@konstructio/ui 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +19 -0
  3. package/dist/AlertDialogTrigger-BIbxXexQ.js +553 -0
  4. package/dist/Combination-Cmu9JRkv.js +479 -0
  5. package/dist/Modal-CO0_SnXD.js +909 -0
  6. package/dist/_commonjsHelpers-C6fGbg64.js +6 -0
  7. package/dist/chevron-up-Cmu1oXfj.js +54 -0
  8. package/dist/components/AlertDialog/AlertDialog.d.ts +3 -0
  9. package/dist/components/AlertDialog/AlertDialog.js +54 -0
  10. package/dist/components/AlertDialog/AlertDialog.types.d.ts +13 -0
  11. package/dist/components/AlertDialog/AlertDialog.types.js +1 -0
  12. package/dist/components/AlertDialog/AlertDialog.variants.d.ts +3 -0
  13. package/dist/components/AlertDialog/AlertDialog.variants.js +16 -0
  14. package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +3 -0
  15. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +10 -0
  16. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +6 -0
  17. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.js +1 -0
  18. package/dist/components/AlertDialog/components/index.d.ts +1 -0
  19. package/dist/components/AlertDialog/components/index.js +4 -0
  20. package/dist/components/AlertDialog/hooks/index.d.ts +1 -0
  21. package/dist/components/AlertDialog/hooks/index.js +4 -0
  22. package/dist/components/AlertDialog/hooks/useAlertDialog.d.ts +7 -0
  23. package/dist/components/AlertDialog/hooks/useAlertDialog.js +10 -0
  24. package/dist/components/Autocomplete/Autocomplete.d.ts +3 -0
  25. package/dist/components/Autocomplete/Autocomplete.js +84 -0
  26. package/dist/components/Autocomplete/Autocomplete.types.d.ts +18 -0
  27. package/dist/components/Autocomplete/Autocomplete.types.js +1 -0
  28. package/dist/components/Autocomplete/Autocomplete.variants.d.ts +8 -0
  29. package/dist/components/Autocomplete/Autocomplete.variants.js +61 -0
  30. package/dist/components/Autocomplete/components/List.d.ts +3 -0
  31. package/dist/components/Autocomplete/components/List.js +57 -0
  32. package/dist/components/Autocomplete/components/List.types.d.ts +13 -0
  33. package/dist/components/Autocomplete/components/List.types.js +1 -0
  34. package/dist/components/Autocomplete/components/List.variants.d.ts +16 -0
  35. package/dist/components/Autocomplete/components/List.variants.js +81 -0
  36. package/dist/components/Autocomplete/hooks/index.d.ts +2 -0
  37. package/dist/components/Autocomplete/hooks/index.js +6 -0
  38. package/dist/components/Autocomplete/hooks/useAutocomplete.d.ts +17 -0
  39. package/dist/components/Autocomplete/hooks/useAutocomplete.js +81 -0
  40. package/dist/components/Autocomplete/hooks/useNavigationList.d.ts +10 -0
  41. package/dist/components/Autocomplete/hooks/useNavigationList.js +78 -0
  42. package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -0
  43. package/dist/components/Breadcrumb/Breadcrumb.js +460 -0
  44. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +11 -0
  45. package/dist/components/Breadcrumb/Breadcrumb.types.js +1 -0
  46. package/dist/components/Breadcrumb/Breadcrumb.variants.d.ts +12 -0
  47. package/dist/components/Breadcrumb/Breadcrumb.variants.js +61 -0
  48. package/dist/components/Breadcrumb/hooks/useBreadcrumb.d.ts +3 -0
  49. package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +5 -0
  50. package/dist/components/Button/Button.d.ts +4 -0
  51. package/dist/components/Button/Button.js +42 -0
  52. package/dist/components/Button/Button.types.d.ts +7 -0
  53. package/dist/components/Button/Button.types.js +1 -0
  54. package/dist/components/Button/Button.variants.d.ts +6 -0
  55. package/dist/components/Button/Button.variants.js +102 -0
  56. package/dist/components/Checkbox/Checkbox.d.ts +3 -0
  57. package/dist/components/Checkbox/Checkbox.js +233 -0
  58. package/dist/components/Checkbox/Checkbox.types.d.ts +12 -0
  59. package/dist/components/Checkbox/Checkbox.types.js +1 -0
  60. package/dist/components/Checkbox/Checkbox.variants.d.ts +9 -0
  61. package/dist/components/Checkbox/Checkbox.variants.js +82 -0
  62. package/dist/components/Dropdown/Dropdown.d.ts +3 -0
  63. package/dist/components/Dropdown/Dropdown.js +10 -0
  64. package/dist/components/Dropdown/Dropdown.types.d.ts +15 -0
  65. package/dist/components/Dropdown/Dropdown.types.js +1 -0
  66. package/dist/components/Dropdown/Dropdown.variants.d.ts +3 -0
  67. package/dist/components/Dropdown/Dropdown.variants.js +45 -0
  68. package/dist/components/Dropdown/components/EmptyList.d.ts +2 -0
  69. package/dist/components/Dropdown/components/EmptyList.js +5 -0
  70. package/dist/components/Dropdown/components/List/List.d.ts +3 -0
  71. package/dist/components/Dropdown/components/List/List.js +25 -0
  72. package/dist/components/Dropdown/components/List/List.types.d.ts +8 -0
  73. package/dist/components/Dropdown/components/List/List.types.js +1 -0
  74. package/dist/components/Dropdown/components/List/List.variants.d.ts +3 -0
  75. package/dist/components/Dropdown/components/List/List.variants.js +34 -0
  76. package/dist/components/Dropdown/components/ListItem/ListItem.d.ts +3 -0
  77. package/dist/components/Dropdown/components/ListItem/ListItem.js +29 -0
  78. package/dist/components/Dropdown/components/ListItem/ListItem.types.d.ts +4 -0
  79. package/dist/components/Dropdown/components/ListItem/ListItem.types.js +1 -0
  80. package/dist/components/Dropdown/components/ListItem/ListItem.variants.d.ts +3 -0
  81. package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +19 -0
  82. package/dist/components/Dropdown/components/Wrapper.d.ts +3 -0
  83. package/dist/components/Dropdown/components/Wrapper.js +90 -0
  84. package/dist/components/Dropdown/components/index.d.ts +3 -0
  85. package/dist/components/Dropdown/components/index.js +8 -0
  86. package/dist/components/Dropdown/contexts/dropdown.context.d.ts +8 -0
  87. package/dist/components/Dropdown/contexts/dropdown.context.js +14 -0
  88. package/dist/components/Dropdown/contexts/dropdown.hook.d.ts +2 -0
  89. package/dist/components/Dropdown/contexts/dropdown.hook.js +11 -0
  90. package/dist/components/Dropdown/contexts/dropdown.provider.d.ts +2 -0
  91. package/dist/components/Dropdown/contexts/dropdown.provider.js +11 -0
  92. package/dist/components/Dropdown/contexts/index.d.ts +2 -0
  93. package/dist/components/Dropdown/contexts/index.js +6 -0
  94. package/dist/components/Dropdown/hooks/useDropdown.d.ts +11 -0
  95. package/dist/components/Dropdown/hooks/useDropdown.js +65 -0
  96. package/dist/components/Dropdown/hooks/useNavigationList.d.ts +8 -0
  97. package/dist/components/Dropdown/hooks/useNavigationList.js +66 -0
  98. package/dist/components/Input/Input.d.ts +3 -0
  99. package/dist/components/Input/Input.js +178 -0
  100. package/dist/components/Input/Input.types.d.ts +9 -0
  101. package/dist/components/Input/Input.types.js +1 -0
  102. package/dist/components/Input/Input.variants.d.ts +4 -0
  103. package/dist/components/Input/Input.variants.js +43 -0
  104. package/dist/components/Modal/Modal.d.ts +8 -0
  105. package/dist/components/Modal/Modal.js +10 -0
  106. package/dist/components/Modal/Modal.types.d.ts +12 -0
  107. package/dist/components/Modal/Modal.types.js +1 -0
  108. package/dist/components/Modal/components/Body/Body.d.ts +3 -0
  109. package/dist/components/Modal/components/Body/Body.js +7 -0
  110. package/dist/components/Modal/components/Body/Body.types.d.ts +5 -0
  111. package/dist/components/Modal/components/Body/Body.types.js +1 -0
  112. package/dist/components/Modal/components/Footer/Footer.d.ts +3 -0
  113. package/dist/components/Modal/components/Footer/Footer.js +6 -0
  114. package/dist/components/Modal/components/Footer/Footer.types.d.ts +5 -0
  115. package/dist/components/Modal/components/Footer/Footer.types.js +1 -0
  116. package/dist/components/Modal/components/Header/Header.d.ts +3 -0
  117. package/dist/components/Modal/components/Header/Header.js +6 -0
  118. package/dist/components/Modal/components/Header/Header.types.d.ts +5 -0
  119. package/dist/components/Modal/components/Header/Header.types.js +1 -0
  120. package/dist/components/Modal/components/Wrapper/Wrapper.d.ts +3 -0
  121. package/dist/components/Modal/components/Wrapper/Wrapper.js +13 -0
  122. package/dist/components/Modal/components/Wrapper/Wrapper.types.d.ts +7 -0
  123. package/dist/components/Modal/components/Wrapper/Wrapper.types.js +1 -0
  124. package/dist/components/Modal/components/Wrapper/Wrapper.variants.d.ts +6 -0
  125. package/dist/components/Modal/components/Wrapper/Wrapper.variants.js +48 -0
  126. package/dist/components/Modal/components/index.d.ts +4 -0
  127. package/dist/components/Modal/components/index.js +10 -0
  128. package/dist/components/Modal/contexts/Modal.context.d.ts +2 -0
  129. package/dist/components/Modal/contexts/Modal.context.js +20 -0
  130. package/dist/components/Modal/contexts/Modal.provider.d.ts +4 -0
  131. package/dist/components/Modal/contexts/Modal.provider.js +26 -0
  132. package/dist/components/Modal/contexts/Modal.types.d.ts +9 -0
  133. package/dist/components/Modal/contexts/Modal.types.js +1 -0
  134. package/dist/components/Modal/contexts/index.d.ts +1 -0
  135. package/dist/components/Modal/contexts/index.js +4 -0
  136. package/dist/components/Modal/hooks/index.d.ts +1 -0
  137. package/dist/components/Modal/hooks/index.js +4 -0
  138. package/dist/components/Modal/hooks/useModal.d.ts +9 -0
  139. package/dist/components/Modal/hooks/useModal.js +27 -0
  140. package/dist/components/NumberInput/NumberInput.d.ts +3 -0
  141. package/dist/components/NumberInput/NumberInput.js +181 -0
  142. package/dist/components/NumberInput/NumberInput.types.d.ts +11 -0
  143. package/dist/components/NumberInput/NumberInput.types.js +1 -0
  144. package/dist/components/NumberInput/NumberInput.variants.d.ts +11 -0
  145. package/dist/components/NumberInput/NumberInput.variants.js +78 -0
  146. package/dist/components/ProgressBar/ProgressBar.d.ts +3 -0
  147. package/dist/components/ProgressBar/ProgressBar.js +37 -0
  148. package/dist/components/ProgressBar/ProgressBar.types.d.ts +8 -0
  149. package/dist/components/ProgressBar/ProgressBar.types.js +1 -0
  150. package/dist/components/ProgressBar/ProgressBar.variants.d.ts +7 -0
  151. package/dist/components/ProgressBar/ProgressBar.variants.js +62 -0
  152. package/dist/components/Radio/Radio.d.ts +3 -0
  153. package/dist/components/Radio/Radio.js +58 -0
  154. package/dist/components/Radio/Radio.types.d.ts +12 -0
  155. package/dist/components/Radio/Radio.types.js +1 -0
  156. package/dist/components/Radio/Radio.variants.d.ts +3 -0
  157. package/dist/components/Radio/Radio.variants.js +49 -0
  158. package/dist/components/RadioGroup/RadioGroup.d.ts +3 -0
  159. package/dist/components/RadioGroup/RadioGroup.js +37 -0
  160. package/dist/components/RadioGroup/RadioGroup.types.d.ts +11 -0
  161. package/dist/components/RadioGroup/RadioGroup.types.js +1 -0
  162. package/dist/components/Range/Range.d.ts +3 -0
  163. package/dist/components/Range/Range.js +70 -0
  164. package/dist/components/Range/Range.types.d.ts +13 -0
  165. package/dist/components/Range/Range.types.js +1 -0
  166. package/dist/components/Range/Range.variants.d.ts +14 -0
  167. package/dist/components/Range/Range.variants.js +93 -0
  168. package/dist/components/Slider/Slider.d.ts +3 -0
  169. package/dist/components/Slider/Slider.js +52 -0
  170. package/dist/components/Slider/Slider.types.d.ts +13 -0
  171. package/dist/components/Slider/Slider.types.js +1 -0
  172. package/dist/components/Slider/Slider.variants.d.ts +11 -0
  173. package/dist/components/Slider/Slider.variants.js +69 -0
  174. package/dist/components/Switch/Switch.d.ts +3 -0
  175. package/dist/components/Switch/Switch.js +176 -0
  176. package/dist/components/Switch/Switch.types.d.ts +10 -0
  177. package/dist/components/Switch/Switch.types.js +1 -0
  178. package/dist/components/Switch/Switch.variants.d.ts +6 -0
  179. package/dist/components/Switch/Switch.variants.js +58 -0
  180. package/dist/components/Tag/Tag.d.ts +3 -0
  181. package/dist/components/Tag/Tag.js +6 -0
  182. package/dist/components/Tag/Tag.types.d.ts +4 -0
  183. package/dist/components/Tag/Tag.types.js +1 -0
  184. package/dist/components/Tag/Tag.variants.d.ts +3 -0
  185. package/dist/components/Tag/Tag.variants.js +31 -0
  186. package/dist/components/TagSelect/TagSelect.d.ts +3 -0
  187. package/dist/components/TagSelect/TagSelect.js +75 -0
  188. package/dist/components/TagSelect/TagSelect.types.d.ts +9 -0
  189. package/dist/components/TagSelect/TagSelect.types.js +1 -0
  190. package/dist/components/TagSelect/TagSelect.variants.d.ts +9 -0
  191. package/dist/components/TagSelect/TagSelect.variants.js +83 -0
  192. package/dist/components/TagSelect/hooks/useTagSelect.d.ts +9 -0
  193. package/dist/components/TagSelect/hooks/useTagSelect.js +39 -0
  194. package/dist/components/TextArea/TextArea.d.ts +3 -0
  195. package/dist/components/TextArea/TextArea.js +34 -0
  196. package/dist/components/TextArea/TextArea.types.d.ts +10 -0
  197. package/dist/components/TextArea/TextArea.types.js +1 -0
  198. package/dist/components/TextArea/TextArea.variants.d.ts +3 -0
  199. package/dist/components/TextArea/TextArea.variants.js +34 -0
  200. package/dist/components/Toast/Toast.d.ts +3 -0
  201. package/dist/components/Toast/Toast.js +471 -0
  202. package/dist/components/Toast/Toast.types.d.ts +12 -0
  203. package/dist/components/Toast/Toast.types.js +1 -0
  204. package/dist/components/Toast/Toast.variants.d.ts +9 -0
  205. package/dist/components/Toast/Toast.variants.js +74 -0
  206. package/dist/components/Tooltip/Tooltip.d.ts +3 -0
  207. package/dist/components/Tooltip/Tooltip.js +42 -0
  208. package/dist/components/Tooltip/Tooltip.types.d.ts +8 -0
  209. package/dist/components/Tooltip/Tooltip.types.js +1 -0
  210. package/dist/components/Tooltip/Tooltip.variants.d.ts +8 -0
  211. package/dist/components/Tooltip/Tooltip.variants.js +93 -0
  212. package/dist/components/Tooltip/hooks/useTooltip.d.ts +4 -0
  213. package/dist/components/Tooltip/hooks/useTooltip.js +25 -0
  214. package/dist/components/index.d.ts +19 -0
  215. package/dist/components/index.js +40 -0
  216. package/dist/contexts/index.d.ts +3 -0
  217. package/dist/contexts/index.js +8 -0
  218. package/dist/contexts/theme.context.d.ts +6 -0
  219. package/dist/contexts/theme.context.js +10 -0
  220. package/dist/contexts/theme.hook.d.ts +7 -0
  221. package/dist/contexts/theme.hook.js +9 -0
  222. package/dist/contexts/theme.provider.d.ts +7 -0
  223. package/dist/contexts/theme.provider.js +17 -0
  224. package/dist/hooks/index.d.ts +1 -0
  225. package/dist/hooks/index.js +4 -0
  226. package/dist/hooks/useToggle.d.ts +1 -0
  227. package/dist/hooks/useToggle.js +11 -0
  228. package/dist/index-2K8qjK4R.js +145 -0
  229. package/dist/index-2hJuj4UN.js +19069 -0
  230. package/dist/index-4qm4jAkj.js +92 -0
  231. package/dist/index-8vgf-x5i.js +118 -0
  232. package/dist/index-BJ7FQg17.js +35 -0
  233. package/dist/index-B_GWswUP.js +71 -0
  234. package/dist/index-BqM_XclQ.js +94 -0
  235. package/dist/index-BwYCDOHZ.js +44 -0
  236. package/dist/index-BxeV34ij.js +32 -0
  237. package/dist/index-CCavb-1K.js +57 -0
  238. package/dist/index-DFbnnPzA.js +423 -0
  239. package/dist/index-DQMInta3.js +663 -0
  240. package/dist/index.d.ts +4 -0
  241. package/dist/index.js +50 -0
  242. package/dist/js.cookie-OLEfuq_g.js +74 -0
  243. package/dist/package.json +118 -0
  244. package/dist/plugins/index.d.ts +1 -0
  245. package/dist/plugins/index.js +4 -0
  246. package/dist/plugins/konstruct.d.ts +4 -0
  247. package/dist/plugins/konstruct.js +104 -0
  248. package/dist/plugins/utils/colors.d.ts +206 -0
  249. package/dist/plugins/utils/colors.js +626 -0
  250. package/dist/styles.css +1 -0
  251. package/dist/styles.d.ts +0 -0
  252. package/dist/styles.js +1 -0
  253. package/dist/useBreadcrumb-BSMnc4Fu.js +341 -0
  254. package/dist/utils/index.d.ts +4 -0
  255. package/dist/utils/index.js +2278 -0
  256. package/package.json +118 -0
