@things-factory/component-ui 5.0.0-alpha.55 → 5.0.0-alpha.56
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": "@things-factory/component-ui",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.56",
|
|
4
4
|
"browser": "client/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"scripts": {},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@things-factory/styles": "^5.0.0-alpha.
|
|
19
|
+
"@things-factory/styles": "^5.0.0-alpha.56"
|
|
20
20
|
},
|
|
21
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "105413a014a3cacefc97550b8f23e46789465219"
|
|
22
22
|
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { LitElement, html, css } from 'lit'
|
|
2
|
-
|
|
3
|
-
export class CardTypeCreator extends LitElement {
|
|
4
|
-
static get styles() {
|
|
5
|
-
return [
|
|
6
|
-
css`
|
|
7
|
-
:host {
|
|
8
|
-
position: relative;
|
|
9
|
-
|
|
10
|
-
padding: 0;
|
|
11
|
-
margin: 0;
|
|
12
|
-
height: 100%;
|
|
13
|
-
|
|
14
|
-
-webkit-transform-style: preserve-3d;
|
|
15
|
-
transform-style: preserve-3d;
|
|
16
|
-
-webkit-transition: all 0.5s ease-in-out;
|
|
17
|
-
transition: all 0.5s ease-in-out;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
:host(.flipped) {
|
|
21
|
-
-webkit-transform: var(--card-list-flip-transform);
|
|
22
|
-
transform: var(--card-list-flip-transform);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
[front],
|
|
26
|
-
[back] {
|
|
27
|
-
position: absolute;
|
|
28
|
-
|
|
29
|
-
width: 100%;
|
|
30
|
-
height: 100%;
|
|
31
|
-
margin: 0;
|
|
32
|
-
padding: 0;
|
|
33
|
-
|
|
34
|
-
border: var(--card-list-create-border);
|
|
35
|
-
border-radius: var(--card-list-create-border-radius);
|
|
36
|
-
|
|
37
|
-
background-color: #fff;
|
|
38
|
-
|
|
39
|
-
-webkit-backface-visibility: hidden;
|
|
40
|
-
backface-visibility: hidden;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[front] {
|
|
44
|
-
text-align: center;
|
|
45
|
-
font-size: 0.8em;
|
|
46
|
-
color: var(--card-list-create-color);
|
|
47
|
-
text-transform: capitalize;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
[front] mwc-icon {
|
|
51
|
-
margin-top: 15%;
|
|
52
|
-
display: block;
|
|
53
|
-
font-size: 3.5em;
|
|
54
|
-
color: var(--card-list-create-icon-color);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
[back] {
|
|
58
|
-
-webkit-transform: var(--card-list-flip-transform);
|
|
59
|
-
transform: var(--card-list-flip-transform);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
[back] form {
|
|
63
|
-
padding: var(--card-list-create-form-padding);
|
|
64
|
-
display: flex;
|
|
65
|
-
flex-flow: row wrap;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
[back] form label {
|
|
69
|
-
flex: 1 1 25%;
|
|
70
|
-
font: var(--card-list-create-label-font);
|
|
71
|
-
color: var(--card-list-create-label-color);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
[back] form input,
|
|
75
|
-
[back] form select {
|
|
76
|
-
flex: 1 1 60%;
|
|
77
|
-
width: 10px;
|
|
78
|
-
background-color: #fff;
|
|
79
|
-
border: var(--card-list-create-input-border);
|
|
80
|
-
border-radius: var(--card-list-create-input-border-radius);
|
|
81
|
-
padding: var(--card-list-create-input-padding);
|
|
82
|
-
font: var(--card-list-create-input-font);
|
|
83
|
-
color: var(--card-list-create-input-color);
|
|
84
|
-
}
|
|
85
|
-
`
|
|
86
|
-
]
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
render() {
|
|
90
|
-
return html`
|
|
91
|
-
<div @click=${e => this.onClickFlip(e)} front><mwc-icon>add_circle_outline</mwc-icon>create font</div>
|
|
92
|
-
|
|
93
|
-
<div @click=${e => this.onClickFlip(e)} back>${this.renderForm()}</div>
|
|
94
|
-
`
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
renderForm() {
|
|
98
|
-
return html``
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
onClickFlip(e) {
|
|
102
|
-
if (e.currentTarget.hasAttribute('front') || e.target.hasAttribute('back')) {
|
|
103
|
-
this.classList.toggle('flipped')
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
e.stopPropagation()
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
reset() {
|
|
110
|
-
this.classList.remove('flipped')
|
|
111
|
-
}
|
|
112
|
-
}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
import '@things-factory/setting-base'
|
|
2
|
-
import './attachment-creation-card'
|
|
3
|
-
|
|
4
|
-
import { css, html, LitElement } from 'lit'
|
|
5
|
-
|
|
6
|
-
import InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js'
|
|
7
|
-
import { i18next, localize } from '@things-factory/i18n-base'
|
|
8
|
-
import { ScrollbarStyles, TooltipStyles } from '@things-factory/styles'
|
|
9
|
-
|
|
10
|
-
export class CardTypeSelector extends InfiniteScrollable(localize(i18next)(LitElement)) {
|
|
11
|
-
static get styles() {
|
|
12
|
-
return [
|
|
13
|
-
ScrollbarStyles,
|
|
14
|
-
TooltipStyles,
|
|
15
|
-
css`
|
|
16
|
-
:host {
|
|
17
|
-
display: grid;
|
|
18
|
-
grid-template-rows: auto auto 1fr;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
background-color: var(--popup-content-background-color);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
:host(.candrop) {
|
|
24
|
-
background: orange;
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
#list {
|
|
29
|
-
overflow: auto;
|
|
30
|
-
padding: var(--popup-content-padding);
|
|
31
|
-
display: grid;
|
|
32
|
-
grid-template-columns: var(--card-list-template);
|
|
33
|
-
grid-auto-rows: var(--card-list-rows-height);
|
|
34
|
-
grid-gap: 20px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
#list .card {
|
|
38
|
-
display: flex;
|
|
39
|
-
flex-direction: column;
|
|
40
|
-
align-items: center;
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
border-radius: var(--card-list-border-radius);
|
|
43
|
-
border: var(--attachment-selector-border);
|
|
44
|
-
background-color: var(--attachment-selector-background-color);
|
|
45
|
-
|
|
46
|
-
position: relative;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
#list .card.create {
|
|
50
|
-
overflow: visible;
|
|
51
|
-
background-color: initial;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
#list .card:hover {
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.name {
|
|
59
|
-
background-color: var(--board-renderer-name-background-color);
|
|
60
|
-
opacity: 0.8;
|
|
61
|
-
position: absolute;
|
|
62
|
-
bottom: 0px;
|
|
63
|
-
width: 100%;
|
|
64
|
-
padding: 2px 5px;
|
|
65
|
-
font: var(--attachment-selector-name-font);
|
|
66
|
-
color: #fff;
|
|
67
|
-
text-indent: 7px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
mwc-icon {
|
|
71
|
-
position: absolute;
|
|
72
|
-
right: 0px;
|
|
73
|
-
text-align: center;
|
|
74
|
-
|
|
75
|
-
background-color: var(--attachment-selector-icon-background-color);
|
|
76
|
-
width: var(--attachment-selector-icon-size);
|
|
77
|
-
height: var(--attachment-selector-icon-size);
|
|
78
|
-
font: var(--attachment-selector-icon-font);
|
|
79
|
-
color: var(--attachment-selector-icon-color);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
mwc-icon:hover,
|
|
83
|
-
mwc-icon:active {
|
|
84
|
-
background-color: var(--primary-color);
|
|
85
|
-
color: #fff;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
#filter {
|
|
89
|
-
padding: var(--popup-content-padding);
|
|
90
|
-
background-color: var(--attachment-tools-background-color);
|
|
91
|
-
box-shadow: var(--box-shadow);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
#filter * {
|
|
95
|
-
font-size: 15px;
|
|
96
|
-
}
|
|
97
|
-
`
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
static get properties() {
|
|
102
|
-
return {
|
|
103
|
-
categories: Array,
|
|
104
|
-
attachments: Array,
|
|
105
|
-
category: String,
|
|
106
|
-
_page: Number,
|
|
107
|
-
_total: Number,
|
|
108
|
-
creatable: Boolean
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
constructor() {
|
|
113
|
-
super()
|
|
114
|
-
|
|
115
|
-
this.categories = ['audio', 'video', 'image', 'text', 'application']
|
|
116
|
-
this.attachments = []
|
|
117
|
-
|
|
118
|
-
this._page = 1
|
|
119
|
-
this._total = 0
|
|
120
|
-
|
|
121
|
-
this._infiniteScrollOptions.limit = 20
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
render() {
|
|
125
|
-
return html`
|
|
126
|
-
<div id="filter">${this.renderFilter()}</div>
|
|
127
|
-
|
|
128
|
-
<div id="list">${this.renderList()}</div>
|
|
129
|
-
`
|
|
130
|
-
}
|
|
131
|
-
}
|