@operato/input 2.0.0-alpha.8 → 2.0.0-alpha.80
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 +203 -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 +4 -4
- 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 +3 -4
- package/dist/src/ox-input-barcode.js +28 -42
- 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 +129 -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 +2 -2
- package/dist/src/ox-input-mass-fraction.js +46 -29
- 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 +4 -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-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 +2 -2
- package/dist/src/ox-input-unit-number.js +5 -4
- 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 +15 -15
- 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 +15 -15
- 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 -5
- 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 +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 +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.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 +25 -21
- package/src/ox-input-barcode.ts +31 -41
- 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 +139 -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 +46 -29
- 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 +4 -4
- package/src/ox-input-table.ts +12 -12
- package/src/ox-input-unit-number.ts +5 -4
- package/src/ox-input-value-map.ts +17 -17
- package/src/ox-input-value-ranges.ts +17 -17
- package/src/ox-input-work-shift.ts +4 -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 +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 +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,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'] {
|
@@ -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'
|
@@ -178,6 +178,8 @@ export class OxInputUnitNumber extends OxFormField {
|
|
178
178
|
display: flex;
|
179
179
|
flex-direction: row;
|
180
180
|
align-items: center;
|
181
|
+
|
182
|
+
--md-icon-size: var(--fontsize-default, 14px);
|
181
183
|
}
|
182
184
|
|
183
185
|
input {
|
@@ -217,8 +219,7 @@ export class OxInputUnitNumber extends OxFormField {
|
|
217
219
|
min-width: 24px;
|
218
220
|
}
|
219
221
|
|
220
|
-
|
221
|
-
font-size: 18px;
|
222
|
+
md-icon {
|
222
223
|
color: var(--primary-color, #3c3938);
|
223
224
|
margin-left: auto;
|
224
225
|
}
|
@@ -272,7 +273,7 @@ export class OxInputUnitNumber extends OxFormField {
|
|
272
273
|
<div option value=${this.stdUnit}>${this.stdUnit}</div>
|
273
274
|
${units.map(unit => html`<div option value=${unit}>${unit}</div>`)}
|
274
275
|
</ox-popup-list>
|
275
|
-
<
|
276
|
+
<md-icon>expand_more</md-icon>
|
276
277
|
</div>
|
277
278
|
`
|
278
279
|
}
|
@@ -33,6 +33,8 @@ export class OxInputValueMap extends OxFormField {
|
|
33
33
|
flex-direction: column;
|
34
34
|
border: var(--border-dark-color);
|
35
35
|
padding: var(--padding-narrow) var(--padding-narrow) 0 var(--padding-narrow);
|
36
|
+
|
37
|
+
--md-icon-size: var(--fontsize-default, 14px);
|
36
38
|
}
|
37
39
|
|
38
40
|
div {
|
@@ -63,9 +65,7 @@ export class OxInputValueMap extends OxFormField {
|
|
63
65
|
button + button {
|
64
66
|
margin-left: -5px;
|
65
67
|
}
|
66
|
-
|
67
|
-
font-size: var(--fontsize-default);
|
68
|
-
}
|
68
|
+
|
69
69
|
button:focus,
|
70
70
|
button:hover,
|
71
71
|
button:active {
|
@@ -144,17 +144,17 @@ export class OxInputValueMap extends OxFormField {
|
|
144
144
|
/>
|
145
145
|
`
|
146
146
|
: this.valuetype == 'color'
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
147
|
+
? html` <ox-input-color data-value value=${ifDefined(value)} ?disabled=${this.disabled}> </ox-input-color> `
|
148
|
+
: html`
|
149
|
+
<input
|
150
|
+
type="text"
|
151
|
+
data-value
|
152
|
+
placeholder="value"
|
153
|
+
value=${ifDefined(value)}
|
154
|
+
data-value-type=${this.valuetype}
|
155
|
+
?disabled=${this.disabled}
|
156
|
+
/>
|
157
|
+
`
|
158
158
|
}
|
159
159
|
|
160
160
|
render() {
|
@@ -170,7 +170,7 @@ export class OxInputValueMap extends OxFormField {
|
|
170
170
|
tabindex="-1"
|
171
171
|
?disabled=${this.disabled}
|
172
172
|
>
|
173
|
-
<
|
173
|
+
<md-icon>remove</md-icon>
|
174
174
|
</button>
|
175
175
|
</div>
|
176
176
|
`
|
@@ -185,7 +185,7 @@ export class OxInputValueMap extends OxFormField {
|
|
185
185
|
|
186
186
|
${this.valueInputTemplate()}
|
187
187
|
<button class="record-action" @click=${(e: MouseEvent) => this._add()} tabindex="-1">
|
188
|
-
<
|
188
|
+
<md-icon>add</md-icon>
|
189
189
|
</button>
|
190
190
|
</div>
|
191
191
|
`
|
@@ -196,7 +196,7 @@ export class OxInputValueMap extends OxFormField {
|
|
196
196
|
|
197
197
|
${this.valueInputTemplate((this.value && this.value.default) || this._defaultValue())}
|
198
198
|
<button class="record-action" @click=${() => this._sort()} tabindex="-1">
|
199
|
-
<
|
199
|
+
<md-icon>chevron_right</md-icon>
|
200
200
|
</button>
|
201
201
|
</div>
|
202
202
|
`
|
@@ -33,6 +33,8 @@ export class OxInputValueRange extends OxFormField {
|
|
33
33
|
flex-direction: column;
|
34
34
|
border: var(--border-dark-color);
|
35
35
|
padding: var(--padding-narrow) var(--padding-narrow) 0 var(--padding-narrow);
|
36
|
+
|
37
|
+
--md-icon-size: var(--fontsize-default, 14px);
|
36
38
|
}
|
37
39
|
|
38
40
|
div {
|
@@ -63,9 +65,7 @@ export class OxInputValueRange extends OxFormField {
|
|
63
65
|
button + button {
|
64
66
|
margin-left: -5px;
|
65
67
|
}
|
66
|
-
|
67
|
-
font-size: var(--fontsize-default);
|
68
|
-
}
|
68
|
+
|
69
69
|
button:focus,
|
70
70
|
button:hover,
|
71
71
|
button:active {
|
@@ -153,17 +153,17 @@ export class OxInputValueRange extends OxFormField {
|
|
153
153
|
/>
|
154
154
|
`
|
155
155
|
: this.valuetype == 'color'
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
156
|
+
? html` <ox-input-color data-value value=${ifDefined(value)} ?disabled=${this.disabled}> </ox-input-color> `
|
157
|
+
: html`
|
158
|
+
<input
|
159
|
+
type="text"
|
160
|
+
data-value
|
161
|
+
placeholder="value"
|
162
|
+
value=${ifDefined(value)}
|
163
|
+
data-value-type=${this.valuetype}
|
164
|
+
?disabled=${this.disabled}
|
165
|
+
/>
|
166
|
+
`
|
167
167
|
}
|
168
168
|
|
169
169
|
render() {
|
@@ -181,7 +181,7 @@ export class OxInputValueRange extends OxFormField {
|
|
181
181
|
tabindex="-1"
|
182
182
|
?disabled=${this.disabled}
|
183
183
|
>
|
184
|
-
<
|
184
|
+
<md-icon>remove</md-icon>
|
185
185
|
</button>
|
186
186
|
</div>
|
187
187
|
`
|
@@ -197,7 +197,7 @@ export class OxInputValueRange extends OxFormField {
|
|
197
197
|
|
198
198
|
${this.valueInputTemplate()}
|
199
199
|
<button class="record-action" @click=${(e: Event) => this._add()} tabindex="-1">
|
200
|
-
<
|
200
|
+
<md-icon>add</md-icon>
|
201
201
|
</button>
|
202
202
|
</div>
|
203
203
|
`
|
@@ -209,7 +209,7 @@ export class OxInputValueRange extends OxFormField {
|
|
209
209
|
|
210
210
|
${this.valueInputTemplate((this.value && this.value.default) || this._defaultValue())}
|
211
211
|
<button class="record-action" @click=${(e: Event) => this._sort()} ?disabled=${this.disabled}>
|
212
|
-
<
|
212
|
+
<md-icon>chevron_right</md-icon>
|
213
213
|
</button>
|
214
214
|
</div>
|
215
215
|
`
|
@@ -31,6 +31,8 @@ export class OxInputWorkShift extends OxFormField {
|
|
31
31
|
|
32
32
|
width: 100%;
|
33
33
|
overflow: hidden;
|
34
|
+
|
35
|
+
--md-icon-size: var(--fontsize-default, 14px);
|
34
36
|
}
|
35
37
|
|
36
38
|
div {
|
@@ -94,9 +96,6 @@ export class OxInputWorkShift extends OxFormField {
|
|
94
96
|
color: var(--button-color);
|
95
97
|
cursor: pointer;
|
96
98
|
}
|
97
|
-
button mwc-icon {
|
98
|
-
font-size: var(--fontsize-default);
|
99
|
-
}
|
100
99
|
button:focus,
|
101
100
|
button:hover,
|
102
101
|
button:active {
|
@@ -156,7 +155,7 @@ export class OxInputWorkShift extends OxFormField {
|
|
156
155
|
tabindex="-1"
|
157
156
|
?disabled=${this.disabled}
|
158
157
|
>
|
159
|
-
<
|
158
|
+
<md-icon>remove</md-icon>
|
160
159
|
</button>
|
161
160
|
</div>
|
162
161
|
`
|
@@ -182,7 +181,7 @@ export class OxInputWorkShift extends OxFormField {
|
|
182
181
|
<input type="time" data-to-time step="1800" />
|
183
182
|
|
184
183
|
<button class="record-action" @click=${(e: Event) => this._add()} tabindex="-1">
|
185
|
-
<
|
184
|
+
<md-icon>add</md-icon>
|
186
185
|
</button>
|
187
186
|
</div>
|
188
187
|
`}
|
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
|
}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import '../src/ox-input-data.js'
|
2
|
+
|
3
|
+
import { html, TemplateResult } from 'lit'
|
4
|
+
|
5
|
+
export default {
|
6
|
+
title: 'ox-input-data',
|
7
|
+
component: 'ox-input-data',
|
8
|
+
argTypes: {
|
9
|
+
value: { control: 'text' },
|
10
|
+
name: { control: 'text' },
|
11
|
+
disabled: { control: 'boolean' }
|
12
|
+
}
|
13
|
+
}
|
14
|
+
|
15
|
+
interface Story<T> {
|
16
|
+
(args: T): TemplateResult
|
17
|
+
args?: Partial<T>
|
18
|
+
argTypes?: Record<string, unknown>
|
19
|
+
}
|
20
|
+
|
21
|
+
interface ArgTypes {
|
22
|
+
name?: string
|
23
|
+
value?: string | number | object
|
24
|
+
disabled?: boolean
|
25
|
+
}
|
26
|
+
|
27
|
+
const Template: Story<ArgTypes> = ({ name = 'code', value = '', disabled }: ArgTypes) => html`
|
28
|
+
<link href="/themes/app-theme.css" rel="stylesheet" />
|
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
|
+
/>
|
42
|
+
<style>
|
43
|
+
body {
|
44
|
+
}
|
45
|
+
ox-input-data {
|
46
|
+
height: 300px;
|
47
|
+
}
|
48
|
+
</style>
|
49
|
+
|
50
|
+
<ox-input-data
|
51
|
+
@change=${(e: Event) => {
|
52
|
+
const value = (e.target as HTMLInputElement).value
|
53
|
+
console.log('value : ', value, typeof value)
|
54
|
+
}}
|
55
|
+
name=${name}
|
56
|
+
.value=${value}
|
57
|
+
?disabled=${disabled}
|
58
|
+
>
|
59
|
+
</ox-input-data>
|
60
|
+
`
|
61
|
+
|
62
|
+
export const Regular = Template.bind({})
|
63
|
+
Regular.args = {
|
64
|
+
name: 'data'
|
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
|
}
|