@anoki/fse-ui 1.0.545 → 1.0.546

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 (249) hide show
  1. package/dist/index.cjs103.js.map +1 -1
  2. package/dist/index.cjs213.js +1 -1
  3. package/dist/index.cjs217.js +1 -1
  4. package/dist/index.cjs224.js +1 -1
  5. package/dist/index.cjs235.js +1 -1
  6. package/dist/index.cjs242.js +1 -1
  7. package/dist/index.cjs247.js +1 -1
  8. package/dist/index.cjs254.js +1 -1
  9. package/dist/index.cjs262.js +1 -1
  10. package/dist/index.cjs301.js +1 -1
  11. package/dist/index.cjs334.js +1 -1
  12. package/dist/index.cjs334.js.map +1 -1
  13. package/dist/index.cjs335.js +2 -0
  14. package/dist/index.cjs335.js.map +1 -0
  15. package/dist/index.cjs336.js +2 -0
  16. package/dist/index.cjs336.js.map +1 -0
  17. package/dist/index.cjs337.js +1 -1
  18. package/dist/index.cjs337.js.map +1 -1
  19. package/dist/index.cjs338.js +1 -1
  20. package/dist/index.cjs338.js.map +1 -1
  21. package/dist/index.cjs339.js +1 -1
  22. package/dist/index.cjs339.js.map +1 -1
  23. package/dist/index.cjs340.js +1 -1
  24. package/dist/index.cjs340.js.map +1 -1
  25. package/dist/index.cjs341.js +1 -1
  26. package/dist/index.cjs341.js.map +1 -1
  27. package/dist/index.cjs344.js +1 -1
  28. package/dist/index.cjs344.js.map +1 -1
  29. package/dist/index.cjs345.js +1 -1
  30. package/dist/index.cjs345.js.map +1 -1
  31. package/dist/index.cjs346.js +1 -1
  32. package/dist/index.cjs346.js.map +1 -1
  33. package/dist/index.cjs347.js +1 -1
  34. package/dist/index.cjs347.js.map +1 -1
  35. package/dist/index.cjs348.js +1 -1
  36. package/dist/index.cjs348.js.map +1 -1
  37. package/dist/index.cjs349.js +1 -1
  38. package/dist/index.cjs349.js.map +1 -1
  39. package/dist/index.cjs350.js +1 -1
  40. package/dist/index.cjs350.js.map +1 -1
  41. package/dist/index.cjs351.js +1 -1
  42. package/dist/index.cjs351.js.map +1 -1
  43. package/dist/index.cjs352.js +1 -1
  44. package/dist/index.cjs352.js.map +1 -1
  45. package/dist/index.cjs353.js +1 -1
  46. package/dist/index.cjs353.js.map +1 -1
  47. package/dist/index.cjs354.js +1 -1
  48. package/dist/index.cjs354.js.map +1 -1
  49. package/dist/index.cjs355.js +1 -1
  50. package/dist/index.cjs355.js.map +1 -1
  51. package/dist/index.cjs356.js +1 -1
  52. package/dist/index.cjs356.js.map +1 -1
  53. package/dist/index.cjs357.js +1 -1
  54. package/dist/index.cjs357.js.map +1 -1
  55. package/dist/index.cjs358.js +1 -1
  56. package/dist/index.cjs358.js.map +1 -1
  57. package/dist/index.cjs359.js +1 -1
  58. package/dist/index.cjs359.js.map +1 -1
  59. package/dist/index.cjs360.js +2 -0
  60. package/dist/index.cjs360.js.map +1 -0
  61. package/dist/index.cjs361.js +2 -0
  62. package/dist/index.cjs361.js.map +1 -0
  63. package/dist/index.cjs362.js +2 -0
  64. package/dist/index.cjs362.js.map +1 -0
  65. package/dist/index.cjs363.js +1 -1
  66. package/dist/index.cjs363.js.map +1 -1
  67. package/dist/index.cjs364.js +1 -1
  68. package/dist/index.cjs364.js.map +1 -1
  69. package/dist/index.cjs365.js +1 -1
  70. package/dist/index.cjs365.js.map +1 -1
  71. package/dist/index.cjs366.js +1 -1
  72. package/dist/index.cjs366.js.map +1 -1
  73. package/dist/{index.cjs385.js → index.cjs367.js} +1 -1
  74. package/dist/{index.cjs385.js.map → index.cjs367.js.map} +1 -1
  75. package/dist/{index.cjs386.js → index.cjs368.js} +1 -1
  76. package/dist/{index.cjs386.js.map → index.cjs368.js.map} +1 -1
  77. package/dist/index.cjs369.js +2 -0
  78. package/dist/index.cjs369.js.map +1 -0
  79. package/dist/index.cjs370.js +1 -1
  80. package/dist/index.cjs370.js.map +1 -1
  81. package/dist/index.cjs371.js +1 -1
  82. package/dist/index.cjs371.js.map +1 -1
  83. package/dist/index.cjs372.js +4 -1
  84. package/dist/index.cjs372.js.map +1 -1
  85. package/dist/{index.cjs383.js → index.cjs373.js} +2 -2
  86. package/dist/{index.cjs383.js.map → index.cjs373.js.map} +1 -1
  87. package/dist/index.cjs374.js +2 -0
  88. package/dist/index.cjs374.js.map +1 -0
  89. package/dist/{index.cjs391.js → index.cjs375.js} +2 -2
  90. package/dist/{index.cjs391.js.map → index.cjs375.js.map} +1 -1
  91. package/dist/{index.cjs387.js → index.cjs376.js} +2 -2
  92. package/dist/{index.cjs387.js.map → index.cjs376.js.map} +1 -1
  93. package/dist/index.cjs377.js +2 -0
  94. package/dist/index.cjs377.js.map +1 -0
  95. package/dist/index.cjs378.js +2 -0
  96. package/dist/index.cjs378.js.map +1 -0
  97. package/dist/index.cjs379.js +1 -1
  98. package/dist/index.cjs379.js.map +1 -1
  99. package/dist/index.cjs388.js +1 -1
  100. package/dist/index.cjs388.js.map +1 -1
  101. package/dist/index.cjs389.js +1 -1
  102. package/dist/index.cjs389.js.map +1 -1
  103. package/dist/index.cjs410.js +1 -1
  104. package/dist/index.cjs85.js.map +1 -1
  105. package/dist/index.cjs86.js.map +1 -1
  106. package/dist/index.d.ts +18 -18
  107. package/dist/index.es103.js.map +1 -1
  108. package/dist/index.es213.js +7 -7
  109. package/dist/index.es217.js +1 -1
  110. package/dist/index.es224.js +8 -8
  111. package/dist/index.es235.js +14 -14
  112. package/dist/index.es242.js +1 -1
  113. package/dist/index.es247.js +1 -1
  114. package/dist/index.es254.js +1 -1
  115. package/dist/index.es262.js +7 -7
  116. package/dist/index.es301.js +4 -4
  117. package/dist/index.es334.js +7 -15
  118. package/dist/index.es334.js.map +1 -1
  119. package/dist/index.es335.js +30 -0
  120. package/dist/index.es335.js.map +1 -0
  121. package/dist/index.es336.js +71 -0
  122. package/dist/index.es336.js.map +1 -0
  123. package/dist/index.es337.js +29 -6
  124. package/dist/index.es337.js.map +1 -1
  125. package/dist/index.es338.js +32 -26
  126. package/dist/index.es338.js.map +1 -1
  127. package/dist/index.es339.js +617 -63
  128. package/dist/index.es339.js.map +1 -1
  129. package/dist/index.es340.js +10 -29
  130. package/dist/index.es340.js.map +1 -1
  131. package/dist/index.es341.js +15 -33
  132. package/dist/index.es341.js.map +1 -1
  133. package/dist/index.es344.js +10 -5
  134. package/dist/index.es344.js.map +1 -1
  135. package/dist/index.es345.js +52 -24
  136. package/dist/index.es345.js.map +1 -1
  137. package/dist/index.es346.js +43 -66
  138. package/dist/index.es346.js.map +1 -1
  139. package/dist/index.es347.js +7 -10
  140. package/dist/index.es347.js.map +1 -1
  141. package/dist/index.es348.js +120 -48
  142. package/dist/index.es348.js.map +1 -1
  143. package/dist/index.es349.js +14 -45
  144. package/dist/index.es349.js.map +1 -1
  145. package/dist/index.es350.js +134 -7
  146. package/dist/index.es350.js.map +1 -1
  147. package/dist/index.es351.js +206 -113
  148. package/dist/index.es351.js.map +1 -1
  149. package/dist/index.es352.js +13 -14
  150. package/dist/index.es352.js.map +1 -1
  151. package/dist/index.es353.js +60 -126
  152. package/dist/index.es353.js.map +1 -1
  153. package/dist/index.es354.js +163 -203
  154. package/dist/index.es354.js.map +1 -1
  155. package/dist/index.es355.js +50 -14
  156. package/dist/index.es355.js.map +1 -1
  157. package/dist/index.es356.js +9 -178
  158. package/dist/index.es356.js.map +1 -1
  159. package/dist/index.es357.js +3 -49
  160. package/dist/index.es357.js.map +1 -1
  161. package/dist/index.es358.js +11 -8
  162. package/dist/index.es358.js.map +1 -1
  163. package/dist/index.es359.js +205 -4
  164. package/dist/index.es359.js.map +1 -1
  165. package/dist/index.es360.js +25 -0
  166. package/dist/index.es360.js.map +1 -0
  167. package/dist/index.es361.js +28 -0
  168. package/dist/index.es361.js.map +1 -0
  169. package/dist/index.es362.js +396 -0
  170. package/dist/index.es362.js.map +1 -0
  171. package/dist/index.es363.js +24 -11
  172. package/dist/index.es363.js.map +1 -1
  173. package/dist/index.es364.js +28 -204
  174. package/dist/index.es364.js.map +1 -1
  175. package/dist/index.es365.js +5 -22
  176. package/dist/index.es365.js.map +1 -1
  177. package/dist/index.es366.js +494 -364
  178. package/dist/index.es366.js.map +1 -1
  179. package/dist/{index.es385.js → index.es367.js} +1 -1
  180. package/dist/{index.es385.js.map → index.es367.js.map} +1 -1
  181. package/dist/{index.es386.js → index.es368.js} +1 -1
  182. package/dist/{index.es386.js.map → index.es368.js.map} +1 -1
  183. package/dist/index.es369.js +8 -0
  184. package/dist/index.es369.js.map +1 -0
  185. package/dist/index.es370.js +3 -25
  186. package/dist/index.es370.js.map +1 -1
  187. package/dist/index.es371.js +24 -29
  188. package/dist/index.es371.js.map +1 -1
  189. package/dist/index.es372.js +110 -5
  190. package/dist/index.es372.js.map +1 -1
  191. package/dist/{index.es383.js → index.es373.js} +2 -2
  192. package/dist/{index.es383.js.map → index.es373.js.map} +1 -1
  193. package/dist/index.es374.js +9 -0
  194. package/dist/index.es374.js.map +1 -0
  195. package/dist/{index.es391.js → index.es375.js} +2 -2
  196. package/dist/{index.es391.js.map → index.es375.js.map} +1 -1
  197. package/dist/{index.es387.js → index.es376.js} +3 -3
  198. package/dist/{index.es387.js.map → index.es376.js.map} +1 -1
  199. package/dist/index.es377.js +12 -0
  200. package/dist/index.es377.js.map +1 -0
  201. package/dist/index.es378.js +17 -0
  202. package/dist/index.es378.js.map +1 -0
  203. package/dist/index.es379.js +62 -5
  204. package/dist/index.es379.js.map +1 -1
  205. package/dist/index.es388.js +4 -9
  206. package/dist/index.es388.js.map +1 -1
  207. package/dist/index.es389.js +22 -13
  208. package/dist/index.es389.js.map +1 -1
  209. package/dist/index.es410.js +8 -8
  210. package/dist/index.es85.js.map +1 -1
  211. package/dist/index.es86.js.map +1 -1
  212. package/package.json +1 -1
  213. package/dist/index.cjs342.js +0 -2
  214. package/dist/index.cjs342.js.map +0 -1
  215. package/dist/index.cjs343.js +0 -2
  216. package/dist/index.cjs343.js.map +0 -1
  217. package/dist/index.cjs380.js +0 -2
  218. package/dist/index.cjs380.js.map +0 -1
  219. package/dist/index.cjs381.js +0 -2
  220. package/dist/index.cjs381.js.map +0 -1
  221. package/dist/index.cjs382.js +0 -5
  222. package/dist/index.cjs382.js.map +0 -1
  223. package/dist/index.cjs384.js +0 -2
  224. package/dist/index.cjs384.js.map +0 -1
  225. package/dist/index.cjs390.js +0 -2
  226. package/dist/index.cjs390.js.map +0 -1
  227. package/dist/index.cjs395.js +0 -2
  228. package/dist/index.cjs395.js.map +0 -1
  229. package/dist/index.cjs396.js +0 -2
  230. package/dist/index.cjs396.js.map +0 -1
  231. package/dist/index.es342.js +0 -625
  232. package/dist/index.es342.js.map +0 -1
  233. package/dist/index.es343.js +0 -14
  234. package/dist/index.es343.js.map +0 -1
  235. package/dist/index.es380.js +0 -6
  236. package/dist/index.es380.js.map +0 -1
  237. package/dist/index.es381.js +0 -27
  238. package/dist/index.es381.js.map +0 -1
  239. package/dist/index.es382.js +0 -113
  240. package/dist/index.es382.js.map +0 -1
  241. package/dist/index.es384.js +0 -526
  242. package/dist/index.es384.js.map +0 -1
  243. package/dist/index.es390.js +0 -65
  244. package/dist/index.es390.js.map +0 -1
  245. package/dist/index.es395.js +0 -7
  246. package/dist/index.es395.js.map +0 -1
  247. package/dist/index.es396.js +0 -26
  248. package/dist/index.es396.js.map +0 -1
  249. /package/dist/components/ui/{ConsentModal/ConsentModalFooter/ConsentModalFooter.css → DoctorModal/DoctorModalFooter/DoctorModalFooter.css} +0 -0
