@operato/form 10.12.0 → 10.15.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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@operato/form",
3
3
  "description": "WebApplication form supporting components following open-wc recommendations",
4
4
  "author": "heartyoh",
5
- "version": "10.12.0",
5
+ "version": "10.15.0",
6
6
  "type": "module",
7
7
  "main": "dist/src/index.js",
8
8
  "module": "dist/src/index.js",
@@ -63,11 +63,12 @@
63
63
  },
64
64
  "dependencies": {
65
65
  "@material/web": "^2.0.0",
66
- "@operato/graphql": "^10.11.0",
67
- "@operato/input": "^10.12.0",
68
- "@operato/p13n": "^10.11.0",
66
+ "@operato/graphql": "^10.15.0",
67
+ "@operato/input": "^10.15.0",
68
+ "@operato/p13n": "^10.15.0",
69
+ "@operato/styles": "^10.15.0",
69
70
  "@operato/time-calculator": "^10.0.0",
70
- "@operato/utils": "^10.11.0",
71
+ "@operato/utils": "^10.15.0",
71
72
  "lit": "^3.1.2"
72
73
  },
73
74
  "devDependencies": {
@@ -103,5 +104,5 @@
103
104
  "prettier --write"
104
105
  ]
105
106
  },
106
- "gitHead": "37ba4d22b6ca676f4edc905bce7c1775bc514bd6"
107
+ "gitHead": "62ac2a23866e7ea579786c4433ef356888dfded8"
107
108
  }
@@ -0,0 +1,30 @@
1
+ import { expect } from '@open-wc/testing'
2
+
3
+ import { CustomInput } from '../src/components/ox-custom-input.js'
4
+ import { FilterStyles } from '../src/filters/filter-styles.js'
5
+
6
+ /**
7
+ * Form inputs read the input height tokens with the @operato/styles default. Without a default, a
8
+ * page that does not load the shell theme would drop the whole declaration and the input would size
9
+ * itself.
10
+ */
11
+
12
+ const text = (styles: unknown): string =>
13
+ (Array.isArray(styles) ? styles.flat(Infinity) : [styles])
14
+ .map(s => String((s as { cssText?: string }).cssText ?? s))
15
+ .join('\n')
16
+
17
+ describe('form element height', () => {
18
+ it('the filter form is a dense row: medium is re-pointed at small, both with defaults', () => {
19
+ const css = text(FilterStyles)
20
+ expect(css).to.contain('--form-element-height-medium: var(--form-element-height-small, 26px)')
21
+ expect(css).to.contain('height: var(--form-element-height-medium, 32px)')
22
+ expect(css).to.not.match(/var\(--form-element-height-[a-z]+\)/)
23
+ })
24
+
25
+ it('ox-custom-input reads the medium token with its default', () => {
26
+ const css = text(CustomInput.styles)
27
+ expect(css).to.contain('height: var(--form-element-height-medium, 32px)')
28
+ expect(css).to.not.match(/var\(--form-element-height-[a-z]+\)/)
29
+ })
30
+ })