@operato/input 2.0.0-alpha.57 → 2.0.0-alpha.62
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 +20 -0
- package/dist/src/ox-input-barcode.js +2 -2
- 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-container.d.ts +1 -1
- 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 +0 -1
- 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.js +2 -2
- package/dist/src/ox-input-data.js.map +1 -1
- package/dist/src/ox-input-duration.d.ts +0 -1
- package/dist/src/ox-input-duration.js +3 -5
- package/dist/src/ox-input-duration.js.map +1 -1
- package/dist/src/ox-input-file.d.ts +1 -1
- package/dist/src/ox-input-file.js +9 -9
- package/dist/src/ox-input-file.js.map +1 -1
- package/dist/src/ox-input-i18n-label.d.ts +1 -1
- package/dist/src/ox-input-i18n-label.js +1 -1
- package/dist/src/ox-input-i18n-label.js.map +1 -1
- package/dist/src/ox-input-image.d.ts +1 -1
- 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 +1 -1
- package/dist/src/ox-input-key-values.js +8 -8
- package/dist/src/ox-input-key-values.js.map +1 -1
- package/dist/src/ox-input-mass-fraction.d.ts +1 -1
- package/dist/src/ox-input-mass-fraction.js +18 -10
- package/dist/src/ox-input-mass-fraction.js.map +1 -1
- package/dist/src/ox-input-multiple-colors.d.ts +1 -1
- package/dist/src/ox-input-multiple-colors.js +4 -7
- package/dist/src/ox-input-multiple-colors.js.map +1 -1
- package/dist/src/ox-input-options.d.ts +1 -1
- package/dist/src/ox-input-options.js +3 -7
- package/dist/src/ox-input-options.js.map +1 -1
- package/dist/src/ox-input-partition-keys.d.ts +1 -1
- package/dist/src/ox-input-partition-keys.js +8 -10
- package/dist/src/ox-input-partition-keys.js.map +1 -1
- package/dist/src/ox-input-privilege.d.ts +0 -1
- package/dist/src/ox-input-privilege.js +0 -1
- package/dist/src/ox-input-privilege.js.map +1 -1
- package/dist/src/ox-input-search.d.ts +1 -1
- package/dist/src/ox-input-search.js +4 -4
- package/dist/src/ox-input-search.js.map +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-unit-number.d.ts +1 -1
- package/dist/src/ox-input-unit-number.js +3 -3
- package/dist/src/ox-input-unit-number.js.map +1 -1
- package/dist/src/ox-input-value-map.js +13 -15
- package/dist/src/ox-input-value-map.js.map +1 -1
- package/dist/src/ox-input-value-ranges.js +13 -15
- package/dist/src/ox-input-value-ranges.js.map +1 -1
- package/dist/src/ox-input-work-shift.js +2 -5
- package/dist/src/ox-input-work-shift.js.map +1 -1
- package/dist/src/ox-select.d.ts +1 -1
- package/dist/src/ox-select.js +4 -4
- 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 +13 -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 +0 -4
- package/dist/stories/ox-input-data.stories.js +14 -4
- package/dist/stories/ox-input-data.stories.js.map +1 -1
- 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.js +13 -1
- package/dist/stories/ox-input-i18n-label.stories.js.map +1 -1
- 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.js +13 -1
- package/dist/stories/ox-input-mass-fraction.stories.js.map +1 -1
- package/dist/stories/ox-input-multiple-colors.stories.js +21 -10
- 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 -1
- 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 +6 -6
- package/src/ox-input-barcode.ts +2 -2
- 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 +2 -2
- package/src/ox-input-duration.ts +3 -6
- package/src/ox-input-file.ts +9 -9
- package/src/ox-input-i18n-label.ts +1 -1
- package/src/ox-input-image.ts +4 -4
- package/src/ox-input-key-values.ts +26 -20
- package/src/ox-input-mass-fraction.ts +18 -10
- package/src/ox-input-multiple-colors.ts +4 -7
- package/src/ox-input-options.ts +3 -7
- package/src/ox-input-partition-keys.ts +26 -22
- package/src/ox-input-privilege.ts +0 -2
- package/src/ox-input-search.ts +4 -4
- package/src/ox-input-table.ts +12 -12
- package/src/ox-input-unit-number.ts +3 -3
- package/src/ox-input-value-map.ts +15 -17
- package/src/ox-input-value-ranges.ts +15 -17
- package/src/ox-input-work-shift.ts +2 -5
- package/src/ox-select.ts +4 -4
- 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 +13 -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 +14 -4
- 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 +13 -1
- package/stories/ox-input-key-values.stories.ts +13 -1
- package/stories/ox-input-mass-fraction.stories.ts +13 -1
- package/stories/ox-input-multiple-colors.stories.ts +21 -10
- 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 -1
- 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
@@ -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'
|
@@ -50,9 +50,7 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
50
50
|
button + button {
|
51
51
|
margin-left: -5px;
|
52
52
|
}
|
53
|
-
|
54
|
-
font-size: var(--fontsize-default);
|
55
|
-
}
|
53
|
+
|
56
54
|
button:focus,
|
57
55
|
button:hover,
|
58
56
|
button:active {
|
@@ -109,7 +107,7 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
109
107
|
tabindex="-1"
|
110
108
|
?disabled=${this.disabled}
|
111
109
|
>
|
112
|
-
<
|
110
|
+
<md-icon>remove</md-icon>
|
113
111
|
</button>
|
114
112
|
<button
|
115
113
|
class="record-action"
|
@@ -117,7 +115,7 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
117
115
|
tabindex="-1"
|
118
116
|
?disabled=${this.disabled}
|
119
117
|
>
|
120
|
-
<
|
118
|
+
<md-icon>arrow_upward</md-icon>
|
121
119
|
</button>
|
122
120
|
<button
|
123
121
|
class="record-action"
|
@@ -125,7 +123,7 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
125
123
|
tabindex="-1"
|
126
124
|
?disabled=${this.disabled}
|
127
125
|
>
|
128
|
-
<
|
126
|
+
<md-icon>arrow_downward</md-icon>
|
129
127
|
</button>
|
130
128
|
</div>
|
131
129
|
`
|
@@ -137,10 +135,10 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
137
135
|
<input type="text" data-key placeholder="key" value="" />
|
138
136
|
<input type="text" data-value placeholder="value" value="" list="value-template" />
|
139
137
|
<button class="record-action" @click=${(e: MouseEvent) => this._add()} tabindex="-1">
|
140
|
-
<
|
138
|
+
<md-icon>add</md-icon>
|
141
139
|
</button>
|
142
|
-
<button class="hidden"><
|
143
|
-
<button class="hidden"><
|
140
|
+
<button class="hidden"><md-icon>add</md-icon></button>
|
141
|
+
<button class="hidden"><md-icon>add</md-icon></button>
|
144
142
|
</div>
|
145
143
|
`}
|
146
144
|
|
@@ -261,13 +259,16 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
261
259
|
const deleted = array.splice(index, 1)
|
262
260
|
array.splice(index + 1, 0, ...deleted)
|
263
261
|
|
264
|
-
this.value = array.reduce(
|
265
|
-
|
266
|
-
|
262
|
+
this.value = array.reduce(
|
263
|
+
(sum, record) => {
|
264
|
+
const key = (record.querySelector('[data-key]') as HTMLInputElement).value
|
265
|
+
const value = (record.querySelector('[data-value]') as HTMLInputElement).value
|
267
266
|
|
268
|
-
|
269
|
-
|
270
|
-
|
267
|
+
sum[key] = value
|
268
|
+
return sum
|
269
|
+
},
|
270
|
+
{} as { [key: string]: string }
|
271
|
+
)
|
271
272
|
|
272
273
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
|
273
274
|
}
|
@@ -284,13 +285,16 @@ export class OxInputPartitionKeys extends OxFormField {
|
|
284
285
|
array.splice(index, 1)
|
285
286
|
array.splice(index + 1, 0, record)
|
286
287
|
|
287
|
-
this.value = array.reduce(
|
288
|
-
|
289
|
-
|
288
|
+
this.value = array.reduce(
|
289
|
+
(sum, record) => {
|
290
|
+
const key = (record.querySelector('[data-key]') as HTMLInputElement).value
|
291
|
+
const value = (record.querySelector('[data-value]') as HTMLInputElement).value
|
290
292
|
|
291
|
-
|
292
|
-
|
293
|
-
|
293
|
+
sum[key] = value
|
294
|
+
return sum
|
295
|
+
},
|
296
|
+
{} as { [key: string]: string }
|
297
|
+
)
|
294
298
|
|
295
299
|
this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail: this.value }))
|
296
300
|
}
|
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'] {
|
@@ -38,7 +38,7 @@ export class OxInputSearch extends OxFormField {
|
|
38
38
|
border-bottom: var(--input-search-focus-border-bottom, 1px solid var(--primary-color));
|
39
39
|
}
|
40
40
|
|
41
|
-
|
41
|
+
md-icon {
|
42
42
|
position: absolute;
|
43
43
|
color: var(--secondary-color);
|
44
44
|
}
|
@@ -54,7 +54,7 @@ export class OxInputSearch extends OxFormField {
|
|
54
54
|
|
55
55
|
render() {
|
56
56
|
return html`
|
57
|
-
<
|
57
|
+
<md-icon @click=${(e: Event) => !this.disabled && this._onClickSearch(e)}>search</md-icon>
|
58
58
|
<input
|
59
59
|
type="text"
|
60
60
|
.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">
|
@@ -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, PropertyValues } from 'lit'
|
8
8
|
import { customElement, property, query } from 'lit/decorators.js'
|
@@ -217,7 +217,7 @@ export class OxInputUnitNumber extends OxFormField {
|
|
217
217
|
min-width: 24px;
|
218
218
|
}
|
219
219
|
|
220
|
-
|
220
|
+
md-icon {
|
221
221
|
font-size: 18px;
|
222
222
|
color: var(--primary-color, #3c3938);
|
223
223
|
margin-left: auto;
|
@@ -272,7 +272,7 @@ export class OxInputUnitNumber extends OxFormField {
|
|
272
272
|
<div option value=${this.stdUnit}>${this.stdUnit}</div>
|
273
273
|
${units.map(unit => html`<div option value=${unit}>${unit}</div>`)}
|
274
274
|
</ox-popup-list>
|
275
|
-
<
|
275
|
+
<md-icon>expand_more</md-icon>
|
276
276
|
</div>
|
277
277
|
`
|
278
278
|
}
|
@@ -63,9 +63,7 @@ export class OxInputValueMap extends OxFormField {
|
|
63
63
|
button + button {
|
64
64
|
margin-left: -5px;
|
65
65
|
}
|
66
|
-
|
67
|
-
font-size: var(--fontsize-default);
|
68
|
-
}
|
66
|
+
|
69
67
|
button:focus,
|
70
68
|
button:hover,
|
71
69
|
button:active {
|
@@ -144,17 +142,17 @@ export class OxInputValueMap extends OxFormField {
|
|
144
142
|
/>
|
145
143
|
`
|
146
144
|
: this.valuetype == 'color'
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
145
|
+
? html` <ox-input-color data-value value=${ifDefined(value)} ?disabled=${this.disabled}> </ox-input-color> `
|
146
|
+
: html`
|
147
|
+
<input
|
148
|
+
type="text"
|
149
|
+
data-value
|
150
|
+
placeholder="value"
|
151
|
+
value=${ifDefined(value)}
|
152
|
+
data-value-type=${this.valuetype}
|
153
|
+
?disabled=${this.disabled}
|
154
|
+
/>
|
155
|
+
`
|
158
156
|
}
|
159
157
|
|
160
158
|
render() {
|
@@ -170,7 +168,7 @@ export class OxInputValueMap extends OxFormField {
|
|
170
168
|
tabindex="-1"
|
171
169
|
?disabled=${this.disabled}
|
172
170
|
>
|
173
|
-
<
|
171
|
+
<md-icon>remove</md-icon>
|
174
172
|
</button>
|
175
173
|
</div>
|
176
174
|
`
|
@@ -185,7 +183,7 @@ export class OxInputValueMap extends OxFormField {
|
|
185
183
|
|
186
184
|
${this.valueInputTemplate()}
|
187
185
|
<button class="record-action" @click=${(e: MouseEvent) => this._add()} tabindex="-1">
|
188
|
-
<
|
186
|
+
<md-icon>add</md-icon>
|
189
187
|
</button>
|
190
188
|
</div>
|
191
189
|
`
|
@@ -196,7 +194,7 @@ export class OxInputValueMap extends OxFormField {
|
|
196
194
|
|
197
195
|
${this.valueInputTemplate((this.value && this.value.default) || this._defaultValue())}
|
198
196
|
<button class="record-action" @click=${() => this._sort()} tabindex="-1">
|
199
|
-
<
|
197
|
+
<md-icon>chevron_right</md-icon>
|
200
198
|
</button>
|
201
199
|
</div>
|
202
200
|
`
|
@@ -63,9 +63,7 @@ export class OxInputValueRange extends OxFormField {
|
|
63
63
|
button + button {
|
64
64
|
margin-left: -5px;
|
65
65
|
}
|
66
|
-
|
67
|
-
font-size: var(--fontsize-default);
|
68
|
-
}
|
66
|
+
|
69
67
|
button:focus,
|
70
68
|
button:hover,
|
71
69
|
button:active {
|
@@ -153,17 +151,17 @@ export class OxInputValueRange extends OxFormField {
|
|
153
151
|
/>
|
154
152
|
`
|
155
153
|
: this.valuetype == 'color'
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
154
|
+
? html` <ox-input-color data-value value=${ifDefined(value)} ?disabled=${this.disabled}> </ox-input-color> `
|
155
|
+
: html`
|
156
|
+
<input
|
157
|
+
type="text"
|
158
|
+
data-value
|
159
|
+
placeholder="value"
|
160
|
+
value=${ifDefined(value)}
|
161
|
+
data-value-type=${this.valuetype}
|
162
|
+
?disabled=${this.disabled}
|
163
|
+
/>
|
164
|
+
`
|
167
165
|
}
|
168
166
|
|
169
167
|
render() {
|
@@ -181,7 +179,7 @@ export class OxInputValueRange extends OxFormField {
|
|
181
179
|
tabindex="-1"
|
182
180
|
?disabled=${this.disabled}
|
183
181
|
>
|
184
|
-
<
|
182
|
+
<md-icon>remove</md-icon>
|
185
183
|
</button>
|
186
184
|
</div>
|
187
185
|
`
|
@@ -197,7 +195,7 @@ export class OxInputValueRange extends OxFormField {
|
|
197
195
|
|
198
196
|
${this.valueInputTemplate()}
|
199
197
|
<button class="record-action" @click=${(e: Event) => this._add()} tabindex="-1">
|
200
|
-
<
|
198
|
+
<md-icon>add</md-icon>
|
201
199
|
</button>
|
202
200
|
</div>
|
203
201
|
`
|
@@ -209,7 +207,7 @@ export class OxInputValueRange extends OxFormField {
|
|
209
207
|
|
210
208
|
${this.valueInputTemplate((this.value && this.value.default) || this._defaultValue())}
|
211
209
|
<button class="record-action" @click=${(e: Event) => this._sort()} ?disabled=${this.disabled}>
|
212
|
-
<
|
210
|
+
<md-icon>chevron_right</md-icon>
|
213
211
|
</button>
|
214
212
|
</div>
|
215
213
|
`
|
@@ -94,9 +94,6 @@ export class OxInputWorkShift extends OxFormField {
|
|
94
94
|
color: var(--button-color);
|
95
95
|
cursor: pointer;
|
96
96
|
}
|
97
|
-
button mwc-icon {
|
98
|
-
font-size: var(--fontsize-default);
|
99
|
-
}
|
100
97
|
button:focus,
|
101
98
|
button:hover,
|
102
99
|
button:active {
|
@@ -156,7 +153,7 @@ export class OxInputWorkShift extends OxFormField {
|
|
156
153
|
tabindex="-1"
|
157
154
|
?disabled=${this.disabled}
|
158
155
|
>
|
159
|
-
<
|
156
|
+
<md-icon>remove</md-icon>
|
160
157
|
</button>
|
161
158
|
</div>
|
162
159
|
`
|
@@ -182,7 +179,7 @@ export class OxInputWorkShift extends OxFormField {
|
|
182
179
|
<input type="time" data-to-time step="1800" />
|
183
180
|
|
184
181
|
<button class="record-action" @click=${(e: Event) => this._add()} tabindex="-1">
|
185
|
-
<
|
182
|
+
<md-icon>add</md-icon>
|
186
183
|
</button>
|
187
184
|
</div>
|
188
185
|
`}
|
package/src/ox-select.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 '@operato/popup/ox-popup-list.js'
|
7
7
|
|
8
8
|
import { css, html, PropertyValues } from 'lit'
|
@@ -58,7 +58,7 @@ export class Select extends OxFormField {
|
|
58
58
|
white-space: nowrap;
|
59
59
|
}
|
60
60
|
|
61
|
-
|
61
|
+
md-icon {
|
62
62
|
display: block;
|
63
63
|
width: 24px;
|
64
64
|
text-align: right;
|
@@ -67,7 +67,7 @@ export class Select extends OxFormField {
|
|
67
67
|
opacity: 0.7;
|
68
68
|
}
|
69
69
|
|
70
|
-
div:hover
|
70
|
+
div:hover md-icon {
|
71
71
|
color: var(--primary-color);
|
72
72
|
}
|
73
73
|
|
@@ -92,7 +92,7 @@ export class Select extends OxFormField {
|
|
92
92
|
return html`
|
93
93
|
<div @click=${this.expand}>
|
94
94
|
<span @mouseover=${onmouseover} @mouseout=${onmouseout}>${label}</span>
|
95
|
-
<
|
95
|
+
<md-icon>expand_more</md-icon>
|
96
96
|
</div>
|
97
97
|
|
98
98
|
<slot></slot>
|
@@ -25,7 +25,20 @@ interface ArgTypes {
|
|
25
25
|
|
26
26
|
const Template: Story<ArgTypes> = ({ value = {}, disabled }: ArgTypes) => html`
|
27
27
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
28
|
-
|
28
|
+
|
29
|
+
<link
|
30
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
31
|
+
rel="stylesheet"
|
32
|
+
/>
|
33
|
+
<link
|
34
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
35
|
+
rel="stylesheet"
|
36
|
+
/>
|
37
|
+
<link
|
38
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
39
|
+
rel="stylesheet"
|
40
|
+
/>
|
41
|
+
|
29
42
|
<style>
|
30
43
|
body {
|
31
44
|
}
|
@@ -27,7 +27,20 @@ interface ArgTypes {
|
|
27
27
|
|
28
28
|
const Template: Story<ArgTypes> = ({ name = '3dish', value = [], disabled }: ArgTypes) => html`
|
29
29
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
30
|
-
|
30
|
+
|
31
|
+
<link
|
32
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
33
|
+
rel="stylesheet"
|
34
|
+
/>
|
35
|
+
<link
|
36
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
37
|
+
rel="stylesheet"
|
38
|
+
/>
|
39
|
+
<link
|
40
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
41
|
+
rel="stylesheet"
|
42
|
+
/>
|
43
|
+
|
31
44
|
<style>
|
32
45
|
body {
|
33
46
|
}
|
@@ -27,7 +27,19 @@ interface ArgTypes {
|
|
27
27
|
|
28
28
|
const Template: Story<ArgTypes> = ({ name = '3dish', value = 0, disabled }: ArgTypes) => html`
|
29
29
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
30
|
-
|
30
|
+
|
31
|
+
<link
|
32
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
33
|
+
rel="stylesheet"
|
34
|
+
/>
|
35
|
+
<link
|
36
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
37
|
+
rel="stylesheet"
|
38
|
+
/>
|
39
|
+
<link
|
40
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
41
|
+
rel="stylesheet"
|
42
|
+
/>
|
31
43
|
<style>
|
32
44
|
body {
|
33
45
|
}
|
@@ -41,7 +41,19 @@ const Template: Story<ArgTypes> = ({
|
|
41
41
|
disabled
|
42
42
|
}: ArgTypes) => html`
|
43
43
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
44
|
-
|
44
|
+
|
45
|
+
<link
|
46
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
47
|
+
rel="stylesheet"
|
48
|
+
/>
|
49
|
+
<link
|
50
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
51
|
+
rel="stylesheet"
|
52
|
+
/>
|
53
|
+
<link
|
54
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
55
|
+
rel="stylesheet"
|
56
|
+
/>
|
45
57
|
<style>
|
46
58
|
#root {
|
47
59
|
height: 500px;
|
@@ -9,6 +9,7 @@ export default {
|
|
9
9
|
value: { control: 'text' },
|
10
10
|
name: { control: 'text' },
|
11
11
|
language: { control: 'select', options: ['javascript', 'sql', 'json'] },
|
12
|
+
showLineNumbers: { control: 'boolean' },
|
12
13
|
disabled: { control: 'boolean' }
|
13
14
|
}
|
14
15
|
}
|
@@ -23,12 +24,31 @@ interface ArgTypes {
|
|
23
24
|
name?: string
|
24
25
|
value?: string
|
25
26
|
language: 'javascript' | 'sql' | 'json'
|
27
|
+
showLineNumbers?: boolean
|
26
28
|
disabled?: boolean
|
27
29
|
}
|
28
30
|
|
29
|
-
const Template: Story<ArgTypes> = ({
|
31
|
+
const Template: Story<ArgTypes> = ({
|
32
|
+
name = 'code',
|
33
|
+
language = 'javascript',
|
34
|
+
value = '',
|
35
|
+
showLineNumbers,
|
36
|
+
disabled
|
37
|
+
}: ArgTypes) => html`
|
30
38
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
31
|
-
|
39
|
+
|
40
|
+
<link
|
41
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
42
|
+
rel="stylesheet"
|
43
|
+
/>
|
44
|
+
<link
|
45
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
46
|
+
rel="stylesheet"
|
47
|
+
/>
|
48
|
+
<link
|
49
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
50
|
+
rel="stylesheet"
|
51
|
+
/>
|
32
52
|
<style>
|
33
53
|
body {
|
34
54
|
}
|
@@ -44,6 +64,7 @@ const Template: Story<ArgTypes> = ({ name = 'code', language = 'javascript', val
|
|
44
64
|
name=${name}
|
45
65
|
language=${language}
|
46
66
|
.value=${value}
|
67
|
+
?show-line-numbers=${showLineNumbers}
|
47
68
|
?disabled=${disabled}
|
48
69
|
>
|
49
70
|
</ox-input-code>
|
@@ -53,5 +74,6 @@ export const Regular = Template.bind({})
|
|
53
74
|
Regular.args = {
|
54
75
|
name: 'code',
|
55
76
|
value: '',
|
56
|
-
language: 'javascript'
|
77
|
+
language: 'javascript',
|
78
|
+
showLineNumbers: true
|
57
79
|
}
|
@@ -26,7 +26,19 @@ interface ArgTypes {
|
|
26
26
|
|
27
27
|
const Template: Story<ArgTypes> = ({ name = 'crontab', value = '* * * * * *', disabled }: ArgTypes) => html`
|
28
28
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
29
|
-
|
29
|
+
|
30
|
+
<link
|
31
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
32
|
+
rel="stylesheet"
|
33
|
+
/>
|
34
|
+
<link
|
35
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
36
|
+
rel="stylesheet"
|
37
|
+
/>
|
38
|
+
<link
|
39
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
40
|
+
rel="stylesheet"
|
41
|
+
/>
|
30
42
|
<style>
|
31
43
|
body {
|
32
44
|
}
|
@@ -8,7 +8,6 @@ export default {
|
|
8
8
|
argTypes: {
|
9
9
|
value: { control: 'text' },
|
10
10
|
name: { control: 'text' },
|
11
|
-
language: { control: 'select', options: ['javascript', 'sql', 'json'] },
|
12
11
|
disabled: { control: 'boolean' }
|
13
12
|
}
|
14
13
|
}
|
@@ -27,7 +26,19 @@ interface ArgTypes {
|
|
27
26
|
|
28
27
|
const Template: Story<ArgTypes> = ({ name = 'code', value = '', disabled }: ArgTypes) => html`
|
29
28
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
30
|
-
|
29
|
+
|
30
|
+
<link
|
31
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
32
|
+
rel="stylesheet"
|
33
|
+
/>
|
34
|
+
<link
|
35
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
36
|
+
rel="stylesheet"
|
37
|
+
/>
|
38
|
+
<link
|
39
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
40
|
+
rel="stylesheet"
|
41
|
+
/>
|
31
42
|
<style>
|
32
43
|
body {
|
33
44
|
}
|
@@ -50,6 +61,5 @@ const Template: Story<ArgTypes> = ({ name = 'code', value = '', disabled }: ArgT
|
|
50
61
|
|
51
62
|
export const Regular = Template.bind({})
|
52
63
|
Regular.args = {
|
53
|
-
name: 'data'
|
54
|
-
value: ''
|
64
|
+
name: 'data'
|
55
65
|
}
|
@@ -27,7 +27,19 @@ interface ArgTypes {
|
|
27
27
|
|
28
28
|
const Template: Story<ArgTypes> = ({ name = 'duration', value = 3601, disabled }: ArgTypes) => html`
|
29
29
|
<link href="/themes/app-theme.css" rel="stylesheet" />
|
30
|
-
|
30
|
+
|
31
|
+
<link
|
32
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL@20..48,100..700,0..1"
|
33
|
+
rel="stylesheet"
|
34
|
+
/>
|
35
|
+
<link
|
36
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL@20..48,100..700,0..1"
|
37
|
+
rel="stylesheet"
|
38
|
+
/>
|
39
|
+
<link
|
40
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Sharp:opsz,wght,FILL@20..48,100..700,0..1"
|
41
|
+
rel="stylesheet"
|
42
|
+
/>
|
31
43
|
<style>
|
32
44
|
body {
|
33
45
|
}
|