@@ -1,8 +1,113 @@
1
- import { RemoveScrollSideCar as r } from "./index.es382.js";
2
- import { effectCar as o } from "./index.es380.js";
3
- import { exportSidecar as e } from "./index.es383.js";
4
- const f = e(o, r);
1
+ import { __spreadArray as x } from "./index.es363.js";
2
+ import * as n from "react";
3
+ import { RemoveScrollBar as A } from "./index.es376.js";
4
+ import { styleSingleton as I } from "./index.es377.js";
5
+ import { nonPassive as s } from "./index.es378.js";
6
+ import { locationCouldBeScrolled as T, handleScroll as W } from "./index.es379.js";
7
+ var b = function(t) {
8
+ return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
9
+ }, Y = function(t) {
10
+ return [t.deltaX, t.deltaY];
11
+ }, B = function(t) {
12
+ return t && "current" in t ? t.current : t;
13
+ }, p = function(t, c) {
14
+ return t[0] === c[0] && t[1] === c[1];
15
+ }, F = function(t) {
16
+ return `
17
+ .block-interactivity-`.concat(t, ` {pointer-events: none;}
18
+ .allow-interactivity-`).concat(t, ` {pointer-events: all;}
19
+ `);
20
+ }, K = 0, f = [];
21
+ function z(t) {
22
+ var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(), h = n.useState(K++)[0], m = n.useState(I)[0], g = n.useRef(t);
23
+ n.useEffect(function() {
24
+ g.current = t;
25
+ }, [t]), n.useEffect(function() {
26
+ if (t.inert) {
27
+ document.body.classList.add("block-interactivity-".concat(h));
28
+ var e = x([t.lockRef.current], (t.shards || []).map(B), !0).filter(Boolean);
29
+ return e.forEach(function(r) {
30
+ return r.classList.add("allow-interactivity-".concat(h));
31
+ }), function() {
32
+ document.body.classList.remove("block-interactivity-".concat(h)), e.forEach(function(r) {
33
+ return r.classList.remove("allow-interactivity-".concat(h));
34
+ });
35
+ };
36
+ }
37
+ }, [t.inert, t.lockRef.current, t.shards]);
38
+ var k = n.useCallback(function(e, r) {
39
+ if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey)
40
+ return !g.current.allowPinchZoom;
41
+ var l = b(e), o = E.current, u = "deltaX" in e ? e.deltaX : o[0] - l[0], i = "deltaY" in e ? e.deltaY : o[1] - l[1], a, C = e.target, v = Math.abs(u) > Math.abs(i) ? "h" : "v";
42
+ if ("touches" in e && v === "h" && C.type === "range")
43
+ return !1;
44
+ var y = T(v, C);
45
+ if (!y)
46
+ return !0;
47
+ if (y ? a = v : (a = v === "v" ? "h" : "v", y = T(v, C)), !y)
48
+ return !1;
49
+ if (!d.current && "changedTouches" in e && (u || i) && (d.current = a), !a)
50
+ return !0;
51
+ var P = d.current || a;
52
+ return W(P, r, e, P === "h" ? u : i);
53
+ }, []), S = n.useCallback(function(e) {
54
+ var r = e;
55
+ if (!(!f.length || f[f.length - 1] !== m)) {
56
+ var l = "deltaY" in r ? Y(r) : b(r), o = c.current.filter(function(a) {
57
+ return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) && p(a.delta, l);
58
+ })[0];
59
+ if (o && o.should) {
60
+ r.cancelable && r.preventDefault();
61
+ return;
62
+ }
63
+ if (!o) {
64
+ var u = (g.current.shards || []).map(B).filter(Boolean).filter(function(a) {
65
+ return a.contains(r.target);
66
+ }), i = u.length > 0 ? k(r, u[0]) : !g.current.noIsolation;
67
+ i && r.cancelable && r.preventDefault();
68
+ }
69
+ }
70
+ }, []), R = n.useCallback(function(e, r, l, o) {
71
+ var u = { name: e, delta: r, target: l, should: o, shadowParent: O(l) };
72
+ c.current.push(u), setTimeout(function() {
73
+ c.current = c.current.filter(function(i) {
74
+ return i !== u;
75
+ });
76
+ }, 1);
77
+ }, []), w = n.useCallback(function(e) {
78
+ E.current = b(e), d.current = void 0;
79
+ }, []), L = n.useCallback(function(e) {
80
+ R(e.type, Y(e), e.target, k(e, t.lockRef.current));
81
+ }, []), M = n.useCallback(function(e) {
82
+ R(e.type, b(e), e.target, k(e, t.lockRef.current));
83
+ }, []);
84
+ n.useEffect(function() {
85
+ return f.push(m), t.setCallbacks({
86
+ onScrollCapture: L,
87
+ onWheelCapture: L,
88
+ onTouchMoveCapture: M
89
+ }), document.addEventListener("wheel", S, s), document.addEventListener("touchmove", S, s), document.addEventListener("touchstart", w, s), function() {
90
+ f = f.filter(function(e) {
91
+ return e !== m;
92
+ }), document.removeEventListener("wheel", S, s), document.removeEventListener("touchmove", S, s), document.removeEventListener("touchstart", w, s);
93
+ };
94
+ }, []);
95
+ var X = t.removeScrollBar, D = t.inert;
96
+ return n.createElement(
97
+ n.Fragment,
98
+ null,
99
+ D ? n.createElement(m, { styles: F(h) }) : null,
100
+ X ? n.createElement(A, { gapMode: t.gapMode }) : null
101
+ );
102
+ }
103
+ function O(t) {
104
+ for (var c = null; t !== null; )
105
+ t instanceof ShadowRoot && (c = t.host, t = t.host), t = t.parentNode;
106
+ return c;
107
+ }
5
108
  export {
6
- f as default
109
+ z as RemoveScrollSideCar,
110
+ Y as getDeltaXY,
111
+ b as getTouchXY
7
112
  };
