@deephaven/components 1.7.2-react-18-alpha.3 → 1.8.1-beta.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 (64) hide show
  1. package/css/BaseStyleSheet.css +1 -1
  2. package/css/BaseStyleSheet.css.map +1 -1
  3. package/dist/Collapse.d.ts +6 -5
  4. package/dist/Collapse.d.ts.map +1 -1
  5. package/dist/Collapse.js +40 -22
  6. package/dist/Collapse.js.map +1 -1
  7. package/dist/DraggableItemList.css.map +1 -1
  8. package/dist/DraggableItemList.d.ts +5 -5
  9. package/dist/DraggableItemList.d.ts.map +1 -1
  10. package/dist/DraggableItemList.js +5 -5
  11. package/dist/DraggableItemList.js.map +1 -1
  12. package/dist/LoadingOverlay.d.ts.map +1 -1
  13. package/dist/LoadingOverlay.js +4 -1
  14. package/dist/LoadingOverlay.js.map +1 -1
  15. package/dist/ToastNotification.d.ts.map +1 -1
  16. package/dist/ToastNotification.js +4 -1
  17. package/dist/ToastNotification.js.map +1 -1
  18. package/dist/modal/Modal.d.ts.map +1 -1
  19. package/dist/modal/Modal.js +4 -0
  20. package/dist/modal/Modal.js.map +1 -1
  21. package/dist/navigation/NavTab.js +1 -1
  22. package/dist/navigation/NavTab.js.map +1 -1
  23. package/dist/navigation/NavTabList.js +1 -1
  24. package/dist/navigation/NavTabList.js.map +1 -1
  25. package/dist/popper/Popper.d.ts +1 -0
  26. package/dist/popper/Popper.d.ts.map +1 -1
  27. package/dist/popper/Popper.js +3 -0
  28. package/dist/popper/Popper.js.map +1 -1
  29. package/dist/shortcuts/GlobalShortcuts.d.ts +2 -0
  30. package/dist/shortcuts/GlobalShortcuts.d.ts.map +1 -1
  31. package/dist/shortcuts/GlobalShortcuts.js +14 -0
  32. package/dist/shortcuts/GlobalShortcuts.js.map +1 -1
  33. package/dist/spectrum/SpectrumMenu.css +11 -0
  34. package/dist/spectrum/SpectrumMenu.css.map +1 -0
  35. package/dist/spectrum/SpectrumMenu.d.ts +3 -0
  36. package/dist/spectrum/SpectrumMenu.d.ts.map +1 -0
  37. package/dist/spectrum/SpectrumMenu.js +3 -0
  38. package/dist/spectrum/SpectrumMenu.js.map +1 -0
  39. package/dist/spectrum/collections.d.ts +2 -1
  40. package/dist/spectrum/collections.d.ts.map +1 -1
  41. package/dist/spectrum/collections.js +3 -2
  42. package/dist/spectrum/collections.js.map +1 -1
  43. package/dist/theme/FontBootstrap.d.ts +30 -0
  44. package/dist/theme/FontBootstrap.d.ts.map +1 -0
  45. package/dist/theme/FontBootstrap.js +49 -0
  46. package/dist/theme/FontBootstrap.js.map +1 -0
  47. package/dist/theme/FontsLoaded.d.ts +8 -0
  48. package/dist/theme/FontsLoaded.d.ts.map +1 -0
  49. package/dist/theme/FontsLoaded.js +22 -0
  50. package/dist/theme/FontsLoaded.js.map +1 -0
  51. package/dist/theme/index.d.ts +2 -0
  52. package/dist/theme/index.d.ts.map +1 -1
  53. package/dist/theme/index.js +2 -0
  54. package/dist/theme/index.js.map +1 -1
  55. package/dist/transitions/FadeTransition.d.ts +7 -4
  56. package/dist/transitions/FadeTransition.d.ts.map +1 -1
  57. package/dist/transitions/FadeTransition.js +34 -6
  58. package/dist/transitions/FadeTransition.js.map +1 -1
  59. package/dist/transitions/SlideTransition.d.ts +5 -4
  60. package/dist/transitions/SlideTransition.d.ts.map +1 -1
  61. package/dist/transitions/SlideTransition.js +24 -6
  62. package/dist/transitions/SlideTransition.js.map +1 -1
  63. package/package.json +11 -9
  64. package/scss/BaseStyleSheet.scss +1 -1
