@onehat/ui 0.4.93 → 0.4.95

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.4.93",
3
+ "version": "0.4.95",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -14,6 +14,7 @@ import {
14
14
  CURRENT_MODE,
15
15
  } from '../../Constants/UiModes.js';
16
16
  import * as colourMixer from '@k-renwick/colour-mixer';
17
+ import Tooltip from '../Tooltip/Tooltip.js';
17
18
  import getComponentFromType from '../../Functions/getComponentFromType.js';
18
19
  import UiGlobals from '../../UiGlobals.js';
19
20
  import { withDragSource, withDropTarget } from '../Hoc/withDnd.js';
@@ -457,16 +458,20 @@ const GridRow = forwardRef((props, ref) => {
457
458
  if (isOver) {
458
459
  rowClassName += ' border-4 border-[#0ff]';
459
460
  }
460
- return <HStackNative
461
- ref={ref}
462
- {...testProps('Row ' + (isSelected ? 'row-selected' : ''))}
463
- {...rowProps}
464
- key={hash}
465
- className={rowClassName}
466
- style={{
467
- backgroundColor: bg,
468
- }}
469
- >{rowContents}</HStackNative>;
461
+ let row = <HStackNative
462
+ ref={ref}
463
+ {...testProps('Row ' + (isSelected ? 'row-selected' : ''))}
464
+ {...rowProps}
465
+ key={hash}
466
+ className={rowClassName}
467
+ style={{
468
+ backgroundColor: bg,
469
+ }}
470
+ >{rowContents}</HStackNative>;
471
+ if (rowProps.tooltip) {
472
+ row = <Tooltip label={rowProps.tooltip} placement="bottom left">{row}</Tooltip>;
473
+ }
474
+ return row;
470
475
  }, [
471
476
  columnsConfig,
472
477
  asyncResults,
@@ -11,6 +11,7 @@ export function GridPanel(props) {
11
11
  const {
12
12
  isEditor = false,
13
13
  editorType = EDITOR_TYPE__WINDOWED,
14
+ _panel = {},
14
15
  } = props;
15
16
 
16
17
  let WhichGrid = Grid;
@@ -28,11 +29,7 @@ export function GridPanel(props) {
28
29
  }
29
30
  }
30
31
 
31
- if (!props._panel) {
32
- props._panel = {};
33
- }
34
-
35
- return <Panel {...props} {...props._panel}>
32
+ return <Panel {...props} {..._panel}>
36
33
  <WhichGrid {...props} />
37
34
  </Panel>;
38
35
  }
@@ -3,7 +3,8 @@ import Panel from './Panel.js';
3
3
 
4
4
 
5
5
  export default function TabPanel(props) {
6
- return <Panel className="w-full flex" {...props._panel}>
6
+ const panelProps = props._panel || {};
7
+ return <Panel className="w-full flex" {...panelProps}>
7
8
  <TabBar {...props} {...props._tab} />
8
9
  </Panel>;
9
10
  }
@@ -10,6 +10,7 @@ export function TreePanel(props) {
10
10
  const {
11
11
  isEditor = false,
12
12
  editorType = EDITOR_TYPE__WINDOWED,
13
+ _panel = {},
13
14
  } = props;
14
15
 
15
16
  let WhichTree = Tree;
@@ -24,8 +25,8 @@ export function TreePanel(props) {
24
25
  }
25
26
  }
26
27
 
27
- return <Panel {...props._panel}>
28
- <WhichTree {...props} {...props._tree} />
28
+ return <Panel {..._panel}>
29
+ <WhichTree {...props} {..._panel} />
29
30
  </Panel>;
30
31
  }
31
32