@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,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.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,CAAC,CAAC,CAAC,KAAK,EAC5C,YAAY,EAAE,qBAAY,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"}
@@ -1,174 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.innerChildrenContainerStyles = exports.getChildrenContainerStyles = exports.getHeaderStyles = exports.getInnerContainerStyles = exports.getDrawerShadowStyles = exports.getDrawerStyles = exports.drawerClassName = exports.drawerTransitionDuration = void 0;
4
- const emotion_1 = require("@leafygreen-ui/emotion");
5
- const lib_1 = require("@leafygreen-ui/lib");
6
- const tokens_1 = require("@leafygreen-ui/tokens");
7
- const constants_1 = require("../constants");
8
- const drawer_constants_1 = require("./drawer.constants");
9
- const drawer_types_1 = require("./drawer.types");
10
- exports.drawerTransitionDuration = tokens_1.transitionDuration.slower;
11
- exports.drawerClassName = (0, lib_1.createUniqueClassName)('lg-drawer');
12
- // Because of .show() and .close() in the drawer component, transitioning from 0px to (x)px does not transition correctly. Having the drawer start at the open position while hidden, moving to the closed position, and then animating to the open position is a workaround to get the animation to work.
13
- // These styles are used for a standalone drawer in overlay mode since it is not part of a grid layout.
14
- const drawerIn = (0, emotion_1.keyframes) `
15
- 0% {
16
- transform: translate3d(0%, 0, 0);
17
- opacity: 0;
18
- visibility: hidden;
19
- }
20
- 1% {
21
- transform: translate3d(100%, 0, 0);
22
- opacity: 1;
23
- visibility: visible;
24
- }
25
- 100% {
26
- transform: translate3d(0%, 0, 0);
27
- }
28
- `;
29
- // Keep the drawer opacity at 1 until the end of the animation. The inner container opacity is transitioned separately.
30
- const drawerOut = (0, emotion_1.keyframes) `
31
- 0% {
32
- transform: translate3d(0%, 0, 0);
33
- }
34
- 99% {
35
- transform: translate3d(100%, 0, 0);
36
- opacity: 1;
37
- }
38
- 100% {
39
- opacity: 0;
40
- visibility: hidden;
41
- }
42
- `;
43
- const getBaseStyles = ({ theme }) => (0, emotion_1.css) `
44
- all: unset;
45
- background-color: ${tokens_1.color[theme].background.primary.default};
46
- border: 1px solid ${tokens_1.color[theme].border.secondary.default};
47
- max-width: ${constants_1.PANEL_WIDTH}px;
48
- height: 100%;
49
- overflow: hidden;
50
- box-sizing: border-box;
51
-
52
- @media only screen and (max-width: ${drawer_constants_1.MOBILE_BREAKPOINT}px) {
53
- max-width: 100%;
54
- height: 50vh;
55
- }
56
- `;
57
- const overlayOpenStyles = (0, emotion_1.css) `
58
- opacity: 1;
59
- animation-name: ${drawerIn};
60
-
61
- // On mobile, the drawer should be positioned at the bottom of the screen when closed, and slide up to the top when opened.
62
- @media only screen and (max-width: ${drawer_constants_1.MOBILE_BREAKPOINT}px) {
63
- transform: none;
64
- }
65
- `;
66
- const overlayClosedStyles = (0, emotion_1.css) `
67
- pointer-events: none;
68
- animation-name: ${drawerOut};
69
-
70
- // On mobile, the drawer should be positioned at the bottom of the screen when closed, and slide up to the top when opened.
71
- @media only screen and (max-width: ${drawer_constants_1.MOBILE_BREAKPOINT}px) {
72
- transform: translate3d(0, 100%, 0);
73
- opacity: 0;
74
- }
75
- `;
76
- const getOverlayStyles = ({ open, shouldAnimate, zIndex, }) => (0, emotion_1.cx)((0, emotion_1.css) `
77
- position: absolute;
78
- z-index: ${zIndex};
79
- top: 0;
80
- bottom: 0;
81
- right: 0;
82
- overflow: visible;
83
-
84
- // By default, the drawer is positioned off-screen to the right.
85
- transform: translate3d(100%, 0, 0);
86
- animation-timing-function: ease-in-out;
87
- animation-duration: ${exports.drawerTransitionDuration}ms;
88
- animation-fill-mode: forwards;
89
-
90
- @media only screen and (max-width: ${drawer_constants_1.MOBILE_BREAKPOINT}px) {
91
- top: unset;
92
- left: 0;
93
- // Since the drawer has position: fixed, we can use normal transitions
94
- animation: none;
95
- position: fixed;
96
- transform: translate3d(0, 100%, 0);
97
- transition: transform ${exports.drawerTransitionDuration}ms ease-in-out,
98
- opacity ${exports.drawerTransitionDuration}ms ease-in-out
99
- ${open ? '0ms' : `${exports.drawerTransitionDuration}ms`};
100
- }
101
- `, {
102
- [overlayOpenStyles]: open,
103
- [overlayClosedStyles]: !open && shouldAnimate, // This ensures that the drawer does not animate closed on initial render
104
- });
105
- const getDisplayModeStyles = ({ displayMode, open, shouldAnimate, zIndex, }) => (0, emotion_1.cx)({
106
- [getOverlayStyles({ open, shouldAnimate, zIndex })]: displayMode === drawer_types_1.DisplayMode.Overlay,
107
- });
108
- const getDrawerStyles = ({ className, displayMode, open, shouldAnimate, theme, zIndex, }) => (0, emotion_1.cx)(getBaseStyles({ theme }), getDisplayModeStyles({ displayMode, open, shouldAnimate, zIndex }), className, exports.drawerClassName);
109
- exports.getDrawerStyles = getDrawerStyles;
110
- const getDrawerShadowStyles = ({ theme, displayMode, }) => (0, emotion_1.cx)((0, emotion_1.css) `
111
- height: 100%;
112
- background-color: ${tokens_1.color[theme].background.primary.default};
113
- `, {
114
- [(0, emotion_1.css) `
115
- ${(0, tokens_1.addOverflowShadow)({ isInside: false, side: tokens_1.Side.Left, theme })};
116
-
117
- @media only screen and (max-width: ${drawer_constants_1.MOBILE_BREAKPOINT}px) {
118
- ${(0, tokens_1.addOverflowShadow)({ isInside: false, side: tokens_1.Side.Top, theme })};
119
- }
120
- `]: displayMode === drawer_types_1.DisplayMode.Overlay,
121
- });
122
- exports.getDrawerShadowStyles = getDrawerShadowStyles;
123
- const getBaseInnerContainerStyles = ({ theme }) => (0, emotion_1.css) `
124
- width: 100%;
125
- height: 100%;
126
- display: flex;
127
- flex-direction: column;
128
- background-color: ${tokens_1.color[theme].background.primary.default};
129
- opacity: 0;
130
- transition-property: opacity;
131
- transition-duration: ${tokens_1.transitionDuration.faster}ms;
132
- transition-timing-function: linear;
133
- `;
134
- const getInnerOpenContainerStyles = (0, emotion_1.css) `
135
- transition-property: opacity;
136
- transition-duration: ${tokens_1.transitionDuration.slowest}ms;
137
- transition-timing-function: linear;
138
- opacity: 1;
139
- width: ${constants_1.PANEL_WIDTH}px;
140
- `;
141
- const getInnerContainerStyles = ({ theme, open, }) => (0, emotion_1.cx)(getBaseInnerContainerStyles({ theme }), {
142
- [getInnerOpenContainerStyles]: open,
143
- });
144
- exports.getInnerContainerStyles = getInnerContainerStyles;
145
- const getHeaderStyles = ({ theme }) => (0, emotion_1.css) `
146
- height: ${drawer_constants_1.HEADER_HEIGHT}px;
147
- padding: ${tokens_1.spacing[400]}px;
148
- display: flex;
149
- justify-content: space-between;
150
- align-items: center;
151
- border-bottom: 1px solid ${tokens_1.color[theme].border.secondary.default};
152
- transition-property: box-shadow;
153
- transition-duration: ${tokens_1.transitionDuration.faster}ms;
154
- transition-timing-function: ease-in-out;
155
- `;
156
- exports.getHeaderStyles = getHeaderStyles;
157
- const baseChildrenContainerStyles = (0, emotion_1.css) `
158
- height: 100%;
159
- overflow: hidden;
160
- `;
161
- const getChildrenContainerStyles = ({ hasShadowTop, theme, }) => (0, emotion_1.cx)(baseChildrenContainerStyles, {
162
- [(0, tokens_1.addOverflowShadow)({ isInside: true, side: tokens_1.Side.Top, theme })]: hasShadowTop,
163
- });
164
- exports.getChildrenContainerStyles = getChildrenContainerStyles;
165
- const baseInnerChildrenContainerStyles = (0, emotion_1.css) `
166
- height: 100%;
167
- `;
168
- const scrollContainerStyles = (0, emotion_1.css) `
169
- padding: ${tokens_1.spacing[400]}px;
170
- overflow-y: auto;
171
- overscroll-behavior: contain;
172
- `;
173
- exports.innerChildrenContainerStyles = (0, emotion_1.cx)(baseInnerChildrenContainerStyles, scrollContainerStyles);
174
- //# sourceMappingURL=drawer.styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.styles.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/drawer.styles.ts"],"names":[],"mappings":";;;AAAA,oDAA4D;AAC5D,4CAAuE;AACvE,kDAM+B;AAE/B,4CAA2C;AAE3C,yDAAsE;AACtE,iDAA6C;AAEhC,QAAA,wBAAwB,GAAG,2BAAkB,CAAC,MAAM,CAAC;AAErD,QAAA,eAAe,GAAG,IAAA,2BAAqB,EAAC,WAAW,CAAC,CAAC;AAElE,0SAA0S;AAC1S,uGAAuG;AACvG,MAAM,QAAQ,GAAG,IAAA,mBAAS,EAAA;;;;;;;;;;;;;;CAczB,CAAC;AAEF,uHAAuH;AACvH,MAAM,SAAS,GAAG,IAAA,mBAAS,EAAA;;;;;;;;;;;;CAY1B,CAAC;AA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,EAAE,CAAC,EAAE;IACzC,CAAC,2BAA2B,CAAC,EAAE,IAAI;CACpC,CAAC,CAAC;AATQ,QAAA,uBAAuB,2BAS/B;AAEE,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK,EAAoB,EAAE,EAAE,CAAC,IAAA,aAAG,EAAA;YACvD,gCAAa;aACZ,gBAAO,CAAC,GAAG,CAAC;;;;6BAII,cAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO;;yBAEzC,2BAAkB,CAAC,MAAM;;CAEjD,CAAC;AAVW,QAAA,eAAe,mBAU1B;AAEF,MAAM,2BAA2B,GAAG,IAAA,aAAG,EAAA;;;CAGtC,CAAC;AAEK,MAAM,0BAA0B,GAAG,CAAC,EACzC,YAAY,EACZ,KAAK,GAIN,EAAE,EAAE,CACH,IAAA,YAAE,EAAC,2BAA2B,EAAE;IAC9B,CAAC,IAAA,0BAAiB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,aAAI,CAAC,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,EAC5D,YAAY;CACf,CAAC,CAAC;AAVQ,QAAA,0BAA0B,8BAUlC;AAEL,MAAM,gCAAgC,GAAG,IAAA,aAAG,EAAA;;CAE3C,CAAC;AAEF,MAAM,qBAAqB,GAAG,IAAA,aAAG,EAAA;aACpB,gBAAO,CAAC,GAAG,CAAC;;;CAGxB,CAAC;AAEW,QAAA,4BAA4B,GAAG,IAAA,YAAE,EAC5C,gCAAgC,EAChC,qBAAqB,CACtB,CAAC"}
@@ -1,40 +0,0 @@
1
- import type React from 'react';
2
- import type { DarkModeProps, HTMLElementProps, LgIdProps } from '@leafygreen-ui/lib';
3
- /**
4
- * Options to control how the drawer element is displayed
5
- * @param Embedded will display a drawer as a `<div>` element that takes up the full parent container height and on the same elevation as container page content. It is recommended to wrap an embedded drawer within the `DrawerLayout` container
6
- * @param Overlay will display a drawer as a `<dialog>` element that takes up the full parent container height and elevated above container page content. It is recommended to wrap an overlay drawer within the `DrawerLayout` container
7
- */
8
- export declare const DisplayMode: {
9
- readonly Embedded: "embedded";
10
- readonly Overlay: "overlay";
11
- };
12
- export type DisplayMode = (typeof DisplayMode)[keyof typeof DisplayMode];
13
- export interface DrawerProps extends Omit<HTMLElementProps<'dialog' | 'div'>, 'title'>, DarkModeProps, LgIdProps {
14
- /**
15
- * Options to display the drawer element
16
- * @defaultValue 'overlay'
17
- * @param Embedded will display a drawer as a `<div>` element that takes up the full parent container height and on the same elevation as container page content. It is recommended to wrap an embedded drawer within the `DrawerLayout` container
18
- * @param Overlay will display a drawer as a `<dialog>` element that takes up the full parent container height and elevated above container page content. It is recommended to wrap an overlay drawer within the `DrawerLayout` container
19
- */
20
- displayMode?: DisplayMode;
21
- /**
22
- * Determines if the Drawer is open or closed
23
- * @defaultValue false
24
- */
25
- open?: boolean;
26
- /**
27
- * Event handler called on close button click. If provided, a close button will be rendered in the Drawer header.
28
- */
29
- onClose?: React.MouseEventHandler<HTMLButtonElement>;
30
- /**
31
- * Title of the Drawer
32
- */
33
- title: React.ReactNode;
34
- /**
35
- * Determines if the Drawer has padding
36
- * @defaultValue true
37
- */
38
- hasPadding?: boolean;
39
- }
40
- //# sourceMappingURL=drawer.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/drawer.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,SAAS,EACV,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;CAGd,CAAC;AACX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE,MAAM,WAAW,WACf,SAAQ,IAAI,CAAC,gBAAgB,CAAC,QAAQ,GAAG,KAAK,CAAC,EAAE,OAAO,CAAC,EACvD,aAAa,EACb,SAAS;IACX;;;;;OAKG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAErD;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IAEvB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DisplayMode = void 0;
4
- /**
5
- * Options to control how the drawer element is displayed
6
- * @param Embedded will display a drawer as a `<div>` element that takes up the full parent container height and on the same elevation as container page content. It is recommended to wrap an embedded drawer within the `DrawerLayout` container
7
- * @param Overlay will display a drawer as a `<dialog>` element that takes up the full parent container height and elevated above container page content. It is recommended to wrap an overlay drawer within the `DrawerLayout` container
8
- */
9
- exports.DisplayMode = {
10
- Embedded: 'embedded',
11
- Overlay: 'overlay',
12
- };
13
- //# sourceMappingURL=drawer.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer.types.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/drawer.types.ts"],"names":[],"mappings":";;;AAQA;;;;GAIG;AACU,QAAA,WAAW,GAAG;IACzB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;CACV,CAAC"}
@@ -1,5 +0,0 @@
1
- export { Drawer } from './drawer';
2
- export { MOBILE_BREAKPOINT } from './drawer.constants';
3
- export { drawerClassName } from './drawer.styles';
4
- export { DisplayMode, type DrawerProps } from './drawer.types';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DisplayMode = exports.drawerClassName = exports.MOBILE_BREAKPOINT = exports.Drawer = void 0;
4
- var drawer_1 = require("./drawer");
5
- Object.defineProperty(exports, "Drawer", { enumerable: true, get: function () { return drawer_1.Drawer; } });
6
- var drawer_constants_1 = require("./drawer.constants");
7
- Object.defineProperty(exports, "MOBILE_BREAKPOINT", { enumerable: true, get: function () { return drawer_constants_1.MOBILE_BREAKPOINT; } });
8
- var drawer_styles_1 = require("./drawer.styles");
9
- Object.defineProperty(exports, "drawerClassName", { enumerable: true, get: function () { return drawer_styles_1.drawerClassName; } });
10
- var drawer_types_1 = require("./drawer.types");
11
- Object.defineProperty(exports, "DisplayMode", { enumerable: true, get: function () { return drawer_types_1.DisplayMode; } });
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AACf,uDAAuD;AAA9C,qHAAA,iBAAiB,OAAA;AAC1B,iDAAkD;AAAzC,gHAAA,eAAe,OAAA;AACxB,+CAA+D;AAAtD,2GAAA,WAAW,OAAA"}
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * `DrawerLayout` is a component that provides a flexible layout for displaying content in a drawer.
4
- * It can be used in both `overlay` and `embedded` modes, with or without a `Toolbar`.
5
- */
6
- export declare const DrawerLayout: React.ForwardRefExoticComponent<(Omit<{
7
- toolbarData: import("./drawer-layout.types").DrawerLayoutPropsWithToolbar["toolbarData"];
8
- } & Omit<import("../drawer-toolbar-layout").DrawerToolbarLayoutProps, "displayMode"> & {
9
- isDrawerOpen?: never;
10
- } & import("./drawer-layout.types").BaseDrawerLayoutProps, "ref"> | Omit<{
11
- toolbarData?: never;
12
- } & Omit<import("../layout-component").LayoutComponentProps, "displayMode" | "isDrawerOpen"> & {
13
- toolbarData?: never;
14
- onClose?: never;
15
- isDrawerOpen?: boolean;
16
- } & import("./drawer-layout.types").BaseDrawerLayoutProps, "ref">) & React.RefAttributes<HTMLDivElement>>;
17
- //# sourceMappingURL=drawer-layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-layout.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-layout/drawer-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C;;;GAGG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;yGA0CxB,CAAC"}
@@ -1,57 +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.DrawerLayout = void 0;
37
- const react_1 = __importStar(require("react"));
38
- const lib_1 = require("@leafygreen-ui/lib");
39
- const drawer_types_1 = require("../drawer/drawer.types");
40
- const drawer_toolbar_layout_1 = require("../drawer-toolbar-layout");
41
- const layout_component_1 = require("../layout-component");
42
- /**
43
- * `DrawerLayout` is a component that provides a flexible layout for displaying content in a drawer.
44
- * It can be used in both `overlay` and `embedded` modes, with or without a `Toolbar`.
45
- */
46
- exports.DrawerLayout = (0, react_1.forwardRef)(({ toolbarData, children, displayMode = drawer_types_1.DisplayMode.Overlay, isDrawerOpen = false, ...rest }, forwardedRef) => {
47
- // If there is data, we render the DrawerToolbarLayout.
48
- if (toolbarData) {
49
- return (react_1.default.createElement(drawer_toolbar_layout_1.DrawerToolbarLayout, { ref: forwardedRef, toolbarData: toolbarData, displayMode: displayMode, ...rest }, children));
50
- }
51
- lib_1.consoleOnce.warn('Using a Drawer without a toolbar is not recommended. To include a toolbar, pass a toolbarData prop containing the desired toolbar items.');
52
- // If there is no data, we render the LayoutComponent.
53
- // The LayoutComponent will read the displayMode and render the appropriate layout.
54
- return (react_1.default.createElement(layout_component_1.LayoutComponent, { ref: forwardedRef, displayMode: displayMode, isDrawerOpen: isDrawerOpen, ...rest }, children));
55
- });
56
- exports.DrawerLayout.displayName = 'DrawerLayout';
57
- //# sourceMappingURL=drawer-layout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-layout.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-layout/drawer-layout.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,4CAAiD;AAEjD,yDAAqD;AACrD,oEAA+D;AAC/D,0DAAsD;AAItD;;;GAGG;AACU,QAAA,YAAY,GAAG,IAAA,kBAAU,EACpC,CACE,EACE,WAAW,EACX,QAAQ,EACR,WAAW,GAAG,0BAAW,CAAC,OAAO,EACjC,YAAY,GAAG,KAAK,EACpB,GAAG,IAAI,EACW,EACpB,YAAY,EACZ,EAAE;IACF,uDAAuD;IACvD,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,CACL,8BAAC,2CAAmB,IAClB,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,WAAW,KACpB,IAAI,IAEP,QAAQ,CACW,CACvB,CAAC;IACJ,CAAC;IAED,iBAAW,CAAC,IAAI,CACd,0IAA0I,CAC3I,CAAC;IAEF,sDAAsD;IACtD,mFAAmF;IACnF,OAAO,CACL,8BAAC,kCAAe,IACd,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,KACtB,IAAI,IAEP,QAAQ,CACO,CACnB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
@@ -1,34 +0,0 @@
1
- import type { DarkModeProps, HTMLElementProps } from '@leafygreen-ui/lib';
2
- import type { DrawerProps } from '../drawer/drawer.types';
3
- import type { DrawerToolbarLayoutProps } from '../drawer-toolbar-layout';
4
- import type { LayoutComponentProps } from '../layout-component';
5
- export type PickedDrawerProps = Pick<DrawerProps, 'displayMode'>;
6
- export interface BaseDrawerLayoutProps extends PickedDrawerProps, HTMLElementProps<'div'>, DarkModeProps {
7
- children: React.ReactNode;
8
- }
9
- export type DrawerLayoutPropsWithoutToolbar = Omit<LayoutComponentProps, 'displayMode' | 'isDrawerOpen'> & {
10
- /**
11
- * An array of data that will be used to render the toolbar items and the drawer content.
12
- */
13
- toolbarData?: never;
14
- /**
15
- * Event handler called on close button click. If provided, a close button will be rendered in the Drawer header.
16
- */
17
- onClose?: never;
18
- /**
19
- * Determines if the Drawer is open. This is only needed if using the Drawer without a toolbar. This will shift the layout to the right by the width of the drawer if `displayMode` is set to 'embedded'.
20
- */
21
- isDrawerOpen?: boolean;
22
- } & BaseDrawerLayoutProps;
23
- export type DrawerLayoutPropsWithToolbar = Omit<DrawerToolbarLayoutProps, 'displayMode'> & {
24
- /**
25
- * Determines if the Drawer is open. This is only needed if using the Drawer without a toolbar. This will shift the layout to the right by the width of the drawer if `displayMode` is set to 'embedded'.
26
- */
27
- isDrawerOpen?: never;
28
- } & BaseDrawerLayoutProps;
29
- export type DrawerLayoutProps = ({
30
- toolbarData: DrawerLayoutPropsWithToolbar['toolbarData'];
31
- } & DrawerLayoutPropsWithToolbar) | ({
32
- toolbarData?: never;
33
- } & DrawerLayoutPropsWithoutToolbar);
34
- //# sourceMappingURL=drawer-layout.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-layout.types.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-layout/drawer-layout.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACzE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,CAAC;AAEjE,MAAM,WAAW,qBACf,SAAQ,iBAAiB,EACvB,gBAAgB,CAAC,KAAK,CAAC,EACvB,aAAa;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,MAAM,+BAA+B,GAAG,IAAI,CAChD,oBAAoB,EACpB,aAAa,GAAG,cAAc,CAC/B,GAAG;IACF;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,GAAG,qBAAqB,CAAC;AAE1B,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,wBAAwB,EACxB,aAAa,CACd,GAAG;IACF;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,GAAG,qBAAqB,CAAC;AAE1B,MAAM,MAAM,iBAAiB,GACzB,CAAC;IACC,WAAW,EAAE,4BAA4B,CAAC,aAAa,CAAC,CAAC;CAC1D,GAAG,4BAA4B,CAAC,GACjC,CAAC;IAAE,WAAW,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG,+BAA+B,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=drawer-layout.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-layout.types.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-layout/drawer-layout.types.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export { DrawerLayout } from './drawer-layout';
2
- export type { DrawerLayoutProps } from './drawer-layout.types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DrawerLayout = void 0;
4
- var drawer_layout_1 = require("./drawer-layout");
5
- Object.defineProperty(exports, "DrawerLayout", { enumerable: true, get: function () { return drawer_layout_1.DrawerLayout; } });
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-layout/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,6GAAA,YAAY,OAAA"}
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import type { DrawerStackContextType } from './drawer-stack-context.types';
3
- export declare const DrawerStackContext: React.Context<DrawerStackContextType>;
4
- export declare const DrawerStackProvider: ({ children, }: {
5
- children: React.ReactNode;
6
- }) => React.JSX.Element;
7
- export declare const useDrawerStackContext: () => DrawerStackContextType;
8
- //# sourceMappingURL=drawer-stack-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawer-stack-context.d.ts","sourceRoot":"","sources":["../../../../src/components/drawer/drawer-stack-context/drawer-stack-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAE3E,eAAO,MAAM,kBAAkB,uCAI7B,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,eAEjC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,sBAwCA,CAAC;AAEF,eAAO,MAAM,qBAAqB,8BAIjC,CAAC"}