@operato/input 10.29.37 → 10.29.38

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": "10.29.37",
5
+ "version": "10.29.38",
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.29.27",
253
253
  "@operato/pickr": "^10.29.1",
254
- "@operato/popup": "^10.29.37",
254
+ "@operato/popup": "^10.29.38",
255
255
  "@operato/styles": "^10.29.30",
256
- "@operato/utils": "^10.29.37",
256
+ "@operato/utils": "^10.29.38",
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": "38361a65226ee9f23814747b4f0520edf42c3184"
297
+ "gitHead": "d053d740f71d091f5fbfa93dc4705bc712ff6222"
298
298
  }
@@ -242,6 +242,30 @@ describe('ox-input-file', () => {
242
242
  expect([...el.renderRoot.querySelectorAll('[part]')].map((one: Element) => one.getAttribute('part'))).to.deep.equal(['replace', 'remove'])
243
243
  })
244
244
 
245
+ it('takes no room while it has nothing to say when a page action starts the pick', async () => {
246
+ const column: any = await fixture(html`<div style="display: flex; flex-direction: column; gap: 24px">
247
+ <h2 style="margin: 0; height: 20px">title</h2>
248
+ <ox-input-file quiet outside-trigger accept="application/pdf"></ox-input-file>
249
+ <div style="height: 20px">filters</div>
250
+ </div>`)
251
+ const [title, el, filters] = [...column.children] as any[]
252
+
253
+ expect(filters.getBoundingClientRect().top - title.getBoundingClientRect().bottom, 'an empty picker opened a gap').to.equal(24)
254
+
255
+ drop(el, file('register.xlsx', 'application/vnd.ms-excel'))
256
+ await settle(el)
257
+ expect(filters.getBoundingClientRect().top - title.getBoundingClientRect().bottom, 'the refusal line has no place').to.be.above(24)
258
+ })
259
+
260
+ it('says what it refused at the error-sentence size, not its place\'s', async () => {
261
+ const wrap: any = await fixture(html`<div style="font-size: 16px"><ox-input-file quiet accept="image/*"></ox-input-file></div>`)
262
+ const el: any = wrap.querySelector('ox-input-file')
263
+
264
+ drop(el, file('scan.pdf', 'application/pdf'))
265
+ await settle(el)
266
+ expect(getComputedStyle(el.renderRoot.querySelector('[role="alert"]')).fontSize).to.equal('11.5px')
267
+ })
268
+
245
269
  it('hands its files to the form data as files', async () => {
246
270
  const form: any = await fixture(html`<form><ox-input-file name="papers" multiple></ox-input-file></form>`)
247
271
  const el: any = form.querySelector('ox-input-file')