@adam-milo/ui 1.0.23 → 1.0.25

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.
Files changed (154) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +20 -9
  3. package/dist/index10.cjs +1 -1
  4. package/dist/index10.js +53 -59
  5. package/dist/index11.cjs +1 -1
  6. package/dist/index11.js +50 -104
  7. package/dist/index12.cjs +1 -1
  8. package/dist/index12.js +108 -76
  9. package/dist/index13.cjs +1 -1
  10. package/dist/index13.js +77 -26
  11. package/dist/index14.cjs +1 -1
  12. package/dist/index14.js +22 -462
  13. package/dist/index15.cjs +1 -1
  14. package/dist/index15.js +466 -109
  15. package/dist/index16.cjs +1 -1
  16. package/dist/index16.js +111 -30
  17. package/dist/index17.cjs +1 -1
  18. package/dist/index17.js +42 -12
  19. package/dist/index18.cjs +1 -0
  20. package/dist/index18.js +38 -0
  21. package/dist/index19.cjs +1 -1
  22. package/dist/index19.js +12 -20
  23. package/dist/index2.cjs +1 -1
  24. package/dist/index2.js +1 -1
  25. package/dist/index21.cjs +1 -1
  26. package/dist/index21.js +20 -14
  27. package/dist/{index20.cjs → index22.cjs} +1 -1
  28. package/dist/{index20.js → index22.js} +3 -3
  29. package/dist/index23.cjs +1 -0
  30. package/dist/index23.js +16 -0
  31. package/dist/index26.cjs +1 -0
  32. package/dist/index26.js +1193 -0
  33. package/dist/index3.cjs +1 -1
  34. package/dist/index3.js +2 -2
  35. package/dist/index4.cjs +1 -1
  36. package/dist/index4.js +1 -1
  37. package/dist/index40.cjs +1 -0
  38. package/dist/index40.js +6 -0
  39. package/dist/index41.cjs +1 -0
  40. package/dist/index41.js +11 -0
  41. package/dist/index42.cjs +1 -0
  42. package/dist/index42.js +70 -0
  43. package/dist/index43.cjs +1 -0
  44. package/dist/index43.js +39 -0
  45. package/dist/index44.cjs +1 -0
  46. package/dist/index44.js +64 -0
  47. package/dist/index45.cjs +1 -0
  48. package/dist/index45.js +10 -0
  49. package/dist/index46.cjs +1 -0
  50. package/dist/index46.js +212 -0
  51. package/dist/index47.cjs +1 -0
  52. package/dist/index47.js +29 -0
  53. package/dist/index48.cjs +1 -0
  54. package/dist/index48.js +208 -0
  55. package/dist/index49.cjs +1 -0
  56. package/dist/index49.js +14 -0
  57. package/dist/index5.cjs +1 -1
  58. package/dist/index5.js +1 -1
  59. package/dist/index50.cjs +1 -0
  60. package/dist/index50.js +293 -0
  61. package/dist/index51.cjs +1 -0
  62. package/dist/index51.js +18 -0
  63. package/dist/index52.cjs +1 -0
  64. package/dist/index52.js +43 -0
  65. package/dist/index53.cjs +1 -0
  66. package/dist/index53.js +89 -0
  67. package/dist/index54.cjs +1 -0
  68. package/dist/index54.js +14 -0
  69. package/dist/index55.cjs +1 -0
  70. package/dist/index55.js +71 -0
  71. package/dist/index56.cjs +1 -0
  72. package/dist/index56.js +6 -0
  73. package/dist/index57.cjs +1 -0
  74. package/dist/index57.js +14 -0
  75. package/dist/index58.cjs +1 -0
  76. package/dist/index58.js +34 -0
  77. package/dist/index59.cjs +1 -0
  78. package/dist/index59.js +122 -0
  79. package/dist/index6.cjs +1 -1
  80. package/dist/index6.js +2 -2
  81. package/dist/index60.cjs +1 -0
  82. package/dist/index60.js +11 -0
  83. package/dist/index61.cjs +1 -0
  84. package/dist/index61.js +17 -0
  85. package/dist/index62.cjs +1 -0
  86. package/dist/index62.js +297 -0
  87. package/dist/index63.cjs +1 -0
  88. package/dist/index63.js +25 -0
  89. package/dist/index64.cjs +1 -0
  90. package/dist/index64.js +39 -0
  91. package/dist/index65.cjs +1 -0
  92. package/dist/index65.js +625 -0
  93. package/dist/index66.cjs +1 -0
  94. package/dist/index66.js +39 -0
  95. package/dist/index67.cjs +1 -0
  96. package/dist/index67.js +38 -0
  97. package/dist/index68.cjs +1 -0
  98. package/dist/index68.js +7 -0
  99. package/dist/index69.cjs +1 -0
  100. package/dist/index69.js +10 -0
  101. package/dist/index7.cjs +1 -1
  102. package/dist/index7.js +1 -1
  103. package/dist/index70.cjs +1 -0
  104. package/dist/index70.js +5 -0
  105. package/dist/index71.cjs +1 -0
  106. package/dist/index71.js +35 -0
  107. package/dist/index72.cjs +1 -0
  108. package/dist/index72.js +180 -0
  109. package/dist/index73.cjs +1 -0
  110. package/dist/index73.js +21 -0
  111. package/dist/index74.cjs +1 -0
  112. package/dist/index74.js +721 -0
  113. package/dist/index75.cjs +1 -0
  114. package/dist/index75.js +154 -0
  115. package/dist/index76.cjs +1 -0
  116. package/dist/index76.js +173 -0
  117. package/dist/index77.cjs +1 -0
  118. package/dist/index77.js +47 -0
  119. package/dist/index78.cjs +1 -0
  120. package/dist/index78.js +13 -0
  121. package/dist/index79.cjs +1 -0
  122. package/dist/index79.js +19 -0
  123. package/dist/index8.cjs +1 -1
  124. package/dist/index8.js +1 -1
  125. package/dist/index80.cjs +1 -0
  126. package/dist/index80.js +102 -0
  127. package/dist/index81.cjs +1 -0
  128. package/dist/index81.js +88 -0
  129. package/dist/index82.cjs +1 -0
  130. package/dist/index82.js +11 -0
  131. package/dist/index83.cjs +1 -0
  132. package/dist/index83.js +29 -0
  133. package/dist/index84.cjs +1 -0
  134. package/dist/index84.js +37 -0
  135. package/dist/index85.cjs +1 -0
  136. package/dist/index85.js +16 -0
  137. package/dist/index86.cjs +1 -0
  138. package/dist/index86.js +48 -0
  139. package/dist/index87.cjs +1 -0
  140. package/dist/index87.js +9 -0
  141. package/dist/index9.cjs +1 -1
  142. package/dist/index9.js +224 -35
  143. package/dist/src/components/forms/select/Select.component.d.ts +100 -0
  144. package/dist/src/components/forms/select/Select.component.d.ts.map +1 -0
  145. package/dist/src/components/layout/container/Container.component.d.ts +26 -0
  146. package/dist/src/components/layout/container/Container.component.d.ts.map +1 -0
  147. package/dist/src/index.d.ts +4 -0
  148. package/dist/src/index.d.ts.map +1 -1
  149. package/dist/style.css +1 -1
  150. package/package.json +2 -1
  151. /package/dist/{index30.cjs → index34.cjs} +0 -0
  152. /package/dist/{index30.js → index34.js} +0 -0
  153. /package/dist/{index33.cjs → index38.cjs} +0 -0
  154. /package/dist/{index33.js → index38.js} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=Math.min,e=Math.max,o=Math.round,n=Math.floor,r={left:"right",right:"left",bottom:"top",top:"bottom"},i={start:"end",end:"start"};function s(t){return t.split("-")[0]}function p(t){return t.split("-")[1]}function c(t){return"x"===t?"y":"x"}function u(t){return"y"===t?"height":"width"}const x=new Set(["top","bottom"]);function a(t){return x.has(s(t))?"y":"x"}function g(t){return c(a(t))}function f(t){return t.replace(/start|end/g,t=>i[t])}const l=["left","right"],m=["right","left"],h=["top","bottom"],d=["bottom","top"];function b(t){return t.replace(/left|right|bottom|top/g,t=>r[t])}function y(t){return{top:0,right:0,bottom:0,left:0,...t}}exports.clamp=function(o,n,r){return e(o,t(n,r))},exports.createCoords=t=>({x:t,y:t}),exports.evaluate=function(t,e){return"function"==typeof t?t(e):t},exports.expandPaddingObject=y,exports.floor=n,exports.getAlignment=p,exports.getAlignmentAxis=g,exports.getAlignmentSides=function(t,e,o){void 0===o&&(o=!1);const n=p(t),r=g(t),i=u(r);let s="x"===r?n===(o?"end":"start")?"right":"left":"start"===n?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=b(s)),[s,b(s)]},exports.getAxisLength=u,exports.getExpandedPlacements=function(t){const e=b(t);return[f(t),e,f(e)]},exports.getOppositeAlignmentPlacement=f,exports.getOppositeAxis=c,exports.getOppositeAxisPlacements=function(t,e,o,n){const r=p(t);let i=function(t,e,o){switch(t){case"top":case"bottom":return o?e?m:l:e?l:m;case"left":case"right":return e?h:d;default:return[]}}(s(t),"start"===o,n);return r&&(i=i.map(t=>t+"-"+r),e&&(i=i.concat(i.map(f)))),i},exports.getOppositePlacement=b,exports.getPaddingObject=function(t){return"number"!=typeof t?y(t):{top:t,right:t,bottom:t,left:t}},exports.getSide=s,exports.getSideAxis=a,exports.max=e,exports.min=t,exports.rectToClientRect=function(t){const{x:e,y:o,width:n,height:r}=t;return{width:n,height:r,top:o,left:e,right:e+n,bottom:o+r,x:e,y:o}},exports.round=o,exports.sides=["top","right","bottom","left"];
