ywana-core8 0.0.274 → 0.0.277

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": "ywana-core8",
3
- "version": "0.0.274",
3
+ "version": "0.0.277",
4
4
  "description": "ywana-core8",
5
5
  "author": "Ernesto Roldan Garcia",
6
6
  "license": "MIT",
package/src/html/list.js CHANGED
@@ -66,7 +66,7 @@ const ListItem = ({ item, onSelect }) => {
66
66
  }
67
67
 
68
68
  return (
69
- <li id={id} onClick={select}>
69
+ <li onClick={select}>
70
70
  {icon ? <Icon icon={icon} size="small" /> : null}
71
71
  <main>
72
72
  <div className="primary-line"><Text>{line1}</Text></div>
package/src/html/table.js CHANGED
@@ -42,10 +42,8 @@ export const DataTable = (props) => {
42
42
  // Loop until sorted (-1 or 1) or until the sort keys have been processed.
43
43
  while (sorted === 0 && index < sortKeys.length) {
44
44
  const key = sortKeys[index];
45
-
46
45
  if (key) {
47
46
  const direction = sortObject[key];
48
-
49
47
  sorted = keySort(a[key], b[key], direction);
50
48
  index++;
51
49
  }
@@ -0,0 +1,13 @@
1
+ import React, { useState } from 'react'
2
+ import { Tooltip } from './tooltip'
3
+
4
+ const TooltipTest = (prop) => {
5
+
6
+ return (
7
+ <>
8
+ <Tooltip text="role1" top="2rem" >
9
+ John Smith
10
+ </Tooltip>
11
+ </>
12
+ )
13
+ }
@@ -1,3 +1,19 @@
1
1
  .tooltip {
2
-
2
+ position: relative;
3
+ cursor: pointer;
4
+ }
5
+
6
+ .tooltip-text {
7
+ display: none;
8
+ z-index: 10;
9
+ }
10
+
11
+ .tooltip:hover .tooltip-text {
12
+ display: block;
13
+ position: absolute;
14
+ border: solid 1px var(--divider-color);
15
+ background-color: var(--text-color-light);
16
+ color: var(--paper-color);
17
+ padding: .5rem;
18
+ border-radius: 4px;
3
19
  }
@@ -6,12 +6,15 @@ import './tooltip.css'
6
6
  */
7
7
  export const Tooltip = (props) => {
8
8
 
9
- const { text = "..." } = props
9
+ const { text = "", top = "1rem", left = "1rem" } = props
10
+
11
+ const style = { top, left }
10
12
 
11
13
  return (
12
- <ReactTooltip id="filters" effect="solid" className="tooltip">
13
- <Text use="body2">{text}</Text>
14
- </ReactTooltip>
14
+ <div className="tooltip" >
15
+ <span className="tooltip-text" style={style}>{text}</span>
16
+ {props.children}
17
+ </div>
15
18
  )
16
19
 
17
20
  }
package/src/site/site.js CHANGED
@@ -70,6 +70,7 @@ export const SiteProvider = ({ children, siteLang, siteDictionary, showConsole }
70
70
  closePreview: () => { setPreview(null) },
71
71
 
72
72
  confirm: (message) => window.confirm(message),
73
+ prompt: (message) => window.prompt(message),
73
74
 
74
75
  notify: ({ title, body, type = "success" }) => {
75
76
  Store.addNotification({