@@ -0,0 +1,479 @@
1
+ import * as u from "react";
2
+ import { useState as ee } from "react";
3
+ var S = function() {
4
+ return S = Object.assign || function(t) {
5
+ for (var n, r = 1, a = arguments.length; r < a; r++) {
6
+ n = arguments[r];
7
+ for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
8
+ }
9
+ return t;
10
+ }, S.apply(this, arguments);
11
+ };
12
+ function Z(e, t) {
13
+ var n = {};
14
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
15
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
16
+ for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
17
+ t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
18
+ return n;
19
+ }
20
+ function te(e, t, n) {
21
+ if (n || arguments.length === 2) for (var r = 0, a = t.length, i; r < a; r++)
22
+ (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
23
+ return e.concat(i || Array.prototype.slice.call(t));
24
+ }
25
+ var N = "right-scroll-bar-position", A = "width-before-scroll-bar", re = "with-scroll-bars-hidden", ne = "--removed-body-scroll-bar-size";
26
+ function W(e, t) {
27
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
28
+ }
29
+ function ae(e, t) {
30
+ var n = ee(function() {
31
+ return {
32
+ // value
33
+ value: e,
34
+ // last callback
35
+ callback: t,
36
+ // "memoized" public interface
37
+ facade: {
38
+ get current() {
39
+ return n.value;
40
+ },
41
+ set current(r) {
42
+ var a = n.value;
43
+ a !== r && (n.value = r, n.callback(r, a));
44
+ }
45
+ }
46
+ };
47
+ })[0];
48
+ return n.callback = t, n.facade;
49
+ }
50
+ var oe = typeof window < "u" ? u.useLayoutEffect : u.useEffect, D = /* @__PURE__ */ new WeakMap();
51
+ function ce(e, t) {
52
+ var n = ae(null, function(r) {
53
+ return e.forEach(function(a) {
54
+ return W(a, r);
55
+ });
56
+ });
57
+ return oe(function() {
58
+ var r = D.get(n);
59
+ if (r) {
60
+ var a = new Set(r), i = new Set(e), l = n.current;
61
+ a.forEach(function(o) {
62
+ i.has(o) || W(o, null);
63
+ }), i.forEach(function(o) {
64
+ a.has(o) || W(o, l);
65
+ });
66
+ }
67
+ D.set(n, e);
68
+ }, [e]), n;
69
+ }
70
+ function _(e) {
71
+ return e;
72
+ }
73
+ function Q(e, t) {
74
+ t === void 0 && (t = _);
75
+ var n = [], r = !1, a = {
76
+ read: function() {
77
+ if (r)
78
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
79
+ return n.length ? n[n.length - 1] : e;
80
+ },
81
+ useMedium: function(i) {
82
+ var l = t(i, r);
83
+ return n.push(l), function() {
84
+ n = n.filter(function(o) {
85
+ return o !== l;
86
+ });
87
+ };
88
+ },
89
+ assignSyncMedium: function(i) {
90
+ for (r = !0; n.length; ) {
91
+ var l = n;
92
+ n = [], l.forEach(i);
93
+ }
94
+ n = {
95
+ push: function(o) {
96
+ return i(o);
97
+ },
98
+ filter: function() {
99
+ return n;
100
+ }
101
+ };
102
+ },
103
+ assignMedium: function(i) {
104
+ r = !0;
105
+ var l = [];
106
+ if (n.length) {
107
+ var o = n;
108
+ n = [], o.forEach(i), l = n;
109
+ }
110
+ var h = function() {
111
+ var d = l;
112
+ l = [], d.forEach(i);
113
+ }, m = function() {
114
+ return Promise.resolve().then(h);
115
+ };
116
+ m(), n = {
117
+ push: function(d) {
118
+ l.push(d), m();
119
+ },
120
+ filter: function(d) {
121
+ return l = l.filter(d), n;
122
+ }
123
+ };
124
+ }
125
+ };
126
+ return a;
127
+ }
128
+ function Xe(e, t) {
129
+ return t === void 0 && (t = _), Q(e, t);
130
+ }
131
+ function ie(e) {
132
+ e === void 0 && (e = {});
133
+ var t = Q(null);
134
+ return t.options = S({ async: !0, ssr: !1 }, e), t;
135
+ }
136
+ var G = function(e) {
137
+ var t = e.sideCar, n = Z(e, ["sideCar"]);
138
+ if (!t)
139
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
140
+ var r = t.read();
141
+ if (!r)
142
+ throw new Error("Sidecar medium not found");
143
+ return u.createElement(r, S({}, n));
144
+ };
145
+ G.isSideCarExport = !0;
146
+ function ue(e, t) {
147
+ return e.useMedium(t), G;
148
+ }
149
+ var K = ie(), O = function() {
150
+ }, I = u.forwardRef(function(e, t) {
151
+ var n = u.useRef(null), r = u.useState({
152
+ onScrollCapture: O,
153
+ onWheelCapture: O,
154
+ onTouchMoveCapture: O
155
+ }), a = r[0], i = r[1], l = e.forwardProps, o = e.children, h = e.className, m = e.removeScrollBar, d = e.enabled, b = e.shards, E = e.sideCar, w = e.noIsolation, C = e.inert, c = e.allowPinchZoom, f = e.as, v = f === void 0 ? "div" : f, y = e.gapMode, g = Z(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), p = E, s = ce([n, t]), R = S(S({}, g), a);
156
+ return u.createElement(
157
+ u.Fragment,
158
+ null,
159
+ d && u.createElement(p, { sideCar: K, removeScrollBar: m, shards: b, noIsolation: w, inert: C, setCallbacks: i, allowPinchZoom: !!c, lockRef: n, gapMode: y }),
160
+ l ? u.cloneElement(u.Children.only(o), S(S({}, R), { ref: s })) : u.createElement(v, S({}, R, { className: h, ref: s }), o)
161
+ );
162
+ });
163
+ I.defaultProps = {
164
+ enabled: !0,
165
+ removeScrollBar: !0,
166
+ inert: !1
167
+ };
168
+ I.classNames = {
169
+ fullWidth: A,
170
+ zeroRight: N
171
+ };
172
+ var le = function() {
173
+ if (typeof __webpack_nonce__ < "u")
174
+ return __webpack_nonce__;
175
+ };
176
+ function fe() {
177
+ if (!document)
178
+ return null;
179
+ var e = document.createElement("style");
180
+ e.type = "text/css";
181
+ var t = le();
182
+ return t && e.setAttribute("nonce", t), e;
183
+ }
184
+ function se(e, t) {
185
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
186
+ }
187
+ function de(e) {
188
+ var t = document.head || document.getElementsByTagName("head")[0];
189
+ t.appendChild(e);
190
+ }
191
+ var ve = function() {
192
+ var e = 0, t = null;
193
+ return {
194
+ add: function(n) {
195
+ e == 0 && (t = fe()) && (se(t, n), de(t)), e++;
196
+ },
197
+ remove: function() {
198
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
199
+ }
200
+ };
201
+ }, he = function() {
202
+ var e = ve();
203
+ return function(t, n) {
204
+ u.useEffect(function() {
205
+ return e.add(t), function() {
206
+ e.remove();
207
+ };
208
+ }, [t && n]);
209
+ };
210
+ }, U = function() {
211
+ var e = he(), t = function(n) {
212
+ var r = n.styles, a = n.dynamic;
213
+ return e(r, a), null;
214
+ };
215
+ return t;
216
+ }, me = {
217
+ left: 0,
218
+ top: 0,
219
+ right: 0,
220
+ gap: 0
221
+ }, X = function(e) {
222
+ return parseInt(e || "", 10) || 0;
223
+ }, ge = function(e) {
224
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
225
+ return [X(n), X(r), X(a)];
226
+ }, ye = function(e) {
227
+ if (e === void 0 && (e = "margin"), typeof window > "u")
228
+ return me;
229
+ var t = ge(e), n = document.documentElement.clientWidth, r = window.innerWidth;
230
+ return {
231
+ left: t[0],
232
+ top: t[1],
233
+ right: t[2],
234
+ gap: Math.max(0, r - n + t[2] - t[0])
235
+ };
236
+ }, Se = U(), M = "data-scroll-locked", pe = function(e, t, n, r) {
237
+ var a = e.left, i = e.top, l = e.right, o = e.gap;
238
+ return n === void 0 && (n = "margin"), `
239
+ .`.concat(re, ` {
240
+ overflow: hidden `).concat(r, `;
241
+ padding-right: `).concat(o, "px ").concat(r, `;
242
+ }
243
+ body[`).concat(M, `] {
244
+ overflow: hidden `).concat(r, `;
245
+ overscroll-behavior: contain;
246
+ `).concat([
247
+ t && "position: relative ".concat(r, ";"),
248
+ n === "margin" && `
249
+ padding-left: `.concat(a, `px;
250
+ padding-top: `).concat(i, `px;
251
+ padding-right: `).concat(l, `px;
252
+ margin-left:0;
253
+ margin-top:0;
254
+ margin-right: `).concat(o, "px ").concat(r, `;
255
+ `),
256
+ n === "padding" && "padding-right: ".concat(o, "px ").concat(r, ";")
257
+ ].filter(Boolean).join(""), `
258
+ }
259
+
260
+ .`).concat(N, ` {
261
+ right: `).concat(o, "px ").concat(r, `;
262
+ }
263
+
264
+ .`).concat(A, ` {
265
+ margin-right: `).concat(o, "px ").concat(r, `;
266
+ }
267
+
268
+ .`).concat(N, " .").concat(N, ` {
269
+ right: 0 `).concat(r, `;
270
+ }
271
+
272
+ .`).concat(A, " .").concat(A, ` {
273
+ margin-right: 0 `).concat(r, `;
274
+ }
275
+
276
+ body[`).concat(M, `] {
277
+ `).concat(ne, ": ").concat(o, `px;
278
+ }
279
+ `);
280
+ }, V = function() {
281
+ var e = parseInt(document.body.getAttribute(M) || "0", 10);
282
+ return isFinite(e) ? e : 0;
283
+ }, be = function() {
284
+ u.useEffect(function() {
285
+ return document.body.setAttribute(M, (V() + 1).toString()), function() {
286
+ var e = V() - 1;
287
+ e <= 0 ? document.body.removeAttribute(M) : document.body.setAttribute(M, e.toString());
288
+ };
289
+ }, []);
290
+ }, we = function(e) {
291
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, a = r === void 0 ? "margin" : r;
292
+ be();
293
+ var i = u.useMemo(function() {
294
+ return ye(a);
295
+ }, [a]);
296
+ return u.createElement(Se, { styles: pe(i, !t, a, n ? "" : "!important") });
297
+ }, Y = !1;
298
+ if (typeof window < "u")
299
+ try {
300
+ var B = Object.defineProperty({}, "passive", {
301
+ get: function() {
302
+ return Y = !0, !0;
303
+ }
304
+ });
305
+ window.addEventListener("test", B, B), window.removeEventListener("test", B, B);
306
+ } catch {
307
+ Y = !1;
308
+ }
309
+ var k = Y ? { passive: !1 } : !1, Ce = function(e) {
310
+ return e.tagName === "TEXTAREA";
311
+ }, $ = function(e, t) {
312
+ if (!(e instanceof Element))
313
+ return !1;
314
+ var n = window.getComputedStyle(e);
315
+ return (
316
+ // not-not-scrollable
317
+ n[t] !== "hidden" && // contains scroll inside self
318
+ !(n.overflowY === n.overflowX && !Ce(e) && n[t] === "visible")
319
+ );
320
+ }, Ee = function(e) {
321
+ return $(e, "overflowY");
322
+ }, Re = function(e) {
323
+ return $(e, "overflowX");
324
+ }, H = function(e, t) {
325
+ var n = t.ownerDocument, r = t;
326
+ do {
327
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
328
+ var a = q(e, r);
329
+ if (a) {
330
+ var i = J(e, r), l = i[1], o = i[2];
331
+ if (l > o)
332
+ return !0;
333
+ }
334
+ r = r.parentNode;
335
+ } while (r && r !== n.body);
336
+ return !1;
337
+ }, ke = function(e) {
338
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
339
+ return [
340
+ t,
341
+ n,
342
+ r
343
+ ];
344
+ }, Pe = function(e) {
345
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
346
+ return [
347
+ t,
348
+ n,
349
+ r
350
+ ];
351
+ }, q = function(e, t) {
352
+ return e === "v" ? Ee(t) : Re(t);
353
+ }, J = function(e, t) {
354
+ return e === "v" ? ke(t) : Pe(t);
355
+ }, Me = function(e, t) {
356
+ return e === "h" && t === "rtl" ? -1 : 1;
357
+ }, Le = function(e, t, n, r, a) {
358
+ var i = Me(e, window.getComputedStyle(t).direction), l = i * r, o = n.target, h = t.contains(o), m = !1, d = l > 0, b = 0, E = 0;
359
+ do {
360
+ var w = J(e, o), C = w[0], c = w[1], f = w[2], v = c - f - i * C;
361
+ (C || v) && q(e, o) && (b += v, E += C), o instanceof ShadowRoot ? o = o.host : o = o.parentNode;
362
+ } while (
363
+ // portaled content
364
+ !h && o !== document.body || // self content
365
+ h && (t.contains(o) || t === o)
366
+ );
367
+ return (d && (Math.abs(b) < 1 || !a) || !d && (Math.abs(E) < 1 || !a)) && (m = !0), m;
368
+ }, x = function(e) {
369
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
370
+ }, z = function(e) {
371
+ return [e.deltaX, e.deltaY];
372
+ }, F = function(e) {
373
+ return e && "current" in e ? e.current : e;
374
+ }, Te = function(e, t) {
375
+ return e[0] === t[0] && e[1] === t[1];
376
+ }, Be = function(e) {
377
+ return `
378
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
379
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
380
+ `);
381
+ }, xe = 0, P = [];
382
+ function Ne(e) {
383
+ var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), a = u.useState(xe++)[0], i = u.useState(U)[0], l = u.useRef(e);
384
+ u.useEffect(function() {
385
+ l.current = e;
386
+ }, [e]), u.useEffect(function() {
387
+ if (e.inert) {
388
+ document.body.classList.add("block-interactivity-".concat(a));
389
+ var c = te([e.lockRef.current], (e.shards || []).map(F), !0).filter(Boolean);
390
+ return c.forEach(function(f) {
391
+ return f.classList.add("allow-interactivity-".concat(a));
392
+ }), function() {
393
+ document.body.classList.remove("block-interactivity-".concat(a)), c.forEach(function(f) {
394
+ return f.classList.remove("allow-interactivity-".concat(a));
395
+ });
396
+ };
397
+ }
398
+ }, [e.inert, e.lockRef.current, e.shards]);
399
+ var o = u.useCallback(function(c, f) {
400
+ if ("touches" in c && c.touches.length === 2 || c.type === "wheel" && c.ctrlKey)
401
+ return !l.current.allowPinchZoom;
402
+ var v = x(c), y = n.current, g = "deltaX" in c ? c.deltaX : y[0] - v[0], p = "deltaY" in c ? c.deltaY : y[1] - v[1], s, R = c.target, L = Math.abs(g) > Math.abs(p) ? "h" : "v";
403
+ if ("touches" in c && L === "h" && R.type === "range")
404
+ return !1;
405
+ var T = H(L, R);
406
+ if (!T)
407
+ return !0;
408
+ if (T ? s = L : (s = L === "v" ? "h" : "v", T = H(L, R)), !T)
409
+ return !1;
410
+ if (!r.current && "changedTouches" in c && (g || p) && (r.current = s), !s)
411
+ return !0;
412
+ var j = r.current || s;
413
+ return Le(j, f, c, j === "h" ? g : p, !0);
414
+ }, []), h = u.useCallback(function(c) {
415
+ var f = c;
416
+ if (!(!P.length || P[P.length - 1] !== i)) {
417
+ var v = "deltaY" in f ? z(f) : x(f), y = t.current.filter(function(s) {
418
+ return s.name === f.type && (s.target === f.target || f.target === s.shadowParent) && Te(s.delta, v);
419
+ })[0];
420
+ if (y && y.should) {
421
+ f.cancelable && f.preventDefault();
422
+ return;
423
+ }
424
+ if (!y) {
425
+ var g = (l.current.shards || []).map(F).filter(Boolean).filter(function(s) {
426
+ return s.contains(f.target);
427
+ }), p = g.length > 0 ? o(f, g[0]) : !l.current.noIsolation;
428
+ p && f.cancelable && f.preventDefault();
429
+ }
430
+ }
431
+ }, []), m = u.useCallback(function(c, f, v, y) {
432
+ var g = { name: c, delta: f, target: v, should: y, shadowParent: Ae(v) };
433
+ t.current.push(g), setTimeout(function() {
434
+ t.current = t.current.filter(function(p) {
435
+ return p !== g;
436
+ });
437
+ }, 1);
438
+ }, []), d = u.useCallback(function(c) {
439
+ n.current = x(c), r.current = void 0;
440
+ }, []), b = u.useCallback(function(c) {
441
+ m(c.type, z(c), c.target, o(c, e.lockRef.current));
442
+ }, []), E = u.useCallback(function(c) {
443
+ m(c.type, x(c), c.target, o(c, e.lockRef.current));
444
+ }, []);
445
+ u.useEffect(function() {
446
+ return P.push(i), e.setCallbacks({
447
+ onScrollCapture: b,
448
+ onWheelCapture: b,
449
+ onTouchMoveCapture: E
450
+ }), document.addEventListener("wheel", h, k), document.addEventListener("touchmove", h, k), document.addEventListener("touchstart", d, k), function() {
451
+ P = P.filter(function(c) {
452
+ return c !== i;
453
+ }), document.removeEventListener("wheel", h, k), document.removeEventListener("touchmove", h, k), document.removeEventListener("touchstart", d, k);
454
+ };
455
+ }, []);
456
+ var w = e.removeScrollBar, C = e.inert;
457
+ return u.createElement(
458
+ u.Fragment,
459
+ null,
460
+ C ? u.createElement(i, { styles: Be(a) }) : null,
461
+ w ? u.createElement(we, { gapMode: e.gapMode }) : null
462
+ );
463
+ }
464
+ function Ae(e) {
465
+ for (var t = null; e !== null; )
466
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
467
+ return t;
468
+ }
469
+ const Ie = ue(K, Ne);
470
+ var We = u.forwardRef(function(e, t) {
471
+ return u.createElement(I, S({}, e, { ref: t, sideCar: Ie }));
472
+ });
473
+ We.classNames = I.classNames;
474
+ export {
475
+ We as R,
476
+ ie as a,
477
+ Xe as c,
478
+ ce as u
479
+ };