8
113
  //# sourceMappingURL=index.es372.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es372.js","sources":["../node_modules/react-remove-scroll/dist/es2015/sidecar.js"],"sourcesContent":["import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n"],"names":["SideCar","exportSidecar","effectCar","RemoveScrollSideCar"],"mappings":";;;AAGA,MAAAA,IAAeC,EAAcC,GAAWC,CAAmB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es372.js","sources":["../node_modules/react-remove-scroll/dist/es2015/SideEffect.js"],"sourcesContent":["import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null));\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n"],"names":["getTouchXY","event","getDeltaXY","extractRef","ref","deltaCompare","x","y","generateStyle","id","idCounter","lockStack","RemoveScrollSideCar","props","shouldPreventQueue","React","touchStartRef","activeAxis","Style","styleSingleton","lastProps","allow_1","__spreadArray","el","shouldCancelEvent","parent","touch","touchStart","deltaX","deltaY","currentAxis","target","moveDirection","canBeScrolledInMainDirection","locationCouldBeScrolled","cancelingAxis","handleScroll","shouldPrevent","_event","delta","sourceEvent","e","shardNodes","node","shouldStop","shouldCancel","name","should","getOutermostShadowParent","scrollTouchStart","scrollWheel","scrollTouchMove","nonPassive","inst","removeScrollBar","inert","RemoveScrollBar","shadowParent"],"mappings":";;;;;;AAMU,IAACA,IAAa,SAAUC,GAAO;AACrC,SAAO,oBAAoBA,IAAQ,CAACA,EAAM,eAAe,CAAC,EAAE,SAASA,EAAM,eAAe,CAAC,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC;AACjH,GACWC,IAAa,SAAUD,GAAO;AAAE,SAAO,CAACA,EAAM,QAAQA,EAAM,MAAM;AAAE,GAC3EE,IAAa,SAAUC,GAAK;AAC5B,SAAOA,KAAO,aAAaA,IAAMA,EAAI,UAAUA;AACnD,GACIC,IAAe,SAAUC,GAAGC,GAAG;AAAE,SAAOD,EAAE,CAAC,MAAMC,EA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;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { __rest as o, __assign as d } from "./index.es370.js";
1
+ import { __rest as o, __assign as d } from "./index.es363.js";
2
2
  import * as n from "react";
