@jungherz-de/glasskit-elements 1.22.0 → 1.22.2
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 +19 -1
- package/README.md +1 -1
- package/SKILL.md +3 -3
- package/dist/components/glk-input.js +17 -6
- package/dist/glasskit-elements.esm.js +19 -8
- package/dist/glasskit-elements.js +19 -8
- package/dist/glasskit-elements.min.js +1 -1
- package/package.json +3 -3
- package/src/components/forms/glk-input.js +17 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jungherz-de/glasskit-elements",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.2",
|
|
4
4
|
"description": "Vanilla JavaScript Web Components wrapping the GlassKit CSS glassmorphism library",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://glasskit-elements.jungherz.com",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"vanilla-js"
|
|
50
50
|
],
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@jungherz-de/glasskit": ">=1.22.
|
|
52
|
+
"@jungherz-de/glasskit": ">=1.22.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@jungherz-de/glasskit": "^1.22.
|
|
55
|
+
"@jungherz-de/glasskit": "^1.22.2",
|
|
56
56
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
57
57
|
"@rollup/plugin-terser": "^0.4.0",
|
|
58
58
|
"rollup": "^4.0.0"
|
|
@@ -9,14 +9,25 @@ const FORWARDED = ['min', 'max', 'step', 'minlength', 'maxlength', 'pattern', 'a
|
|
|
9
9
|
// Prefix and suffix (since 1.22.0): two slots inside the field's box, on
|
|
10
10
|
// GlassKit's .glass-input-wrap. An affix shows only while something is
|
|
11
11
|
// slotted into it, and its width is measured, so the text keeps clear of a
|
|
12
|
-
// unit of any length. GlassKit
|
|
13
|
-
//
|
|
14
|
-
//
|
|
15
|
-
//
|
|
12
|
+
// unit of any length. As in GlassKit, a click on text, an icon or a disabled
|
|
13
|
+
// control goes through to the field, and what can be used takes its own: an
|
|
14
|
+
// enabled control (<glk-button>, <glk-select> … are form-associated, so they
|
|
15
|
+
// count), a link, an element with tabindex. GlassKit's own rule cannot reach
|
|
16
|
+
// slotted elements, hence this one. ::slotted() sees the slotted element,
|
|
17
|
+
// not what is inside it: a button wrapped in a slotted <span> needs
|
|
18
|
+
// pointer-events: auto from the page. Until 1.22.1 every slotted element took
|
|
19
|
+
// the pointer — a unit caught the click meant for the field, a disabled
|
|
20
|
+
// button took it and moved the focus into the field, read-only and locked
|
|
21
|
+
// or not. Simple selectors only inside ::slotted(), so that no browser drops
|
|
22
|
+
// the rule.
|
|
16
23
|
const affixSheet = new CSSStyleSheet();
|
|
17
24
|
affixSheet.replaceSync(`
|
|
18
|
-
.glass-input-wrap__prefix ::slotted(
|
|
19
|
-
.glass-input-
|
|
25
|
+
.glass-input-wrap__prefix ::slotted(:enabled),
|
|
26
|
+
.glass-input-wrap__prefix ::slotted(a[href]),
|
|
27
|
+
.glass-input-wrap__prefix ::slotted([tabindex]:not(:disabled)),
|
|
28
|
+
.glass-input-wrap__suffix ::slotted(:enabled),
|
|
29
|
+
.glass-input-wrap__suffix ::slotted(a[href]),
|
|
30
|
+
.glass-input-wrap__suffix ::slotted([tabindex]:not(:disabled)) { pointer-events: auto; }
|
|
20
31
|
`);
|
|
21
32
|
|
|
22
33
|
class GlkInput extends GlkFormElement {
|