@@ -0,0 +1,49 @@
1
+ import React, { createContext, useEffect, useState } from 'react';
2
+ import '@fontsource/fira-mono/400.css';
3
+ import '@fontsource/fira-mono/500.css';
4
+ import '@fontsource/fira-mono/700.css';
5
+ import '@fontsource/fira-sans/300.css';
6
+ import '@fontsource/fira-sans/300-italic.css';
7
+ import '@fontsource/fira-sans/400.css';
8
+ import '@fontsource/fira-sans/400-italic.css';
9
+ import '@fontsource/fira-sans/500.css';
10
+ import '@fontsource/fira-sans/600.css';
11
+ import '@fontsource/fira-sans/700.css';
12
+ import '@fontsource/fira-sans/700-italic.css';
13
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
14
+ export var FontsLoadedContext = /*#__PURE__*/createContext(false);
15
+ FontsLoadedContext.displayName = 'FontsLoadedContext';
16
+ /**
17
+ * FontBootstrap component. Handles preloading fonts.
18
+ */
19
+ export function FontBootstrap(_ref) {
20
+ var {
21
+ fontClassNames = ['fira-sans-regular', 'fira-sans-semibold', 'fira-mono'],
22
+ children
23
+ } = _ref;
24
+ var [isLoaded, setIsLoaded] = useState(false);
25
+ useEffect(function initFonts() {
26
+ document.fonts.ready.then(() => {
27
+ setIsLoaded(true);
28
+ });
29
+ }, []);
30
+ return /*#__PURE__*/_jsxs(_Fragment, {
31
+ children: [/*#__PURE__*/_jsx(FontsLoadedContext.Provider, {
32
+ value: isLoaded,
33
+ children: children
34
+ }), /*#__PURE__*/_jsx("div", {
35
+ id: "preload-fonts",
36
+ style: {
37
+ visibility: 'hidden',
38
+ position: 'absolute',
39
+ top: -10000
40
+ },
41
+ children: fontClassNames.map(className => /*#__PURE__*/_jsx("p", {
42
+ className: className,
43
+ children: "preload"
44
+ }, className))
45
+ })]
46
+ });
47
+ }
48
+ export default FontBootstrap;
49
+ //# sourceMappingURL=FontBootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontBootstrap.js","names":["React","createContext","useEffect","useState","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FontsLoadedContext","displayName","FontBootstrap","_ref","fontClassNames","children","isLoaded","setIsLoaded","initFonts","document","fonts","ready","then","Provider","value","id","style","visibility","position","top","map","className"],"sources":["../../src/theme/FontBootstrap.tsx"],"sourcesContent":["import React, { createContext, useEffect, useState } from 'react';\nimport '@fontsource/fira-mono/400.css';\nimport '@fontsource/fira-mono/500.css';\nimport '@fontsource/fira-mono/700.css';\nimport '@fontsource/fira-sans/300.css';\nimport '@fontsource/fira-sans/300-italic.css';\nimport '@fontsource/fira-sans/400.css';\nimport '@fontsource/fira-sans/400-italic.css';\nimport '@fontsource/fira-sans/500.css';\nimport '@fontsource/fira-sans/600.css';\nimport '@fontsource/fira-sans/700.css';\nimport '@fontsource/fira-sans/700-italic.css';\n\nexport const FontsLoadedContext = createContext<boolean>(false);\nFontsLoadedContext.displayName = 'FontsLoadedContext';\n\nexport type FontBootstrapProps = {\n /**\n * Class names of the font elements to pre load\n */\n fontClassNames?: string[];\n\n /**\n * The children to render wrapped with the FontsLoadedContext.\n * Note that it renders the children even if the fonts aren't loaded yet.\n */\n children: React.ReactNode;\n};\n\n/**\n * FontBootstrap component. Handles preloading fonts.\n */\nexport function FontBootstrap({\n fontClassNames = ['fira-sans-regular', 'fira-sans-semibold', 'fira-mono'],\n children,\n}: FontBootstrapProps): JSX.Element {\n const [isLoaded, setIsLoaded] = useState(false);\n useEffect(function initFonts() {\n document.fonts.ready.then(() => {\n setIsLoaded(true);\n });\n }, []);\n\n return (\n <>\n <FontsLoadedContext.Provider value={isLoaded}>\n {children}\n </FontsLoadedContext.Provider>\n {/*\n Need to preload any monaco and Deephaven grid fonts.\n We hide text with all the fonts we need on the root app.jsx page\n Load the Fira Mono font so that Monaco calculates word wrapping properly.\n This element doesn't need to be visible, just load the font and stay hidden.\n https://github.com/microsoft/vscode/issues/88689\n Can be replaced with a rel=\"preload\" when firefox adds support\n https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content\n */}\n <div\n id=\"preload-fonts\"\n style={{ visibility: 'hidden', position: 'absolute', top: -10000 }}\n >\n {/* trigger loading of fonts needed by monaco and iris grid */}\n {fontClassNames.map(className => (\n <p key={className} className={className}>\n preload\n </p>\n ))}\n </div>\n </>\n );\n}\n\nexport default FontBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AACjE,OAAO,+BAA+B;AACtC,OAAO,+B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,EAAC;MAEzC,GAFQgB,SAEL,CACJ;IAAC,CACC,CAAC;EAAA,CACN,CAAC;AAEP;AAEA,eAAenB,aAAa","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ export type FontsLoadedProps = {
3
+ /** Children to show when the fonts have completed loading */
4
+ children: React.ReactNode;
5
+ };
6
+ export declare function FontsLoaded({ children }: FontsLoadedProps): JSX.Element;
7
+ export default FontsLoaded;
8
+ //# sourceMappingURL=FontsLoaded.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontsLoaded.d.ts","sourceRoot":"","sources":["../../src/theme/FontsLoaded.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,6DAA6D;IAC7D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CASvE;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,22 @@
1
+ import React, { useContext } from 'react';
2
+ import LoadingOverlay from "../LoadingOverlay.js";
3
+ import { FontsLoadedContext } from "./FontBootstrap.js";
4
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
5
+ export function FontsLoaded(_ref) {
6
+ var {
7
+ children
8
+ } = _ref;
9
+ var isFontsLoaded = useContext(FontsLoadedContext);
10
+ if (!isFontsLoaded) {
11
+ return /*#__PURE__*/_jsx(LoadingOverlay, {
12
+ "data-testid": "fonts-loaded-loading"
13
+ });
14
+ }
15
+
16
+ // eslint-disable-next-line react/jsx-no-useless-fragment
17
+ return /*#__PURE__*/_jsx(_Fragment, {
18
+ children: children
19
+ });
20
+ }
21
+ export default FontsLoaded;
22
+ //# sourceMappingURL=FontsLoaded.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontsLoaded.js","names":["React","useContext","LoadingOverlay","FontsLoadedContext","jsx","_jsx","Fragment","_Fragment","FontsLoaded","_ref","children","isFontsLoaded"],"sources":["../../src/theme/FontsLoaded.tsx"],"sourcesContent":["import React, { useContext } from 'react';\nimport LoadingOverlay from '../LoadingOverlay';\nimport { FontsLoadedContext } from './FontBootstrap';\n\nexport type FontsLoadedProps = {\n /** Children to show when the fonts have completed loading */\n children: React.ReactNode;\n};\n\nexport function FontsLoaded({ children }: FontsLoadedProps): JSX.Element {\n const isFontsLoaded = useContext(FontsLoadedContext);\n\n if (!isFontsLoaded) {\n return <LoadingOverlay data-testid=\"fonts-loaded-loading\" />;\n }\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <>{children}</>;\n}\n\nexport default FontsLoaded;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AAAC,OACnCC,cAAc;AAAA,SACZC,kBAAkB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAO3B,OAAO,SAASC,WAAWA,CAAAC,IAAA,EAA8C;EAAA,IAA7C;IAAEC;EAA2B,CAAC,GAAAD,IAAA;EACxD,IAAME,aAAa,GAAGV,UAAU,CAACE,kBAAkB,CAAC;EAEpD,IAAI,CAACQ,aAAa,EAAE;IAClB,oBAAON,IAAA,CAACH,cAAc;MAAC,eAAY;IAAsB,CAAE,CAAC;EAC9D;;EAEA;EACA,oBAAOG,IAAA,CAAAE,SAAA;IAAAG,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB;AAEA,eAAeF,WAAW","ignoreList":[]}
@@ -9,4 +9,6 @@ export * from './Logo';
9
9
  export * from './colorUtils';
