@operato/input 2.0.0-alpha.0 → 2.0.0-alpha.102
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/CHANGELOG.md +339 -0
- package/demo/index-multiple-colors.html +14 -2
- package/demo/index-partition-keys.html +13 -2
- package/demo/index-select.html +20 -9
- package/demo/index-table.html +13 -2
- package/demo/index.html +13 -2
- package/dist/src/locale/locale-picker.d.ts +1 -1
- package/dist/src/ox-buttons-radio.d.ts +1 -1
- package/dist/src/ox-checkbox.d.ts +5 -4
- package/dist/src/ox-checkbox.js +12 -6
- package/dist/src/ox-checkbox.js.map +1 -1
- package/dist/src/ox-input-3axis.d.ts +1 -1
- package/dist/src/ox-input-3dish.d.ts +1 -1
- package/dist/src/ox-input-angle.d.ts +1 -1
- package/dist/src/ox-input-barcode.d.ts +49 -6
- package/dist/src/ox-input-barcode.js +97 -69
- package/dist/src/ox-input-barcode.js.map +1 -1
- package/dist/src/ox-input-code.d.ts +2 -3
- package/dist/src/ox-input-code.js +8 -15
- package/dist/src/ox-input-code.js.map +1 -1
- package/dist/src/ox-input-color-gradient.d.ts +1 -1
- package/dist/src/ox-input-color-stops.d.ts +1 -1
- package/dist/src/ox-input-color.d.ts +1 -1
- package/dist/src/ox-input-container.d.ts +2 -2
- package/dist/src/ox-input-container.js +2 -2
- package/dist/src/ox-input-container.js.map +1 -1
- package/dist/src/ox-input-crontab.d.ts +1 -2
- package/dist/src/ox-input-crontab.js +4 -7
- package/dist/src/ox-input-crontab.js.map +1 -1
- package/dist/src/ox-input-data.d.ts +4 -5
- package/dist/src/ox-input-data.js +88 -36
- package/dist/src/ox-input-data.js.map +1 -1
- package/dist/src/ox-input-duration.d.ts +1 -2
- package/dist/src/ox-input-duration.js +13 -9
- package/dist/src/ox-input-duration.js.map +1 -1
- package/dist/src/ox-input-file.d.ts +2 -2
- package/dist/src/ox-input-file.js +10 -9
- package/dist/src/ox-input-file.js.map +1 -1
- package/dist/src/ox-input-hashtags.d.ts +1 -1
- package/dist/src/ox-input-i18n-label.d.ts +33 -0
- package/dist/src/ox-input-i18n-label.js +130 -0
- package/dist/src/ox-input-i18n-label.js.map +1 -0
- package/dist/src/ox-input-image.d.ts +2 -2
- package/dist/src/ox-input-image.js +4 -4
- package/dist/src/ox-input-image.js.map +1 -1
- package/dist/src/ox-input-key-values.d.ts +2 -2
- package/dist/src/ox-input-key-values.js +9 -10
- package/dist/src/ox-input-key-values.js.map +1 -1
- package/dist/src/ox-input-mass-fraction.d.ts +3 -2
- package/dist/src/ox-input-mass-fraction.js +90 -56
- package/dist/src/ox-input-mass-fraction.js.map +1 -1
- package/dist/src/ox-input-multiple-colors.d.ts +2 -2
- package/dist/src/ox-input-multiple-colors.js +7 -7
- package/dist/src/ox-input-multiple-colors.js.map +1 -1
- package/dist/src/ox-input-options.d.ts +2 -2
- package/dist/src/ox-input-options.js +5 -7
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/src/ox-input-partition-keys.d.ts +2 -2
- package/dist/src/ox-input-partition-keys.js +10 -10
- package/dist/src/ox-input-partition-keys.js.map +1 -1
- package/dist/src/ox-input-privilege.d.ts +1 -2
- package/dist/src/ox-input-privilege.js +15 -31
- package/dist/src/ox-input-privilege.js.map +1 -1
- package/dist/src/ox-input-quantifier.d.ts +1 -1
- package/dist/src/ox-input-scene-component-id.d.ts +1 -1
- package/dist/src/ox-input-search.d.ts +2 -2
- package/dist/src/ox-input-search.js +5 -4
- package/dist/src/ox-input-search.js.map +1 -1
- package/dist/src/ox-input-select-buttons.d.ts +1 -1
- package/dist/src/ox-input-select-buttons.js +1 -1
- package/dist/src/ox-input-select-buttons.js.map +1 -1
- package/dist/src/ox-input-stack.d.ts +1 -1
- package/dist/src/ox-input-table.d.ts +1 -1
- package/dist/src/ox-input-table.js +12 -12
- package/dist/src/ox-input-table.js.map +1 -1
- package/dist/src/ox-input-textarea.d.ts +1 -1
- package/dist/src/ox-input-unit-number.d.ts +3 -2
- package/dist/src/ox-input-unit-number.js +25 -10
- package/dist/src/ox-input-unit-number.js.map +1 -1
- package/dist/src/ox-input-value-map.d.ts +2 -2
- package/dist/src/ox-input-value-map.js +17 -17
- package/dist/src/ox-input-value-map.js.map +1 -1
- package/dist/src/ox-input-value-ranges.d.ts +2 -2
- package/dist/src/ox-input-value-ranges.js +22 -17
- package/dist/src/ox-input-value-ranges.js.map +1 -1
- package/dist/src/ox-input-work-shift.d.ts +1 -1
- package/dist/src/ox-input-work-shift.js +4 -8
- package/dist/src/ox-input-work-shift.js.map +1 -1
- package/dist/src/ox-select.d.ts +2 -2
- package/dist/src/ox-select.js +16 -10
- package/dist/src/ox-select.js.map +1 -1
- package/dist/stories/ox-input-3axis.stories.js +14 -1
- package/dist/stories/ox-input-3axis.stories.js.map +1 -1
- package/dist/stories/ox-input-3dish.stories.js +14 -1
- package/dist/stories/ox-input-3dish.stories.js.map +1 -1
- package/dist/stories/ox-input-angle.stories.js +13 -1
- package/dist/stories/ox-input-angle.stories.js.map +1 -1
- package/dist/stories/ox-input-barcode.stories.js +17 -1
- package/dist/stories/ox-input-barcode.stories.js.map +1 -1
- package/dist/stories/ox-input-code.stories.d.ts +4 -0
- package/dist/stories/ox-input-code.stories.js +18 -3
- package/dist/stories/ox-input-code.stories.js.map +1 -1
- package/dist/stories/ox-input-crontab.stories.js +13 -1
- package/dist/stories/ox-input-crontab.stories.js.map +1 -1
- package/dist/stories/ox-input-data.stories.d.ts +29 -0
- package/dist/stories/ox-input-data.stories.js +50 -0
- package/dist/stories/ox-input-data.stories.js.map +1 -0
- package/dist/stories/ox-input-duration.stories.js +13 -1
- package/dist/stories/ox-input-duration.stories.js.map +1 -1
- package/dist/stories/ox-input-file.stories.js +13 -1
- package/dist/stories/ox-input-file.stories.js.map +1 -1
- package/dist/stories/ox-input-hashtags.stories.js +13 -1
- package/dist/stories/ox-input-hashtags.stories.js.map +1 -1
- package/dist/stories/ox-input-i18n-label.stories.d.ts +29 -0
- package/dist/stories/ox-input-i18n-label.stories.js +70 -0
- package/dist/stories/ox-input-i18n-label.stories.js.map +1 -0
- package/dist/stories/ox-input-key-values.stories.js +13 -1
- package/dist/stories/ox-input-key-values.stories.js.map +1 -1
- package/dist/stories/ox-input-mass-fraction.stories.d.ts +4 -0
- package/dist/stories/ox-input-mass-fraction.stories.js +22 -3
- package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
- package/dist/stories/ox-input-multiple-colors.stories.js +21 -11
- package/dist/stories/ox-input-multiple-colors.stories.js.map +1 -1
- package/dist/stories/ox-input-options.stories.js +13 -1
- package/dist/stories/ox-input-options.stories.js.map +1 -1
- package/dist/stories/ox-input-partition-keys.stories.js +13 -1
- package/dist/stories/ox-input-partition-keys.stories.js.map +1 -1
- package/dist/stories/ox-input-privilege.stories.js +13 -1
- package/dist/stories/ox-input-privilege.stories.js.map +1 -1
- package/dist/stories/ox-input-quantifier.stories.js +13 -1
- package/dist/stories/ox-input-quantifier.stories.js.map +1 -1
- package/dist/stories/ox-input-range.stories.js +13 -1
- package/dist/stories/ox-input-range.stories.js.map +1 -1
- package/dist/stories/ox-input-search.stories.js +13 -1
- package/dist/stories/ox-input-search.stories.js.map +1 -1
- package/dist/stories/ox-input-select-buttons.stories.js +13 -1
- package/dist/stories/ox-input-select-buttons.stories.js.map +1 -1
- package/dist/stories/ox-input-unit.stories.js +14 -0
- package/dist/stories/ox-input-unit.stories.js.map +1 -1
- package/dist/stories/ox-input-value-map.stories.js +13 -1
- package/dist/stories/ox-input-value-map.stories.js.map +1 -1
- package/dist/stories/ox-input-value-ranges.stories.js +13 -1
- package/dist/stories/ox-input-value-ranges.stories.js.map +1 -1
- package/dist/stories/ox-input-work-shift.stories.js +13 -1
- package/dist/stories/ox-input-work-shift.stories.js.map +1 -1
- package/dist/stories/ox-select.stories.js +13 -1
- package/dist/stories/ox-select.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +26 -22
- package/src/ox-checkbox.ts +9 -6
- package/src/ox-input-barcode.ts +128 -63
- package/src/ox-input-code.ts +6 -13
- package/src/ox-input-container.ts +2 -2
- package/src/ox-input-crontab.ts +4 -8
- package/src/ox-input-data.ts +97 -38
- package/src/ox-input-duration.ts +13 -10
- package/src/ox-input-file.ts +10 -9
- package/src/ox-input-i18n-label.ts +140 -0
- package/src/ox-input-image.ts +4 -4
- package/src/ox-input-key-values.ts +27 -22
- package/src/ox-input-mass-fraction.ts +88 -57
- package/src/ox-input-multiple-colors.ts +7 -7
- package/src/ox-input-options.ts +5 -7
- package/src/ox-input-partition-keys.ts +28 -22
- package/src/ox-input-privilege.ts +15 -32
- package/src/ox-input-search.ts +5 -4
- package/src/ox-input-select-buttons.ts +1 -1
- package/src/ox-input-table.ts +12 -12
- package/src/ox-input-unit-number.ts +18 -2
- package/src/ox-input-value-map.ts +19 -19
- package/src/ox-input-value-ranges.ts +24 -19
- package/src/ox-input-work-shift.ts +4 -8
- package/src/ox-select.ts +16 -10
- package/stories/ox-input-3axis.stories.ts +14 -1
- package/stories/ox-input-3dish.stories.ts +14 -1
- package/stories/ox-input-angle.stories.ts +13 -1
- package/stories/ox-input-barcode.stories.ts +17 -1
- package/stories/ox-input-code.stories.ts +25 -3
- package/stories/ox-input-crontab.stories.ts +13 -1
- package/stories/ox-input-data.stories.ts +65 -0
- package/stories/ox-input-duration.stories.ts +13 -1
- package/stories/ox-input-file.stories.ts +13 -1
- package/stories/ox-input-hashtags.stories.ts +13 -1
- package/stories/ox-input-i18n-label.stories.ts +85 -0
- package/stories/ox-input-key-values.stories.ts +13 -1
- package/stories/ox-input-mass-fraction.stories.ts +23 -2
- package/stories/ox-input-multiple-colors.stories.ts +21 -11
- package/stories/ox-input-options.stories.ts +13 -1
- package/stories/ox-input-partition-keys.stories.ts +13 -1
- package/stories/ox-input-privilege.stories.ts +13 -1
- package/stories/ox-input-quantifier.stories.ts +13 -1
- package/stories/ox-input-range.stories.ts +13 -1
- package/stories/ox-input-search.stories.ts +13 -1
- package/stories/ox-input-select-buttons.stories.ts +13 -1
- package/stories/ox-input-unit.stories.ts +14 -0
- package/stories/ox-input-value-map.stories.ts +13 -1
- package/stories/ox-input-value-ranges.stories.ts +13 -1
- package/stories/ox-input-work-shift.stories.ts +13 -1
- package/stories/ox-select.stories.ts +13 -1
- package/themes/app-theme.css +1 -1
- package/themes/input-theme.css +20 -7
- package/yarn-error.log +17084 -0
@@ -2,7 +2,7 @@
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
|
5
|
-
import '@material/
|
5
|
+
import '@material/web/icon/icon.js'
|
6
6
|
import '@operato/popup/ox-popup-list.js'
|
7
7
|
import './ox-select.js'
|
8
8
|
|
@@ -43,19 +43,26 @@ export class OxInputMassFraction extends OxFormField {
|
|
43
43
|
display: flex;
|
44
44
|
flex-direction: column;
|
45
45
|
justify-content: space-between;
|
46
|
+
|
47
|
+
--md-icon-size: var(--fontsize-default, 14px);
|
46
48
|
}
|
47
49
|
|
48
50
|
[records] {
|
49
51
|
flex: 1;
|
50
52
|
|
51
53
|
overflow: overlay;
|
52
|
-
}
|
53
54
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
55
|
+
> div {
|
56
|
+
display: flex;
|
57
|
+
flex-flow: row nowrap;
|
58
|
+
gap: var(--mass-fraction-gap, 3px);
|
59
|
+
margin-bottom: var(--margin-narrow);
|
60
|
+
}
|
61
|
+
|
62
|
+
> [nofraction] {
|
63
|
+
display: block;
|
64
|
+
text-align: center;
|
65
|
+
}
|
59
66
|
}
|
60
67
|
|
61
68
|
[data-record-new] {
|
@@ -74,19 +81,18 @@ export class OxInputMassFraction extends OxFormField {
|
|
74
81
|
padding: var(--mass-fraction-button-padding-vertical, 3px) var(--mass-fraction-button-padding-horizontal, 3px);
|
75
82
|
color: var(--button-color);
|
76
83
|
cursor: pointer;
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
background-color: var(--button-background-focus-color);
|
86
|
-
color: var(--theme-white-color);
|
84
|
+
|
85
|
+
&:focus,
|
86
|
+
&:hover,
|
87
|
+
&:active {
|
88
|
+
border: var(--button-active-border, 1px solid rgba(0, 0, 0, 0.2));
|
89
|
+
background-color: var(--button-background-focus-color);
|
90
|
+
color: var(--theme-white-color);
|
91
|
+
}
|
87
92
|
}
|
88
93
|
|
89
94
|
input,
|
95
|
+
label,
|
90
96
|
ox-select {
|
91
97
|
border: 0;
|
92
98
|
border-bottom: var(--border-dark-color);
|
@@ -95,10 +101,15 @@ export class OxInputMassFraction extends OxFormField {
|
|
95
101
|
min-width: 50px;
|
96
102
|
}
|
97
103
|
|
98
|
-
input
|
104
|
+
input,
|
105
|
+
label {
|
99
106
|
padding: var(--input-padding);
|
100
107
|
}
|
101
108
|
|
109
|
+
label {
|
110
|
+
text-align: center;
|
111
|
+
}
|
112
|
+
|
102
113
|
ox-select {
|
103
114
|
padding: 0;
|
104
115
|
}
|
@@ -127,15 +138,19 @@ export class OxInputMassFraction extends OxFormField {
|
|
127
138
|
left: 0;
|
128
139
|
}
|
129
140
|
|
130
|
-
[
|
131
|
-
|
132
|
-
|
141
|
+
[right-end] {
|
142
|
+
margin-left: auto;
|
143
|
+
}
|
144
|
+
|
145
|
+
[hidden] {
|
146
|
+
opacity: 0;
|
133
147
|
}
|
134
148
|
`
|
135
149
|
]
|
136
150
|
|
137
151
|
@property({ type: Object }) defaultValue: MassFraction = {}
|
138
152
|
@property({ type: Object }) value: MassFraction = {}
|
153
|
+
@property({ type: Boolean, attribute: true }) composable: boolean = false
|
139
154
|
|
140
155
|
@queryAll('[data-record]') records!: NodeListOf<HTMLElement>
|
141
156
|
|
@@ -152,6 +167,13 @@ export class OxInputMassFraction extends OxFormField {
|
|
152
167
|
|
153
168
|
return html`
|
154
169
|
<div records>
|
170
|
+
<div data-header>
|
171
|
+
<label data-key>성분</label>
|
172
|
+
<label data-value>체적비(몰분율)</label>
|
173
|
+
<button hidden><md-icon>remove</md-icon></button>
|
174
|
+
<button hidden><md-icon>remove</md-icon></button>
|
175
|
+
${this.composable ? html` <button hidden><md-icon>remove</md-icon></button>` : nothing}
|
176
|
+
</div>
|
155
177
|
${arrayed.length
|
156
178
|
? arrayed.map(
|
157
179
|
(item, idx) => html`
|
@@ -168,21 +190,25 @@ export class OxInputMassFraction extends OxFormField {
|
|
168
190
|
list="value-template"
|
169
191
|
?disabled=${this.disabled}
|
170
192
|
/>
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
193
|
+
${this.composable
|
194
|
+
? html`
|
195
|
+
<button
|
196
|
+
class="record-action"
|
197
|
+
@click=${(e: MouseEvent) => this._delete(e)}
|
198
|
+
tabindex="-1"
|
199
|
+
?disabled=${this.disabled}
|
200
|
+
>
|
201
|
+
<md-icon>remove</md-icon>
|
202
|
+
</button>
|
203
|
+
`
|
204
|
+
: nothing}
|
179
205
|
<button
|
180
206
|
class="record-action"
|
181
207
|
@click=${(e: MouseEvent) => this._up(e)}
|
182
208
|
tabindex="-1"
|
183
209
|
?disabled=${this.disabled || idx === 0}
|
184
210
|
>
|
185
|
-
<
|
211
|
+
<md-icon>arrow_upward</md-icon>
|
186
212
|
</button>
|
187
213
|
<button
|
188
214
|
class="record-action"
|
@@ -190,7 +216,7 @@ export class OxInputMassFraction extends OxFormField {
|
|
190
216
|
tabindex="-1"
|
191
217
|
?disabled=${this.disabled || idx === arrayed.length - 1}
|
192
218
|
>
|
193
|
-
<
|
219
|
+
<md-icon>arrow_downward</md-icon>
|
194
220
|
</button>
|
195
221
|
</div>
|
196
222
|
`
|
@@ -202,38 +228,43 @@ export class OxInputMassFraction extends OxFormField {
|
|
202
228
|
? nothing
|
203
229
|
: html`
|
204
230
|
<div data-record-new>
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
231
|
+
${this.composable
|
232
|
+
? html`
|
233
|
+
<ox-select
|
234
|
+
data-key
|
235
|
+
placeholder="Fluid"
|
236
|
+
.value=${live('')}
|
237
|
+
@change=${(e: Event) => {
|
238
|
+
e.stopPropagation()
|
239
|
+
}}
|
240
|
+
>
|
241
|
+
<ox-popup-list with-search> ${this.options} </ox-popup-list>
|
242
|
+
</ox-select>
|
243
|
+
|
244
|
+
<input
|
245
|
+
type="number"
|
246
|
+
data-value
|
247
|
+
placeholder="proportion"
|
248
|
+
min="0"
|
249
|
+
max="1"
|
250
|
+
step="0.01"
|
251
|
+
value=""
|
252
|
+
list="value-template"
|
253
|
+
/>
|
254
|
+
<button class="record-action" @click=${(e: MouseEvent) => this._add()} tabindex="-1">
|
255
|
+
<md-icon>add</md-icon>
|
256
|
+
</button>
|
257
|
+
`
|
258
|
+
: nothing}
|
229
259
|
<button
|
230
260
|
title="fill with the values suggested"
|
231
261
|
@click=${() => {
|
232
262
|
this.value = { ...this.defaultValue }
|
233
263
|
this.dispatchChangeEvent()
|
234
264
|
}}
|
265
|
+
right-end
|
235
266
|
>
|
236
|
-
<
|
267
|
+
<md-icon>settings_suggest</md-icon>
|
237
268
|
</button>
|
238
269
|
<button
|
239
270
|
title="normalize fraction"
|
@@ -241,7 +272,7 @@ export class OxInputMassFraction extends OxFormField {
|
|
241
272
|
this._normalize()
|
242
273
|
}}
|
243
274
|
>
|
244
|
-
<
|
275
|
+
<md-icon>repartition</md-icon>
|
245
276
|
</button>
|
246
277
|
</div>
|
247
278
|
`}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
*/
|
4
4
|
|
5
5
|
import './ox-input-color.js'
|
6
|
-
import '@material/
|
6
|
+
import '@material/web/icon/icon.js'
|
7
7
|
|
8
8
|
import { css, html } from 'lit'
|
9
9
|
import { customElement, property, query, queryAll } from 'lit/decorators.js'
|
@@ -28,7 +28,10 @@ export class OxInputMultipleColors extends OxFormField {
|
|
28
28
|
static styles = css`
|
29
29
|
:host {
|
30
30
|
display: inline-block;
|
31
|
+
|
32
|
+
--md-icon-size: var(--fontsize-default, 14px);
|
31
33
|
}
|
34
|
+
|
32
35
|
#colors-container > div {
|
33
36
|
display: grid;
|
34
37
|
grid-template-columns: 34px 1fr 34px;
|
@@ -47,14 +50,11 @@ export class OxInputMultipleColors extends OxFormField {
|
|
47
50
|
border: var(--button-border);
|
48
51
|
border-radius: var(--border-radius);
|
49
52
|
background-color: var(--button-background-color);
|
50
|
-
padding: var(--padding-narrow) var(--padding-default);
|
51
53
|
line-height: 0.8;
|
52
54
|
color: var(--button-color);
|
53
55
|
cursor: pointer;
|
54
56
|
}
|
55
|
-
|
56
|
-
font-size: var(--fontsize-default);
|
57
|
-
}
|
57
|
+
|
58
58
|
button:focus,
|
59
59
|
button:hover,
|
60
60
|
button:active {
|
@@ -80,7 +80,7 @@ export class OxInputMultipleColors extends OxFormField {
|
|
80
80
|
(item, index) => html`
|
81
81
|
<div>
|
82
82
|
<button @click=${() => this._appendEditorColor()} data-index=${index} ?disabled=${this.disabled}>
|
83
|
-
<
|
83
|
+
<md-icon>add</md-icon>
|
84
84
|
</button>
|
85
85
|
<ox-input-color .value=${item} ?disabled=${this.disabled}> </ox-input-color>
|
86
86
|
|
@@ -91,7 +91,7 @@ export class OxInputMultipleColors extends OxFormField {
|
|
91
91
|
data-index=${index}
|
92
92
|
?disabled=${this.disabled}
|
93
93
|
>
|
94
|
-
<
|
94
|
+
<md-icon>remove</md-icon>
|
95
95
|
</button>
|
96
96
|
`
|
97
97
|
: html``}
|
package/src/ox-input-options.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
|
5
|
-
import '@material/
|
5
|
+
import '@material/web/icon/icon.js'
|
6
6
|
|
7
7
|
import { css, html, nothing } from 'lit'
|
8
8
|
import { customElement, property } from 'lit/decorators.js'
|
@@ -19,6 +19,8 @@ export class OxInputOptions extends OxFormField {
|
|
19
19
|
flex-direction: column;
|
20
20
|
overflow: hidden;
|
21
21
|
margin-bottom: var(--margin-wide);
|
22
|
+
|
23
|
+
--md-icon-size: var(--fontsize-default, 14px);
|
22
24
|
}
|
23
25
|
|
24
26
|
div {
|
@@ -32,7 +34,6 @@ export class OxInputOptions extends OxFormField {
|
|
32
34
|
border: var(--button-border);
|
33
35
|
border-radius: var(--border-radius);
|
34
36
|
background-color: var(--button-background-color);
|
35
|
-
padding: var(--padding-narrow) var(--padding-default);
|
36
37
|
line-height: 0.8;
|
37
38
|
color: var(--button-color);
|
38
39
|
cursor: pointer;
|
@@ -40,9 +41,6 @@ export class OxInputOptions extends OxFormField {
|
|
40
41
|
button + button {
|
41
42
|
margin-left: -5px;
|
42
43
|
}
|
43
|
-
button mwc-icon {
|
44
|
-
font-size: var(--fontsize-default);
|
45
|
-
}
|
46
44
|
button:focus,
|
47
45
|
button:hover,
|
48
46
|
button:active {
|
@@ -91,7 +89,7 @@ export class OxInputOptions extends OxFormField {
|
|
91
89
|
tabindex="-1"
|
92
90
|
?disabled=${this.disabled}
|
93
91
|
>
|
94
|
-
<
|
92
|
+
<md-icon>remove</md-icon>
|
95
93
|
</button>
|
96
94
|
</div>
|
97
95
|
`
|
@@ -103,7 +101,7 @@ export class OxInputOptions extends OxFormField {
|
|
103
101
|
<input type="text" data-text="" placeholder="text" value="" />
|
104
102
|
<input type="text" data-value="" placeholder="value" value="" @change=${(e: Event) => this._add()} />
|
105
103
|
<button class="record-action" @click=${(e: MouseEvent) => this._add()} tabindex="-1">
|
106
|
-
<
|
104
|
+
<md-icon>add</md-icon>
|
107
105
|
</button>
|
108
106
|
</div>
|
109
107
|
`}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
|
5
|
-
import '@material/
|
5
|
+
import '@material/web/icon/icon.js'
|
6
6
|
|
7
7
|
import { css, html, nothing } from 'lit'
|
8
8
|
import { customElement, property, queryAll } from 'lit/decorators.js'
|
@@ -29,6 +29,8 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
29
29
|
flex-direction: column;
|
30
30
|
overflow: hidden;
|
31
31
|
margin-bottom: var(--margin-wide);
|
32
|
+
|
33
|
+
--md-icon-size: var(--fontsize-default, 14px);
|
32
34
|
}
|
33
35
|
|
34
36
|
div {
|
@@ -50,9 +52,7 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
50
52
|
button + button {
|
51
53
|
margin-left: -5px;
|
52
54
|
}
|
53
|
-
|
54
|
-
font-size: var(--fontsize-default);
|
55
|
-
}
|
55
|
+
|
56
56
|
button:focus,
|
57
57
|
button:hover,
|
58
58
|
button:active {
|
@@ -109,7 +109,7 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
109
109
|
tabindex="-1"
|
110
110
|
?disabled=${this.disabled}
|
111
111
|
>
|
112
|
-
<
|
112
|
+
<md-icon>remove</md-icon>
|
113
113
|
</button>
|
114
114
|
<button
|
115
115
|
class="record-action"
|
@@ -117,7 +117,7 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
117
117
|
tabindex="-1"
|
118
118
|
?disabled=${this.disabled}
|
119
119
|
>
|
120
|
-
<
|
120
|
+
<md-icon>arrow_upward</md-icon>
|
121
121
|
</button>
|
122
122
|
<button
|
123
123
|
class="record-action"
|
@@ -125,7 +125,7 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
125
125
|
tabindex="-1"
|
126
126
|
?disabled=${this.disabled}
|
127
127
|
>
|
128
|
-
<
|
128
|
+
<md-icon>arrow_downward</md-icon>
|
129
129
|
</button>
|
130
130
|
</div>
|
131
131
|
`
|
@@ -137,10 +137,10 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
137
137
|
<input type="text" data-key placeholder="key" value="" />
|
138
138
|
<input type="text" data-value placeholder="value" value="" list="value-template" />
|
139
139
|
<button class="record-action" @click=${(e: MouseEvent) => this._add()} tabindex="-1">
|
140
|
-
<
|
140
|
+
<md-icon>add</md-icon>
|
141
141
|
</button>
|
142
|
-
<button class="hidden"><
|
143
|
-
<button class="hidden"><
|
142
|
+
<button class="hidden"><md-icon>add</md-icon></button>
|
143
|
+
<button class="hidden"><md-icon>add</md-icon></button>
|
144
144
|
</div>
|
145
145
|
`}
|
146
146
|
|
@@ -261,13 +261,16 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
261
261
|
const deleted = array.splice(index, 1)
|
262
262
|
array.splice(index + 1, 0, ...deleted)
|
263
263
|
|
264
|
-
this.value = array.reduce(
|
265
|
-
|
266
|
-
|
264
|
+
this.value = array.reduce(
|
265
|
+
(sum, record) => {
|
266
|
+
const key = (record.querySelector('[data-key]') as HTMLInputElement).value
|
267
|
+
const value = (record.querySelector('[data-value]') as HTMLInputElement).value
|
267
268
|
|
268
|
-
|
269
|
-
|
270
|
-
|
269
|
+
sum[key] = value
|
270
|
+
return sum
|
271
|
+
},
|
272
|
+
{} as { [key: string]: string }
|
273
|
+
)
|
271
274
|
|
272
275
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
|
273
276
|
}
|
@@ -284,13 +287,16 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
284
287
|
array.splice(index, 1)
|
285
288
|
array.splice(index + 1, 0, record)
|
286
289
|
|
287
|
-
this.value = array.reduce(
|
288
|
-
|
289
|
-
|
290
|
+
this.value = array.reduce(
|
291
|
+
(sum, record) => {
|
292
|
+
const key = (record.querySelector('[data-key]') as HTMLInputElement).value
|
293
|
+
const value = (record.querySelector('[data-value]') as HTMLInputElement).value
|
290
294
|
|
291
|
-
|
292
|
-
|
293
|
-
|
295
|
+
sum[key] = value
|
296
|
+
return sum
|
297
|
+
},
|
298
|
+
{} as { [key: string]: string }
|
299
|
+
)
|
294
300
|
|
295
301
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
|
296
302
|
}
|
@@ -2,8 +2,6 @@
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
|
5
|
-
import '@material/mwc-button'
|
6
|
-
|
7
5
|
import { css, html } from 'lit'
|
8
6
|
import { customElement, property, query } from 'lit/decorators.js'
|
9
7
|
import { ifDefined } from 'lit/directives/if-defined.js'
|
@@ -33,6 +31,21 @@ export class OxInputPrivilege extends OxFormField {
|
|
33
31
|
height: 100%;
|
34
32
|
}
|
35
33
|
|
34
|
+
select {
|
35
|
+
border: 0;
|
36
|
+
border-bottom: var(--border-dark-color);
|
37
|
+
padding: var(--input-padding);
|
38
|
+
font: var(--input-font);
|
39
|
+
color: var(--primary-text-color);
|
40
|
+
|
41
|
+
max-height: 35px;
|
42
|
+
}
|
43
|
+
|
44
|
+
select:focus {
|
45
|
+
outline: none;
|
46
|
+
border-bottom: 1px solid var(--primary-color);
|
47
|
+
}
|
48
|
+
|
36
49
|
div[values] {
|
37
50
|
display: grid;
|
38
51
|
grid-template-columns: 1fr 1fr;
|
@@ -66,41 +79,11 @@ export class OxInputPrivilege extends OxFormField {
|
|
66
79
|
border-bottom: 1px solid var(--primary-color);
|
67
80
|
}
|
68
81
|
|
69
|
-
input:invalid {
|
70
|
-
border-bottom: 1px solid var(--status-danger-color);
|
71
|
-
color: var(--status-danger-color);
|
72
|
-
}
|
73
|
-
|
74
82
|
label {
|
75
83
|
margin-right: var(--margin-default);
|
76
84
|
font: normal 0.8em var(--theme-font);
|
77
85
|
color: var(--primary-color);
|
78
86
|
}
|
79
|
-
|
80
|
-
div[buttons] {
|
81
|
-
display: flex;
|
82
|
-
flex-direction: row;
|
83
|
-
justify-content: left;
|
84
|
-
padding: 10px;
|
85
|
-
}
|
86
|
-
|
87
|
-
button {
|
88
|
-
border: var(--button-border);
|
89
|
-
border-radius: var(--border-radius);
|
90
|
-
background-color: var(--button-background-color);
|
91
|
-
padding: var(--padding-narrow) var(--padding-default);
|
92
|
-
min-height: 35px;
|
93
|
-
line-height: 0.8;
|
94
|
-
color: var(--button-color);
|
95
|
-
cursor: pointer;
|
96
|
-
}
|
97
|
-
button:focus,
|
98
|
-
button:hover,
|
99
|
-
button:active {
|
100
|
-
border: var(--button-activ-border);
|
101
|
-
background-color: var(--button-background-focus-color);
|
102
|
-
color: var(--theme-white-color);
|
103
|
-
}
|
104
87
|
`
|
105
88
|
|
106
89
|
@property({ type: Object }) value?: {
|
package/src/ox-input-search.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
|
5
|
-
import '@material/
|
5
|
+
import '@material/web/icon/icon.js'
|
6
6
|
|
7
7
|
import debounce from 'lodash-es/debounce'
|
8
8
|
import { css, html } from 'lit'
|
@@ -19,7 +19,7 @@ export class OxInputSearch extends OxFormField {
|
|
19
19
|
position: relative;
|
20
20
|
align-items: center;
|
21
21
|
|
22
|
-
--
|
22
|
+
--md-icon-size: 20px;
|
23
23
|
}
|
24
24
|
|
25
25
|
[type='text'] {
|
@@ -31,6 +31,7 @@ export class OxInputSearch extends OxFormField {
|
|
31
31
|
padding-left: 25px;
|
32
32
|
font: var(--input-search-font, var(--input-font));
|
33
33
|
color: var(--primary-text-color);
|
34
|
+
overflow: hidden;
|
34
35
|
}
|
35
36
|
|
36
37
|
[type='text']:focus {
|
@@ -38,7 +39,7 @@ export class OxInputSearch extends OxFormField {
|
|
38
39
|
border-bottom: var(--input-search-focus-border-bottom, 1px solid var(--primary-color));
|
39
40
|
}
|
40
41
|
|
41
|
-
|
42
|
+
md-icon {
|
42
43
|
position: absolute;
|
43
44
|
color: var(--secondary-color);
|
44
45
|
}
|
@@ -54,7 +55,7 @@ export class OxInputSearch extends OxFormField {
|
|
54
55
|
|
55
56
|
render() {
|
56
57
|
return html`
|
57
|
-
<
|
58
|
+
<md-icon @click=${(e: Event) => !this.disabled && this._onClickSearch(e)}>search</md-icon>
|
58
59
|
<input
|
59
60
|
type="text"
|
60
61
|
.value=${this.value || ''}
|
package/src/ox-input-table.ts
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
3
3
|
*/
|
4
4
|
|
5
|
-
import '@material/
|
5
|
+
import '@material/web/icon/icon.js'
|
6
6
|
import '@polymer/paper-dropdown-menu/paper-dropdown-menu'
|
7
7
|
import '@polymer/paper-item/paper-item'
|
8
8
|
import '@operato/i18n/ox-i18n.js'
|
@@ -74,7 +74,7 @@ class OxInputTable extends OxFormField {
|
|
74
74
|
line-height: 1.5;
|
75
75
|
}
|
76
76
|
|
77
|
-
#border-set >
|
77
|
+
#border-set > md-icon {
|
78
78
|
grid-column: span 2;
|
79
79
|
margin: 0 0 0 8px;
|
80
80
|
width: 32px;
|
@@ -216,16 +216,16 @@ class OxInputTable extends OxFormField {
|
|
216
216
|
border-style-btn"
|
217
217
|
@click=${(e: Event) => this._onClickType(e)}
|
218
218
|
>
|
219
|
-
<
|
220
|
-
<
|
221
|
-
<
|
222
|
-
<
|
223
|
-
<
|
224
|
-
<
|
225
|
-
<
|
226
|
-
<
|
227
|
-
<
|
228
|
-
<
|
219
|
+
<md-icon data-value="out">border_outer</md-icon>
|
220
|
+
<md-icon data-value="in">border_inner</md-icon>
|
221
|
+
<md-icon data-value="all">border_all</md-icon>
|
222
|
+
<md-icon data-value="left">border_left</md-icon>
|
223
|
+
<md-icon data-value="center">border_vertical</md-icon>
|
224
|
+
<md-icon data-value="right">border_right</md-icon>
|
225
|
+
<md-icon data-value="top">border_top</md-icon>
|
226
|
+
<md-icon data-value="middle">border_horizontal</md-icon>
|
227
|
+
<md-icon data-value="bottom">border_bottom</md-icon>
|
228
|
+
<md-icon data-value="clear">border_clear</md-icon>
|
229
229
|
</div>
|
230
230
|
|
231
231
|
<div class="property-grid">
|