@operato/input 10.29.39 → 10.29.41
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 +139 -139
- 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 +16621 -16463
- package/dist/src/ox-input-select-buttons.js +2 -1
- package/dist/src/ox-input-select-buttons.js.map +1 -1
- package/dist/src/ox-select.d.ts +2 -0
- package/dist/src/ox-select.js +8 -0
- package/dist/src/ox-select.js.map +1 -1
- package/dist/test/ox-input-select-buttons.test.d.ts +1 -0
- package/dist/test/ox-input-select-buttons.test.js +43 -0
- package/dist/test/ox-input-select-buttons.test.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/test/ox-input-select-buttons.test.ts +51 -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.29.
|
|
5
|
+
"version": "10.29.41",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/src/index.js",
|
|
8
8
|
"module": "dist/src/index.js",
|
|
@@ -251,7 +251,7 @@
|
|
|
251
251
|
"@material/web": "^2.0.0",
|
|
252
252
|
"@operato/i18n": "^10.29.27",
|
|
253
253
|
"@operato/pickr": "^10.29.1",
|
|
254
|
-
"@operato/popup": "^10.29.
|
|
254
|
+
"@operato/popup": "^10.29.40",
|
|
255
255
|
"@operato/styles": "^10.29.30",
|
|
256
256
|
"@operato/utils": "^10.29.39",
|
|
257
257
|
"@types/codemirror": "^5.60.5",
|
|
@@ -294,5 +294,5 @@
|
|
|
294
294
|
"prettier --write"
|
|
295
295
|
]
|
|
296
296
|
},
|
|
297
|
-
"gitHead": "
|
|
297
|
+
"gitHead": "198aa1d3eb4bf66de898554f52e57ca0b0905911"
|
|
298
298
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { expect, fixture } from '@open-wc/testing'
|
|
2
|
+
import { html } from 'lit'
|
|
3
|
+
|
|
4
|
+
import '../src/ox-input-select-buttons.js'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Chip labels.
|
|
8
|
+
*
|
|
9
|
+
* Most screens hand the chips words (`important`, `due`) and keep them capitalized. Some hand them
|
|
10
|
+
* identifiers — a part name `roller-row-1`, a code — and those must show as written. The caller says
|
|
11
|
+
* so with --ox-input-select-buttons-label-text-transform; a screen that sets nothing keeps capitalize.
|
|
12
|
+
*/
|
|
13
|
+
describe('ox-input-select-buttons', () => {
|
|
14
|
+
const options = [
|
|
15
|
+
{ display: 'frame', value: 'frame' },
|
|
16
|
+
{ display: 'roller-row-1', value: 'roller-row-1' }
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
const chips = (el: any) => [...el.renderRoot.querySelectorAll('md-filter-chip')] as HTMLElement[]
|
|
20
|
+
|
|
21
|
+
it('capitalizes the chip labels by default', async () => {
|
|
22
|
+
const el = await fixture(html`<ox-input-select-buttons .options=${options}></ox-input-select-buttons>`)
|
|
23
|
+
|
|
24
|
+
expect(chips(el)).to.have.length(2)
|
|
25
|
+
chips(el).forEach(chip => expect(getComputedStyle(chip).textTransform).to.equal('capitalize'))
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
it('shows the labels as written when the caller sets the transform to none', async () => {
|
|
29
|
+
const el = await fixture(html`
|
|
30
|
+
<ox-input-select-buttons
|
|
31
|
+
style="--ox-input-select-buttons-label-text-transform: none"
|
|
32
|
+
.options=${options}
|
|
33
|
+
></ox-input-select-buttons>
|
|
34
|
+
`)
|
|
35
|
+
|
|
36
|
+
expect(chips(el)).to.have.length(2)
|
|
37
|
+
chips(el).forEach(chip => expect(getComputedStyle(chip).textTransform).to.equal('none'))
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
it('takes the transform from an ancestor, so a dialog can set it once', async () => {
|
|
41
|
+
const host = await fixture(html`
|
|
42
|
+
<div style="--ox-input-select-buttons-label-text-transform: none">
|
|
43
|
+
<ox-input-select-buttons .options=${options}></ox-input-select-buttons>
|
|
44
|
+
</div>
|
|
45
|
+
`)
|
|
46
|
+
const el = host.querySelector('ox-input-select-buttons') as any
|
|
47
|
+
await el.updateComplete
|
|
48
|
+
|
|
49
|
+
chips(el).forEach(chip => expect(getComputedStyle(chip).textTransform).to.equal('none'))
|
|
50
|
+
})
|
|
51
|
+
})
|