10
10
  export * from './useExternalTheme';
11
11
  export * from './useSpectrumThemeProvider';
12
+ export * from './FontsLoaded';
13
+ export * from './FontBootstrap';
12
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
@@ -9,4 +9,6 @@ export * from "./Logo.js";
9
9
  export * from "./colorUtils.js";
10
10
  export * from "./useExternalTheme.js";
11
11
  export * from "./useSpectrumThemeProvider.js";
12
+ export * from "./FontsLoaded.js";
13
+ export * from "./FontBootstrap.js";
12
14
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './theme-dark';\nexport * from './theme-light';\nexport * from './ThemeModel';\nexport * from './ThemePicker';\nexport * from './ThemeProvider';\nexport * from './ThemeUtils';\nexport * from './useTheme';\nexport * from './Logo';\nexport * from './colorUtils';\nexport * from './useExternalTheme';\nexport * from './useSpectrumThemeProvider';\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/theme/index.ts"],"sourcesContent":["export * from './theme-dark';\nexport * from './theme-light';\nexport * from './ThemeModel';\nexport * from './ThemePicker';\nexport * from './ThemeProvider';\nexport * from './ThemeUtils';\nexport * from './useTheme';\nexport * from './Logo';\nexport * from './colorUtils';\nexport * from './useExternalTheme';\nexport * from './useSpectrumThemeProvider';\nexport * from './FontsLoaded';\nexport * from './FontBootstrap';\n"],"mappings":"","ignoreList":[]}
@@ -1,11 +1,14 @@
1
1
  import type { CSSTransitionProps } from 'react-transition-group/CSSTransition';