3
3
  var i = function(r) {
4
4
  var e = r.sideCar, a = o(r, ["sideCar"]);
@@ -16,4 +16,4 @@ function p(r, e) {
16
16
  export {
17
17
  p as exportSidecar
18
18
  };
19
- //# sourceMappingURL=index.es383.js.map
19
+ //# sourceMappingURL=index.es373.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es383.js","sources":["../node_modules/use-sidecar/dist/es2015/exports.js"],"sourcesContent":["import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n"],"names":["SideCar","_a","sideCar","rest","__rest","Target","React","__assign","exportSidecar","medium","exported"],"mappings":";;AAEA,IAAIA,IAAU,SAAUC,GAAI;AACxB,MAAIC,IAAUD,EAAG,SAASE,IAAOC,EAAOH,GAAI,CAAC,SAAS,CAAC;AACvD,MAAI,CAACC;AACD,UAAM,IAAI,MAAM,oEAAoE;AAExF,MAAIG,IAASH,EAAQ,KAAM;AAC3B,MAAI,CAACG;AACD,UAAM,IAAI,MAAM,0BAA0B;AAE9C,SAAOC,EAAM,cAAcD,GAAQE,EAAS,CAAA,GAAIJ,CAAI,CAAC;AACzD;AACAH,EAAQ,kBAAkB;AACnB,SAASQ,EAAcC,GAAQC,GAAU;AAC5C,SAAAD,EAAO,UAAUC,CAAQ,GAClBV;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es373.js","sources":["../node_modules/use-sidecar/dist/es2015/exports.js"],"sourcesContent":["import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n"],"names":["SideCar","_a","sideCar","rest","__rest","Target","React","__assign","exportSidecar","medium","exported"],"mappings":";;AAEA,IAAIA,IAAU,SAAUC,GAAI;AACxB,MAAIC,IAAUD,EAAG,SAASE,IAAOC,EAAOH,GAAI,CAAC,SAAS,CAAC;AACvD,MAAI,CAACC;AACD,UAAM,IAAI,MAAM,oEAAoE;AAExF,MAAIG,IAASH,EAAQ,KAAM;AAC3B,MAAI,CAACG;AACD,UAAM,IAAI,MAAM,0BAA0B;AAE9C,SAAOC,EAAM,cAAcD,GAAQE,EAAS,CAAA,GAAIJ,CAAI,CAAC;AACzD;AACAH,EAAQ,kBAAkB;AACnB,SAASQ,EAAcC,GAAQC,GAAU;AAC5C,SAAAD,EAAO,UAAUC,CAAQ,GAClBV;AACX;","x_google_ignoreList":[0]}
@@ -0,0 +1,9 @@
1
+ import * as u from "react";
2
+ function t(r) {
3
+ const e = u.useRef({ value: r, previous: r });
4
+ return u.useMemo(() => (e.current.value !== r && (e.current.previous = e.current.value, e.current.value = r), e.current.previous), [r]);
5
+ }
6
+ export {
7
+ t as usePrevious
8
+ };
9
+ //# sourceMappingURL=index.es374.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es374.js","sources":["../node_modules/@radix-ui/react-use-previous/dist/index.mjs"],"sourcesContent":["// packages/react/use-previous/src/use-previous.tsx\nimport * as React from \"react\";\nfunction usePrevious(value) {\n const ref = React.useRef({ value, previous: value });\n return React.useMemo(() => {\n if (ref.current.value !== value) {\n ref.current.previous = ref.current.value;\n ref.current.value = value;\n }\n return ref.current.previous;\n }, [value]);\n}\nexport {\n usePrevious\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["usePrevious","value","ref","React"],"mappings":";AAEA,SAASA,EAAYC,GAAO;AAC1B,QAAMC,IAAMC,EAAM,OAAO,EAAE,OAAAF,GAAO,UAAUA,GAAO;AACnD,SAAOE,EAAM,QAAQ,OACfD,EAAI,QAAQ,UAAUD,MACxBC,EAAI,QAAQ,WAAWA,EAAI,QAAQ,OACnCA,EAAI,QAAQ,QAAQD,IAEfC,EAAI,QAAQ,WAClB,CAACD,CAAK,CAAC;AACZ;","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import { __assign as d } from "./index.es370.js";
1
+ import { __assign as d } from "./index.es363.js";
2
2
  function l(r) {
3
3
  return r;
4
4
  }
@@ -65,4 +65,4 @@ function v(r) {
65
65
  export {
66
66
  v as createSidecarMedium
67
67
  };
68
- //# sourceMappingURL=index.es391.js.map
68
+ //# sourceMappingURL=index.es375.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es391.js","sources":["../node_modules/use-sidecar/dist/es2015/medium.js"],"sourcesContent":["import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n"],"names":["ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","medium","data","item","x","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","options","__assign"],"mappings":";AACA,SAASA,EAAKC,GAAG;AACb,SAAOA;AACX;AACA,SAASC,EAAkBC,GAAUC,GAAY;AAC7C,EAAIA,MAAe,WAAUA,IAAaJ;AAC1C,MAAIK,IAAS,CAAE,GACXC,IAAW,IACXC,IAAS;AAAA,IACT,MAAM,WAAY;AACd,UAAID;AACA,cAAM,IAAI,MAAM,kGAAkG;AAEtH,aAAID,EAAO,SACAA,EAAOA,EAAO,SAAS,CAAC,IAE5BF;AAAA,IACV;AAAA,IACD,WAAW,SAAUK,GAAM;AACvB,UAAIC,IAAOL,EAAWI,GAAMF,CAAQ;AACpC,aAAAD,EAAO,KAAKI,CAAI,GACT,WAAY;AACf,QAAAJ,IAASA,EAAO,OAAO,SAAUK,GAAG;AAAE,iBAAOA,MAAMD;AAAA,SAAO;AAAA,MAC7D;AAAA,IACJ;AAAA,IACD,kBAAkB,SAAUE,GAAI;AAE5B,WADAL,IAAW,IACJD,EAAO,UAAQ;AAClB,YAAIO,IAAMP;AACV,QAAAA,IAAS,CAAE,GACXO,EAAI,QAAQD,CAAE;AAAA,MAC9B;AACY,MAAAN,IAAS;AAAA,QACL,MAAM,SAAUK,GAAG;AAAE,iBAAOC,EAAGD,CAAC;AAAA,QAAI;AAAA,QACpC,QAAQ,WAAY;AAAE,iBAAOL;AAAA,QAAS;AAAA,MACzC;AAAA,IACJ;AAAA,IACD,cAAc,SAAUM,GAAI;AACxB,MAAAL,IAAW;AACX,UAAIO,IAAe,CAAE;AACrB,UAAIR,EAAO,QAAQ;AACf,YAAIO,IAAMP;AACV,QAAAA,IAAS,CAAE,GACXO,EAAI,QAAQD,CAAE,GACdE,IAAeR;AAAA,MAC/B;AACY,UAAIS,IAAe,WAAY;AAC3B,YAAIF,IAAMC;AACV,QAAAA,IAAe,CAAE,GACjBD,EAAI,QAAQD,CAAE;AAAA,MACjB,GACGI,IAAQ,WAAY;AAAE,eAAO,QAAQ,QAAO,EAAG,KAAKD,CAAY;AAAA,MAAI;AACxE,MAAAC,EAAO,GACPV,IAAS;AAAA,QACL,MAAM,SAAUK,GAAG;AACf,UAAAG,EAAa,KAAKH,CAAC,GACnBK,EAAO;AAAA,QACV;AAAA,QACD,QAAQ,SAAUC,GAAQ;AACtB,iBAAAH,IAAeA,EAAa,OAAOG,CAAM,GAClCX;AAAA,QACV;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACD,SAAOE;AACX;AAMO,SAASU,EAAoBC,GAAS;AACzC,EAAIA,MAAY,WAAUA,IAAU,CAAA;AACpC,MAAIX,IAASL,EAAkB,IAAI;AACnC,SAAAK,EAAO,UAAUY,EAAS,EAAE,OAAO,IAAM,KAAK,GAAO,GAAED,CAAO,GACvDX;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es375.js","sources":["../node_modules/use-sidecar/dist/es2015/medium.js"],"sourcesContent":["import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n"],"names":["ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","medium","data","item","x","cb","cbs","pendingQueue","executeQueue","cycle","filter","createSidecarMedium","options","__assign"],"mappings":";AACA,SAASA,EAAKC,GAAG;AACb,SAAOA;AACX;AACA,SAASC,EAAkBC,GAAUC,GAAY;AAC7C,EAAIA,MAAe,WAAUA,IAAaJ;AAC1C,MAAIK,IAAS,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tB,iBAAAH,IAAeA,EAAa,OAAOG,CAAM,GAClCX;AAAA,QACV;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACD,SAAOE;AACX;AAMO,SAASU,EAAoBC,GAAS;AACzC,EAAIA,MAAY,WAAUA,IAAU,CAAA;AACpC,MAAIX,IAASL,EAAkB,IAAI;AACnC,SAAAK,EAAO,UAAUY,EAAS,EAAE,OAAO,IAAM,KAAK,GAAO,GAAED,CAAO,GACvDX;AACX;","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
1
  import * as d from "react";
2
- import { styleSingleton as f } from "./index.es388.js";
3
- import { noScrollbarsClassName as p, zeroRightClassName as g, fullWidthClassName as l, removedBarSizeVariable as v } from "./index.es379.js";
2
+ import { styleSingleton as f } from "./index.es377.js";
3
+ import { noScrollbarsClassName as p, zeroRightClassName as g, fullWidthClassName as l, removedBarSizeVariable as v } from "./index.es369.js";
4
4
  import { getGapWidth as m } from "./index.es397.js";
5
5
  var b = f(), e = "data-scroll-locked", h = function(n, a, o, t) {
6
6
  var r = n.left, i = n.top, s = n.right, c = n.gap;
@@ -69,4 +69,4 @@ export {
69
69
  e as lockAttribute,
70
70
  x as useLockAttribute
71
71
  };
72
- //# sourceMappingURL=index.es387.js.map
72
+ //# sourceMappingURL=index.es376.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es387.js","sources":["../node_modules/react-remove-scroll-bar/dist/es2015/component.js"],"sourcesContent":["import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n 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([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\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 \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .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\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n"],"names":["Style","styleSingleton","lockAttribute","getStyles","_a","allowRelative","gapMode","important","left","top","right","gap","noScrollbarsClassName","zeroRightClassName","fullWidthClassName","removedBarSizeVariable","getCurrentUseCounter","counter","useLockAttribute","React","newCounter","RemoveScrollBar","noRelative","noImportant","_b","getGapWidth"],"mappings":";;;;AAIA,IAAIA,IAAQC,EAAgB,GACjBC,IAAgB,sBAIvBC,IAAY,SAAUC,GAAIC,GAAeC,GAASC,GAAW;AAC7D,MAAIC,IAAOJ,EAAG,MAAMK,IAAML,EAAG,KAAKM,IAAQN,EAAG,OAAOO,IAAMP,EAAG;AAC7D,SAAIE,MAAY,WAAUA,IAAU,WAC7B;AAAA,KAAQ,OAAOM,GAAuB;AAAA,qBAA0B,EAAE,OAAOL,GAAW;AAAA,mBAAuB,EAAE,OAAOI,GAAK,KAAK,EAAE,OAAOJ,GAAW;AAAA;AAAA,QAAiB,EAAE,OAAOL,GAAe;AAAA,sBAA4B,EAAE,OAAOK,GAAW;AAAA;AAAA,KAA4C,EAAE,OAAO;AAAA,IACnSF,KAAiB,sBAAsB,OAAOE,GAAW,GAAG;AAAA,IAC5DD,MAAY,YACR;AAAA,oBAAuB,OAAOE,GAAM;AAAA,kBAAwB,EAAE,OAAOC,GAAK;AAAA,oBAA0B,EAAE,OAAOC,GAAO;AAAA;AAAA;AAAA,mBAAgE,EAAE,OAAOC,GAAK,KAAK,EAAE,OAAOJ,GAAW;AAAA,KAAS;AAAA,IACxOD,MAAY,aAAa,kBAAkB,OAAOK,GAAK,KAAK,EAAE,OAAOJ,GAAW,GAAG;AAAA,EAC3F,EACS,OAAO,OAAO,EACd,KAAK,EAA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,CAACA,CAAO,CAAC;AAC/E,SAAOa,EAAM,cAAcnB,GAAO,EAAE,QAAQG,EAAUQ,GAAK,CAACW,GAAYhB,GAAUiB,IAA6B,KAAf,YAAiB,EAAC,CAAE;AACxH;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es376.js","sources":["../node_modules/react-remove-scroll-bar/dist/es2015/component.js"],"sourcesContent":["import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n 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([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\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 \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .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\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n"],"names":["Style","styleSingleton","lockAttribute","getStyles","_a","allowRelative","gapMode","important","left","top","right","gap","noScrollbarsClassName","zeroRightClassName","fullWidthClassName","removedBarSizeVariable","getCurrentUseCounter","counter","useLockAttribute","React","newCounter","RemoveScrollBar","noRelative","noImportant","_b","getGapWidth"],"mappings":";;;;AAIA,IAAIA,IAAQC,EAAgB,GACjBC,IAAgB,sBAIvBC,IAAY,SAAUC,GAAIC,GAAeC,GAASC,GAAW;AAC7D,MAAIC,IAAOJ,EAAG,MAAMK,IAAML,EAAG,KAAKM,IAAQN,EAAG,OAAOO,IAAMP,EAAG;AAC7D,SAAIE,MAAY,WAAUA,IAAU,WAC7B;AAAA,KAAQ,OAAOM,GAAu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AO,SAASe,CAAO,IAAIA,IAAU;AACzC,GACWC,IAAmB,WAAY;AACtC,EAAAC,EAAM,UAAU,WAAY;AACxB,oBAAS,KAAK,aAAajB,IAAgBc,MAAyB,GAAG,UAAU,GAC1E,WAAY;AACf,UAAII,IAAaJ,EAAoB,IAAK;AAC1C,MAAII,KAAc,IACd,SAAS,KAAK,gBAAgBlB,CAAa,IAG3C,SAAS,KAAK,aAAaA,GAAekB,EAAW,SAAQ,CAAE;AAAA,IAEtE;AAAA,EACJ,GAAE,EAAE;AACT,GAIWC,IAAkB,SAAUjB,GAAI;AACvC,MAAIkB,IAAalB,EAAG,YAAYmB,IAAcnB,EAAG,aAAaoB,IAAKpB,EAAG,SAASE,IAAUkB,MAAO,SAAS,WAAWA;AACpH,EAAAN,EAAkB;AAMlB,MAAIP,IAAMQ,EAAM,QAAQ,WAAY;AAAE,WAAOM,EAAYnB,CAAO;AAAA,EAAE,GAAI,CAACA,CAAO,CAAC;AAC/E,SAAOa,EAAM,cAAcnB,GAAO,EAAE,QAAQG,EAAUQ,GAAK,CAACW,GAAYhB,GAAUiB,IAA6B,KAAf,YAAiB,EAAC,CAAE;AACxH;","x_google_ignoreList":[0]}
@@ -0,0 +1,12 @@
1
+ import { styleHookSingleton as o } from "./index.es398.js";
2
+ var s = function() {
3
+ var e = o(), n = function(t) {
4
+ var r = t.styles, l = t.dynamic;
5
+ return e(r, l), null;
6
+ };
7
+ return n;
8
+ };
9
+ export {
10
+ s as styleSingleton
11
+ };
12
+ //# sourceMappingURL=index.es377.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es377.js","sources":["../node_modules/react-style-singleton/dist/es2015/component.js"],"sourcesContent":["import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n"],"names":["styleSingleton","useStyle","styleHookSingleton","Sheet","_a","styles","dynamic"],"mappings":";AAOU,IAACA,IAAiB,WAAY;AACpC,MAAIC,IAAWC,EAAoB,GAC/BC,IAAQ,SAAUC,GAAI;AACtB,QAAIC,IAASD,EAAG,QAAQE,IAAUF,EAAG;AACrC,WAAAH,EAASI,GAAQC,CAAO,GACjB;AAAA,EACV;AACD,SAAOH;AACX;","x_google_ignoreList":[0]}
@@ -0,0 +1,17 @@
1
+ var r = !1;
2
+ if (typeof window < "u")
3
+ try {
4
+ var e = Object.defineProperty({}, "passive", {
5
+ get: function() {
6
+ return r = !0, !0;
7
+ }
8
+ });
9
+ window.addEventListener("test", e, e), window.removeEventListener("test", e, e);
10
+ } catch {
11
+ r = !1;
12
+ }
13
+ var a = r ? { passive: !1 } : !1;
14
+ export {
15
+ a as nonPassive
16
+ };
17
+ //# sourceMappingURL=index.es378.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es378.js","sources":["../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js"],"sourcesContent":["var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n"],"names":["passiveSupported","options","nonPassive"],"mappings":"AAAA,IAAIA,IAAmB;AACvB,IAAI,OAAO,SAAW;AAClB,MAAI;AACA,QAAIC,IAAU,OAAO,eAAe,CAAA,GAAI,WAAW;AAAA,MAC/C,KAAK,WAAY;AACb,eAAAD,IAAmB,IACZ;AAAA,MACV;AAAA,IACb,CAAS;AAED,WAAO,iBAAiB,QAAQC,GAASA,CAAO,GAEhD,OAAO,oBAAoB,QAAQA,GAASA,CAAO;AAAA,EAC3D,QACgB;AACR,IAAAD,IAAmB;AAAA,EAC3B;AAEU,IAACE,IAAaF,IAAmB,EAAE,SAAS,GAAK,IAAK;","x_google_ignoreList":[0]}
@@ -1,8 +1,65 @@
1
- var r = "right-scroll-bar-position", a = "width-before-scroll-bar", l = "with-scroll-bars-hidden", e = "--removed-body-scroll-bar-size";
1
+ var p = function(e) {
2
+ return e.tagName === "TEXTAREA";
3
+ }, w = function(e, r) {
4
+ if (!(e instanceof Element))
5
+ return !1;
6
+ var o = window.getComputedStyle(e);
7
+ return (
8
+ // not-not-scrollable
9
+ o[r] !== "hidden" && // contains scroll inside self
10
+ !(o.overflowY === o.overflowX && !p(e) && o[r] === "visible")
11
+ );
12
+ }, y = function(e) {
13
+ return w(e, "overflowY");
14
+ }, H = function(e) {
15
+ return w(e, "overflowX");
16
+ }, R = function(e, r) {
17
+ var o = r.ownerDocument, t = r;
18
+ do {
19
+ typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
20
+ var v = g(e, t);
21
+ if (v) {
22
+ var n = b(e, t), a = n[1], l = n[2];
23
+ if (a > l)
24
+ return !0;
25
+ }
26
+ t = t.parentNode;
27
+ } while (t && t !== o.body);
28
+ return !1;
29
+ }, B = function(e) {
30
+ var r = e.scrollTop, o = e.scrollHeight, t = e.clientHeight;
31
+ return [
32
+ r,
33
+ o,
34
+ t
35
+ ];
36
+ }, V = function(e) {
37
+ var r = e.scrollLeft, o = e.scrollWidth, t = e.clientWidth;
38
+ return [
39
+ r,
40
+ o,
41
+ t
42
+ ];
43
+ }, g = function(e, r) {
44
+ return e === "v" ? y(r) : H(r);
45
+ }, b = function(e, r) {
46
+ return e === "v" ? B(r) : V(r);
47
+ }, D = function(e, r) {
48
+ return e === "h" && r === "rtl" ? -1 : 1;
49
+ }, W = function(e, r, o, t, v) {
50
+ var n = D(e, window.getComputedStyle(r).direction), a = n * t, l = o.target, f = r.contains(l), i = !1, s = a > 0, d = 0, h = 0;
51
+ do {
52
+ var c = b(e, l), u = c[0], m = c[1], C = c[2], S = m - C - n * u;
53
+ (u || S) && g(e, l) && (d += S, h += u), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
54
+ } while (
55
+ // portaled content
56
+ !f && l !== document.body || // self content
57
+ f && (r.contains(l) || r === l)
58
+ );
59
+ return (s && Math.abs(d) < 1 || !s && Math.abs(h) < 1) && (i = !0), i;
60
+ };
2
61
  export {
3
- a as fullWidthClassName,
4
- l as noScrollbarsClassName,
5
- e as removedBarSizeVariable,
6
- r as zeroRightClassName
62
+ W as handleScroll,
63
+ R as locationCouldBeScrolled
7
64
  };
8
65
  //# sourceMappingURL=index.es379.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es379.js","sources":["../node_modules/react-remove-scroll-bar/dist/es2015/constants.js"],"sourcesContent":["export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n"],"names":["zeroRightClassName","fullWidthClassName","noScrollbarsClassName","removedBarSizeVariable"],"mappings":"AAAU,IAACA,IAAqB,6BACrBC,IAAqB,2BACrBC,IAAwB,2BAKxBC,IAAyB;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es379.js","sources":["../node_modules/react-remove-scroll/dist/es2015/handleScroll.js"],"sourcesContent":["var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n if (target instanceof ShadowRoot) {\n target = target.host;\n }\n else {\n target = target.parentNode;\n }\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n"],"names":["alwaysContainsScroll","node","elementCanBeScrolled","overflow","styles","elementCouldBeVScrolled","elementCouldBeHScrolled","locationCouldBeScrolled","axis","ownerDocument","current","isScrollable","elementCouldBeScrolled","_a","getScrollVariables","scrollHeight","clientHeight","getVScrollVariables","scrollTop","getHScrollVariables","scrollLeft","scrollWidth","clientWidth","getDirectionFactor","direction","handleScroll","endTarget","event","sourceDelta","noOverscroll","directionFactor","delta","target","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","position","scroll_1","capacity","elementScroll"],"mappings":"AAAA,IAAIA,IAAuB,SAAUC,GAAM;AAEvC,SAAOA,EAAK,YAAY;AAC5B,GACIC,IAAuB,SAAUD,GAAME,GAAU;AACjD,MAAI,EAAEF,aAAgB;AAClB,WAAO;AAEX,MAAIG,IAAS,OAAO,iBAAiBH,CAAI;AACzC;AAAA;AAAA,IAEAG,EAAOD,CAAQ,MAAM;AAAA,IAEjB,EAAEC,EAAO,cAAcA,EAAO,aAAa,CAACJ,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QAAQ,KAAK;AACtD,GACWC,IAAe,SAAUjB,GAAMkB,GAAWC,GAAOC,GAAaC,GAAc;AACnF,MAAIC,IAAkBP,EAAmBf,GAAM,OAAO,iBAAiBkB,CAAS,EAAE,SAAS,GACvFK,IAAQD,IAAkBF,GAE1BI,IAASL,EAAM,QACfM,IAAeP,EAAU,SAASM,CAAM,GACxCE,IAAqB,IACrBC,IAAkBJ,IAAQ,GAC1BK,IAAkB,GAClBC,IAAqB;AACzB,KAAG;AACC,QAAIxB,IAAKC,EAAmBN,GAAMwB,CAAM,GAAGM,IAAWzB,EAAG,CAAC,GAAG0B,IAAW1B,EAAG,CAAC,GAAG2B,IAAW3B,EAAG,CAAC,GAC1F4B,IAAgBF,IAAWC,IAAWV,IAAkBQ;AAC5D,KAAIA,KAAYG,MACR7B,EAAuBJ,GAAMwB,CAAM,MACnCI,KAAmBK,GACnBJ,KAAsBC,IAG1BN,aAAkB,aAClBA,IAASA,EAAO,OAGhBA,IAASA,EAAO;AAAA,EAEvB;AAAA;AAAA,IAEA,CAACC,KAAgBD,MAAW,SAAS;AAAA,IAEjCC,MAAiBP,EAAU,SAASM,CAAM,KAAKN,MAAcM;AAAA;AAElE,UAAIG,KACkB,KAAK,IAAIC,CAAe,IAAI,KAGzC,CAACD,KACY,KAAK,IAAIE,CAAkB,IAAI,OACjDH,IAAqB,KAElBA;AACX;","x_google_ignoreList":[0]}
@@ -1,12 +1,7 @@
1
- import { styleHookSingleton as o } from "./index.es398.js";
2
- var s = function() {
3
- var e = o(), n = function(t) {
4
- var r = t.styles, l = t.dynamic;
5
- return e(r, l), null;
6
- };
7
- return n;
8
- };
1
+ function i(n, t) {
2
+ return typeof n == "function" ? n(t) : n && (n.current = t), n;
3
+ }
9
4
  export {
10
- s as styleSingleton
5
+ i as assignRef
11
6
  };
12
7
  //# sourceMappingURL=index.es388.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es388.js","sources":["../node_modules/react-style-singleton/dist/es2015/component.js"],"sourcesContent":["import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n"],"names":["styleSingleton","useStyle","styleHookSingleton","Sheet","_a","styles","dynamic"],"mappings":";AAOU,IAACA,IAAiB,WAAY;AACpC,MAAIC,IAAWC,EAAoB,GAC/BC,IAAQ,SAAUC,GAAI;AACtB,QAAIC,IAASD,EAAG,QAAQE,IAAUF,EAAG;AACrC,WAAAH,EAASI,GAAQC,CAAO,GACjB;AAAA,EACV;AACD,SAAOH;AACX;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es388.js","sources":["../node_modules/use-callback-ref/dist/es2015/assignRef.js"],"sourcesContent":["/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n"],"names":["assignRef","ref","value"],"mappings":"AAaO,SAASA,EAAUC,GAAKC,GAAO;AAClC,SAAI,OAAOD,KAAQ,aACfA,EAAIC,CAAK,IAEJD,MACLA,EAAI,UAAUC,IAEXD;AACX;","x_google_ignoreList":[0]}
@@ -1,17 +1,26 @@
1
- var r = !1;
2
- if (typeof window < "u")
3
- try {
4
- var e = Object.defineProperty({}, "passive", {
5
- get: function() {
6
- return r = !0, !0;
1
+ import { useState as u } from "react";
2
+ function n(c, r) {
3
+ var e = u(function() {
4
+ return {
5
+ // value
6
+ value: c,
7
+ // last callback
8
+ callback: r,
9
+ // "memoized" public interface
10
+ facade: {
11
+ get current() {
12
+ return e.value;
13
+ },
14
+ set current(a) {
15
+ var t = e.value;
16
+ t !== a && (e.value = a, e.callback(a, t));
17
+ }
7
18
  }
8
- });
9
- window.addEventListener("test", e, e), window.removeEventListener("test", e, e);
10
- } catch {
11
- r = !1;
12
- }
13
- var a = r ? { passive: !1 } : !1;
19
+ };
20
+ })[0];
21
+ return e.callback = r, e.facade;
22
+ }
14
23
  export {
15
- a as nonPassive
24
+ n as useCallbackRef
16
25
  };
17
26
  //# sourceMappingURL=index.es389.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es389.js","sources":["../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js"],"sourcesContent":["var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n"],"names":["passiveSupported","options","nonPassive"],"mappings":"AAAA,IAAIA,IAAmB;AACvB,IAAI,OAAO,SAAW;AAClB,MAAI;AACA,QAAIC,IAAU,OAAO,eAAe,CAAA,GAAI,WAAW;AAAA,MAC/C,KAAK,WAAY;AACb,eAAAD,IAAmB,IACZ;AAAA,MACV;AAAA,IACb,CAAS;AAED,WAAO,iBAAiB,QAAQC,GAASA,CAAO,GAEhD,OAAO,oBAAoB,QAAQA,GAASA,CAAO;AAAA,EAC3D,QACgB;AACR,IAAAD,IAAmB;AAAA,EAC3B;AAEU,IAACE,IAAaF,IAAmB,EAAE,SAAS,GAAK,IAAK;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es389.js","sources":["../node_modules/use-callback-ref/dist/es2015/useRef.js"],"sourcesContent":["import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n"],"names":["useCallbackRef","initialValue","callback","ref","useState","value","last"],"mappings":";AAeO,SAASA,EAAeC,GAAcC,GAAU;AACnD,MAAIC,IAAMC,EAAS,WAAY;AAAE,WAAQ;AAAA;AAAA,MAErC,OAAOH;AAAA;AAAA,MAEP,UAAUC;AAAA;AAAA,MAEV,QAAQ;AAAA,QACJ,IAAI,UAAU;AACV,iBAAOC,EAAI;AAAA,QACd;AAAA,QACD,IAAI,QAAQE,GAAO;AACf,cAAIC,IAAOH,EAAI;AACf,UAAIG,MAASD,MACTF,EAAI,QAAQE,GACZF,EAAI,SAASE,GAAOC,CAAI;AAAA,QAE/B;AAAA,MACJ;AAAA,IACT;AAAA,EAAO,CAAE,EAAE,CAAC;AAER,SAAAH,EAAI,WAAWD,GACRC,EAAI;AACf;","x_google_ignoreList":[0]}
@@ -1,13 +1,13 @@
1
1
  import * as c from "react";
2
- import { Primitive as L } from "./index.es341.js";
3
- import { Presence as O } from "./index.es346.js";
4
- import { createContextScope as le } from "./index.es339.js";
5
- import { useComposedRefs as T } from "./index.es338.js";
6
- import { useCallbackRef as x } from "./index.es347.js";
7
- import { useDirection as ce } from "./index.es350.js";
8
- import { useLayoutEffect as se } from "./index.es359.js";
2
+ import { Primitive as L } from "./index.es338.js";
3
+ import { Presence as O } from "./index.es353.js";
4
+ import { createContextScope as le } from "./index.es336.js";
5
+ import { useComposedRefs as T } from "./index.es335.js";
6
+ import { useCallbackRef as x } from "./index.es344.js";
7
+ import { useDirection as ce } from "./index.es347.js";
8
+ import { useLayoutEffect as se } from "./index.es357.js";
9
9
  import { clamp as ie } from "./index.es419.js";
10
- import { composeEventHandlers as C } from "./index.es337.js";
10
+ import { composeEventHandlers as C } from "./index.es334.js";
11
11
  import { j as b } from "./index.es185.js";
12
12
  function ae(e, t) {
13
13
  return c.useReducer((r, l) => t[r][l] ?? r, e);
@@ -1 +1 @@
1
- {"version":3,"file":"index.es85.js","sources":["../src/components/ui/Blockquote/index.tsx"],"sourcesContent":["import React from \"react\";\nimport \"./Blockquote.scss\";\n\ntype Variant = \"left-line\" | \"blue-box\" | \"light-bg\";\n\ntype BlockquoteProps = {\n text: string;\n author: string;\n variant?: Variant;\n};\n\nexport const Blockquote: React.FC<BlockquoteProps> = ({\n text,\n author,\n variant = \"left-line\",\n}) => {\n return (\n <blockquote className={`styled-blockquote ${variant}`}>\n <p>{text}</p>\n <footer>{author}</footer>\n </blockquote>\n );\n};\n"],"names":["Blockquote","text","author","variant","jsxs","jsx"],"mappings":";;AAWO,MAAMA,IAAwC,CAAC;AAAA,EACpD,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAEKC,gBAAAA,EAAA,KAAA,cAAA,EAAW,WAAW,qBAAqBD,CAAO,IACjD,UAAA;AAAA,EAAAE,gBAAAA,EAAAA,IAAC,OAAG,UAAKJ,EAAA,CAAA;AAAA,EACTI,gBAAAA,EAAAA,IAAC,YAAQ,UAAOH,EAAA,CAAA;AAAA,GAClB;"}
1
+ {"version":3,"file":"index.es85.js","sources":["../src/components/ui/Blockquote/index.tsx"],"sourcesContent":["import React from \"react\";\nimport \"./Blockquote.scss\";\n\nexport type BlockquoteVariant = \"left-line\" | \"blue-box\" | \"light-bg\";\n\nexport type BlockquoteProps = {\n text: string;\n author: string;\n variant?: BlockquoteVariant;\n};\n\nexport const Blockquote: React.FC<BlockquoteProps> = ({\n text,\n author,\n variant = \"left-line\",\n}) => {\n return (\n <blockquote className={`styled-blockquote ${variant}`}>\n <p>{text}</p>\n <footer>{author}</footer>\n </blockquote>\n );\n};\n"],"names":["Blockquote","text","author","variant","jsxs","jsx"],"mappings":";;AAWO,MAAMA,IAAwC,CAAC;AAAA,EACpD,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAEKC,gBAAAA,EAAA,KAAA,cAAA,EAAW,WAAW,qBAAqBD,CAAO,IACjD,UAAA;AAAA,EAAAE,gBAAAA,EAAAA,IAAC,OAAG,UAAKJ,EAAA,CAAA;AAAA,EACTI,gBAAAA,EAAAA,IAAC,YAAQ,UAAOH,EAAA,CAAA;AAAA,GAClB;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.es86.js","sources":["../src/components/ui/Callout/index.tsx"],"sourcesContent":["import \"./Callout.scss\";\nimport { ErrorExagon, Info } from \"@/icons\";\n\ntype Variant = \"info\" | \"warning\" | \"danger\" | \"success\";\n\ninterface CalloutProps {\n title: string;\n description: React.ReactNode;\n variant?: Variant;\n}\n\nconst iconMap = {\n info: <Info color=\"primary\" />,\n warning: <Info color=\"warning\" />,\n danger: <ErrorExagon />,\n success: <Info color=\"status-success\" />,\n};\n\nexport const Callout: React.FC<CalloutProps> = ({\n title,\n description,\n variant = \"info\",\n}) => {\n return (\n <div className={`callout callout-${variant} p-x40`}>\n <div className=\"callout-header px-x40\">\n {iconMap[variant]}\n <span>{title}</span>\n </div>\n <div className=\"callout-body\">{description}</div>\n </div>\n );\n};\n"],"names":["iconMap","jsx","Info","ErrorExagon","Callout","title","description","variant","jsxs"],"mappings":";;;;AAWA,MAAMA,IAAU;AAAA,EACd,MAAMC,gBAAAA,EAAAA,IAACC,GAAK,EAAA,OAAM,UAAU,CAAA;AAAA,EAC5B,SAASD,gBAAAA,EAAAA,IAACC,GAAK,EAAA,OAAM,UAAU,CAAA;AAAA,EAC/B,8BAASC,GAAY,EAAA;AAAA,EACrB,SAASF,gBAAAA,EAAAA,IAACC,GAAK,EAAA,OAAM,iBAAiB,CAAA;AACxC,GAEaE,IAAkC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAEKC,gBAAAA,EAAA,KAAA,OAAA,EAAI,WAAW,mBAAmBD,CAAO,UACxC,UAAA;AAAA,EAACC,gBAAAA,EAAAA,KAAA,OAAA,EAAI,WAAU,yBACZ,UAAA;AAAA,IAAAR,EAAQO,CAAO;AAAA,IAChBN,gBAAAA,EAAAA,IAAC,UAAM,UAAMI,EAAA,CAAA;AAAA,EAAA,GACf;AAAA,EACCJ,gBAAAA,EAAA,IAAA,OAAA,EAAI,WAAU,gBAAgB,UAAYK,EAAA,CAAA;AAAA,GAC7C;"}
1
+ {"version":3,"file":"index.es86.js","sources":["../src/components/ui/Callout/index.tsx"],"sourcesContent":["import \"./Callout.scss\";\nimport { ErrorExagon, Info } from \"@/icons\";\n\nexport type CalloutVariant = \"info\" | \"warning\" | \"danger\" | \"success\";\n\ninterface CalloutProps {\n title: string;\n description: React.ReactNode;\n variant?: CalloutVariant;\n}\n\nconst iconMap = {\n info: <Info color=\"primary\" />,\n warning: <Info color=\"warning\" />,\n danger: <ErrorExagon />,\n success: <Info color=\"status-success\" />,\n};\n\nexport const Callout: React.FC<CalloutProps> = ({\n title,\n description,\n variant = \"info\",\n}) => {\n return (\n <div className={`callout callout-${variant} p-x40`}>\n <div className=\"callout-header px-x40\">\n {iconMap[variant]}\n <span>{title}</span>\n </div>\n <div className=\"callout-body\">{description}</div>\n </div>\n );\n};\n"],"names":["iconMap","jsx","Info","ErrorExagon","Callout","title","description","variant","jsxs"],"mappings":";;;;AAWA,MAAMA,IAAU;AAAA,EACd,MAAMC,gBAAAA,EAAAA,IAACC,GAAK,EAAA,OAAM,UAAU,CAAA;AAAA,EAC5B,SAASD,gBAAAA,EAAAA,IAACC,GAAK,EAAA,OAAM,UAAU,CAAA;AAAA,EAC/B,8BAASC,GAAY,EAAA;AAAA,EACrB,SAASF,gBAAAA,EAAAA,IAACC,GAAK,EAAA,OAAM,iBAAiB,CAAA;AACxC,GAEaE,IAAkC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC,IAAU;AACZ,MAEKC,gBAAAA,EAAA,KAAA,OAAA,EAAI,WAAW,mBAAmBD,CAAO,UACxC,UAAA;AAAA,EAACC,gBAAAA,EAAAA,KAAA,OAAA,EAAI,WAAU,yBACZ,UAAA;AAAA,IAAAR,EAAQO,CAAO;AAAA,IAChBN,gBAAAA,EAAAA,IAAC,UAAM,UAAMI,EAAA,CAAA;AAAA,EAAA,GACf;AAAA,EACCJ,gBAAAA,EAAA,IAAA,OAAA,EAAI,WAAU,gBAAgB,UAAYK,EAAA,CAAA;AAAA,GAC7C;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anoki/fse-ui",
3
- "version": "1.0.545",
3
+ "version": "1.0.546",
4
4
  "description": "FSE UI components library",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Be=require("react"),v=require("./index.cjs337.js"),Ve=require("./index.cjs349.js"),y=require("./index.cjs338.js"),Ye=require("./index.cjs339.js"),Xe=require("./index.cjs350.js"),We=require("./index.cjs351.js"),ze=require("./index.cjs352.js"),Ze=require("./index.cjs353.js"),T=require("./index.cjs354.js"),Je=require("./index.cjs355.js"),X=require("./index.cjs346.js"),A=require("./index.cjs341.js"),W=require("./index.cjs356.js"),Qe=require("./index.cjs348.js"),be=require("./index.cjs347.js"),et=require("./index.cjs357.js"),tt=require("./index.cjs358.js"),a=require("./index.cjs185.js");function nt(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const r=nt(Be);var oe=["Enter"," "],ot=["ArrowDown","PageUp","Home"],we=["ArrowUp","PageDown","End"],rt=[...ot,...we],st={ltr:[...oe,"ArrowRight"],rtl:[...oe,"ArrowLeft"]},ct={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F="Menu",[N,ut,at]=Ve.createCollection(F),[j,it]=Ye.createContextScope(F,[at,T.createPopperScope,W.createRovingFocusGroupScope]),z=T.createPopperScope(),ye=W.createRovingFocusGroupScope(),[lt,S]=j(F),[dt,G]=j(F),re=e=>{const{__scopeMenu:n,open:t=!1,children:o,dir:u,onOpenChange:s,modal:l=!0}=e,m=z(n),[p,x]=r.useState(null),f=r.useRef(!1),c=be.useCallbackRef(s),d=Xe.useDirection(u);return r.useEffect(()=>{const R=()=>{f.current=!0,document.addEventListener("pointerdown",M,{capture:!0,once:!0}),document.addEventListener("pointermove",M,{capture:!0,once:!0})},M=()=>f.current=!1;return document.addEventListener("keydown",R,{capture:!0}),()=>{document.removeEventListener("keydown",R,{capture:!0}),document.removeEventListener("pointerdown",M,{capture:!0}),document.removeEventListener("pointermove",M,{capture:!0})}},[]),a.jsxRuntimeExports.jsx(T.Root,{...m,children:a.jsxRuntimeExports.jsx(lt,{scope:n,open:t,onOpenChange:c,content:p,onContentChange:x,children:a.jsxRuntimeExports.jsx(dt,{scope:n,onClose:r.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:f,dir:d,modal:l,children:o})})})};re.displayName=F;var ft="MenuAnchor",Z=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,u=z(t);return a.jsxRuntimeExports.jsx(T.Anchor,{...u,...o,ref:n})});Z.displayName=ft;var se="MenuPortal",[mt,Te]=j(se,{forceMount:void 0}),ce=e=>{const{__scopeMenu:n,forceMount:t,children:o,container:u}=e,s=S(se,n);return a.jsxRuntimeExports.jsx(mt,{scope:n,forceMount:t,children:a.jsxRuntimeExports.jsx(X.Presence,{present:t||s.open,children:a.jsxRuntimeExports.jsx(Je.Portal,{asChild:!0,container:u,children:o})})})};ce.displayName=se;var C="MenuContent",[pt,ue]=j(C),ae=r.forwardRef((e,n)=>{const t=Te(C,e.__scopeMenu),{forceMount:o=t.forceMount,...u}=e,s=S(C,e.__scopeMenu),l=G(C,e.__scopeMenu);return a.jsxRuntimeExports.jsx(N.Provider,{scope:e.__scopeMenu,children:a.jsxRuntimeExports.jsx(X.Presence,{present:o||s.open,children:a.jsxRuntimeExports.jsx(N.Slot,{scope:e.__scopeMenu,children:l.modal?a.jsxRuntimeExports.jsx(xt,{...u,ref:n}):a.jsxRuntimeExports.jsx(vt,{...u,ref:n})})})})}),xt=r.forwardRef((e,n)=>{const t=S(C,e.__scopeMenu),o=r.useRef(null),u=y.useComposedRefs(n,o);return r.useEffect(()=>{const s=o.current;if(s)return et.hideOthers(s)},[]),a.jsxRuntimeExports.jsx(ie,{...e,ref:u,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:v.composeEventHandlers(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),vt=r.forwardRef((e,n)=>{const t=S(C,e.__scopeMenu);return a.jsxRuntimeExports.jsx(ie,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),Mt=Qe.createSlot("MenuContent.ScrollLock"),ie=r.forwardRef((e,n)=>{const{__scopeMenu:t,loop:o=!1,trapFocus:u,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:m,onEntryFocus:p,onEscapeKeyDown:x,onPointerDownOutside:f,onFocusOutside:c,onInteractOutside:d,onDismiss:R,disableOutsideScroll:M,...P}=e,I=S(C,t),O=G(C,t),H=z(t),q=ye(t),he=ut(t),[Ge,ge]=r.useState(null),U=r.useRef(null),Ke=y.useComposedRefs(n,U,I.onContentChange),$=r.useRef(0),B=r.useRef(""),He=r.useRef(0),Q=r.useRef(null),_e=r.useRef("right"),ee=r.useRef(0),qe=M?tt:r.Fragment,Ue=M?{as:Mt,allowPinchZoom:!0}:void 0,$e=i=>{var w,je;const E=B.current+i,h=he().filter(g=>!g.disabled),_=document.activeElement,te=(w=h.find(g=>g.ref.current===_))==null?void 0:w.textValue,ne=h.map(g=>g.textValue),Pe=wt(ne,E,te),k=(je=h.find(g=>g.textValue===Pe))==null?void 0:je.ref.current;(function g(Se){B.current=Se,window.clearTimeout($.current),Se!==""&&($.current=window.setTimeout(()=>g(""),1e3))})(E),k&&setTimeout(()=>k.focus())};r.useEffect(()=>()=>window.clearTimeout($.current),[]),ze.useFocusGuards();const b=r.useCallback(i=>{var h,_;return _e.current===((h=Q.current)==null?void 0:h.side)&&Tt(i,(_=Q.current)==null?void 0:_.area)},[]);return a.jsxRuntimeExports.jsx(pt,{scope:t,searchRef:B,onItemEnter:r.useCallback(i=>{b(i)&&i.preventDefault()},[b]),onItemLeave:r.useCallback(i=>{var E;b(i)||((E=U.current)==null||E.focus(),ge(null))},[b]),onTriggerLeave:r.useCallback(i=>{b(i)&&i.preventDefault()},[b]),pointerGraceTimerRef:He,onPointerGraceIntentChange:r.useCallback(i=>{Q.current=i},[]),children:a.jsxRuntimeExports.jsx(qe,{...Ue,children:a.jsxRuntimeExports.jsx(Ze.FocusScope,{asChild:!0,trapped:u,onMountAutoFocus:v.composeEventHandlers(s,i=>{var E;i.preventDefault(),(E=U.current)==null||E.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:a.jsxRuntimeExports.jsx(We.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:x,onPointerDownOutside:f,onFocusOutside:c,onInteractOutside:d,onDismiss:R,children:a.jsxRuntimeExports.jsx(W.Root,{asChild:!0,...q,dir:O.dir,orientation:"vertical",loop:o,currentTabStopId:Ge,onCurrentTabStopIdChange:ge,onEntryFocus:v.composeEventHandlers(p,i=>{O.isUsingKeyboardRef.current||i.preventDefault()}),preventScrollOnEntryFocus:!0,children:a.jsxRuntimeExports.jsx(T.Content,{role:"menu","aria-orientation":"vertical","data-state":Fe(I.open),"data-radix-menu-content":"",dir:O.dir,...H,...P,ref:Ke,style:{outline:"none",...P.style},onKeyDown:v.composeEventHandlers(P.onKeyDown,i=>{const h=i.target.closest("[data-radix-menu-content]")===i.currentTarget,_=i.ctrlKey||i.altKey||i.metaKey,te=i.key.length===1;h&&(i.key==="Tab"&&i.preventDefault(),!_&&te&&$e(i.key));const ne=U.current;if(i.target!==ne||!rt.includes(i.key))return;i.preventDefault();const k=he().filter(w=>!w.disabled).map(w=>w.ref.current);we.includes(i.key)&&k.reverse(),It(k)}),onBlur:v.composeEventHandlers(e.onBlur,i=>{i.currentTarget.contains(i.target)||(window.clearTimeout($.current),B.current="")}),onPointerMove:v.composeEventHandlers(e.onPointerMove,L(i=>{const E=i.target,h=ee.current!==i.clientX;if(i.currentTarget.contains(E)&&h){const _=i.clientX>ee.current?"right":"left";_e.current=_,ee.current=i.clientX}}))})})})})})})});ae.displayName=C;var Rt="MenuGroup",J=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return a.jsxRuntimeExports.jsx(A.Primitive.div,{role:"group",...o,ref:n})});J.displayName=Rt;var Et="MenuLabel",le=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return a.jsxRuntimeExports.jsx(A.Primitive.div,{...o,ref:n})});le.displayName=Et;var V="MenuItem",Ie="menu.itemSelect",K=r.forwardRef((e,n)=>{const{disabled:t=!1,onSelect:o,...u}=e,s=r.useRef(null),l=G(V,e.__scopeMenu),m=ue(V,e.__scopeMenu),p=y.useComposedRefs(n,s),x=r.useRef(!1),f=()=>{const c=s.current;if(!t&&c){const d=new CustomEvent(Ie,{bubbles:!0,cancelable:!0});c.addEventListener(Ie,R=>o==null?void 0:o(R),{once:!0}),A.dispatchDiscreteCustomEvent(c,d),d.defaultPrevented?x.current=!1:l.onClose()}};return a.jsxRuntimeExports.jsx(Ae,{...u,ref:p,disabled:t,onClick:v.composeEventHandlers(e.onClick,f),onPointerDown:c=>{var d;(d=e.onPointerDown)==null||d.call(e,c),x.current=!0},onPointerUp:v.composeEventHandlers(e.onPointerUp,c=>{var d;x.current||(d=c.currentTarget)==null||d.click()}),onKeyDown:v.composeEventHandlers(e.onKeyDown,c=>{const d=m.searchRef.current!=="";t||d&&c.key===" "||oe.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});K.displayName=V;var Ae=r.forwardRef((e,n)=>{const{__scopeMenu:t,disabled:o=!1,textValue:u,...s}=e,l=ue(V,t),m=ye(t),p=r.useRef(null),x=y.useComposedRefs(n,p),[f,c]=r.useState(!1),[d,R]=r.useState("");return r.useEffect(()=>{const M=p.current;M&&R((M.textContent??"").trim())},[s.children]),a.jsxRuntimeExports.jsx(N.ItemSlot,{scope:t,disabled:o,textValue:u??d,children:a.jsxRuntimeExports.jsx(W.Item,{asChild:!0,...m,focusable:!o,children:a.jsxRuntimeExports.jsx(A.Primitive.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:x,onPointerMove:v.composeEventHandlers(e.onPointerMove,L(M=>{o?l.onItemLeave(M):(l.onItemEnter(M),M.defaultPrevented||M.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:v.composeEventHandlers(e.onPointerLeave,L(M=>l.onItemLeave(M))),onFocus:v.composeEventHandlers(e.onFocus,()=>c(!0)),onBlur:v.composeEventHandlers(e.onBlur,()=>c(!1))})})})}),Ct="MenuCheckboxItem",de=r.forwardRef((e,n)=>{const{checked:t=!1,onCheckedChange:o,...u}=e;return a.jsxRuntimeExports.jsx(De,{scope:e.__scopeMenu,checked:t,children:a.jsxRuntimeExports.jsx(K,{role:"menuitemcheckbox","aria-checked":Y(t)?"mixed":t,...u,ref:n,"data-state":Ce(t),onSelect:v.composeEventHandlers(u.onSelect,()=>o==null?void 0:o(Y(t)?!0:!t),{checkForDefaultPrevented:!1})})})});de.displayName=Ct;var Oe="MenuRadioGroup",[ht,gt]=j(Oe,{value:void 0,onValueChange:()=>{}}),fe=r.forwardRef((e,n)=>{const{value:t,onValueChange:o,...u}=e,s=be.useCallbackRef(o);return a.jsxRuntimeExports.jsx(ht,{scope:e.__scopeMenu,value:t,onValueChange:s,children:a.jsxRuntimeExports.jsx(J,{...u,ref:n})})});fe.displayName=Oe;var ke="MenuRadioItem",me=r.forwardRef((e,n)=>{const{value:t,...o}=e,u=gt(ke,e.__scopeMenu),s=t===u.value;return a.jsxRuntimeExports.jsx(De,{scope:e.__scopeMenu,checked:s,children:a.jsxRuntimeExports.jsx(K,{role:"menuitemradio","aria-checked":s,...o,ref:n,"data-state":Ce(s),onSelect:v.composeEventHandlers(o.onSelect,()=>{var l;return(l=u.onValueChange)==null?void 0:l.call(u,t)},{checkForDefaultPrevented:!1})})})});me.displayName=ke;var pe="MenuItemIndicator",[De,_t]=j(pe,{checked:!1}),xe=r.forwardRef((e,n)=>{const{__scopeMenu:t,forceMount:o,...u}=e,s=_t(pe,t);return a.jsxRuntimeExports.jsx(X.Presence,{present:o||Y(s.checked)||s.checked===!0,children:a.jsxRuntimeExports.jsx(A.Primitive.span,{...u,ref:n,"data-state":Ce(s.checked)})})});xe.displayName=pe;var Pt="MenuSeparator",ve=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e;return a.jsxRuntimeExports.jsx(A.Primitive.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});ve.displayName=Pt;var jt="MenuArrow",Me=r.forwardRef((e,n)=>{const{__scopeMenu:t,...o}=e,u=z(t);return a.jsxRuntimeExports.jsx(T.Arrow,{...u,...o,ref:n})});Me.displayName=jt;var St="MenuSub",[Yt,Ne]=j(St),D="MenuSubTrigger",Re=r.forwardRef((e,n)=>{const t=S(D,e.__scopeMenu),o=G(D,e.__scopeMenu),u=Ne(D,e.__scopeMenu),s=ue(D,e.__scopeMenu),l=r.useRef(null),{pointerGraceTimerRef:m,onPointerGraceIntentChange:p}=s,x={__scopeMenu:e.__scopeMenu},f=r.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return r.useEffect(()=>f,[f]),r.useEffect(()=>{const c=m.current;return()=>{window.clearTimeout(c),p(null)}},[m,p]),a.jsxRuntimeExports.jsx(Z,{asChild:!0,...x,children:a.jsxRuntimeExports.jsx(Ae,{id:u.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":u.contentId,"data-state":Fe(t.open),...e,ref:y.composeRefs(n,u.onTriggerChange),onClick:c=>{var d;(d=e.onClick)==null||d.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:v.composeEventHandlers(e.onPointerMove,L(c=>{s.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!t.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{t.onOpenChange(!0),f()},100))})),onPointerLeave:v.composeEventHandlers(e.onPointerLeave,L(c=>{var R,M;f();const d=(R=t.content)==null?void 0:R.getBoundingClientRect();if(d){const P=(M=t.content)==null?void 0:M.dataset.side,I=P==="right",O=I?-5:5,H=d[I?"left":"right"],q=d[I?"right":"left"];s.onPointerGraceIntentChange({area:[{x:c.clientX+O,y:c.clientY},{x:H,y:d.top},{x:q,y:d.top},{x:q,y:d.bottom},{x:H,y:d.bottom}],side:P}),window.clearTimeout(m.current),m.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(c),c.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:v.composeEventHandlers(e.onKeyDown,c=>{var R;const d=s.searchRef.current!=="";e.disabled||d&&c.key===" "||st[o.dir].includes(c.key)&&(t.onOpenChange(!0),(R=t.content)==null||R.focus(),c.preventDefault())})})})});Re.displayName=D;var Le="MenuSubContent",Ee=r.forwardRef((e,n)=>{const t=Te(C,e.__scopeMenu),{forceMount:o=t.forceMount,...u}=e,s=S(C,e.__scopeMenu),l=G(C,e.__scopeMenu),m=Ne(Le,e.__scopeMenu),p=r.useRef(null),x=y.useComposedRefs(n,p);return a.jsxRuntimeExports.jsx(N.Provider,{scope:e.__scopeMenu,children:a.jsxRuntimeExports.jsx(X.Presence,{present:o||s.open,children:a.jsxRuntimeExports.jsx(N.Slot,{scope:e.__scopeMenu,children:a.jsxRuntimeExports.jsx(ie,{id:m.contentId,"aria-labelledby":m.triggerId,...u,ref:x,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var c;l.isUsingKeyboardRef.current&&((c=p.current)==null||c.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:v.composeEventHandlers(e.onFocusOutside,f=>{f.target!==m.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:v.composeEventHandlers(e.onEscapeKeyDown,f=>{l.onClose(),f.preventDefault()}),onKeyDown:v.composeEventHandlers(e.onKeyDown,f=>{var R;const c=f.currentTarget.contains(f.target),d=ct[l.dir].includes(f.key);c&&d&&(s.onOpenChange(!1),(R=m.trigger)==null||R.focus(),f.preventDefault())})})})})})});Ee.displayName=Le;function Fe(e){return e?"open":"closed"}function Y(e){return e==="indeterminate"}function Ce(e){return Y(e)?"indeterminate":e?"checked":"unchecked"}function It(e){const n=document.activeElement;for(const t of e)if(t===n||(t.focus(),document.activeElement!==n))return}function bt(e,n){return e.map((t,o)=>e[(n+o)%e.length])}function wt(e,n,t){const u=n.length>1&&Array.from(n).every(x=>x===n[0])?n[0]:n,s=t?e.indexOf(t):-1;let l=bt(e,Math.max(s,0));u.length===1&&(l=l.filter(x=>x!==t));const p=l.find(x=>x.toLowerCase().startsWith(u.toLowerCase()));return p!==t?p:void 0}function yt(e,n){const{x:t,y:o}=e;let u=!1;for(let s=0,l=n.length-1;s<n.length;l=s++){const m=n[s].x,p=n[s].y,x=n[l].x,f=n[l].y;p>o!=f>o&&t<(x-m)*(o-p)/(f-p)+m&&(u=!u)}return u}function Tt(e,n){if(!n)return!1;const t={x:e.clientX,y:e.clientY};return yt(t,n)}function L(e){return n=>n.pointerType==="mouse"?e(n):void 0}var At=re,Ot=Z,kt=ce,Dt=ae,Nt=J,Lt=le,Ft=K,Gt=de,Kt=fe,Ht=me,qt=xe,Ut=ve,$t=Me,Bt=Re,Vt=Ee;exports.Anchor=Ot;exports.Arrow=$t;exports.CheckboxItem=Gt;exports.Content=Dt;exports.Group=Nt;exports.Item=Ft;exports.ItemIndicator=qt;exports.Label=Lt;exports.Menu=re;exports.MenuAnchor=Z;exports.MenuArrow=Me;exports.MenuCheckboxItem=de;exports.MenuContent=ae;exports.MenuGroup=J;exports.MenuItem=K;exports.MenuItemIndicator=xe;exports.MenuLabel=le;exports.MenuPortal=ce;exports.MenuRadioGroup=fe;exports.MenuRadioItem=me;exports.MenuSeparator=ve;exports.MenuSubContent=Ee;exports.MenuSubTrigger=Re;exports.Portal=kt;exports.RadioGroup=Kt;exports.RadioItem=Ht;exports.Root=At;exports.Separator=Ut;exports.SubContent=Vt;exports.SubTrigger=Bt;exports.createMenuScope=it;
2
- //# sourceMappingURL=index.cjs342.js.map