@operato/input 2.0.0-beta.1 → 2.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -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": "2.0.0-beta.1",
5
+ "version": "2.0.0-beta.12",
6
6
  "main": "dist/src/index.js",
7
7
  "module": "dist/src/index.js",
8
8
  "license": "MIT",
@@ -200,9 +200,9 @@
200
200
  "@lit/localize": "^0.12.1",
201
201
  "@material/web": "^1.4.0",
202
202
  "@operato/color-picker": "^2.0.0-beta.0",
203
- "@operato/i18n": "^2.0.0-beta.0",
204
- "@operato/popup": "^2.0.0-beta.0",
205
- "@operato/styles": "^2.0.0-beta.0",
203
+ "@operato/i18n": "^2.0.0-beta.3",
204
+ "@operato/popup": "^2.0.0-beta.12",
205
+ "@operato/styles": "^2.0.0-beta.5",
206
206
  "@operato/utils": "^2.0.0-beta.0",
207
207
  "@polymer/paper-dropdown-menu": "^3.2.0",
208
208
  "@polymer/paper-item": "^3.0.1",
@@ -247,5 +247,5 @@
247
247
  "prettier --write"
248
248
  ]
249
249
  },
250
- "gitHead": "9ea81d43b1a5b47e2e40320baf6f8729552edc05"
250
+ "gitHead": "08cd1f9bacfca1f0559ee61089a26087cc1876ba"
251
251
  }
@@ -40,7 +40,7 @@ export class OxInputSelectButtons extends OxFormField {
40
40
  data-value=${value}
41
41
  label=${display}
42
42
  ?selected=${values.includes(value)}
43
- @click=${(e: MouseEvent) => !this.disabled && this.onClick(e)}
43
+ @tap=${(e: MouseEvent | TouchEvent) => !this.disabled && this.onTap(e)}
44
44
  ></md-filter-chip>
45
45
  `
46
46
  )}
@@ -48,7 +48,7 @@ export class OxInputSelectButtons extends OxFormField {
48
48
  `
49
49
  }
50
50
 
51
- onClick(e: MouseEvent) {
51
+ onTap(e: MouseEvent | TouchEvent) {
52
52
  e.stopPropagation()
53
53
 
54
54
  const target = e.target as MdFilterChip
@@ -215,7 +215,7 @@ export class OxInputUnitNumber extends OxFormField {
215
215
  position: relative;
216
216
  margin-left: var(--margin-narrow);
217
217
  font: var(--label-font);
218
- color: var(--label-color);
218
+ color: var(--label-color, var(--md-sys-color-on-surface));
219
219
  min-width: 24px;
220
220
  }
221
221
 
@@ -268,6 +268,11 @@ export class OxInputUnitNumber extends OxFormField {
268
268
  .value=${userUnit}
269
269
  @select=${(e: CustomEvent) => {
270
270
  this.userUnit = e.detail
271
+ this.dispatchEvent(
272
+ new CustomEvent('user-unit-change', {
273
+ detail: this.userUnit
274
+ })
275
+ )
271
276
  }}
272
277
  >
273
278
  <div option value=${this.stdUnit}>${this.stdUnit}</div>
@@ -278,12 +283,6 @@ export class OxInputUnitNumber extends OxFormField {
278
283
  `
279
284
  }
280
285
 
281
- updated(changes: PropertyValues<this>) {
282
- // if (changes.has('stdUnit')) {
283
- // this.userUnit = this.userUnit || this.stdUnit
284
- // }
285
- }
286
-
287
286
  _onChangeValue(e: Event) {
288
287
  this.value = this._toStdUnit(this.input.value)
289
288
 
@@ -57,7 +57,7 @@ export class OxInputWorkShift extends OxFormField {
57
57
  }
58
58
  [data-header] span {
59
59
  font: var(--label-font);
60
- color: var(--label-color);
60
+ color: var(--label-color, var(--md-sys-color-on-surface));
61
61
  text-transform: var(--label-text-transform);
62
62
  text-align: center;
63
63
  }
@@ -167,3 +167,7 @@ body {
167
167
  --data-card-create-form-padding: 7px;
168
168
  }
169
169
  }
170
+
171
+ body.dark {
172
+ --grid-container-border-color: 1px solid rgba(255, 255, 255, 0.09);
173
+ }