barbican-reset 3.3.0 → 3.4.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.
@@ -1,2 +1,146 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";function e(e){var t=!0,n=!1,o=null,d={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function u(e){t=!1}function a(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",function(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=!0)},!0),document.addEventListener("mousedown",u,!0),document.addEventListener("pointerdown",u,!0),document.addEventListener("touchstart",u,!0),document.addEventListener("visibilitychange",function(e){"hidden"===document.visibilityState&&(n&&(t=!0),a())},!0),a(),e.addEventListener("focus",function(e){var n,o,u;i(e.target)&&(t||(n=e.target,o=n.type,"INPUT"===(u=n.tagName)&&d[o]&&!n.readOnly||"TEXTAREA"===u&&!n.readOnly||n.isContentEditable))&&s(e.target)},!0),e.addEventListener("blur",function(e){var t;i(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(o),o=window.setTimeout(function(){n=!1},100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))},!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)});
2
- //# sourceMappingURL=focus-visible.min.js.map
1
+ !(function (e, t) {
2
+ "object" == typeof exports && "undefined" != typeof module
3
+ ? t()
4
+ : "function" == typeof define && define.amd
5
+ ? define(t)
6
+ : t();
7
+ })(0, function () {
8
+ "use strict";
9
+ function e(e) {
10
+ var t = !0,
11
+ n = !1,
12
+ o = null,
13
+ d = {
14
+ text: !0,
15
+ search: !0,
16
+ url: !0,
17
+ tel: !0,
18
+ email: !0,
19
+ password: !0,
20
+ number: !0,
21
+ date: !0,
22
+ month: !0,
23
+ week: !0,
24
+ time: !0,
25
+ datetime: !0,
26
+ "datetime-local": !0,
27
+ };
28
+ function i(e) {
29
+ return !!(
30
+ e &&
31
+ e !== document &&
32
+ "HTML" !== e.nodeName &&
33
+ "BODY" !== e.nodeName &&
34
+ "classList" in e &&
35
+ "contains" in e.classList
36
+ );
37
+ }
38
+ function s(e) {
39
+ e.classList.contains("focus-visible") ||
40
+ (e.classList.add("focus-visible"),
41
+ e.setAttribute("data-focus-visible-added", ""));
42
+ }
43
+ function u(e) {
44
+ t = !1;
45
+ }
46
+ function a() {
47
+ document.addEventListener("mousemove", c),
48
+ document.addEventListener("mousedown", c),
49
+ document.addEventListener("mouseup", c),
50
+ document.addEventListener("pointermove", c),
51
+ document.addEventListener("pointerdown", c),
52
+ document.addEventListener("pointerup", c),
53
+ document.addEventListener("touchmove", c),
54
+ document.addEventListener("touchstart", c),
55
+ document.addEventListener("touchend", c);
56
+ }
57
+ function c(e) {
58
+ (e.target.nodeName && "html" === e.target.nodeName.toLowerCase()) ||
59
+ ((t = !1),
60
+ document.removeEventListener("mousemove", c),
61
+ document.removeEventListener("mousedown", c),
62
+ document.removeEventListener("mouseup", c),
63
+ document.removeEventListener("pointermove", c),
64
+ document.removeEventListener("pointerdown", c),
65
+ document.removeEventListener("pointerup", c),
66
+ document.removeEventListener("touchmove", c),
67
+ document.removeEventListener("touchstart", c),
68
+ document.removeEventListener("touchend", c));
69
+ }
70
+ document.addEventListener(
71
+ "keydown",
72
+ function (n) {
73
+ n.metaKey ||
74
+ n.altKey ||
75
+ n.ctrlKey ||
76
+ (i(e.activeElement) && s(e.activeElement), (t = !0));
77
+ },
78
+ !0
79
+ ),
80
+ document.addEventListener("mousedown", u, !0),
81
+ document.addEventListener("pointerdown", u, !0),
82
+ document.addEventListener("touchstart", u, !0),
83
+ document.addEventListener(
84
+ "visibilitychange",
85
+ function (e) {
86
+ "hidden" === document.visibilityState && (n && (t = !0), a());
87
+ },
88
+ !0
89
+ ),
90
+ a(),
91
+ e.addEventListener(
92
+ "focus",
93
+ function (e) {
94
+ var n, o, u;
95
+ i(e.target) &&
96
+ (t ||
97
+ ((n = e.target),
98
+ (o = n.type),
99
+ ("INPUT" === (u = n.tagName) && d[o] && !n.readOnly) ||
100
+ ("TEXTAREA" === u && !n.readOnly) ||
101
+ n.isContentEditable)) &&
102
+ s(e.target);
103
+ },
104
+ !0
105
+ ),
106
+ e.addEventListener(
107
+ "blur",
108
+ function (e) {
109
+ var t;
110
+ i(e.target) &&
111
+ (e.target.classList.contains("focus-visible") ||
112
+ e.target.hasAttribute("data-focus-visible-added")) &&
113
+ ((n = !0),
114
+ window.clearTimeout(o),
115
+ (o = window.setTimeout(function () {
116
+ n = !1;
117
+ }, 100)),
118
+ (t = e.target).hasAttribute("data-focus-visible-added") &&
119
+ (t.classList.remove("focus-visible"),
120
+ t.removeAttribute("data-focus-visible-added")));
121
+ },
122
+ !0
123
+ ),
124
+ e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && e.host
125
+ ? e.host.setAttribute("data-js-focus-visible", "")
126
+ : e.nodeType === Node.DOCUMENT_NODE &&
127
+ (document.documentElement.classList.add("js-focus-visible"),
128
+ document.documentElement.setAttribute("data-js-focus-visible", ""));
129
+ }
130
+ if ("undefined" != typeof window && "undefined" != typeof document) {
131
+ var t;
132
+ window.applyFocusVisiblePolyfill = e;
133
+ try {
134
+ t = new CustomEvent("focus-visible-polyfill-ready");
135
+ } catch (e) {
136
+ (t = document.createEvent("CustomEvent")).initCustomEvent(
137
+ "focus-visible-polyfill-ready",
138
+ !1,
139
+ !1,
140
+ {}
141
+ );
142
+ }
143
+ window.dispatchEvent(t);
144
+ }
145
+ "undefined" != typeof document && e(document);
146
+ });
package/package.json CHANGED
@@ -129,5 +129,5 @@
129
129
  "style:patterns": "cd patterns && gulp build:css",
130
130
  "build:patterns": "cd patterns && rm -rf html && pug views --out html"
131
131
  },
132
- "version": "3.3.0"
132
+ "version": "3.4.0"
133
133
  }