2
- import type { EndHandler } from 'react-transition-group/Transition';
3
- type FadeTransitionProps<Ref extends undefined | HTMLElement = undefined> = Omit<CSSTransitionProps<Ref>, 'addEndHandler'> & {
4
- addEndHandler?: EndHandler<Ref> | undefined;
2
+ import type { EndHandler, EnterHandler } from 'react-transition-group/Transition';
3
+ import type { RemoveIndexSignature } from '@deephaven/utils';
4
+ type FadeTransitionProps = Omit<RemoveIndexSignature<CSSTransitionProps<HTMLElement>>, 'addEndHandler' | 'children' | 'onEnter'> & {
5
+ addEndHandler?: EndHandler<HTMLElement> | undefined;
6
+ onEnter?: EnterHandler<undefined>;
7
+ children?: React.ReactNode;
5
8
  };
6
9
  /**
7
10
  * Fade between two components. Defaults to 150ms transition.
8
11
  */
9
- declare function FadeTransition<Ref extends undefined | HTMLElement = undefined>({ className, timeout, ...props }: FadeTransitionProps<Ref>): JSX.Element;
12
+ declare function FadeTransition({ classNames: classNamesProp, timeout, children, onEnter, ...props }: FadeTransitionProps): JSX.Element;
10
13
  export default FadeTransition;
11
14
  //# sourceMappingURL=FadeTransition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FadeTransition.d.ts","sourceRoot":"","sources":["../../src/transitions/FadeTransition.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAIpE,KAAK,mBAAmB,CAAC,GAAG,SAAS,SAAS,GAAG,WAAW,GAAG,SAAS,IAItE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,GAAG;IAC/C,aAAa,CAAC,EAAE,UAAU,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEJ;;GAEG;AACH,iBAAS,cAAc,CAAC,GAAG,SAAS,SAAS,GAAG,WAAW,GAAG,SAAS,EAAE,EACvE,SAAS,EACT,OAAkC,EAClC,GAAG,KAAK,EACT,EAAE,mBAAmB,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,OAAO,CASxC;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"FadeTransition.d.ts","sourceRoot":"","sources":["../../src/transitions/FadeTransition.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACb,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAK7D,KAAK,mBAAmB,GAItB,IAAI,CACF,oBAAoB,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC,EACrD,eAAe,GAAG,UAAU,GAAG,SAAS,CACzC,GAAG;IACF,aAAa,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC;IACpD,OAAO,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEJ;;GAEG;AACH,iBAAS,cAAc,CAAC,EACtB,UAAU,EAAE,cAAc,EAC1B,OAAkC,EAClC,QAAQ,EACR,OAAO,EACP,GAAG,KAAK,EACT,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAiCnC;AAED,eAAe,cAAc,CAAC"}
@@ -1,4 +1,4 @@
1
- var _excluded = ["className", "timeout"];
1
+ var _excluded = ["classNames", "timeout", "children", "onEnter"];
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -6,24 +6,52 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
8
8
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9
+ import { useCallback, useRef } from 'react';
9
10
  import { CSSTransition } from 'react-transition-group';
10
11
  import classNames from 'classnames';
11
12
  import ThemeExport from "../ThemeExport.js";
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
+ var DISPLAY_CONTENTS = {
15
+ display: 'contents'
16
+ };
13
17
  /**
14
18
  * Fade between two components. Defaults to 150ms transition.
15
19
  */
16
20
  function FadeTransition(_ref) {
17
21
  var {
18
- className,
19
- timeout = ThemeExport.transitionMs
22
+ classNames: classNamesProp,
23
+ timeout = ThemeExport.transitionMs,
24
+ children,
25
+ onEnter
20
26
  } = _ref,
21
27
  props = _objectWithoutProperties(_ref, _excluded);
22
- return /*#__PURE__*/_jsx(CSSTransition, _objectSpread({
28
+ var nodeRef = useRef(null);
29
+ var handleOnEnter = useCallback(isAppearing => {
30
+ var elem = nodeRef.current;
31
+ if (!elem) {
32
+ return;
33
+ }
34
+ onEnter === null || onEnter === void 0 || onEnter(elem, isAppearing);
35
+ }, [onEnter]);
36
+
37
+ // Mimics findDOMNode for CSSTransition
38
+ // The ref should be set before CSSTransition does anything with it
39
+ var setRef = useCallback(node => {
40
+ nodeRef.current = node === null || node === void 0 ? void 0 : node.firstElementChild;
41
+ }, []);
42
+ return /*#__PURE__*/_jsx(CSSTransition, _objectSpread(_objectSpread({
43
+ nodeRef: nodeRef,
23
44
  timeout: timeout,
24
- classNames: classNames('fade', className)
45
+ classNames: classNames('fade', classNamesProp),
46
+ onEnter: handleOnEnter
25
47
  // eslint-disable-next-line react/jsx-props-no-spreading
26
- }, props));
48
+ }, props), {}, {
49
+ children: /*#__PURE__*/_jsx("div", {
50
+ ref: setRef,
51
+ style: DISPLAY_CONTENTS,
52
+ children: children
53
+ })
54
+ }));
27
55
  }
28
56
  export default FadeTransition;
29
57
  //# sourceMappingURL=FadeTransition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FadeTransition.js","names":["CSSTransition","classNames","ThemeExport","jsx","_jsx","FadeTransition","_ref","className","timeout","transitionMs","props","_objectWithoutProperties","_excluded","_objectSpread"],"sources":["../../src/transitions/FadeTransition.tsx"],"sourcesContent":["import { CSSTransition } from 'react-transition-group';\nimport type { CSSTransitionProps } from 'react-transition-group/CSSTransition';\nimport type { EndHandler } from 'react-transition-group/Transition';\nimport classNames from 'classnames';\nimport ThemeExport from '../ThemeExport';\n\ntype FadeTransitionProps<Ref extends undefined | HTMLElement = undefined> =\n // We default the timeout, so user doesn't need to provide it\n // However, CSSTransitionProps get confused if you don't provide a timeout, it requires an endHandler\n // We're just making the endHandler optional here, as the timeout has a default\n Omit<CSSTransitionProps<Ref>, 'addEndHandler'> & {\n addEndHandler?: EndHandler<Ref> | undefined;\n };\n\n/**\n * Fade between two components. Defaults to 150ms transition.\n */\nfunction FadeTransition<Ref extends undefined | HTMLElement = undefined>({\n className,\n timeout = ThemeExport.transitionMs,\n ...props\n}: FadeTransitionProps<Ref>): JSX.Element {\n return (\n <CSSTransition\n timeout={timeout}\n classNames={classNames('fade', className)}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n );\n}\n\nexport default FadeTransition;\n"],"mappings":";;;;;;;;AAAA,SAASA,aAAa,QAAQ,wBAAwB;AAGtD,OAAOC,UAAU,MAAM,YAAY;AAAC,OAC7BC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUlB;AACA;AACA;AACA,SAASC,cAAcA,CAAAC,IAAA,EAImB;EAAA,IAJ+B;MACvEC,SAAS;MACTC,OAAO,GAAGN,WAAW,CAACO;IAEE,CAAC,GAAAH,IAAA;IADtBI,KAAK,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA;EAER,oBACER,IAAA,CAACJ,aAAa,EAAAa,aAAA;IACZL,OAAO,EAAEA,OAAQ;IACjBP,UAAU,EAAEA,UAAU,CAAC,MAAM,EAAEM,SAAS;IACxC;EAAA,GACIG,KAAK,CACV,CAAC;AAEN;AAEA,eAAeL,cAAc","ignoreList":[]}
1
+ {"version":3,"file":"FadeTransition.js","names":["useCallback","useRef","CSSTransition","classNames","ThemeExport","jsx","_jsx","DISPLAY_CONTENTS","display","FadeTransition","_ref","classNamesProp","timeout","transitionMs","children","onEnter","props","_objectWithoutProperties","_excluded","nodeRef","handleOnEnter","isAppearing","elem","current","setRef","node","firstElementChild","_objectSpread","ref","style"],"sources":["../../src/transitions/FadeTransition.tsx"],"sourcesContent":["import { useCallback, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport type { CSSTransitionProps } from 'react-transition-group/CSSTransition';\nimport type {\n EndHandler,\n EnterHandler,\n} from 'react-transition-group/Transition';\nimport classNames from 'classnames';\nimport type { RemoveIndexSignature } from '@deephaven/utils';\nimport ThemeExport from '../ThemeExport';\n\nconst DISPLAY_CONTENTS = { display: 'contents' };\n\ntype FadeTransitionProps =\n // We default the timeout, so user doesn't need to provide it\n // However, CSSTransitionProps get confused if you don't provide a timeout, it requires an endHandler\n // We're just making the endHandler optional here, as the timeout has a default\n Omit<\n RemoveIndexSignature<CSSTransitionProps<HTMLElement>>,\n 'addEndHandler' | 'children' | 'onEnter'\n > & {\n addEndHandler?: EndHandler<HTMLElement> | undefined;\n onEnter?: EnterHandler<undefined>;\n children?: React.ReactNode;\n };\n\n/**\n * Fade between two components. Defaults to 150ms transition.\n */\nfunction FadeTransition({\n classNames: classNamesProp,\n timeout = ThemeExport.transitionMs,\n children,\n onEnter,\n ...props\n}: FadeTransitionProps): JSX.Element {\n const nodeRef = useRef<HTMLElement | null>(null);\n const handleOnEnter = useCallback(\n (isAppearing: boolean) => {\n const elem = nodeRef.current;\n if (!elem) {\n return;\n }\n onEnter?.(elem, isAppearing);\n },\n [onEnter]\n );\n\n // Mimics findDOMNode for CSSTransition\n // The ref should be set before CSSTransition does anything with it\n const setRef = useCallback((node: HTMLElement | null) => {\n nodeRef.current = node?.firstElementChild as HTMLElement;\n }, []);\n\n return (\n <CSSTransition\n nodeRef={nodeRef}\n timeout={timeout}\n classNames={classNames('fade', classNamesProp)}\n onEnter={handleOnEnter}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n >\n <div ref={setRef} style={DISPLAY_CONTENTS}>\n {children}\n </div>\n </CSSTransition>\n );\n}\n\nexport default FadeT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,MAAO;MAACK,KAAK,EAAEtB,gBAAiB;MAAAO,QAAA,EACvCA;IAAQ,CACN;EAAC,EACO,CAAC;AAEpB;AAEA,eAAeL,cAAc","ignoreList":[]}
@@ -1,9 +1,10 @@
1
1
  import type { CSSTransitionProps } from 'react-transition-group/CSSTransition';
2
2
  import type { EndHandler } from 'react-transition-group/Transition';
3
+ import type { RemoveIndexSignature } from '@deephaven/utils';
3
4
  type SlideDirection = 'left' | 'right';
4
- type SlideTransitionProps<Ref extends undefined | HTMLElement = undefined> = Omit<CSSTransitionProps<Ref>, 'addEndHandler'> & {
5
- addEndHandler?: EndHandler<Ref> | undefined;
6
- } & {
5
+ type SlideTransitionProps = Omit<RemoveIndexSignature<CSSTransitionProps<HTMLElement>>, 'addEndHandler'> & {
6
+ addEndHandler?: EndHandler<HTMLElement> | undefined;
7
+ children?: React.ReactNode;
7
8
  /**
8
9
  * The direction of the slide transition. Defaults to left.
9
10
  */
@@ -15,7 +16,7 @@ type SlideTransitionProps<Ref extends undefined | HTMLElement = undefined> = Omi
15
16
  * Defaults to sliding left, unless `direction='right'` is provided.
16
17
  * Timeout defaults to 200ms.
17
18
  */
18
- declare function SlideTransition({ direction, className,
19
+ declare function SlideTransition({ direction, classNames: classNamesProp, children,
19
20
  /** Defaults to mid */
20
21
  timeout, ...props }: SlideTransitionProps): JSX.Element;
21
22
  export default SlideTransition;
@@ -1 +1 @@
1
- {"version":3,"file":"SlideTransition.d.ts","sourceRoot":"","sources":["../../src/transitions/SlideTransition.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAKpE,KAAK,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAEvC,KAAK,oBAAoB,CAAC,GAAG,SAAS,SAAS,GAAG,WAAW,GAAG,SAAS,IAIvE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC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"}
@@ -1,4 +1,4 @@
1
- var _excluded = ["direction", "className", "timeout"];
1
+ var _excluded = ["direction", "classNames", "children", "timeout"];
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -7,11 +7,14 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
7
7
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
8
8
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
9
9
  // SlideTransition class uses CSSTransition with slide-left and slide-right classNames, depending on the prop direction. The transition is 250ms long.
10
- //
10
+ import { useCallback, useRef } from 'react';
11
11
  import { CSSTransition } from 'react-transition-group';
12
12
  import classNames from 'classnames';
13
13
  import ThemeExport from "../ThemeExport.js";
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ var DISPLAY_CONTENTS = {
16
+ display: 'contents'
17
+ };
15
18
  /**
16
19
  * Slides one component overtop of another component.
17
20
  * Defaults to sliding left, unless `direction='right'` is provided.
@@ -20,16 +23,31 @@ import { jsx as _jsx } from "react/jsx-runtime";
20
23
  function SlideTransition(_ref) {
21
24
  var {
22
25
  direction = 'left',
23
- className,
26
+ classNames: classNamesProp,
27
+ children,
24
28
  /** Defaults to mid */
25
29
  timeout = ThemeExport.transitionMidMs
26
30
  } = _ref,
27
31
  props = _objectWithoutProperties(_ref, _excluded);
28
- return /*#__PURE__*/_jsx(CSSTransition, _objectSpread({
32
+ var nodeRef = useRef(null);
33
+
34
+ // Mimics findDOMNode for CSSTransition
35
+ // The ref should be set before CSSTransition does anything with it
36
+ var setRef = useCallback(node => {
37
+ nodeRef.current = node === null || node === void 0 ? void 0 : node.firstElementChild;
38
+ }, []);
39
+ return /*#__PURE__*/_jsx(CSSTransition, _objectSpread(_objectSpread({
40
+ nodeRef: nodeRef,
29
41
  timeout: timeout,
30
- classNames: classNames("slide-".concat(direction), className)
42
+ classNames: classNames("slide-".concat(direction), classNamesProp)
31
43
  // eslint-disable-next-line react/jsx-props-no-spreading
32
- }, props));
44
+ }, props), {}, {
45
+ children: /*#__PURE__*/_jsx("div", {
46
+ ref: setRef,
47
+ style: DISPLAY_CONTENTS,
48
+ children: children
49
+ })
50
+ }));
33
51
  }
34
52
  export default SlideTransition;
35
53
  //# sourceMappingURL=SlideTransition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SlideTransition.js","names":["CSSTransition","classNames","ThemeExport","jsx","_jsx","SlideTransition","_ref","direction","className","timeout","transitionMidMs","props","_objectWithoutProperties","_excluded","_objectSpread","concat"],"sources":["../../src/transitions/SlideTransition.tsx"],"sourcesContent":["// SlideTransition class uses CSSTransition with slide-left and slide-right classNames, depending on the prop direction. The transition is 250ms long.\n//\nimport { CSSTransition } from 'react-transition-group';\nimport type { CSSTransitionProps } from 'react-transition-group/CSSTransition';\nimport type { EndHandler } from 'react-transition-group/Transition';\n\nimport classNames from 'classnames';\nimport ThemeExport from '../ThemeExport';\n\ntype SlideDirection = 'left' | 'right';\n\ntype SlideTransitionProps<Ref extends undefined | HTMLElement = undefined> =\n // We default the timeout, so user doesn't need to provide it\n // However, CSSTransitionProps get confused if you don't provide a timeout, it requires an endHandler\n // We're just making the endHandler optional here, as the timeout has a default\n Omit<CSSTransitionProps<Ref>, 'addEndHandler'> & {\n addEndHandler?: EndHandler<Ref> | undefined;\n } & {\n /**\n * The direction of the slide transition. Defaults to left.\n */\n direction?: SlideDirection;\n\n timeout?: number;\n };\n\n/**\n * Slides one component overtop of another component.\n * Defaults to sliding left, unless `direction='right'` is provided.\n * Timeout defaults to 200ms.\n */\nfunction SlideTransition({\n direction = 'left',\n className,\n\n /** Defaults to mid */\n timeout = ThemeExport.transitionMidMs,\n ...props\n}: SlideTransitionProps): JSX.Element {\n return (\n <CSSTransition\n timeout={timeout}\n classNames={classNames(`slide-${direction}`, className)}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n />\n );\n}\n\nexport default SlideTransition;\n"],"mappings":";;;;;;;;AAAA;AACA;AACA,SAASA,aAAa,QAAQ,wBAAwB;AAItD,OAAOC,UAAU,MAAM,YAAY;AAAC,OAC7BC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAmBlB;AACA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAAAC,IAAA,EAOc;EAAA,IAPb;MACvBC,SAAS,GAAG,MAAM;MAClBC,SAAS;MAET;MACAC,OAAO,GAAGP,WAAW,CAACQ;IAEF,CAAC,GAAAJ,IAAA;IADlBK,KAAK,GAAAC,wBAAA,CAAAN,IAAA,EAAAO,SAAA;EAER,oBACET,IAAA,CAACJ,aAAa,EAAAc,aAAA;IACZL,OAAO,EAAEA,OAAQ;IACjBR,UAAU,EAAEA,UAAU,UAAAc,MAAA,CAAUR,SAAS,GAAIC,SAAS;IACtD;EAAA,GACIG,KAAK,CACV,CAAC;AAEN;AAEA,eAAeN,eAAe","ignoreList":[]}
1
+ {"version":3,"file":"SlideTransition.js","names":["useCallback","useRef","CSSTransition","classNames","ThemeExport","jsx","_jsx","DISPLAY_CONTENTS","display","SlideTransition","_ref","direction","classNamesProp","children","timeout","transitionMidMs","props","_objectWithoutProperties","_excluded","nodeRef","setRef","node","current","firstElementChild","_objectSpread","concat","ref","style"],"sources":["../../src/transitions/SlideTransition.tsx"],"sourcesContent":["// SlideTransition class uses CSSTransition with slide-left and slide-right classNames, depending on the prop direction. The transition is 250ms long.\nimport { useCallback, useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\nimport type { CSSTransitionProps } from 'react-transition-group/CSSTransition';\nimport type { EndHandler } from 'react-transition-group/Transition';\nimport classNames from 'classnames';\nimport type { RemoveIndexSignature } from '@deephaven/utils';\nimport ThemeExport from '../ThemeExport';\n\nconst DISPLAY_CONTENTS = { display: 'contents' };\n\ntype SlideDirection = 'left' | 'right';\n\ntype SlideTransitionProps =\n // We default the timeout, so user doesn't need to provide it\n // However, CSSTransitionProps get confused if you don't provide a timeout, it requires an endHandler\n // We're just making the endHandler optional here, as the timeout has a default\n Omit<\n RemoveIndexSignature<CSSTransitionProps<HTMLElement>>,\n 'addEndHandler'\n > & {\n addEndHandler?: EndHandler<HTMLElement> | undefined;\n children?: React.ReactNode;\n /**\n * The direction of the slide transition. Defaults to left.\n */\n direction?: SlideDirection;\n\n timeout?: number;\n };\n\n/**\n * Slides one component overtop of another component.\n * Defaults to sliding left, unless `direction='right'` is provided.\n * Timeout defaults to 200ms.\n */\nfunction SlideTransition({\n direction = 'left',\n classNames: classNamesProp,\n children,\n\n /** Defaults to mid */\n timeout = ThemeExport.transitionMidMs,\n ...props\n}: SlideTransitionProps): JSX.Element {\n const nodeRef = useRef<HTMLElement | null>(null);\n\n // Mimics findDOMNode for CSSTransition\n // The ref should be set before CSSTransition does anything with it\n const setRef = useCallback((node: HTMLElement | null) => {\n nodeRef.current = node?.firstElementChild as HTMLElement;\n }, []);\n\n return (\n <CSSTransition\n nodeRef={nodeRef}\n timeout={timeout}\n classNames={classNames(`slide-${direction}`, classNamesProp)}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n >\n <div ref={setRef} style={DISPLAY_CONTENTS}>\n {children}\n </div>\n </CSSTransition>\n );\n}\n\nexport default SlideTransition;\n"],"mappings":";;;;;;;;AAAA;AACA,SAASA,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAC3C,SAASC,aAAa,QAAQ,wBAAwB;AAGtD,OAAOC,UAAU,MAAM,YAAY;AAAC,OAE7BC,WAAW;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAElB,IAAMC,gBAAgB,GAAG;EAAEC,OAAO,EAAE;AAAW,CAAC;AAsBhD;AACA;AACA;AACA;AACA;AACA,SAASC,eAAeA,CAAAC,IAAA,EAQc;EAAA,IARb;MACvBC,SAAS,GAAG,MAAM;MAClBR,UAAU,EAAES,cAAc;MAC1BC,QAAQ;MAER;MACAC,OAAO,GAAGV,WAAW,CAACW;IAEF,CAAC,GAAAL,IAAA;IADlBM,KAAK,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA;EAER,IAAMC,OAAO,GAAGlB,MAAM,CAAqB,IAAI,CAAC;;EAEhD;EACA;EACA,IAAMmB,MAAM,GAAGpB,WAAW,CAAEqB,IAAwB,IAAK;IACvDF,OAAO,CAACG,OAAO,GAAGD,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,iBAAgC;EAC1D,CAAC,EAAE,EAAE,CAAC;EAEN,oBACEjB,IAAA,CAACJ,aAAa,EAAAsB,aAAA,CAAAA,aAAA;IACZL,OAAO,EAAEA,OAAQ;IACjBL,OAAO,EAAEA,OAAQ;IACjBX,UAAU,EAAEA,UAAU,UAAAsB,MAAA,CAAUd,SAAS,GAAIC,cAAc;IAC3D;EAAA,GACII,KAAK;IAAAH,QAAA,eAETP,IAAA;MAAKoB,GAAG,EAAEN,MAAO;MAACO,KAAK,EAAEpB,gBAAiB;MAAAM,QAAA,EACvCA;IAAQ,CACN;EAAC,EACO,CAAC;AAEpB;AAEA,eAAeJ,eAAe","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/components",
3
- "version": "1.7.2-react-18-alpha.3+b369a51e",
3
+ "version": "1.8.1-beta.0+84c5dcae",
4
4
  "description": "Deephaven React component library",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -25,12 +25,15 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@adobe/react-spectrum": "3.38.0",
28
- "@deephaven/icons": "^1.7.2-react-18-alpha.3+b369a51e",
29
- "@deephaven/log": "^1.7.2-react-18-alpha.3+b369a51e",
30
- "@deephaven/react-hooks": "^1.7.2-react-18-alpha.3+b369a51e",
31
- "@deephaven/utils": "^1.7.2-react-18-alpha.3+b369a51e",
28
+ "@deephaven/icons": "^1.8.1-beta.0+84c5dcae",
29
+ "@deephaven/log": "^1.8.1-beta.0+84c5dcae",
30
+ "@deephaven/react-hooks": "^1.8.1-beta.0+84c5dcae",
31
+ "@deephaven/utils": "^1.8.1-beta.0+84c5dcae",
32
+ "@fontsource/fira-mono": "5.0.13",
33
+ "@fontsource/fira-sans": "5.0.20",
32
34
  "@fortawesome/fontawesome-svg-core": "^6.2.1",
33
35
  "@fortawesome/react-fontawesome": "^0.2.0",
36
+ "@hello-pangea/dnd": "^18.0.1",
34
37
  "@internationalized/date": "^3.5.5",
35
38
  "@react-spectrum/theme-default": "^3.5.1",
36
39
  "@react-spectrum/toast": "^3.0.0-beta.16",
@@ -48,7 +51,6 @@
48
51
  "memoizee": "^0.4.15",
49
52
  "nanoid": "^5.0.7",
50
53
  "popper.js": "^1.16.1",
51
- "react-beautiful-dnd": "^13.1.1",
52
54
  "react-reverse-portal": "^2.3.0",
53
55
  "react-transition-group": "^4.4.2",
54
56
  "react-virtualized-auto-sizer": "1.0.7",
@@ -60,8 +62,8 @@
60
62
  "react-is": ">=16.8.0"
61
63
  },
62
64
  "devDependencies": {
63
- "@deephaven/mocks": "^1.7.2-react-18-alpha.3+b369a51e",
64
- "@deephaven/test-utils": "^1.7.2-react-18-alpha.3+b369a51e",
65
+ "@deephaven/mocks": "^1.8.1-beta.0+84c5dcae",
66
+ "@deephaven/test-utils": "^1.8.1-beta.0+84c5dcae",
65
67
  "react-redux": "^7.2.7"
66
68
  },
67
69
  "files": [
@@ -76,5 +78,5 @@
76
78
  "publishConfig": {
77
79
  "access": "public"
78
80
  },
79
- "gitHead": "b369a51ee94d212641a14c6ce1f19fcc85168339"
81
+ "gitHead": "84c5dcaed2803b85b80eb763b550f432eabe0d53"
80
82
  }
@@ -913,7 +913,7 @@ input[type='number']::-webkit-inner-spin-button {
913
913
  }
914
914
  }
915
915
 
916
- /** Preload some fonts for grid metric calculations, loaded in App.jsx */
916
+ /** Preload some fonts for grid metric calculations, loaded by FontBootstrap */
917
917
  /* stylelint-disable */
918
918
  .fira-sans-regular {
919
919
  font-family: 'Fira Sans';