@operato/input 10.12.0 → 10.16.0
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 +18 -0
- package/coverage/lcov-report/index.html +96 -36
- package/coverage/lcov-report/webpack/bootstrap.html +1 -1
- package/coverage/lcov-report/webpack/index.html +1 -1
- package/coverage/lcov-report/webpack/runtime/define property getters.html +1 -1
- package/coverage/lcov-report/webpack/runtime/global.html +1 -1
- package/coverage/lcov-report/webpack/runtime/hasOwnProperty shorthand.html +1 -1
- package/coverage/lcov-report/webpack/runtime/index.html +1 -1
- package/coverage/lcov-report/webpack/runtime/make namespace object.html +1 -1
- package/coverage/lcov.info +10653 -550
- package/dist/src/input-styles.js +0 -1
- package/dist/src/input-styles.js.map +1 -1
- package/dist/src/ox-buttons-radio.js +5 -4
- package/dist/src/ox-buttons-radio.js.map +1 -1
- package/dist/src/ox-input-3axis.js +2 -1
- package/dist/src/ox-input-3axis.js.map +1 -1
- package/dist/src/ox-input-3dish.js +2 -1
- package/dist/src/ox-input-3dish.js.map +1 -1
- package/dist/src/ox-input-barcode.js +2 -1
- package/dist/src/ox-input-barcode.js.map +1 -1
- package/dist/src/ox-input-crontab.js +3 -2
- package/dist/src/ox-input-crontab.js.map +1 -1
- package/dist/src/ox-input-duration.js +3 -2
- package/dist/src/ox-input-duration.js.map +1 -1
- package/dist/src/ox-input-select-buttons.js +4 -3
- package/dist/src/ox-input-select-buttons.js.map +1 -1
- package/dist/test/form-element-height.test.d.ts +1 -0
- package/dist/test/form-element-height.test.js +37 -0
- package/dist/test/form-element-height.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/test/form-element-height.test.ts +43 -0
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": "10.
|
|
5
|
+
"version": "10.16.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -251,9 +251,9 @@
|
|
|
251
251
|
"@material/web": "^2.0.0",
|
|
252
252
|
"@operato/i18n": "^10.11.0",
|
|
253
253
|
"@operato/pickr": "^10.0.0",
|
|
254
|
-
"@operato/popup": "^10.
|
|
255
|
-
"@operato/styles": "^10.
|
|
256
|
-
"@operato/utils": "^10.
|
|
254
|
+
"@operato/popup": "^10.16.0",
|
|
255
|
+
"@operato/styles": "^10.16.0",
|
|
256
|
+
"@operato/utils": "^10.16.0",
|
|
257
257
|
"@types/codemirror": "^5.60.5",
|
|
258
258
|
"@undecaf/zbar-wasm": "^0.11.0",
|
|
259
259
|
"codemirror": "^6.0.1",
|
|
@@ -294,5 +294,5 @@
|
|
|
294
294
|
"prettier --write"
|
|
295
295
|
]
|
|
296
296
|
},
|
|
297
|
-
"gitHead": "
|
|
297
|
+
"gitHead": "8a061bd85d68e619b0c6aef699c57c89d3d9052a"
|
|
298
298
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { expect } from '@open-wc/testing'
|
|
2
|
+
|
|
3
|
+
import { OxButtonsRadio } from '../src/ox-buttons-radio.js'
|
|
4
|
+
import { OxInputBarcode } from '../src/ox-input-barcode.js'
|
|
5
|
+
import { OxInputCrontab } from '../src/ox-input-crontab.js'
|
|
6
|
+
import { OxInputDuration } from '../src/ox-input-duration.js'
|
|
7
|
+
import { OxInputSelectButtons } from '../src/ox-input-select-buttons.js'
|
|
8
|
+
import { InputStyles } from '../src/input-styles.js'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Inputs read the medium input height, --form-element-height-medium (30px on the platform). The number
|
|
12
|
+
* comes from @operato/styles (FORM_ELEMENT_HEIGHT_TOKENS) so a component used without the shell theme
|
|
13
|
+
* still has a height, and no component writes its own number or keeps a private height variable.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
const text = (styles: unknown): string =>
|
|
17
|
+
(Array.isArray(styles) ? styles.flat(Infinity) : [styles])
|
|
18
|
+
.map(s => String((s as { cssText?: string }).cssText ?? s))
|
|
19
|
+
.join('\n')
|
|
20
|
+
|
|
21
|
+
describe('form element height', () => {
|
|
22
|
+
for (const [name, element] of [
|
|
23
|
+
['ox-buttons-radio', OxButtonsRadio],
|
|
24
|
+
['ox-input-barcode', OxInputBarcode],
|
|
25
|
+
['ox-input-crontab', OxInputCrontab],
|
|
26
|
+
['ox-input-duration', OxInputDuration]
|
|
27
|
+
] as const) {
|
|
28
|
+
it(`${name} reads the medium token with the shared default`, () => {
|
|
29
|
+
const css = text((element as unknown as { styles: unknown }).styles)
|
|
30
|
+
expect(css).to.contain('var(--form-element-height-medium, 30px)')
|
|
31
|
+
expect(css).to.not.match(/var\(--form-element-height-medium\)/)
|
|
32
|
+
})
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
it('ox-input-select-buttons chips: 26px on the platform, the suite small height in the operato products', () => {
|
|
36
|
+
const css = text(OxInputSelectButtons.styles)
|
|
37
|
+
expect(css).to.contain('--md-filter-chip-container-height: var(--suite-form-element-height-small, 26px)')
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
it('InputStyles keeps no private input height', () => {
|
|
41
|
+
expect(text(InputStyles)).to.not.contain('--ox-input-height')
|
|
42
|
+
})
|
|
43
|
+
})
|