@operato/input 7.0.0-rc.0 → 7.0.0-rc.10
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 +50 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/locale/localization.d.ts +2 -2
- package/dist/src/ox-input-barcode.js +15 -11
- package/dist/src/ox-input-barcode.js.map +1 -1
- package/dist/src/ox-input-search.d.ts +0 -1
- package/dist/src/ox-input-search.js +2 -5
- package/dist/src/ox-input-search.js.map +1 -1
- package/dist/src/ox-select.js +0 -2
- package/dist/src/ox-select.js.map +1 -1
- package/dist/stories/ox-input-search.stories.d.ts +0 -1
- package/dist/stories/ox-input-search.stories.js +2 -1
- package/dist/stories/ox-input-search.stories.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/index.ts +1 -0
- package/src/ox-input-barcode.ts +14 -12
- package/src/ox-input-search.ts +2 -2
- package/src/ox-select.ts +0 -2
- package/stories/ox-input-search.stories.ts +2 -1
- package/themes/grist-theme.css +1 -1
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@operato/input",
|
3
3
|
"description": "Webcomponents for input following open-wc recommendations",
|
4
4
|
"author": "heartyoh@hatiolab.com",
|
5
|
-
"version": "7.0.0-rc.
|
5
|
+
"version": "7.0.0-rc.10",
|
6
6
|
"main": "dist/src/index.js",
|
7
7
|
"module": "dist/src/index.js",
|
8
8
|
"license": "MIT",
|
@@ -208,9 +208,9 @@
|
|
208
208
|
"@material/web": "^1.5.0",
|
209
209
|
"@operato/color-picker": "^7.0.0-rc.0",
|
210
210
|
"@operato/i18n": "^7.0.0-rc.0",
|
211
|
-
"@operato/popup": "^7.0.0-rc.
|
212
|
-
"@operato/styles": "^7.0.0-rc.
|
213
|
-
"@operato/utils": "^7.0.0-rc.
|
211
|
+
"@operato/popup": "^7.0.0-rc.10",
|
212
|
+
"@operato/styles": "^7.0.0-rc.10",
|
213
|
+
"@operato/utils": "^7.0.0-rc.8",
|
214
214
|
"@polymer/paper-dropdown-menu": "^3.2.0",
|
215
215
|
"@polymer/paper-item": "^3.0.1",
|
216
216
|
"@thebespokepixel/es-tinycolor": "^3.1.0",
|
@@ -254,5 +254,5 @@
|
|
254
254
|
"prettier --write"
|
255
255
|
]
|
256
256
|
},
|
257
|
-
"gitHead": "
|
257
|
+
"gitHead": "96efe00ae617394f5a4fee901be5e20323ff7e57"
|
258
258
|
}
|
package/src/index.ts
CHANGED
package/src/ox-input-barcode.ts
CHANGED
@@ -48,6 +48,8 @@ export class OxInputBarcode extends OxFormField {
|
|
48
48
|
display: flex;
|
49
49
|
align-items: center;
|
50
50
|
border: none;
|
51
|
+
background-color: transparent;
|
52
|
+
height: var(--ox-input-height, var(--form-element-height-medium));
|
51
53
|
}
|
52
54
|
|
53
55
|
* {
|
@@ -61,17 +63,16 @@ export class OxInputBarcode extends OxFormField {
|
|
61
63
|
input {
|
62
64
|
flex: 1;
|
63
65
|
width: 10px; /* intentionally width set */
|
66
|
+
border: var(--ox-input-border, 1px solid var(--md-sys-color-outline));
|
67
|
+
border-radius: var(--ox-input-radius, var(--md-sys-shape-corner-small));
|
68
|
+
background-color: var(--ox-input-background-color, var(--md-sys-color-on-primary));
|
69
|
+
color: var(--ox-input-color, var(--md-sys-color-on-primary-container));
|
70
|
+
font-size: var(--md-sys-typescale-label-large-size, 0.875rem);
|
71
|
+
|
64
72
|
box-sizing: border-box;
|
65
|
-
padding: 0 var(--spacing-small);
|
66
73
|
padding-right: 35px;
|
67
|
-
height: var(--form-element-height-medium);
|
68
|
-
border: 1px solid var(--md-sys-color-outline);
|
69
|
-
border-radius: var(--md-sys-shape-corner-small);
|
70
|
-
|
71
|
-
background-color: var(--md-sys-color-on-primary);
|
72
|
-
font-size: var(--md-sys-typescale-label-large-size, 0.875rem);
|
73
|
-
color: var(--md-sys-color-on-primary-container);
|
74
74
|
}
|
75
|
+
|
75
76
|
input:focus {
|
76
77
|
outline: none;
|
77
78
|
border-color: var(--md-sys-color-secondary-fixed-dim);
|
@@ -81,7 +82,7 @@ export class OxInputBarcode extends OxFormField {
|
|
81
82
|
display: block;
|
82
83
|
position: relative;
|
83
84
|
margin-left: -35px;
|
84
|
-
width:
|
85
|
+
width: 35px;
|
85
86
|
border: none;
|
86
87
|
background: var(--barcodescan-input-button-icon) no-repeat center center;
|
87
88
|
}
|
@@ -96,7 +97,7 @@ export class OxInputBarcode extends OxFormField {
|
|
96
97
|
* Indicates whether barcode scanning is enabled.
|
97
98
|
* @property {Boolean} scannable
|
98
99
|
*/
|
99
|
-
@property({ type: Boolean }) scannable?: boolean
|
100
|
+
@property({ type: Boolean, attribute: true }) scannable?: boolean
|
100
101
|
|
101
102
|
/**
|
102
103
|
* If true, the "Enter" key press event is not fired after scanning a barcode.
|
@@ -132,8 +133,6 @@ export class OxInputBarcode extends OxFormField {
|
|
132
133
|
connectedCallback() {
|
133
134
|
super.connectedCallback()
|
134
135
|
|
135
|
-
this.scannable = false
|
136
|
-
|
137
136
|
if (navigator.mediaDevices) {
|
138
137
|
;(async () => {
|
139
138
|
try {
|
@@ -143,9 +142,12 @@ export class OxInputBarcode extends OxFormField {
|
|
143
142
|
this.scannable = true
|
144
143
|
}
|
145
144
|
} catch (e) {
|
145
|
+
this.scannable = false
|
146
146
|
console.warn('this device not support camera for barcode scan', e)
|
147
147
|
}
|
148
148
|
})()
|
149
|
+
} else {
|
150
|
+
this.scannable = false
|
149
151
|
}
|
150
152
|
}
|
151
153
|
|
package/src/ox-input-search.ts
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
import '@material/web/icon/icon.js'
|
6
6
|
|
7
|
-
import debounce from 'lodash-es/debounce'
|
7
|
+
// import debounce from 'lodash-es/debounce'
|
8
8
|
import { css, html } from 'lit'
|
9
9
|
import { customElement, property, query } from 'lit/decorators.js'
|
10
10
|
|
@@ -50,7 +50,7 @@ export class OxInputSearch extends OxFormField {
|
|
50
50
|
|
51
51
|
@query('input') input!: HTMLInputElement
|
52
52
|
|
53
|
-
private dispatchChangeEventDebouncer = debounce((value: string) => this.dispatchChangeEvent(value), 100)
|
53
|
+
// private dispatchChangeEventDebouncer = debounce((value: string) => this.dispatchChangeEvent(value), 100)
|
54
54
|
|
55
55
|
render() {
|
56
56
|
return html`
|
package/src/ox-select.ts
CHANGED
@@ -10,14 +10,12 @@ import { css, html, render, PropertyValues, nothing } from 'lit'
|
|
10
10
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
11
11
|
|
12
12
|
import { OxPopupList } from '@operato/popup'
|
13
|
-
import { TooltipStyles } from '@operato/styles'
|
14
13
|
|
15
14
|
import { OxFormField } from './ox-form-field.js'
|
16
15
|
|
17
16
|
@customElement('ox-select')
|
18
17
|
export class OxSelect extends OxFormField {
|
19
18
|
static styles = [
|
20
|
-
TooltipStyles,
|
21
19
|
css`
|
22
20
|
:host {
|
23
21
|
display: block;
|
package/themes/grist-theme.css
CHANGED
@@ -61,7 +61,7 @@ body {
|
|
61
61
|
|
62
62
|
--grid-record-dirty-border-top: 24px solid rgba(var(--md-sys-color-primary-rgb), 0.6);
|
63
63
|
--grid-record-dirty-border-left: 24px solid transparent;
|
64
|
-
--grid-record-dirty-icon-font: bold 10px/12px var(--
|
64
|
+
--grid-record-dirty-icon-font: bold 10px/12px var(--md-icon-font, 'Material Symbols Outlined');
|
65
65
|
--grid-record-dirty-icon-size: var(--fontsize-large);
|
66
66
|
--grid-record-dirty-color: var(--md-sys-color-surface);
|
67
67
|
|