@adam-milo/ui 1.0.29 → 1.0.30
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/dist/index27.cjs +1 -1
- package/dist/index27.js +21 -21
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +3 -8
- package/dist/index43.cjs +1 -1
- package/dist/index43.js +7 -66
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +66 -35
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +31 -56
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +60 -6
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +6 -208
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +203 -20
- package/dist/index49.cjs +1 -1
- package/dist/index49.js +23 -202
- package/dist/index50.cjs +1 -1
- package/dist/index50.js +204 -10
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +10 -289
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +288 -13
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +14 -39
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +36 -82
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +84 -9
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +8 -65
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +68 -3
- package/dist/index58.cjs +1 -1
- package/dist/index58.js +3 -11
- package/dist/index59.cjs +1 -1
- package/dist/index59.js +11 -31
- package/dist/index60.cjs +1 -1
- package/dist/index60.js +30 -118
- package/dist/index61.cjs +1 -1
- package/dist/index61.js +120 -9
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +11 -0
- package/dist/index63.cjs +1 -1
- package/dist/index63.js +1 -1
- package/dist/index65.cjs +1 -1
- package/dist/index65.js +1 -1
- package/dist/index66.cjs +1 -1
- package/dist/index66.js +1 -1
- package/dist/index80.cjs +1 -1
- package/dist/index80.js +1 -1
- package/dist/index81.cjs +1 -1
- package/dist/index81.js +1 -1
- package/dist/index86.cjs +1 -1
- package/dist/index86.js +12 -33
- package/dist/index87.cjs +1 -1
- package/dist/index87.js +44 -12
- package/dist/index88.cjs +1 -1
- package/dist/index88.js +5 -44
- package/dist/index89.cjs +1 -1
- package/dist/index89.js +33 -5
- package/dist/src/components/forms/radio/Radio.component.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/index41.cjs +0 -1
- package/dist/index41.js +0 -6
package/dist/index60.js
CHANGED
|
@@ -1,122 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}).filter(function(x) {
|
|
27
|
-
return Boolean(x);
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
|
|
31
|
-
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
32
|
-
if (!markerMap[markerName]) {
|
|
33
|
-
markerMap[markerName] = /* @__PURE__ */ new WeakMap();
|
|
34
|
-
}
|
|
35
|
-
var markerCounter = markerMap[markerName];
|
|
36
|
-
var hiddenNodes = [];
|
|
37
|
-
var elementsToKeep = /* @__PURE__ */ new Set();
|
|
38
|
-
var elementsToStop = new Set(targets);
|
|
39
|
-
var keep = function(el) {
|
|
40
|
-
if (!el || elementsToKeep.has(el)) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
elementsToKeep.add(el);
|
|
44
|
-
keep(el.parentNode);
|
|
45
|
-
};
|
|
46
|
-
targets.forEach(keep);
|
|
47
|
-
var deep = function(parent) {
|
|
48
|
-
if (!parent || elementsToStop.has(parent)) {
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
Array.prototype.forEach.call(parent.children, function(node) {
|
|
52
|
-
if (elementsToKeep.has(node)) {
|
|
53
|
-
deep(node);
|
|
54
|
-
} else {
|
|
55
|
-
try {
|
|
56
|
-
var attr = node.getAttribute(controlAttribute);
|
|
57
|
-
var alreadyHidden = attr !== null && attr !== "false";
|
|
58
|
-
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
59
|
-
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
60
|
-
counterMap.set(node, counterValue);
|
|
61
|
-
markerCounter.set(node, markerValue);
|
|
62
|
-
hiddenNodes.push(node);
|
|
63
|
-
if (counterValue === 1 && alreadyHidden) {
|
|
64
|
-
uncontrolledNodes.set(node, true);
|
|
65
|
-
}
|
|
66
|
-
if (markerValue === 1) {
|
|
67
|
-
node.setAttribute(markerName, "true");
|
|
68
|
-
}
|
|
69
|
-
if (!alreadyHidden) {
|
|
70
|
-
node.setAttribute(controlAttribute, "true");
|
|
71
|
-
}
|
|
72
|
-
} catch (e) {
|
|
73
|
-
console.error("aria-hidden: cannot operate on ", node, e);
|
|
74
|
-
}
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Primitive } from "./index54.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
5
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
6
|
+
position: "absolute",
|
|
7
|
+
border: 0,
|
|
8
|
+
width: 1,
|
|
9
|
+
height: 1,
|
|
10
|
+
padding: 0,
|
|
11
|
+
margin: -1,
|
|
12
|
+
overflow: "hidden",
|
|
13
|
+
clip: "rect(0, 0, 0, 0)",
|
|
14
|
+
whiteSpace: "nowrap",
|
|
15
|
+
wordWrap: "normal"
|
|
16
|
+
});
|
|
17
|
+
var NAME = "VisuallyHidden";
|
|
18
|
+
var VisuallyHidden = React.forwardRef(
|
|
19
|
+
(props, forwardedRef) => {
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
Primitive.span,
|
|
22
|
+
{
|
|
23
|
+
...props,
|
|
24
|
+
ref: forwardedRef,
|
|
25
|
+
style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }
|
|
75
26
|
}
|
|
76
|
-
|
|
77
|
-
};
|
|
78
|
-
deep(parentNode);
|
|
79
|
-
elementsToKeep.clear();
|
|
80
|
-
lockCount++;
|
|
81
|
-
return function() {
|
|
82
|
-
hiddenNodes.forEach(function(node) {
|
|
83
|
-
var counterValue = counterMap.get(node) - 1;
|
|
84
|
-
var markerValue = markerCounter.get(node) - 1;
|
|
85
|
-
counterMap.set(node, counterValue);
|
|
86
|
-
markerCounter.set(node, markerValue);
|
|
87
|
-
if (!counterValue) {
|
|
88
|
-
if (!uncontrolledNodes.has(node)) {
|
|
89
|
-
node.removeAttribute(controlAttribute);
|
|
90
|
-
}
|
|
91
|
-
uncontrolledNodes.delete(node);
|
|
92
|
-
}
|
|
93
|
-
if (!markerValue) {
|
|
94
|
-
node.removeAttribute(markerName);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
lockCount--;
|
|
98
|
-
if (!lockCount) {
|
|
99
|
-
counterMap = /* @__PURE__ */ new WeakMap();
|
|
100
|
-
counterMap = /* @__PURE__ */ new WeakMap();
|
|
101
|
-
uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
102
|
-
markerMap = {};
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
107
|
-
if (markerName === void 0) {
|
|
108
|
-
markerName = "data-aria-hidden";
|
|
27
|
+
);
|
|
109
28
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (!activeParentNode) {
|
|
113
|
-
return function() {
|
|
114
|
-
return null;
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
|
-
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
|
|
118
|
-
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
119
|
-
};
|
|
29
|
+
);
|
|
30
|
+
VisuallyHidden.displayName = NAME;
|
|
120
31
|
export {
|
|
121
|
-
|
|
32
|
+
VISUALLY_HIDDEN_STYLES,
|
|
33
|
+
VisuallyHidden
|
|
122
34
|
};
|
package/dist/index61.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=new WeakMap,r=new WeakMap,t={},n=0,a=function(e){return e&&(e.host||a(e.parentNode))},o=function(o,u,i,c){var s=function(e,r){return r.map(function(r){if(e.contains(r))return r;var t=a(r);return t&&e.contains(t)?t:null}).filter(function(e){return Boolean(e)})}(u,Array.isArray(o)?o:[o]);t[i]||(t[i]=new WeakMap);var f=t[i],l=[],p=new Set,d=new Set(s),y=function(e){e&&!p.has(e)&&(p.add(e),y(e.parentNode))};s.forEach(y);var h=function(t){t&&!d.has(t)&&Array.prototype.forEach.call(t.children,function(t){if(p.has(t))h(t);else try{var n=t.getAttribute(c),a=null!==n&&"false"!==n,o=(e.get(t)||0)+1,u=(f.get(t)||0)+1;e.set(t,o),f.set(t,u),l.push(t),1===o&&a&&r.set(t,!0),1===u&&t.setAttribute(i,"true"),a||t.setAttribute(c,"true")}catch(s){}})};return h(u),p.clear(),n++,function(){l.forEach(function(t){var n=e.get(t)-1,a=f.get(t)-1;e.set(t,n),f.set(t,a),n||(r.has(t)||t.removeAttribute(c),r.delete(t)),a||t.removeAttribute(i)}),--n||(e=new WeakMap,e=new WeakMap,r=new WeakMap,t={})}};exports.hideOthers=function(e,r,t){void 0===t&&(t="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),a=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return a?(n.push.apply(n,Array.from(a.querySelectorAll("[aria-live], script"))),o(n,a,t,"aria-hidden")):function(){return null}};
|
package/dist/index61.js
CHANGED
|
@@ -1,11 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
}
|
|
8
|
-
|
|
1
|
+
var getDefaultParent = function(originalTarget) {
|
|
2
|
+
if (typeof document === "undefined") {
|
|
3
|
+
return null;
|
|
4
|
+
}
|
|
5
|
+
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
6
|
+
return sampleTarget.ownerDocument.body;
|
|
7
|
+
};
|
|
8
|
+
var counterMap = /* @__PURE__ */ new WeakMap();
|
|
9
|
+
var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
var markerMap = {};
|
|
11
|
+
var lockCount = 0;
|
|
12
|
+
var unwrapHost = function(node) {
|
|
13
|
+
return node && (node.host || unwrapHost(node.parentNode));
|
|
14
|
+
};
|
|
15
|
+
var correctTargets = function(parent, targets) {
|
|
16
|
+
return targets.map(function(target) {
|
|
17
|
+
if (parent.contains(target)) {
|
|
18
|
+
return target;
|
|
19
|
+
}
|
|
20
|
+
var correctedTarget = unwrapHost(target);
|
|
21
|
+
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
22
|
+
return correctedTarget;
|
|
23
|
+
}
|
|
24
|
+
console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
|
|
25
|
+
return null;
|
|
26
|
+
}).filter(function(x) {
|
|
27
|
+
return Boolean(x);
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
|
|
31
|
+
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
32
|
+
if (!markerMap[markerName]) {
|
|
33
|
+
markerMap[markerName] = /* @__PURE__ */ new WeakMap();
|
|
34
|
+
}
|
|
35
|
+
var markerCounter = markerMap[markerName];
|
|
36
|
+
var hiddenNodes = [];
|
|
37
|
+
var elementsToKeep = /* @__PURE__ */ new Set();
|
|
38
|
+
var elementsToStop = new Set(targets);
|
|
39
|
+
var keep = function(el) {
|
|
40
|
+
if (!el || elementsToKeep.has(el)) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
elementsToKeep.add(el);
|
|
44
|
+
keep(el.parentNode);
|
|
45
|
+
};
|
|
46
|
+
targets.forEach(keep);
|
|
47
|
+
var deep = function(parent) {
|
|
48
|
+
if (!parent || elementsToStop.has(parent)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
Array.prototype.forEach.call(parent.children, function(node) {
|
|
52
|
+
if (elementsToKeep.has(node)) {
|
|
53
|
+
deep(node);
|
|
54
|
+
} else {
|
|
55
|
+
try {
|
|
56
|
+
var attr = node.getAttribute(controlAttribute);
|
|
57
|
+
var alreadyHidden = attr !== null && attr !== "false";
|
|
58
|
+
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
59
|
+
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
60
|
+
counterMap.set(node, counterValue);
|
|
61
|
+
markerCounter.set(node, markerValue);
|
|
62
|
+
hiddenNodes.push(node);
|
|
63
|
+
if (counterValue === 1 && alreadyHidden) {
|
|
64
|
+
uncontrolledNodes.set(node, true);
|
|
65
|
+
}
|
|
66
|
+
if (markerValue === 1) {
|
|
67
|
+
node.setAttribute(markerName, "true");
|
|
68
|
+
}
|
|
69
|
+
if (!alreadyHidden) {
|
|
70
|
+
node.setAttribute(controlAttribute, "true");
|
|
71
|
+
}
|
|
72
|
+
} catch (e) {
|
|
73
|
+
console.error("aria-hidden: cannot operate on ", node, e);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
deep(parentNode);
|
|
79
|
+
elementsToKeep.clear();
|
|
80
|
+
lockCount++;
|
|
81
|
+
return function() {
|
|
82
|
+
hiddenNodes.forEach(function(node) {
|
|
83
|
+
var counterValue = counterMap.get(node) - 1;
|
|
84
|
+
var markerValue = markerCounter.get(node) - 1;
|
|
85
|
+
counterMap.set(node, counterValue);
|
|
86
|
+
markerCounter.set(node, markerValue);
|
|
87
|
+
if (!counterValue) {
|
|
88
|
+
if (!uncontrolledNodes.has(node)) {
|
|
89
|
+
node.removeAttribute(controlAttribute);
|
|
90
|
+
}
|
|
91
|
+
uncontrolledNodes.delete(node);
|
|
92
|
+
}
|
|
93
|
+
if (!markerValue) {
|
|
94
|
+
node.removeAttribute(markerName);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
lockCount--;
|
|
98
|
+
if (!lockCount) {
|
|
99
|
+
counterMap = /* @__PURE__ */ new WeakMap();
|
|
100
|
+
counterMap = /* @__PURE__ */ new WeakMap();
|
|
101
|
+
uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
102
|
+
markerMap = {};
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
107
|
+
if (markerName === void 0) {
|
|
108
|
+
markerName = "data-aria-hidden";
|
|
109
|
+
}
|
|
110
|
+
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
111
|
+
var activeParentNode = getDefaultParent(originalTarget);
|
|
112
|
+
if (!activeParentNode) {
|
|
113
|
+
return function() {
|
|
114
|
+
return null;
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
|
|
118
|
+
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
119
|
+
};
|
|
9
120
|
export {
|
|
10
|
-
|
|
121
|
+
hideOthers
|
|
11
122
|
};
|
package/dist/index62.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./index68.cjs"),r=require("react"),t=require("./index69.cjs"),c=require("./index70.cjs");function n(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const c=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,c.get?c:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}const o=n(r);var s=o.forwardRef(function(r,n){return o.createElement(t.RemoveScroll,e.__assign({},r,{ref:n,sideCar:c}))});s.classNames=t.RemoveScroll.classNames,module.exports=s;
|
package/dist/index62.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __assign } from "./index68.js";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { RemoveScroll } from "./index69.js";
|
|
4
|
+
import SideCar from "./index70.js";
|
|
5
|
+
var ReactRemoveScroll = React.forwardRef(function(props, ref) {
|
|
6
|
+
return React.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: SideCar }));
|
|
7
|
+
});
|
|
8
|
+
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
9
|
+
export {
|
|
10
|
+
ReactRemoveScroll as default
|
|
11
|
+
};
|
package/dist/index63.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index56.cjs");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const r=n(e);exports.useEscapeKeydown=function(e,n=(null==globalThis?void 0:globalThis.document)){const o=t.useCallbackRef(e);r.useEffect(()=>{const e=e=>{"Escape"===e.key&&o(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[o,n])};
|
package/dist/index63.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useCallbackRef } from "./
|
|
2
|
+
import { useCallbackRef } from "./index56.js";
|
|
3
3
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
4
4
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
5
5
|
React.useEffect(() => {
|
package/dist/index65.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),r=require("./index54.cjs"),t=require("react/jsx-runtime");function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const t in e)if("default"!==t){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}return r.default=e,Object.freeze(r)}var i=o(e).forwardRef((e,o)=>{const{children:i,width:n=10,height:s=5,...c}=e;return t.jsx(r.Primitive.svg,{...c,ref:o,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?i:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});i.displayName="Arrow";var n=i;exports.Arrow=i,exports.Root=n;
|
package/dist/index65.js
CHANGED
package/dist/index66.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index58.cjs");function r(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const r in e)if("default"!==r){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}return t.default=e,Object.freeze(t)}const o=r(e);exports.useSize=function(e){const[r,i]=o.useState(void 0);return t.useLayoutEffect(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,n;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,n=t.blockSize}else o=e.offsetWidth,n=e.offsetHeight;i({width:o,height:n})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}i(void 0)},[e]),r};
|
package/dist/index66.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { useLayoutEffect as useLayoutEffect2 } from "./
|
|
2
|
+
import { useLayoutEffect as useLayoutEffect2 } from "./index58.js";
|
|
3
3
|
function useSize(element) {
|
|
4
4
|
const [size, setSize] = React.useState(void 0);
|
|
5
5
|
useLayoutEffect2(() => {
|
package/dist/index80.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),n=require("./index81.cjs"),e=require("./index71.cjs"),o=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),n=require("./index81.cjs"),e=require("./index71.cjs"),o=require("./index89.cjs");function c(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const e in t)if("default"!==e){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}return n.default=t,Object.freeze(n)}const r=c(t);var a=n.styleSingleton(),i="data-scroll-locked",l=function(t,n,o,c){var r=t.left,a=t.top,l=t.right,d=t.gap;return void 0===o&&(o="margin"),"\n .".concat(e.noScrollbarsClassName," {\n overflow: hidden ").concat(c,";\n padding-right: ").concat(d,"px ").concat(c,";\n }\n body[").concat(i,"] {\n overflow: hidden ").concat(c,";\n overscroll-behavior: contain;\n ").concat([n&&"position: relative ".concat(c,";"),"margin"===o&&"\n padding-left: ".concat(r,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(d,"px ").concat(c,";\n "),"padding"===o&&"padding-right: ".concat(d,"px ").concat(c,";")].filter(Boolean).join(""),"\n }\n \n .").concat(e.zeroRightClassName," {\n right: ").concat(d,"px ").concat(c,";\n }\n \n .").concat(e.fullWidthClassName," {\n margin-right: ").concat(d,"px ").concat(c,";\n }\n \n .").concat(e.zeroRightClassName," .").concat(e.zeroRightClassName," {\n right: 0 ").concat(c,";\n }\n \n .").concat(e.fullWidthClassName," .").concat(e.fullWidthClassName," {\n margin-right: 0 ").concat(c,";\n }\n \n body[").concat(i,"] {\n ").concat(e.removedBarSizeVariable,": ").concat(d,"px;\n }\n")},d=function(){var t=parseInt(document.body.getAttribute(i)||"0",10);return isFinite(t)?t:0},s=function(){r.useEffect(function(){return document.body.setAttribute(i,(d()+1).toString()),function(){var t=d()-1;t<=0?document.body.removeAttribute(i):document.body.setAttribute(i,t.toString())}},[])};exports.RemoveScrollBar=function(t){var n=t.noRelative,e=t.noImportant,c=t.gapMode,i=void 0===c?"margin":c;s();var d=r.useMemo(function(){return o.getGapWidth(i)},[i]);return r.createElement(a,{styles:l(d,!n,i,e?"":"!important")})},exports.lockAttribute=i,exports.useLockAttribute=s;
|
package/dist/index80.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { styleSingleton } from "./index81.js";
|
|
3
3
|
import { noScrollbarsClassName, zeroRightClassName, fullWidthClassName, removedBarSizeVariable } from "./index71.js";
|
|
4
|
-
import { getGapWidth } from "./
|
|
4
|
+
import { getGapWidth } from "./index89.js";
|
|
5
5
|
var Style = styleSingleton();
|
|
6
6
|
var lockAttribute = "data-scroll-locked";
|
|
7
7
|
var getStyles = function(_a, allowRelative, gapMode, important) {
|
package/dist/index81.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index86.cjs");exports.styleSingleton=function(){var t=e.styleHookSingleton();return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}};
|
package/dist/index81.js
CHANGED
package/dist/index86.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=require("./index87.cjs");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const r=n(e);exports.styleHookSingleton=function(){var e=t.stylesheetSingleton();return function(t,n){r.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}};
|
package/dist/index86.js
CHANGED
|
@@ -1,37 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
|
|
13
|
-
var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
|
|
14
|
-
var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
|
|
15
|
-
return [parse(left), parse(top), parse(right)];
|
|
16
|
-
};
|
|
17
|
-
var getGapWidth = function(gapMode) {
|
|
18
|
-
if (gapMode === void 0) {
|
|
19
|
-
gapMode = "margin";
|
|
20
|
-
}
|
|
21
|
-
if (typeof window === "undefined") {
|
|
22
|
-
return zeroGap;
|
|
23
|
-
}
|
|
24
|
-
var offsets = getOffset(gapMode);
|
|
25
|
-
var documentWidth = document.documentElement.clientWidth;
|
|
26
|
-
var windowWidth = window.innerWidth;
|
|
27
|
-
return {
|
|
28
|
-
left: offsets[0],
|
|
29
|
-
top: offsets[1],
|
|
30
|
-
right: offsets[2],
|
|
31
|
-
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { stylesheetSingleton } from "./index87.js";
|
|
3
|
+
var styleHookSingleton = function() {
|
|
4
|
+
var sheet = stylesheetSingleton();
|
|
5
|
+
return function(styles, isDynamic) {
|
|
6
|
+
React.useEffect(function() {
|
|
7
|
+
sheet.add(styles);
|
|
8
|
+
return function() {
|
|
9
|
+
sheet.remove();
|
|
10
|
+
};
|
|
11
|
+
}, [styles && isDynamic]);
|
|
32
12
|
};
|
|
33
13
|
};
|
|
34
14
|
export {
|
|
35
|
-
|
|
36
|
-
zeroGap
|
|
15
|
+
styleHookSingleton
|
|
37
16
|
};
|
package/dist/index87.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index88.cjs");exports.stylesheetSingleton=function(){var t=0,n=null;return{add:function(o){var r,u;0==t&&(n=function(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var n=e.getNonce();return n&&t.setAttribute("nonce",n),t}())&&(u=o,(r=n).styleSheet?r.styleSheet.cssText=u:r.appendChild(document.createTextNode(u)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),t++},remove:function(){! --t&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}};
|
package/dist/index87.js
CHANGED
|
@@ -1,16 +1,48 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { getNonce } from "./index88.js";
|
|
2
|
+
function makeStyleTag() {
|
|
3
|
+
if (!document)
|
|
4
|
+
return null;
|
|
5
|
+
var tag = document.createElement("style");
|
|
6
|
+
tag.type = "text/css";
|
|
7
|
+
var nonce = getNonce();
|
|
8
|
+
if (nonce) {
|
|
9
|
+
tag.setAttribute("nonce", nonce);
|
|
10
|
+
}
|
|
11
|
+
return tag;
|
|
12
|
+
}
|
|
13
|
+
function injectStyles(tag, css) {
|
|
14
|
+
if (tag.styleSheet) {
|
|
15
|
+
tag.styleSheet.cssText = css;
|
|
16
|
+
} else {
|
|
17
|
+
tag.appendChild(document.createTextNode(css));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function insertStyleTag(tag) {
|
|
21
|
+
var head = document.head || document.getElementsByTagName("head")[0];
|
|
22
|
+
head.appendChild(tag);
|
|
23
|
+
}
|
|
24
|
+
var stylesheetSingleton = function() {
|
|
25
|
+
var counter = 0;
|
|
26
|
+
var stylesheet = null;
|
|
27
|
+
return {
|
|
28
|
+
add: function(style) {
|
|
29
|
+
if (counter == 0) {
|
|
30
|
+
if (stylesheet = makeStyleTag()) {
|
|
31
|
+
injectStyles(stylesheet, style);
|
|
32
|
+
insertStyleTag(stylesheet);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
counter++;
|
|
36
|
+
},
|
|
37
|
+
remove: function() {
|
|
38
|
+
counter--;
|
|
39
|
+
if (!counter && stylesheet) {
|
|
40
|
+
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
|
|
41
|
+
stylesheet = null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
12
44
|
};
|
|
13
45
|
};
|
|
14
46
|
export {
|
|
15
|
-
|
|
47
|
+
stylesheetSingleton
|
|
16
48
|
};
|
package/dist/index88.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.getNonce=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__};
|
package/dist/index88.js
CHANGED
|
@@ -1,48 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return null;
|
|
5
|
-
var tag = document.createElement("style");
|
|
6
|
-
tag.type = "text/css";
|
|
7
|
-
var nonce = getNonce();
|
|
8
|
-
if (nonce) {
|
|
9
|
-
tag.setAttribute("nonce", nonce);
|
|
1
|
+
var getNonce = function() {
|
|
2
|
+
if (typeof __webpack_nonce__ !== "undefined") {
|
|
3
|
+
return __webpack_nonce__;
|
|
10
4
|
}
|
|
11
|
-
return
|
|
12
|
-
}
|
|
13
|
-
function injectStyles(tag, css) {
|
|
14
|
-
if (tag.styleSheet) {
|
|
15
|
-
tag.styleSheet.cssText = css;
|
|
16
|
-
} else {
|
|
17
|
-
tag.appendChild(document.createTextNode(css));
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
function insertStyleTag(tag) {
|
|
21
|
-
var head = document.head || document.getElementsByTagName("head")[0];
|
|
22
|
-
head.appendChild(tag);
|
|
23
|
-
}
|
|
24
|
-
var stylesheetSingleton = function() {
|
|
25
|
-
var counter = 0;
|
|
26
|
-
var stylesheet = null;
|
|
27
|
-
return {
|
|
28
|
-
add: function(style) {
|
|
29
|
-
if (counter == 0) {
|
|
30
|
-
if (stylesheet = makeStyleTag()) {
|
|
31
|
-
injectStyles(stylesheet, style);
|
|
32
|
-
insertStyleTag(stylesheet);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
counter++;
|
|
36
|
-
},
|
|
37
|
-
remove: function() {
|
|
38
|
-
counter--;
|
|
39
|
-
if (!counter && stylesheet) {
|
|
40
|
-
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
|
|
41
|
-
stylesheet = null;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
5
|
+
return void 0;
|
|
45
6
|
};
|
|
46
7
|
export {
|
|
47
|
-
|
|
8
|
+
getNonce
|
|
48
9
|
};
|
package/dist/index89.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t={left:0,top:0,right:0,gap:0},n=function(t){return parseInt(t||"",10)||0};exports.getGapWidth=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return t;var i=function(t){var e=window.getComputedStyle(document.body),i=e["padding"===t?"paddingLeft":"marginLeft"],d=e["padding"===t?"paddingTop":"marginTop"],r=e["padding"===t?"paddingRight":"marginRight"];return[n(i),n(d),n(r)]}(e),d=document.documentElement.clientWidth,r=window.innerWidth;return{left:i[0],top:i[1],right:i[2],gap:Math.max(0,r-d+i[2]-i[0])}},exports.zeroGap=t;
|
package/dist/index89.js
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
var zeroGap = {
|
|
2
|
+
left: 0,
|
|
3
|
+
top: 0,
|
|
4
|
+
right: 0,
|
|
5
|
+
gap: 0
|
|
6
|
+
};
|
|
7
|
+
var parse = function(x) {
|
|
8
|
+
return parseInt(x || "", 10) || 0;
|
|
9
|
+
};
|
|
10
|
+
var getOffset = function(gapMode) {
|
|
11
|
+
var cs = window.getComputedStyle(document.body);
|
|
12
|
+
var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
|
|
13
|
+
var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
|
|
14
|
+
var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
|
|
15
|
+
return [parse(left), parse(top), parse(right)];
|
|
16
|
+
};
|
|
17
|
+
var getGapWidth = function(gapMode) {
|
|
18
|
+
if (gapMode === void 0) {
|
|
19
|
+
gapMode = "margin";
|
|
20
|
+
}
|
|
21
|
+
if (typeof window === "undefined") {
|
|
22
|
+
return zeroGap;
|
|
4
23
|
}
|
|
5
|
-
|
|
24
|
+
var offsets = getOffset(gapMode);
|
|
25
|
+
var documentWidth = document.documentElement.clientWidth;
|
|
26
|
+
var windowWidth = window.innerWidth;
|
|
27
|
+
return {
|
|
28
|
+
left: offsets[0],
|
|
29
|
+
top: offsets[1],
|
|
30
|
+
right: offsets[2],
|
|
31
|
+
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
|
|
32
|
+
};
|
|
6
33
|
};
|
|
7
34
|
export {
|
|
8
|
-
|
|
35
|
+
getGapWidth,
|
|
36
|
+
zeroGap
|
|
9
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/radio/Radio.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAA8B,MAAM,OAAO,CAAC;AAEpF,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACrF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEhE;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE7D;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEnE;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEjE;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"Radio.component.d.ts","sourceRoot":"","sources":["../../../../../src/components/forms/radio/Radio.component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAA8B,MAAM,OAAO,CAAC;AAEpF,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACrF;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEhE;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE7D;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAE9D;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEnE;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAEjE;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,KAAK,yGA8GjB,CAAC"}
|