@@ -0,0 +1,154 @@
1
+ const sides = ["top", "right", "bottom", "left"];
2
+ const min = Math.min;
3
+ const max = Math.max;
4
+ const round = Math.round;
5
+ const floor = Math.floor;
6
+ const createCoords = (v) => ({
7
+ x: v,
8
+ y: v
9
+ });
10
+ const oppositeSideMap = {
11
+ left: "right",
12
+ right: "left",
13
+ bottom: "top",
14
+ top: "bottom"
15
+ };
16
+ const oppositeAlignmentMap = {
17
+ start: "end",
18
+ end: "start"
19
+ };
20
+ function clamp(start, value, end) {
21
+ return max(start, min(value, end));
22
+ }
23
+ function evaluate(value, param) {
24
+ return typeof value === "function" ? value(param) : value;
25
+ }
26
+ function getSide(placement) {
27
+ return placement.split("-")[0];
28
+ }
29
+ function getAlignment(placement) {
30
+ return placement.split("-")[1];
31
+ }
32
+ function getOppositeAxis(axis) {
33
+ return axis === "x" ? "y" : "x";
34
+ }
35
+ function getAxisLength(axis) {
36
+ return axis === "y" ? "height" : "width";
37
+ }
38
+ const yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
39
+ function getSideAxis(placement) {
40
+ return yAxisSides.has(getSide(placement)) ? "y" : "x";
41
+ }
42
+ function getAlignmentAxis(placement) {
43
+ return getOppositeAxis(getSideAxis(placement));
44
+ }
45
+ function getAlignmentSides(placement, rects, rtl) {
46
+ if (rtl === void 0) {
47
+ rtl = false;
48
+ }
49
+ const alignment = getAlignment(placement);
50
+ const alignmentAxis = getAlignmentAxis(placement);
51
+ const length = getAxisLength(alignmentAxis);
52
+ let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
53
+ if (rects.reference[length] > rects.floating[length]) {
54
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
55
+ }
56
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
57
+ }
58
+ function getExpandedPlacements(placement) {
59
+ const oppositePlacement = getOppositePlacement(placement);
60
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
61
+ }
62
+ function getOppositeAlignmentPlacement(placement) {
63
+ return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
64
+ }
65
+ const lrPlacement = ["left", "right"];
66
+ const rlPlacement = ["right", "left"];
67
+ const tbPlacement = ["top", "bottom"];
68
+ const btPlacement = ["bottom", "top"];
69
+ function getSideList(side, isStart, rtl) {
70
+ switch (side) {
71
+ case "top":
72
+ case "bottom":
73
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
74
+ return isStart ? lrPlacement : rlPlacement;
75
+ case "left":
76
+ case "right":
77
+ return isStart ? tbPlacement : btPlacement;
78
+ default:
79
+ return [];
80
+ }
81
+ }
82
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
83
+ const alignment = getAlignment(placement);
84
+ let list = getSideList(getSide(placement), direction === "start", rtl);
85
+ if (alignment) {
86
+ list = list.map((side) => side + "-" + alignment);
87
+ if (flipAlignment) {
88
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
89
+ }
90
+ }
91
+ return list;
92
+ }
93
+ function getOppositePlacement(placement) {
94
+ return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
95
+ }
96
+ function expandPaddingObject(padding) {
97
+ return {
98
+ top: 0,
99
+ right: 0,
100
+ bottom: 0,
101
+ left: 0,
102
+ ...padding
103
+ };
104
+ }
105
+ function getPaddingObject(padding) {
106
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
107
+ top: padding,
108
+ right: padding,
109
+ bottom: padding,
110
+ left: padding
111
+ };
112
+ }
113
+ function rectToClientRect(rect) {
114
+ const {
115
+ x,
116
+ y,
117
+ width,
118
+ height
119
+ } = rect;
120
+ return {
121
+ width,
122
+ height,
123
+ top: y,
124
+ left: x,
125
+ right: x + width,
126
+ bottom: y + height,
127
+ x,
128
+ y
129
+ };
130
+ }
131
+ export {
132
+ clamp,
133
+ createCoords,
134
+ evaluate,
135
+ expandPaddingObject,
136
+ floor,
137
+ getAlignment,
138
+ getAlignmentAxis,
139
+ getAlignmentSides,
140
+ getAxisLength,
141
+ getExpandedPlacements,
142
+ getOppositeAlignmentPlacement,
143
+ getOppositeAxis,
144
+ getOppositeAxisPlacements,
145
+ getOppositePlacement,
146
+ getPaddingObject,
147
+ getSide,
148
+ getSideAxis,
149
+ max,
150
+ min,
151
+ rectToClientRect,
152
+ round,
153
+ sides
154
+ };
@@ -0,0 +1 @@
1
+ "use strict";function e(){return"undefined"!=typeof window}function t(e){return r(e)?(e.nodeName||"").toLowerCase():"#document"}function n(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function o(e){var t;return null==(t=(r(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function r(t){return!!e()&&(t instanceof Node||t instanceof n(t).Node)}function s(t){return!!e()&&(t instanceof Element||t instanceof n(t).Element)}function c(t){return!!e()&&(t instanceof HTMLElement||t instanceof n(t).HTMLElement)}function i(t){return!(!e()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof n(t).ShadowRoot)}Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=new Set(["inline","contents"]);function u(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=g(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!l.has(r)}const a=new Set(["table","td","th"]);const f=[":popover-open",":modal"];function p(e){return f.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const d=["transform","translate","scale","rotate","perspective"],m=["transform","translate","scale","rotate","perspective","filter"],w=["paint","layout","strict","content"];function v(e){const t=x(),n=s(e)?g(e):e;return d.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||m.some(e=>(n.willChange||"").includes(e))||w.some(e=>(n.contain||"").includes(e))}function x(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const y=new Set(["html","body","#document"]);function S(e){return y.has(t(e))}function g(e){return n(e).getComputedStyle(e)}function h(e){if("html"===t(e))return e;const n=e.assignedSlot||e.parentNode||i(e)&&e.host||o(e);return i(n)?n.host:n}function b(e){const t=h(e);return S(t)?e.ownerDocument?e.ownerDocument.body:e.body:c(t)&&u(t)?t:b(t)}function E(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}exports.getComputedStyle=g,exports.getContainingBlock=function(e){let t=h(e);for(;c(t)&&!S(t);){if(v(t))return t;if(p(t))return null;t=h(t)}return null},exports.getDocumentElement=o,exports.getFrameElement=E,exports.getNearestOverflowAncestor=b,exports.getNodeName=t,exports.getNodeScroll=function(e){return s(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}},exports.getOverflowAncestors=function e(t,o,r){var s;void 0===o&&(o=[]),void 0===r&&(r=!0);const c=b(t),i=c===(null==(s=t.ownerDocument)?void 0:s.body),l=n(c);if(i){const t=E(l);return o.concat(l,l.visualViewport||[],u(c)?c:[],t&&r?e(t):[])}return o.concat(c,e(c,[],r))},exports.getParentNode=h,exports.getWindow=n,exports.isContainingBlock=v,exports.isElement=s,exports.isHTMLElement=c,exports.isLastTraversableNode=S,exports.isNode=r,exports.isOverflowElement=u,exports.isShadowRoot=i,exports.isTableElement=function(e){return a.has(t(e))},exports.isTopLayer=p,exports.isWebKit=x;
@@ -0,0 +1,173 @@
1
+ function hasWindow() {
2
+ return typeof window !== "undefined";
3
+ }
4
+ function getNodeName(node) {
5
+ if (isNode(node)) {
6
+ return (node.nodeName || "").toLowerCase();
7
+ }
8
+ return "#document";
9
+ }
10
+ function getWindow(node) {
11
+ var _node$ownerDocument;
12
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
13
+ }
14
+ function getDocumentElement(node) {
15
+ var _ref;
16
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
17
+ }
18
+ function isNode(value) {
19
+ if (!hasWindow()) {
20
+ return false;
21
+ }
22
+ return value instanceof Node || value instanceof getWindow(value).Node;
23
+ }
24
+ function isElement(value) {
25
+ if (!hasWindow()) {
26
+ return false;
27
+ }
28
+ return value instanceof Element || value instanceof getWindow(value).Element;
29
+ }
30
+ function isHTMLElement(value) {
31
+ if (!hasWindow()) {
32
+ return false;
33
+ }
34
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
35
+ }
36
+ function isShadowRoot(value) {
37
+ if (!hasWindow() || typeof ShadowRoot === "undefined") {
38
+ return false;
39
+ }
40
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
41
+ }
42
+ const invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
43
+ function isOverflowElement(element) {
44
+ const {
45
+ overflow,
46
+ overflowX,
47
+ overflowY,
48
+ display
49
+ } = getComputedStyle(element);
50
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
51
+ }
52
+ const tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
53
+ function isTableElement(element) {
54
+ return tableElements.has(getNodeName(element));
55
+ }
56
+ const topLayerSelectors = [":popover-open", ":modal"];
57
+ function isTopLayer(element) {
58
+ return topLayerSelectors.some((selector) => {
59
+ try {
60
+ return element.matches(selector);
61
+ } catch (_e) {
62
+ return false;
63
+ }
64
+ });
65
+ }
66
+ const transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
67
+ const willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
68
+ const containValues = ["paint", "layout", "strict", "content"];
69
+ function isContainingBlock(elementOrCss) {
70
+ const webkit = isWebKit();
71
+ const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;
72
+ return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
73
+ }
74
+ function getContainingBlock(element) {
75
+ let currentNode = getParentNode(element);
76
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
77
+ if (isContainingBlock(currentNode)) {
78
+ return currentNode;
79
+ } else if (isTopLayer(currentNode)) {
80
+ return null;
81
+ }
82
+ currentNode = getParentNode(currentNode);
83
+ }
84
+ return null;
85
+ }
86
+ function isWebKit() {
87
+ if (typeof CSS === "undefined" || !CSS.supports) return false;
88
+ return CSS.supports("-webkit-backdrop-filter", "none");
89
+ }
90
+ const lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
91
+ function isLastTraversableNode(node) {
92
+ return lastTraversableNodeNames.has(getNodeName(node));
93
+ }
94
+ function getComputedStyle(element) {
95
+ return getWindow(element).getComputedStyle(element);
96
+ }
97
+ function getNodeScroll(element) {
98
+ if (isElement(element)) {
99
+ return {
100
+ scrollLeft: element.scrollLeft,
101
+ scrollTop: element.scrollTop
102
+ };
103
+ }
104
+ return {
105
+ scrollLeft: element.scrollX,
106
+ scrollTop: element.scrollY
107
+ };
108
+ }
109
+ function getParentNode(node) {
110
+ if (getNodeName(node) === "html") {
111
+ return node;
112
+ }
113
+ const result = (
114
+ // Step into the shadow DOM of the parent of a slotted node.
115
+ node.assignedSlot || // DOM Element detected.
116
+ node.parentNode || // ShadowRoot detected.
117
+ isShadowRoot(node) && node.host || // Fallback.
118
+ getDocumentElement(node)
119
+ );
120
+ return isShadowRoot(result) ? result.host : result;
121
+ }
122
+ function getNearestOverflowAncestor(node) {
123
+ const parentNode = getParentNode(node);
124
+ if (isLastTraversableNode(parentNode)) {
125
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
126
+ }
127
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
128
+ return parentNode;
129
+ }
130
+ return getNearestOverflowAncestor(parentNode);
131
+ }
132
+ function getOverflowAncestors(node, list, traverseIframes) {
133
+ var _node$ownerDocument2;
134
+ if (list === void 0) {
135
+ list = [];
136
+ }
137
+ if (traverseIframes === void 0) {
138
+ traverseIframes = true;
139
+ }
140
+ const scrollableAncestor = getNearestOverflowAncestor(node);
141
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
142
+ const win = getWindow(scrollableAncestor);
143
+ if (isBody) {
144
+ const frameElement = getFrameElement(win);
145
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
146
+ }
147
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
148
+ }
149
+ function getFrameElement(win) {
150
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
151
+ }
152
+ export {
153
+ getComputedStyle,
154
+ getContainingBlock,
155
+ getDocumentElement,
156
+ getFrameElement,
157
+ getNearestOverflowAncestor,
158
+ getNodeName,
159
+ getNodeScroll,
160
+ getOverflowAncestors,
161
+ getParentNode,
162
+ getWindow,
163
+ isContainingBlock,
164
+ isElement,
165
+ isHTMLElement,
166
+ isLastTraversableNode,
167
+ isNode,
168
+ isOverflowElement,
169
+ isShadowRoot,
170
+ isTableElement,
171
+ isTopLayer,
172
+ isWebKit
173
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),n=require("./index78.cjs"),e=require("./index69.cjs"),o=require("./index84.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;
@@ -0,0 +1,47 @@
1
+ import * as React from "react";
2
+ import { styleSingleton } from "./index78.js";
3
+ import { noScrollbarsClassName, zeroRightClassName, fullWidthClassName, removedBarSizeVariable } from "./index69.js";
4
+ import { getGapWidth } from "./index84.js";
5
+ var Style = styleSingleton();
6
+ var lockAttribute = "data-scroll-locked";
7
+ var getStyles = function(_a, allowRelative, gapMode, important) {
8
+ var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
9
+ if (gapMode === void 0) {
10
+ gapMode = "margin";
11
+ }
12
+ return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
13
+ allowRelative && "position: relative ".concat(important, ";"),
14
+ gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
15
+ gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
16
+ ].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
17
+ };
18
+ var getCurrentUseCounter = function() {
19
+ var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
20
+ return isFinite(counter) ? counter : 0;
21
+ };
22
+ var useLockAttribute = function() {
23
+ React.useEffect(function() {
24
+ document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
25
+ return function() {
26
+ var newCounter = getCurrentUseCounter() - 1;
27
+ if (newCounter <= 0) {
28
+ document.body.removeAttribute(lockAttribute);
29
+ } else {
30
+ document.body.setAttribute(lockAttribute, newCounter.toString());
31
+ }
32
+ };
33
+ }, []);
34
+ };
35
+ var RemoveScrollBar = function(_a) {
36
+ var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
37
+ useLockAttribute();
38
+ var gap = React.useMemo(function() {
39
+ return getGapWidth(gapMode);
40
+ }, [gapMode]);
41
+ return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
42
+ };
43
+ export {
44
+ RemoveScrollBar,
45
+ lockAttribute,
46
+ useLockAttribute
47
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index85.cjs");exports.styleSingleton=function(){var t=e.styleHookSingleton();return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}};
@@ -0,0 +1,13 @@
1
+ import { styleHookSingleton } from "./index85.js";
2
+ var styleSingleton = function() {
3
+ var useStyle = styleHookSingleton();
4
+ var Sheet = function(_a) {
5
+ var styles = _a.styles, dynamic = _a.dynamic;
6
+ useStyle(styles, dynamic);
7
+ return null;
8
+ };
9
+ return Sheet;
10
+ };
11
+ export {
12
+ styleSingleton
13
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=!1;if("undefined"!=typeof window)try{var t=Object.defineProperty({},"passive",{get:function(){return e=!0,!0}});window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(r){e=!1}var n=!!e&&{passive:!1};exports.nonPassive=n;
@@ -0,0 +1,19 @@
1
+ var passiveSupported = false;
2
+ if (typeof window !== "undefined") {
3
+ try {
4
+ var options = Object.defineProperty({}, "passive", {
5
+ get: function() {
6
+ passiveSupported = true;
7
+ return true;
8
+ }
9
+ });
10
+ window.addEventListener("test", options, options);
11
+ window.removeEventListener("test", options, options);
12
+ } catch (err) {
13
+ passiveSupported = false;
14
+ }
15
+ }
16
+ var nonPassive = passiveSupported ? { passive: false } : false;
17
+ export {
18
+ nonPassive
19
+ };
package/dist/index8.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./index17.cjs");;/* empty css */const d=r.forwardRef(({label:d,error:i,helperText:t,className:s,id:l,required:c,disabled:o,checked:n,"data-cy":p,"data-testid":u,...b},h)=>{const x=r.useId(),y=l||x,_=`${y}-error`,m=`${y}-helper`,$=p||"radio",j=u||"radio",N=r.useRef(null),f=r.useCallback(e=>{N.current=e,h&&("function"==typeof h?h(e):"current"in h&&(h.current=e))},[h]),q=d&&c&&!d.includes("*")?`${d} *`:d;return e.jsxs("div",{className:a.cn("radio-wrapper",o&&"radio-wrapper--disabled"),"data-cy":`${$}-wrapper`,"data-testid":`${j}-wrapper`,children:[e.jsxs("div",{className:"radio__container",children:[e.jsx("input",{ref:f,id:y,type:"radio",checked:n,className:a.cn("radio__input",i&&"radio__input--error",s),"aria-describedby":i?_:t?m:void 0,"data-cy":$,"data-testid":j,disabled:o,required:c,...b}),d&&e.jsx("label",{htmlFor:y,className:"radio__label","data-cy":`${$}-label`,"data-testid":`${j}-label`,children:q})]}),i&&e.jsx("span",{id:_,className:"radio__error",role:"alert","data-cy":`${$}-error`,"data-testid":`${j}-error`,children:i}),t&&!i&&e.jsx("span",{id:m,className:"radio__helper","data-cy":`${$}-helper`,"data-testid":`${j}-helper`,children:t})]})});d.displayName="Radio",exports.Radio=d;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),a=require("./index19.cjs");;/* empty css */const d=r.forwardRef(({label:d,error:i,helperText:t,className:s,id:l,required:c,disabled:o,checked:n,"data-cy":p,"data-testid":u,...b},h)=>{const x=r.useId(),y=l||x,_=`${y}-error`,m=`${y}-helper`,$=p||"radio",j=u||"radio",N=r.useRef(null),f=r.useCallback(e=>{N.current=e,h&&("function"==typeof h?h(e):"current"in h&&(h.current=e))},[h]),q=d&&c&&!d.includes("*")?`${d} *`:d;return e.jsxs("div",{className:a.cn("radio-wrapper",o&&"radio-wrapper--disabled"),"data-cy":`${$}-wrapper`,"data-testid":`${j}-wrapper`,children:[e.jsxs("div",{className:"radio__container",children:[e.jsx("input",{ref:f,id:y,type:"radio",checked:n,className:a.cn("radio__input",i&&"radio__input--error",s),"aria-describedby":i?_:t?m:void 0,"data-cy":$,"data-testid":j,disabled:o,required:c,...b}),d&&e.jsx("label",{htmlFor:y,className:"radio__label","data-cy":`${$}-label`,"data-testid":`${j}-label`,children:q})]}),i&&e.jsx("span",{id:_,className:"radio__error",role:"alert","data-cy":`${$}-error`,"data-testid":`${j}-error`,children:i}),t&&!i&&e.jsx("span",{id:m,className:"radio__helper","data-cy":`${$}-helper`,"data-testid":`${j}-helper`,children:t})]})});d.displayName="Radio",exports.Radio=d;
package/dist/index8.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef, useId, useRef, useCallback } from "react";
3
- import { cn } from "./index17.js";
3
+ import { cn } from "./index19.js";
4
4
  /* empty css */
5
5
  const Radio = forwardRef(
6
6
  ({
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var t=function(t,e){if(!(t instanceof Element))return!1;var o=window.getComputedStyle(t);return"hidden"!==o[e]&&!(o.overflowY===o.overflowX&&!function(t){return"TEXTAREA"===t.tagName}(t)&&"visible"===o[e])},e=function(e,o){return"v"===e?function(e){return t(e,"overflowY")}(o):function(e){return t(e,"overflowX")}(o)},o=function(t,e){return"v"===t?[(o=e).scrollTop,o.scrollHeight,o.clientHeight]:function(t){return[t.scrollLeft,t.scrollWidth,t.clientWidth]}(e);var o};exports.handleScroll=function(t,n,r,i,l){var u=function(t,e){return"h"===t&&"rtl"===e?-1:1}(t,window.getComputedStyle(n).direction),a=u*i,c=r.target,d=n.contains(c),f=!1,s=a>0,v=0,h=0;do{if(!c)break;var w=o(t,c),p=w[0],b=w[1]-w[2]-u*p;(p||b)&&e(t,c)&&(v+=b,h+=p);var g=c.parentNode;c=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!d&&c!==document.body||d&&(n.contains(c)||n===c));return(s&&Math.abs(v)<1||!s&&Math.abs(h)<1)&&(f=!0),f},exports.locationCouldBeScrolled=function(t,n){var r=n.ownerDocument,i=n;do{if("undefined"!=typeof ShadowRoot&&i instanceof ShadowRoot&&(i=i.host),e(t,i)){var l=o(t,i);if(l[1]>l[2])return!0}i=i.parentNode}while(i&&i!==r.body);return!1};
@@ -0,0 +1,102 @@
1
+ var alwaysContainsScroll = function(node) {
2
+ return node.tagName === "TEXTAREA";
3
+ };
4
+ var elementCanBeScrolled = function(node, overflow) {
5
+ if (!(node instanceof Element)) {
6
+ return false;
7
+ }
8
+ var styles = window.getComputedStyle(node);
9
+ return (
10
+ // not-not-scrollable
11
+ styles[overflow] !== "hidden" && // contains scroll inside self
12
+ !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
13
+ );
14
+ };
15
+ var elementCouldBeVScrolled = function(node) {
16
+ return elementCanBeScrolled(node, "overflowY");
17
+ };
18
+ var elementCouldBeHScrolled = function(node) {
19
+ return elementCanBeScrolled(node, "overflowX");
20
+ };
21
+ var locationCouldBeScrolled = function(axis, node) {
22
+ var ownerDocument = node.ownerDocument;
23
+ var current = node;
24
+ do {
25
+ if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
26
+ current = current.host;
27
+ }
28
+ var isScrollable = elementCouldBeScrolled(axis, current);
29
+ if (isScrollable) {
30
+ var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
31
+ if (scrollHeight > clientHeight) {
32
+ return true;
33
+ }
34
+ }
35
+ current = current.parentNode;
36
+ } while (current && current !== ownerDocument.body);
37
+ return false;
38
+ };
39
+ var getVScrollVariables = function(_a) {
40
+ var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
41
+ return [
42
+ scrollTop,
43
+ scrollHeight,
44
+ clientHeight
45
+ ];
46
+ };
47
+ var getHScrollVariables = function(_a) {
48
+ var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
49
+ return [
50
+ scrollLeft,
51
+ scrollWidth,
52
+ clientWidth
53
+ ];
54
+ };
55
+ var elementCouldBeScrolled = function(axis, node) {
56
+ return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
57
+ };
58
+ var getScrollVariables = function(axis, node) {
59
+ return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
60
+ };
61
+ var getDirectionFactor = function(axis, direction) {
62
+ return axis === "h" && direction === "rtl" ? -1 : 1;
63
+ };
64
+ var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
65
+ var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
66
+ var delta = directionFactor * sourceDelta;
67
+ var target = event.target;
68
+ var targetInLock = endTarget.contains(target);
69
+ var shouldCancelScroll = false;
70
+ var isDeltaPositive = delta > 0;
71
+ var availableScroll = 0;
72
+ var availableScrollTop = 0;
73
+ do {
74
+ if (!target) {
75
+ break;
76
+ }
77
+ var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
78
+ var elementScroll = scroll_1 - capacity - directionFactor * position;
79
+ if (position || elementScroll) {
80
+ if (elementCouldBeScrolled(axis, target)) {
81
+ availableScroll += elementScroll;
82
+ availableScrollTop += position;
83
+ }
84
+ }
85
+ var parent_1 = target.parentNode;
86
+ target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
87
+ } while (
88
+ // portaled content
89
+ !targetInLock && target !== document.body || // self content
90
+ targetInLock && (endTarget.contains(target) || endTarget === target)
91
+ );
92
+ if (isDeltaPositive && (Math.abs(availableScroll) < 1 || false)) {
93
+ shouldCancelScroll = true;
94
+ } else if (!isDeltaPositive && (Math.abs(availableScrollTop) < 1 || false)) {
95
+ shouldCancelScroll = true;
96
+ }
97
+ return shouldCancelScroll;
98
+ };
99
+ export {
100
+ handleScroll,
101
+ locationCouldBeScrolled
102
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index66.cjs");function r(n){return n}exports.createSidecarMedium=function(e){void 0===e&&(e={});var t=function(n,e){void 0===e&&(e=r);var t=[],u=!1;return{read:function(){if(u)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:n},useMedium:function(n){var r=e(n,u);return t.push(r),function(){t=t.filter(function(n){return n!==r})}},assignSyncMedium:function(n){for(u=!0;t.length;){var r=t;t=[],r.forEach(n)}t={push:function(r){return n(r)},filter:function(){return t}}},assignMedium:function(n){u=!0;var r=[];if(t.length){var e=t;t=[],e.forEach(n),r=t}var i=function(){var e=r;r=[],e.forEach(n)},o=function(){return Promise.resolve().then(i)};o(),t={push:function(n){r.push(n),o()},filter:function(n){return r=r.filter(n),t}}}}}(null);return t.options=n.__assign({async:!0,ssr:!1},e),t};
@@ -0,0 +1,88 @@
1
+ import { __assign } from "./index66.js";
2
+ function ItoI(a) {
3
+ return a;
4
+ }
5
+ function innerCreateMedium(defaults, middleware) {
6
+ if (middleware === void 0) {
7
+ middleware = ItoI;
8
+ }
9
+ var buffer = [];
10
+ var assigned = false;
11
+ var medium = {
12
+ read: function() {
13
+ if (assigned) {
14
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
15
+ }
16
+ if (buffer.length) {
17
+ return buffer[buffer.length - 1];
18
+ }
19
+ return defaults;
20
+ },
21
+ useMedium: function(data) {
22
+ var item = middleware(data, assigned);
23
+ buffer.push(item);
24
+ return function() {
25
+ buffer = buffer.filter(function(x) {
26
+ return x !== item;
27
+ });
28
+ };
29
+ },
30
+ assignSyncMedium: function(cb) {
31
+ assigned = true;
32
+ while (buffer.length) {
33
+ var cbs = buffer;
34
+ buffer = [];
35
+ cbs.forEach(cb);
36
+ }
37
+ buffer = {
38
+ push: function(x) {
39
+ return cb(x);
40
+ },
41
+ filter: function() {
42
+ return buffer;
43
+ }
44
+ };
45
+ },
46
+ assignMedium: function(cb) {
47
+ assigned = true;
48
+ var pendingQueue = [];
49
+ if (buffer.length) {
50
+ var cbs = buffer;
51
+ buffer = [];
52
+ cbs.forEach(cb);
53
+ pendingQueue = buffer;
54
+ }
55
+ var executeQueue = function() {
56
+ var cbs2 = pendingQueue;
57
+ pendingQueue = [];
58
+ cbs2.forEach(cb);
59
+ };
60
+ var cycle = function() {
61
+ return Promise.resolve().then(executeQueue);
62
+ };
63
+ cycle();
64
+ buffer = {
65
+ push: function(x) {
66
+ pendingQueue.push(x);
67
+ cycle();
68
+ },
69
+ filter: function(filter) {
70
+ pendingQueue = pendingQueue.filter(filter);
71
+ return buffer;
72
+ }
73
+ };
74
+ }
75
+ };
76
+ return medium;
77
+ }
78
+ function createSidecarMedium(options) {
79
+ if (options === void 0) {
80
+ options = {};
81
+ }
82
+ var medium = innerCreateMedium(null);
83
+ medium.options = __assign({ async: true, ssr: false }, options);
84
+ return medium;
85
+ }
86
+ export {
87
+ createSidecarMedium
88
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.assignRef=function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e};
@@ -0,0 +1,11 @@
1
+ function assignRef(ref, value) {
2
+ if (typeof ref === "function") {
3
+ ref(value);
4
+ } else if (ref) {
5
+ ref.current = value;
6
+ }
7
+ return ref;
8
+ }
9
+ export {
10
+ assignRef
11
+ };