@andersonalmeidax0/webcomponents 0.1.9 → 0.1.11

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/README.md CHANGED
@@ -49,6 +49,13 @@ Atenção: objetos devem ter propriedade "_id" para serem editaveis
49
49
 
50
50
  ```
51
51
  ### Complete Example:
52
+ ## Index
53
+ ```
54
+ <link rel="stylesheet" href="/css/basic2.css">
55
+ <link rel="stylesheet" href="./css/font-awesome.ander.css">
56
+ ```
57
+ ## Page
58
+
52
59
  ```
53
60
  import React from "react";
54
61
  import {RestAPIAdapter} from "@andersonalmeidax0/webcomponents/RestAPIAdapter.js"
@@ -114,4 +121,7 @@ class PageAPI extends React.Component{
114
121
  }
115
122
 
116
123
  }
124
+
125
+ //import { PageAPI } from "./PageAPI";
126
+ export {PageAPI};
117
127
  ```
package/RestAPIAdapter.js CHANGED
@@ -172,7 +172,7 @@ function getStorageWithExpiry(key) {
172
172
  return await this.callAPI('findByFK',fkArr,context)
173
173
  };
174
174
  async update(vo,context) {
175
- alert(JSON.stringify(vo));
175
+ //alert(JSON.stringify(vo));
176
176
  return await this.callAPI('update',vo,context)
177
177
  };
178
178
  async removeByPK(vo,context) {
package/XButton.jsx CHANGED
@@ -28,13 +28,21 @@ class XButton extends React.Component {
28
28
 
29
29
  render() {
30
30
  var t=this.props.attachFile?'file':'button';
31
- if(this.props.attachFile)
32
- return (
33
- <label onChange={this.evtFile} xclassName='tile bg--lightblue fg--white btn--raised ' xstyle={{lineHeight:20,xwidth:20,display:'inline-block'}} htmlFor="formId">
34
- <input name="" type="file" id="formId" hidden />
35
- <i className={'fa fa-paperclip'} />
36
- </label>
37
- );
31
+ if(this.props.attachFile){
32
+ if(this.props.textlabel==null)
33
+ return (
34
+ <label onChange={this.evtFile} xclassName='tile bg--lightblue fg--white btn--raised ' xstyle={{lineHeight:20,xwidth:20,display:'inline-block'}} htmlFor="formId">
35
+ <input name="" type="file" id="formId" hidden />
36
+ <i className={'fa fa-paperclip'} />
37
+ </label>
38
+ );
39
+ else
40
+ return (
41
+ <label onChange={this.evtFile} xclassName='tile bg--lightblue fg--white btn--raised ' xstyle={{lineHeight:20,xwidth:20,display:'inline-block'}} htmlFor="formId">
42
+ <input name={this.props.textlabel} type="file" id="formId" />
43
+ </label>
44
+ );
45
+ }
38
46
 
39
47
  if(this.props.icon){
40
48
  if(this.props.textlabel==null)
package/basic2.css ADDED
@@ -0,0 +1,186 @@
1
+ /* Basic.css */
2
+
3
+ * {box-sizing: border-box}
4
+
5
+ :root{
6
+ --sans: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Fira Sans, sans-serif;
7
+ --mono: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, 'Courier New', monospace;
8
+ --c1:#0074d9;
9
+ --c2:#eee;
10
+ --c3:#fff;
11
+ --c4:#000;
12
+ --c5:#fff;
13
+ --m1: 8px;
14
+ --rc: 4px;
15
+ }
16
+
17
+ html {
18
+ -ms-text-size-adjust: 100%;
19
+ -webkit-text-size-adjust: 100%;
20
+ margin: 0;
21
+ padding: 0;
22
+
23
+ }
24
+
25
+ a:hover {
26
+ cursor:pointer;
27
+ }
28
+
29
+ /* General settings */
30
+
31
+ body {
32
+ zoom: 80%;
33
+ margin-top: 0;
34
+ padding: 0;
35
+ font: var(--sans);
36
+ font-weight: 400;
37
+ font-style: normal;
38
+ text-rendering: optimizeLegibility;
39
+ -webkit-font-smoothing: antialiased;
40
+ background-color: var(--c3);
41
+ color: var(--c4);
42
+ }
43
+
44
+ main {
45
+ margin-left: 0px;
46
+ float: left;
47
+ width: 85%;
48
+ }
49
+
50
+ menu li {
51
+ xdisplay:inline-block;
52
+ list-style-type: none;
53
+ margin: 0;
54
+ padding: 0;
55
+
56
+ }
57
+
58
+ menu ul {
59
+
60
+ list-style-type: none;
61
+ margin: 0;
62
+ padding: 0;
63
+
64
+ }
65
+
66
+ .collapse a{
67
+ display: block;
68
+ }
69
+ .collapse > div{
70
+ display:none;
71
+ }
72
+ .collapse > div:target{
73
+ display:block;
74
+ }
75
+
76
+
77
+ header {
78
+ background:var(--c1);
79
+ color:white;
80
+ xheight: 90px;
81
+ padding: 0px;
82
+ margin: 0px;
83
+ border: 0px;
84
+
85
+
86
+ }
87
+
88
+ aside {
89
+ background: #f5f5f5;;
90
+ color:black;
91
+ xpadding: 0;
92
+ xmargin: 0;
93
+ float: left;
94
+ width: 15%;
95
+ padding:10px;
96
+ padding-top: 1px;
97
+ height: 2000px;
98
+ }
99
+
100
+ section {
101
+ padding: 10px;
102
+ margin: 10px;
103
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
104
+ display: table;
105
+ xflex-flow: xrow wrap
106
+ }
107
+
108
+ [style*="--c:"], section>section, article {flex:var(--c,1); margin:var(--m1)}
109
+
110
+ /* Cards */
111
+
112
+ article {
113
+ xbackground: var(--c2);
114
+ border-radius: var(--rc);
115
+ align-items: center;
116
+ align-content: center;
117
+ padding: 1em;
118
+ width: 100%;
119
+ display: flex;
120
+ justify-content: center;
121
+ xbox-shadow: 0px 1px 0px rgba(0,0,0,0.3)
122
+ }
123
+
124
+
125
+ img, iframe {border: none; max-width: 100%}
126
+
127
+ a {color: var(--c1); text-decoration:none}
128
+
129
+ a:hover {color: var(--c1); text-decoration: underline}
130
+
131
+ pre {font: 1em/1.6 var(--mono); background: var(--c2); padding: 1em; overflow: auto}
132
+
133
+ code {font: 1em/1.6 var(--mono);}
134
+
135
+ blockquote {border-left: 5px solid var(--c2); padding: 1em 1.5em; margin: 0}
136
+
137
+ hr {border:0; border-bottom: 1px solid var(--c4)}
138
+
139
+ /* Headlines */
140
+
141
+ h1 {
142
+ margin: 0.0em 0;
143
+ padding: 0px;
144
+ font-weight: normal
145
+
146
+ }
147
+
148
+ h2,h3,h4,h5,h6 {margin: 0.0em 0;padding: 1px; font-weight: normal}
149
+
150
+ h1 {font-size: 2.625em; line-height: 1.2}
151
+
152
+ h2 {font-size: 1.625em; line-height: 1.2}
153
+
154
+ h3 {font-size: 1.3125em; line-height: 1.24}
155
+
156
+ h4 {font-size: 1.1875em; line-height: 1.23}
157
+
158
+ h5,h6 {font-size: 1em; font-weight:bold}
159
+
160
+ /* Table */
161
+
162
+ table {border-collapse: collapse; border-spacing: 0; margin:1em 0}
163
+
164
+ th, td {text-align: left; vertical-align: top; border: 1px solid; border-color: var(--c2); padding: 0.4em}
165
+
166
+ thead,tfoot {background: var(--c2)}
167
+
168
+ /* Rounded Corners*/
169
+
170
+ pre,code,input,select,textarea,button,img {border-radius: var(--rc)}
171
+
172
+ /* Forms */
173
+
174
+ input, select, textarea {font-size: 1em; color:var(--c4); background: var(--c2); border-color: #33324434; border: 1; padding: 0.6em; margin:0.6em}
175
+
176
+ fieldset {border-color: #b7b6c834; }
177
+
178
+
179
+ button, input[type=submit], input[type=reset], input[type="button"] { -webkit-appearance: none; font-size: 1em; display: inline-block; color: var(--c5); background: var(--c1); border: 0; margin: 4px; padding: 0.6em; cursor: pointer; text-align: center}
180
+
181
+ button:hover, button:focus, input:hover, textarea:hover, select:hover {opacity: 0.8}
182
+
183
+ /* Infinite Grid */
184
+
185
+ [style*="--c:"]:first-child, section>section:first-child, article:first-child {margin-left:0}
186
+ [style*="--c:"]:last-child, section>section:last-child, article:last-child {margin-right:0}
@@ -0,0 +1,178 @@
1
+ /* Basic.css */
2
+
3
+ * {box-sizing: border-box}
4
+
5
+ :root{
6
+ --sans: 1em/1.6 system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Fira Sans, sans-serif;
7
+ --mono: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, 'Courier New', monospace;
8
+ --c1:#0074d9;
9
+ --c2:#eee;
10
+ --c3:#fff;
11
+ --c4:#000;
12
+ --c5:#fff;
13
+ --m1: 8px;
14
+ --rc: 4px;
15
+ }
16
+
17
+ html {
18
+ -ms-text-size-adjust: 100%;
19
+ -webkit-text-size-adjust: 100%;
20
+ margin: 0;
21
+ padding: 0;
22
+
23
+ }
24
+
25
+ a:hover {
26
+ cursor:pointer;
27
+ }
28
+
29
+ /* General settings */
30
+
31
+ body {
32
+ zoom: 80%;
33
+ margin-top: 0;
34
+ padding: 0;
35
+ font: var(--sans);
36
+ font-weight: 400;
37
+ font-style: normal;
38
+ text-rendering: optimizeLegibility;
39
+ -webkit-font-smoothing: antialiased;
40
+ background-color: var(--c3);
41
+ color: var(--c4);
42
+ }
43
+
44
+ nav li {
45
+ display:inline-block;
46
+ }
47
+
48
+ nav aside {
49
+ padding: var(--body-padding);
50
+ }
51
+
52
+ main {
53
+ margin-left: 0px;
54
+ float: left;
55
+ width: 100%;
56
+ }
57
+
58
+ .collapse a{
59
+ display: block;
60
+ }
61
+ .collapse > div{
62
+ display:none;
63
+ }
64
+ .collapse > div:target{
65
+ display:block;
66
+ }
67
+
68
+
69
+ header {
70
+ background: #607d8b;;
71
+ color:white;
72
+ xheight: 90px;
73
+ padding: 0px;
74
+ margin: 0px;
75
+ border: 0px;
76
+
77
+
78
+ }
79
+
80
+ aside {
81
+ xbackground: #f5f5f5;;
82
+ color:black;
83
+ xpadding: 0;
84
+ xmargin: 0;
85
+ xfloat: left;
86
+ width: 100%;
87
+ padding:10px;
88
+ padding-top: 1px;
89
+ xheight: 2000px;
90
+ }
91
+
92
+ section {
93
+ padding: 10px;
94
+ margin: 10px;
95
+ box-shadow: 0 1px 1px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12);
96
+ display: table;
97
+ xflex-flow: xrow wrap
98
+ }
99
+
100
+ [style*="--c:"], section>section, article {flex:var(--c,1); margin:var(--m1)}
101
+
102
+ /* Cards */
103
+
104
+ article {
105
+ xbackground: var(--c2);
106
+ border-radius: var(--rc);
107
+ align-items: center;
108
+ align-content: center;
109
+ padding: 1em;
110
+ width: 100%;
111
+ display: flex;
112
+ justify-content: center;
113
+ xbox-shadow: 0px 1px 0px rgba(0,0,0,0.3)
114
+ }
115
+
116
+
117
+ img, iframe {border: none; max-width: 100%}
118
+
119
+ a {color: var(--c1); text-decoration:none}
120
+
121
+ a:hover {color: var(--c1); text-decoration: underline}
122
+
123
+ pre {font: 1em/1.6 var(--mono); background: var(--c2); padding: 1em; overflow: auto}
124
+
125
+ code {font: 1em/1.6 var(--mono);}
126
+
127
+ blockquote {border-left: 5px solid var(--c2); padding: 1em 1.5em; margin: 0}
128
+
129
+ hr {border:0; border-bottom: 1px solid var(--c4)}
130
+
131
+ /* Headlines */
132
+
133
+ h1 {
134
+ margin: 0.0em 0;
135
+ padding: 0px;
136
+ font-weight: normal
137
+
138
+ }
139
+
140
+ h2,h3,h4,h5,h6 {margin: 0.0em 0;padding: 1px; font-weight: normal}
141
+
142
+ h1 {font-size: 2.625em; line-height: 1.2}
143
+
144
+ h2 {font-size: 1.625em; line-height: 1.2}
145
+
146
+ h3 {font-size: 1.3125em; line-height: 1.24}
147
+
148
+ h4 {font-size: 1.1875em; line-height: 1.23}
149
+
150
+ h5,h6 {font-size: 1em; font-weight:bold}
151
+
152
+ /* Table */
153
+
154
+ table {border-collapse: collapse; border-spacing: 0; margin:1em 0}
155
+
156
+ th, td {text-align: left; vertical-align: top; border: 1px solid; border-color: var(--c2); padding: 0.4em}
157
+
158
+ thead,tfoot {background: var(--c2)}
159
+
160
+ /* Rounded Corners*/
161
+
162
+ pre,code,input,select,textarea,button,img {border-radius: var(--rc)}
163
+
164
+ /* Forms */
165
+
166
+ input, select, textarea {font-size: 1em; color:var(--c4); background: var(--c2); border-color: #33324434; border: 1; padding: 0.6em; margin:0.6em}
167
+
168
+ fieldset {border-color: #b7b6c834; }
169
+
170
+
171
+ button, input[type=submit], input[type=reset], input[type="button"] { -webkit-appearance: none; font-size: 1em; display: inline-block; color: var(--c5); background: var(--c1); border: 0; margin: 4px; padding: 0.6em; cursor: pointer; text-align: center}
172
+
173
+ button:hover, button:focus, input:hover, textarea:hover, select:hover {opacity: 0.8}
174
+
175
+ /* Infinite Grid */
176
+
177
+ [style*="--c:"]:first-child, section>section:first-child, article:first-child {margin-left:0}
178
+ [style*="--c:"]:last-child, section>section:last-child, article:last-child {margin-right:0}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andersonalmeidax0/webcomponents",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "webcomponents",
5
5
  "main": "webcomponents",
6
6
  "scripts": {
package/releasenotes.txt CHANGED
@@ -7,6 +7,8 @@
7
7
  0.1.7: readme, editKey _id ou id, errorCard msg, barra dupla na url
8
8
  0.1.8: doc example
9
9
  0.1.9: doc fix
10
+ 0.1.10: add css
11
+ 0.0.11: no alert on update / XButton upload com text=true
10
12
 
11
13
 
12
14
  TODO