ywana-core8 0.0.858 → 0.0.860

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.858",
3
+ "version": "0.0.860",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -12,7 +12,7 @@ import './textarea.css'
12
12
  export const TextField = (props) => {
13
13
 
14
14
  const site = useContext(SiteContext)
15
- const { id, type = 'text', label, labelPosition = 'top', placeholder, value, outlined, readOnly = false, canClear = true, onChange, onEnter, onClick, onBlur } = props
15
+ const { id, type = 'text', label, labelPosition = 'top', placeholder, value, outlined, readOnly = false, canClear = true, onChange, onEnter, onClick, onFocus, onBlur } = props
16
16
 
17
17
  function onKeyPress(event) {
18
18
  var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;
@@ -29,13 +29,7 @@ export const TextField = (props) => {
29
29
  }
30
30
 
31
31
  function focus() {
32
- if (site && site.changeFocus) {
33
- site.changeFocus({
34
- lose: () => {
35
- // DO NOTHING
36
- }
37
- })
38
- }
32
+ if (onFocus) onFocus()
39
33
  }
40
34
 
41
35
  function blur() {
package/src/site/site.js CHANGED
@@ -26,8 +26,7 @@ export const SiteProvider = ({ children, siteLang, siteDictionary }) => {
26
26
  const [promptDialog, setPromptDialog] = useState()
27
27
  const [preview, setPreview] = useState()
28
28
  const [breadcrumb, setBreadcrumb] = useState()
29
- const [focused, setFocused] = useState()
30
-
29
+
31
30
  const value = {
32
31
 
33
32
  lang,
@@ -35,17 +34,7 @@ export const SiteProvider = ({ children, siteLang, siteDictionary }) => {
35
34
 
36
35
  dictionary,
37
36
  setDictionary,
38
-
39
- focused,
40
- changeFocus: (next) => {
41
- if (focused) focused.lose()
42
- setFocused(next)
43
- },
44
- clearFocus: () => {
45
- if (focused) focused.lose()
46
- setFocused(null)
47
- },
48
-
37
+
49
38
  sideNav,
50
39
  setSideNav,
51
40
 
package/src/site/view.css CHANGED
@@ -8,20 +8,28 @@
8
8
  .view>header {
9
9
  width: 100%;
10
10
  display: flex;
11
- align-items: center;
11
+ align-items: flex-end;
12
12
  background-color: rgb(200,200,200);
13
13
  min-height: 2rem;
14
- padding-left: 1rem;
14
+ height: 2.5rem;
15
+ max-height: 2.5rem;
16
+ }
17
+
18
+ .view>header>.icon {
19
+ height: 2.4rem;
20
+ width: 3rem
15
21
  }
16
22
 
17
23
  .view>header>label {
18
24
  flex: 1;
25
+ height: 100%;
26
+ display: flex;
27
+ align-items: center;
19
28
  }
20
29
 
21
30
  .view>nav {
22
31
  min-height: 2rem;
23
32
  display: flex;
24
- flex-direction: ;
25
33
  align-items: center;
26
34
  justify-content: flex-end;
27
35
  background-color: rgb(230,230,230);