ics-ui-kit 0.1.0-alpha.12 → 0.1.0-alpha.13

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 (227) hide show
  1. package/dist/Button-DQtBfU9y.js +57 -0
  2. package/dist/Button-DQtBfU9y.js.map +1 -0
  3. package/dist/{Button-DhfE69q0.js → ButtonBase-BEM8SNmT.js} +27 -56
  4. package/dist/ButtonBase-BEM8SNmT.js.map +1 -0
  5. package/dist/CarouselItem-pSHe0ufN.js +1500 -0
  6. package/dist/CarouselItem-pSHe0ufN.js.map +1 -0
  7. package/dist/CheckboxField-i_-dPpFM.js +370 -0
  8. package/dist/CheckboxField-i_-dPpFM.js.map +1 -0
  9. package/dist/Divider-C0Ss5GJT.js +47 -0
  10. package/dist/{Divider-D3NvaU8c.js.map → Divider-C0Ss5GJT.js.map} +1 -1
  11. package/dist/Field-3XJNFTql.js +78 -0
  12. package/dist/Field-3XJNFTql.js.map +1 -0
  13. package/dist/FieldLabel-CAbVan3E.js +97 -0
  14. package/dist/FieldLabel-CAbVan3E.js.map +1 -0
  15. package/dist/FormBody-4HptEjhb.js +103 -0
  16. package/dist/FormBody-4HptEjhb.js.map +1 -0
  17. package/dist/{IconButton-BUPs2kEo.js → IconButton-BkBsOIf5.js} +15 -15
  18. package/dist/{IconButton-BUPs2kEo.js.map → IconButton-BkBsOIf5.js.map} +1 -1
  19. package/dist/ImagePlaceholder-CNAKQWTh.js +45 -0
  20. package/dist/ImagePlaceholder-CNAKQWTh.js.map +1 -0
  21. package/dist/ImagePreview-DHi7A8md.js +156 -0
  22. package/dist/ImagePreview-DHi7A8md.js.map +1 -0
  23. package/dist/ImageUploader-46sxdmt5.js +123 -0
  24. package/dist/ImageUploader-46sxdmt5.js.map +1 -0
  25. package/dist/IsolatedStylesWrapper-WgaoHh7y.js +179 -0
  26. package/dist/IsolatedStylesWrapper-WgaoHh7y.js.map +1 -0
  27. package/dist/Modal-D33MSQot.js +125 -0
  28. package/dist/Modal-D33MSQot.js.map +1 -0
  29. package/dist/ScrollShadowContainer-ByNH68Kg.js +636 -0
  30. package/dist/ScrollShadowContainer-ByNH68Kg.js.map +1 -0
  31. package/dist/Toggle-7AlEmn8A.js +104 -0
  32. package/dist/Toggle-7AlEmn8A.js.map +1 -0
  33. package/dist/ToggleGroup-CT453MNp.js +200 -0
  34. package/dist/ToggleGroup-CT453MNp.js.map +1 -0
  35. package/dist/Tooltip-C4BbGF2_.js +372 -0
  36. package/dist/Tooltip-C4BbGF2_.js.map +1 -0
  37. package/dist/{bundle-mjs-D6wdQkGI.js → bundle-mjs-LhQum_e3.js} +676 -425
  38. package/dist/bundle-mjs-LhQum_e3.js.map +1 -0
  39. package/dist/check-C-TqZgvb.js.map +1 -1
  40. package/dist/chevron-right-CobOebzi.js.map +1 -1
  41. package/dist/components/badge.js +1 -1
  42. package/dist/components/button/icon-button/IconButton.stories.d.ts +330 -2
  43. package/dist/components/button/loading-button/LoadingButton.d.ts +249 -0
  44. package/dist/components/button/loading-button/LoadingButton.stories.d.ts +219 -0
  45. package/dist/components/button.js +6 -5
  46. package/dist/components/button.js.map +1 -1
  47. package/dist/components/carousel.js +65 -1532
  48. package/dist/components/carousel.js.map +1 -1
  49. package/dist/components/checkbox.js +1 -1
  50. package/dist/components/divider/content-divider/ContentDivider.d.ts +14 -0
  51. package/dist/components/divider/content-divider/ContentDivider.stories.d.ts +7 -0
  52. package/dist/components/divider/index.d.ts +1 -0
  53. package/dist/components/divider.js +45 -2
  54. package/dist/components/divider.js.map +1 -1
  55. package/dist/components/drawer/templates/drawer-footer-template/DrawerFooterTemplate.d.ts +3 -0
  56. package/dist/components/drawer.js +450 -447
  57. package/dist/components/drawer.js.map +1 -1
  58. package/dist/components/dropdown.js +37 -33
  59. package/dist/components/dropdown.js.map +1 -1
  60. package/dist/components/empty-state/EmptyState.d.ts +2 -2
  61. package/dist/components/empty-state.js +1 -1
  62. package/dist/components/empty-state.js.map +1 -1
  63. package/dist/components/field/Field.d.ts +35 -0
  64. package/dist/components/field.js +1 -1
  65. package/dist/components/form/components/form-header/FormHeader.d.ts +2 -2
  66. package/dist/components/form.js +289 -288
  67. package/dist/components/form.js.map +1 -1
  68. package/dist/components/gallery/Gallery.d.ts +21 -0
  69. package/dist/components/gallery/Gallery.stories.d.ts +26 -0
  70. package/dist/components/gallery/index.d.ts +1 -0
  71. package/dist/components/gallery.d.ts +2 -0
  72. package/dist/components/gallery.js +130 -0
  73. package/dist/components/gallery.js.map +1 -0
  74. package/dist/components/icon-tooltip/IconTooltip.d.ts +2 -1
  75. package/dist/components/image-placeholder.js +2 -42
  76. package/dist/components/image-placeholder.js.map +1 -1
  77. package/dist/components/image-preview/ImagePreview.d.ts +6 -6
  78. package/dist/components/image-preview.js +2 -136
  79. package/dist/components/image-preview.js.map +1 -1
  80. package/dist/components/image-uploader.js +2 -118
  81. package/dist/components/image-uploader.js.map +1 -1
  82. package/dist/components/input/file-input/FileInput.d.ts +3 -1
  83. package/dist/components/input-otp.js +1 -1
  84. package/dist/components/input-otp.js.map +1 -1
  85. package/dist/components/input.js +176 -195
  86. package/dist/components/input.js.map +1 -1
  87. package/dist/components/isolated-styles-wrapper/IsolatedStylesWrapper.d.ts +1 -1
  88. package/dist/components/label/Label.stories.d.ts +0 -2
  89. package/dist/components/label/field-label/FieldLabel.d.ts +11 -0
  90. package/dist/components/label/field-label/FieldLabel.stories.d.ts +1 -0
  91. package/dist/components/label/field-label/components/RequiredIcon.d.ts +5 -0
  92. package/dist/components/label.js +1 -1
  93. package/dist/components/loading/Loading.d.ts +4 -4
  94. package/dist/components/loading.js +2 -2
  95. package/dist/components/loading.js.map +1 -1
  96. package/dist/components/modal.js +12 -122
  97. package/dist/components/modal.js.map +1 -1
  98. package/dist/components/option-group.js +1 -1
  99. package/dist/components/popover.js +34 -31
  100. package/dist/components/popover.js.map +1 -1
  101. package/dist/components/scheduler.js +11 -11
  102. package/dist/components/scheduler.js.map +1 -1
  103. package/dist/components/scroll-shadow-container/ScrollShadowContainer.d.ts +1 -0
  104. package/dist/components/scroll-shadow-container.js +1 -1
  105. package/dist/components/select.js +487 -519
  106. package/dist/components/select.js.map +1 -1
  107. package/dist/components/shortcut/Shortcut.d.ts +14 -14
  108. package/dist/components/shortcut/Shortcut.stories.d.ts +7 -7
  109. package/dist/components/shortcut.js +16 -16
  110. package/dist/components/shortcut.js.map +1 -1
  111. package/dist/components/skeleton/Skeleton.d.ts +1 -0
  112. package/dist/components/skeleton/Skeleton.stories.d.ts +7 -0
  113. package/dist/components/skeleton/index.d.ts +1 -0
  114. package/dist/components/skeleton.d.ts +2 -0
  115. package/dist/components/skeleton.js +33 -0
  116. package/dist/components/skeleton.js.map +1 -0
  117. package/dist/components/switch.js +147 -126
  118. package/dist/components/switch.js.map +1 -1
  119. package/dist/components/tabs.js +9 -8
  120. package/dist/components/tabs.js.map +1 -1
  121. package/dist/components/tag.js +3 -3
  122. package/dist/components/toast.js +4 -4
  123. package/dist/components/toast.js.map +1 -1
  124. package/dist/components/toggle-group.js +1 -1
  125. package/dist/components/toggle.js +1 -1
  126. package/dist/components/tooltip/Tooltip.stories.d.ts +7 -0
  127. package/dist/components/tooltip/index.d.ts +1 -0
  128. package/dist/components/tooltip.d.ts +2 -0
  129. package/dist/components/tooltip.js +8 -0
  130. package/dist/components/tooltip.js.map +1 -0
  131. package/dist/createLucideIcon-DgrNxRV5.js.map +1 -1
  132. package/dist/design-tokens.source.json +1 -1
  133. package/dist/download-CVOGyQ0e.js.map +1 -1
  134. package/dist/downloadFile-yZV-aaO2.js +15 -0
  135. package/dist/downloadFile-yZV-aaO2.js.map +1 -0
  136. package/dist/index-B6K06mzp.js +67 -0
  137. package/dist/index-B6K06mzp.js.map +1 -0
  138. package/dist/index-BCZIl2rL.js +68 -0
  139. package/dist/index-BCZIl2rL.js.map +1 -0
  140. package/dist/index-BZPx6jYI.js.map +1 -1
  141. package/dist/index-Bj6ZBhqh.js +105 -0
  142. package/dist/index-Bj6ZBhqh.js.map +1 -0
  143. package/dist/index-ByaXH_ih.js.map +1 -1
  144. package/dist/index-CACw01gt.js +702 -0
  145. package/dist/index-CACw01gt.js.map +1 -0
  146. package/dist/index-COBL2CQB.js +14 -0
  147. package/dist/index-COBL2CQB.js.map +1 -0
  148. package/dist/index-CR-odn5-.js.map +1 -1
  149. package/dist/{index-BjbwEU_d.js → index-ClwWa5fz.js} +20 -20
  150. package/dist/index-ClwWa5fz.js.map +1 -0
  151. package/dist/{index-DwbC6luJ.js → index-Cx4x7Bv2.js} +52 -50
  152. package/dist/index-Cx4x7Bv2.js.map +1 -0
  153. package/dist/index-CzNelU6n.js +55 -0
  154. package/dist/index-CzNelU6n.js.map +1 -0
  155. package/dist/index-DBsc8nMF.js +43 -0
  156. package/dist/index-DBsc8nMF.js.map +1 -0
  157. package/dist/index-Mbnk_gHS.js +102 -0
  158. package/dist/index-Mbnk_gHS.js.map +1 -0
  159. package/dist/index-bhXb51Q1.js +215 -0
  160. package/dist/index-bhXb51Q1.js.map +1 -0
  161. package/dist/index-n71RB2rx.js +1592 -0
  162. package/dist/index-n71RB2rx.js.map +1 -0
  163. package/dist/index-rKs9bXHr.js +7 -0
  164. package/dist/index-rKs9bXHr.js.map +1 -0
  165. package/dist/lib/utils/file/downloadFile.d.ts +2 -0
  166. package/dist/lib/utils/image/imageConverter.d.ts +23 -0
  167. package/dist/styles-scoped.css +72 -18
  168. package/dist/styles.css +72 -18
  169. package/dist/{utils-DGzAmwok.js → utils-BK4mPzkB.js} +2 -2
  170. package/dist/utils-BK4mPzkB.js.map +1 -0
  171. package/dist/x-JgjNP5oH.js.map +1 -1
  172. package/package.json +1 -1
  173. package/dist/Button-DhfE69q0.js.map +0 -1
  174. package/dist/CheckboxField-CL1Tc7P4.js +0 -257
  175. package/dist/CheckboxField-CL1Tc7P4.js.map +0 -1
  176. package/dist/Divider-D3NvaU8c.js +0 -46
  177. package/dist/Field-COOo8o9f.js +0 -80
  178. package/dist/Field-COOo8o9f.js.map +0 -1
  179. package/dist/FieldLabel-BGxT_RaE.js +0 -64
  180. package/dist/FieldLabel-BGxT_RaE.js.map +0 -1
  181. package/dist/FormBody-DM52shm4.js +0 -101
  182. package/dist/FormBody-DM52shm4.js.map +0 -1
  183. package/dist/IsolatedStylesWrapper-B_Qu75eR.js +0 -555
  184. package/dist/IsolatedStylesWrapper-B_Qu75eR.js.map +0 -1
  185. package/dist/ScrollShadowContainer-DSKr3_fV.js +0 -690
  186. package/dist/ScrollShadowContainer-DSKr3_fV.js.map +0 -1
  187. package/dist/Toggle-BuYtICWv.js +0 -129
  188. package/dist/Toggle-BuYtICWv.js.map +0 -1
  189. package/dist/ToggleGroup-CMyUAz04.js +0 -467
  190. package/dist/ToggleGroup-CMyUAz04.js.map +0 -1
  191. package/dist/bundle-mjs-D6wdQkGI.js.map +0 -1
  192. package/dist/floating-ui.react-dom-CWfR7VfF.js +0 -1346
  193. package/dist/floating-ui.react-dom-CWfR7VfF.js.map +0 -1
  194. package/dist/index-0WznJ1QS.js +0 -276
  195. package/dist/index-0WznJ1QS.js.map +0 -1
  196. package/dist/index-BjbwEU_d.js.map +0 -1
  197. package/dist/index-BqriTm0o.js +0 -47
  198. package/dist/index-BqriTm0o.js.map +0 -1
  199. package/dist/index-C6bvrqL8.js +0 -563
  200. package/dist/index-C6bvrqL8.js.map +0 -1
  201. package/dist/index-C6t9z3on.js +0 -97
  202. package/dist/index-C6t9z3on.js.map +0 -1
  203. package/dist/index-CaQG3DzJ.js +0 -64
  204. package/dist/index-CaQG3DzJ.js.map +0 -1
  205. package/dist/index-ChTGHCkY.js +0 -255
  206. package/dist/index-ChTGHCkY.js.map +0 -1
  207. package/dist/index-D808y1pT.js +0 -178
  208. package/dist/index-D808y1pT.js.map +0 -1
  209. package/dist/index-DE3fiSzl.js +0 -28
  210. package/dist/index-DE3fiSzl.js.map +0 -1
  211. package/dist/index-DPws5oAn.js +0 -90
  212. package/dist/index-DPws5oAn.js.map +0 -1
  213. package/dist/index-DeUgDpdG.js +0 -80
  214. package/dist/index-DeUgDpdG.js.map +0 -1
  215. package/dist/index-DvquTpxI.js +0 -140
  216. package/dist/index-DvquTpxI.js.map +0 -1
  217. package/dist/index-DwbC6luJ.js.map +0 -1
  218. package/dist/index-Ncxt32Wo.js +0 -174
  219. package/dist/index-Ncxt32Wo.js.map +0 -1
  220. package/dist/index-U7y6nBZR.js +0 -179
  221. package/dist/index-U7y6nBZR.js.map +0 -1
  222. package/dist/index-pysSAa5G.js +0 -57
  223. package/dist/index-pysSAa5G.js.map +0 -1
  224. package/dist/tooltip-DI3_ZKNk.js +0 -365
  225. package/dist/tooltip-DI3_ZKNk.js.map +0 -1
  226. package/dist/utils-DGzAmwok.js.map +0 -1
  227. /package/dist/components/{ui/tooltip.d.ts → tooltip/Tooltip.d.ts} +0 -0
@@ -1,555 +0,0 @@
1
- var fe = Object.defineProperty, se = Object.defineProperties;
2
- var de = Object.getOwnPropertyDescriptors;
3
- var B = Object.getOwnPropertySymbols;
4
- var _ = Object.prototype.hasOwnProperty, Q = Object.prototype.propertyIsEnumerable;
5
- var Z = (e, t, r) => t in e ? fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, G = (e, t) => {
6
- for (var r in t || (t = {}))
7
- _.call(t, r) && Z(e, r, t[r]);
8
- if (B)
9
- for (var r of B(t))
10
- Q.call(t, r) && Z(e, r, t[r]);
11
- return e;
12
- }, K = (e, t) => se(e, de(t));
13
- var q = (e, t) => {
14
- var r = {};
15
- for (var n in e)
16
- _.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
17
- if (e != null && B)
18
- for (var n of B(e))
19
- t.indexOf(n) < 0 && Q.call(e, n) && (r[n] = e[n]);
20
- return r;
21
- };
22
- import * as u from "react";
23
- import { useState as ve } from "react";
24
- import { jsx as he } from "react/jsx-runtime";
25
- import { c as me } from "./utils-DGzAmwok.js";
26
- var C = function() {
27
- return C = Object.assign || function(t) {
28
- for (var r, n = 1, a = arguments.length; n < a; n++) {
29
- r = arguments[n];
30
- for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (t[o] = r[o]);
31
- }
32
- return t;
33
- }, C.apply(this, arguments);
34
- };
35
- function re(e, t) {
36
- var r = {};
37
- for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
38
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
39
- for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
40
- t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (r[n[a]] = e[n[a]]);
41
- return r;
42
- }
43
- function ge(e, t, r) {
44
- if (r || arguments.length === 2) for (var n = 0, a = t.length, o; n < a; n++)
45
- (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
46
- return e.concat(o || Array.prototype.slice.call(t));
47
- }
48
- var O = "right-scroll-bar-position", D = "width-before-scroll-bar", pe = "with-scroll-bars-hidden", ye = "--removed-body-scroll-bar-size";
49
- function X(e, t) {
50
- return typeof e == "function" ? e(t) : e && (e.current = t), e;
51
- }
52
- function Se(e, t) {
53
- var r = ve(function() {
54
- return {
55
- // value
56
- value: e,
57
- // last callback
58
- callback: t,
59
- // "memoized" public interface
60
- facade: {
61
- get current() {
62
- return r.value;
63
- },
64
- set current(n) {
65
- var a = r.value;
66
- a !== n && (r.value = n, r.callback(n, a));
67
- }
68
- }
69
- };
70
- })[0];
71
- return r.callback = t, r.facade;
72
- }
73
- var we = typeof window != "undefined" ? u.useLayoutEffect : u.useEffect, U = /* @__PURE__ */ new WeakMap();
74
- function be(e, t) {
75
- var r = Se(null, function(n) {
76
- return e.forEach(function(a) {
77
- return X(a, n);
78
- });
79
- });
80
- return we(function() {
81
- var n = U.get(r);
82
- if (n) {
83
- var a = new Set(n), o = new Set(e), l = r.current;
84
- a.forEach(function(c) {
85
- o.has(c) || X(c, null);
86
- }), o.forEach(function(c) {
87
- a.has(c) || X(c, l);
88
- });
89
- }
90
- U.set(r, e);
91
- }, [e]), r;
92
- }
93
- function Ce(e) {
94
- return e;
95
- }
96
- function Ee(e, t) {
97
- t === void 0 && (t = Ce);
98
- var r = [], n = !1, a = {
99
- read: function() {
100
- if (n)
101
- throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
102
- return r.length ? r[r.length - 1] : e;
103
- },
104
- useMedium: function(o) {
105
- var l = t(o, n);
106
- return r.push(l), function() {
107
- r = r.filter(function(c) {
108
- return c !== l;
109
- });
110
- };
111
- },
112
- assignSyncMedium: function(o) {
113
- for (n = !0; r.length; ) {
114
- var l = r;
115
- r = [], l.forEach(o);
116
- }
117
- r = {
118
- push: function(c) {
119
- return o(c);
120
- },
121
- filter: function() {
122
- return r;
123
- }
124
- };
125
- },
126
- assignMedium: function(o) {
127
- n = !0;
128
- var l = [];
129
- if (r.length) {
130
- var c = r;
131
- r = [], c.forEach(o), l = r;
132
- }
133
- var p = function() {
134
- var v = l;
135
- l = [], v.forEach(o);
136
- }, m = function() {
137
- return Promise.resolve().then(p);
138
- };
139
- m(), r = {
140
- push: function(v) {
141
- l.push(v), m();
142
- },
143
- filter: function(v) {
144
- return l = l.filter(v), r;
145
- }
146
- };
147
- }
148
- };
149
- return a;
150
- }
151
- function ke(e) {
152
- e === void 0 && (e = {});
153
- var t = Ee(null);
154
- return t.options = C({ async: !0, ssr: !1 }, e), t;
155
- }
156
- var ne = function(e) {
157
- var t = e.sideCar, r = re(e, ["sideCar"]);
158
- if (!t)
159
- throw new Error("Sidecar: please provide `sideCar` property to import the right car");
160
- var n = t.read();
161
- if (!n)
162
- throw new Error("Sidecar medium not found");
163
- return u.createElement(n, C({}, r));
164
- };
165
- ne.isSideCarExport = !0;
166
- function Re(e, t) {
167
- return e.useMedium(t), ne;
168
- }
169
- var ae = ke(), Y = function() {
170
- }, j = u.forwardRef(function(e, t) {
171
- var r = u.useRef(null), n = u.useState({
172
- onScrollCapture: Y,
173
- onWheelCapture: Y,
174
- onTouchMoveCapture: Y
175
- }), a = n[0], o = n[1], l = e.forwardProps, c = e.children, p = e.className, m = e.removeScrollBar, v = e.enabled, s = e.shards, d = e.sideCar, y = e.noIsolation, w = e.inert, i = e.allowPinchZoom, f = e.as, g = f === void 0 ? "div" : f, b = e.gapMode, S = re(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = d, h = be([r, t]), k = C(C({}, S), a);
176
- return u.createElement(
177
- u.Fragment,
178
- null,
179
- v && u.createElement(E, { sideCar: ae, removeScrollBar: m, shards: s, noIsolation: y, inert: w, setCallbacks: o, allowPinchZoom: !!i, lockRef: r, gapMode: b }),
180
- l ? u.cloneElement(u.Children.only(c), C(C({}, k), { ref: h })) : u.createElement(g, C({}, k, { className: p, ref: h }), c)
181
- );
182
- });
183
- j.defaultProps = {
184
- enabled: !0,
185
- removeScrollBar: !0,
186
- inert: !1
187
- };
188
- j.classNames = {
189
- fullWidth: D,
190
- zeroRight: O
191
- };
192
- var Ae = function() {
193
- if (typeof __webpack_nonce__ != "undefined")
194
- return __webpack_nonce__;
195
- };
196
- function Me() {
197
- if (!document)
198
- return null;
199
- var e = document.createElement("style");
200
- e.type = "text/css";
201
- var t = Ae();
202
- return t && e.setAttribute("nonce", t), e;
203
- }
204
- function Pe(e, t) {
205
- e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
206
- }
207
- function We(e) {
208
- var t = document.head || document.getElementsByTagName("head")[0];
209
- t.appendChild(e);
210
- }
211
- var xe = function() {
212
- var e = 0, t = null;
213
- return {
214
- add: function(r) {
215
- e == 0 && (t = Me()) && (Pe(t, r), We(t)), e++;
216
- },
217
- remove: function() {
218
- e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
219
- }
220
- };
221
- }, Be = function() {
222
- var e = xe();
223
- return function(t, r) {
224
- u.useEffect(function() {
225
- return e.add(t), function() {
226
- e.remove();
227
- };
228
- }, [t && r]);
229
- };
230
- }, oe = function() {
231
- var e = Be(), t = function(r) {
232
- var n = r.styles, a = r.dynamic;
233
- return e(n, a), null;
234
- };
235
- return t;
236
- }, Le = {
237
- left: 0,
238
- top: 0,
239
- right: 0,
240
- gap: 0
241
- }, V = function(e) {
242
- return parseInt(e || "", 10) || 0;
243
- }, Ne = function(e) {
244
- var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], n = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
245
- return [V(r), V(n), V(a)];
246
- }, Te = function(e) {
247
- if (e === void 0 && (e = "margin"), typeof window == "undefined")
248
- return Le;
249
- var t = Ne(e), r = document.documentElement.clientWidth, n = window.innerWidth;
250
- return {
251
- left: t[0],
252
- top: t[1],
253
- right: t[2],
254
- gap: Math.max(0, n - r + t[2] - t[0])
255
- };
256
- }, Ie = oe(), P = "data-scroll-locked", Oe = function(e, t, r, n) {
257
- var a = e.left, o = e.top, l = e.right, c = e.gap;
258
- return r === void 0 && (r = "margin"), `
259
- .`.concat(pe, ` {
260
- overflow: hidden `).concat(n, `;
261
- padding-right: `).concat(c, "px ").concat(n, `;
262
- }
263
- body[`).concat(P, `] {
264
- overflow: hidden `).concat(n, `;
265
- overscroll-behavior: contain;
266
- `).concat([
267
- t && "position: relative ".concat(n, ";"),
268
- r === "margin" && `
269
- padding-left: `.concat(a, `px;
270
- padding-top: `).concat(o, `px;
271
- padding-right: `).concat(l, `px;
272
- margin-left:0;
273
- margin-top:0;
274
- margin-right: `).concat(c, "px ").concat(n, `;
275
- `),
276
- r === "padding" && "padding-right: ".concat(c, "px ").concat(n, ";")
277
- ].filter(Boolean).join(""), `
278
- }
279
-
280
- .`).concat(O, ` {
281
- right: `).concat(c, "px ").concat(n, `;
282
- }
283
-
284
- .`).concat(D, ` {
285
- margin-right: `).concat(c, "px ").concat(n, `;
286
- }
287
-
288
- .`).concat(O, " .").concat(O, ` {
289
- right: 0 `).concat(n, `;
290
- }
291
-
292
- .`).concat(D, " .").concat(D, ` {
293
- margin-right: 0 `).concat(n, `;
294
- }
295
-
296
- body[`).concat(P, `] {
297
- `).concat(ye, ": ").concat(c, `px;
298
- }
299
- `);
300
- }, $ = function() {
301
- var e = parseInt(document.body.getAttribute(P) || "0", 10);
302
- return isFinite(e) ? e : 0;
303
- }, De = function() {
304
- u.useEffect(function() {
305
- return document.body.setAttribute(P, ($() + 1).toString()), function() {
306
- var e = $() - 1;
307
- e <= 0 ? document.body.removeAttribute(P) : document.body.setAttribute(P, e.toString());
308
- };
309
- }, []);
310
- }, je = function(e) {
311
- var t = e.noRelative, r = e.noImportant, n = e.gapMode, a = n === void 0 ? "margin" : n;
312
- De();
313
- var o = u.useMemo(function() {
314
- return Te(a);
315
- }, [a]);
316
- return u.createElement(Ie, { styles: Oe(o, !t, a, r ? "" : "!important") });
317
- }, z = !1;
318
- if (typeof window != "undefined")
319
- try {
320
- var L = Object.defineProperty({}, "passive", {
321
- get: function() {
322
- return z = !0, !0;
323
- }
324
- });
325
- window.addEventListener("test", L, L), window.removeEventListener("test", L, L);
326
- } catch (e) {
327
- z = !1;
328
- }
329
- var R = z ? { passive: !1 } : !1, Xe = function(e) {
330
- return e.tagName === "TEXTAREA";
331
- }, ce = function(e, t) {
332
- if (!(e instanceof Element))
333
- return !1;
334
- var r = window.getComputedStyle(e);
335
- return (
336
- // not-not-scrollable
337
- r[t] !== "hidden" && // contains scroll inside self
338
- !(r.overflowY === r.overflowX && !Xe(e) && r[t] === "visible")
339
- );
340
- }, Ye = function(e) {
341
- return ce(e, "overflowY");
342
- }, Ve = function(e) {
343
- return ce(e, "overflowX");
344
- }, J = function(e, t) {
345
- var r = t.ownerDocument, n = t;
346
- do {
347
- typeof ShadowRoot != "undefined" && n instanceof ShadowRoot && (n = n.host);
348
- var a = ie(e, n);
349
- if (a) {
350
- var o = ue(e, n), l = o[1], c = o[2];
351
- if (l > c)
352
- return !0;
353
- }
354
- n = n.parentNode;
355
- } while (n && n !== r.body);
356
- return !1;
357
- }, He = function(e) {
358
- var t = e.scrollTop, r = e.scrollHeight, n = e.clientHeight;
359
- return [
360
- t,
361
- r,
362
- n
363
- ];
364
- }, ze = function(e) {
365
- var t = e.scrollLeft, r = e.scrollWidth, n = e.clientWidth;
366
- return [
367
- t,
368
- r,
369
- n
370
- ];
371
- }, ie = function(e, t) {
372
- return e === "v" ? Ye(t) : Ve(t);
373
- }, ue = function(e, t) {
374
- return e === "v" ? He(t) : ze(t);
375
- }, Fe = function(e, t) {
376
- return e === "h" && t === "rtl" ? -1 : 1;
377
- }, Ze = function(e, t, r, n, a) {
378
- var o = Fe(e, window.getComputedStyle(t).direction), l = o * n, c = r.target, p = t.contains(c), m = !1, v = l > 0, s = 0, d = 0;
379
- do {
380
- var y = ue(e, c), w = y[0], i = y[1], f = y[2], g = i - f - o * w;
381
- (w || g) && ie(e, c) && (s += g, d += w), c instanceof ShadowRoot ? c = c.host : c = c.parentNode;
382
- } while (
383
- // portaled content
384
- !p && c !== document.body || // self content
385
- p && (t.contains(c) || t === c)
386
- );
387
- return (v && Math.abs(s) < 1 || !v && Math.abs(d) < 1) && (m = !0), m;
388
- }, N = function(e) {
389
- return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
390
- }, ee = function(e) {
391
- return [e.deltaX, e.deltaY];
392
- }, te = function(e) {
393
- return e && "current" in e ? e.current : e;
394
- }, _e = function(e, t) {
395
- return e[0] === t[0] && e[1] === t[1];
396
- }, Qe = function(e) {
397
- return `
398
- .block-interactivity-`.concat(e, ` {pointer-events: none;}
399
- .allow-interactivity-`).concat(e, ` {pointer-events: all;}
400
- `);
401
- }, Ge = 0, A = [];
402
- function Ke(e) {
403
- var t = u.useRef([]), r = u.useRef([0, 0]), n = u.useRef(), a = u.useState(Ge++)[0], o = u.useState(oe)[0], l = u.useRef(e);
404
- u.useEffect(function() {
405
- l.current = e;
406
- }, [e]), u.useEffect(function() {
407
- if (e.inert) {
408
- document.body.classList.add("block-interactivity-".concat(a));
409
- var i = ge([e.lockRef.current], (e.shards || []).map(te), !0).filter(Boolean);
410
- return i.forEach(function(f) {
411
- return f.classList.add("allow-interactivity-".concat(a));
412
- }), function() {
413
- document.body.classList.remove("block-interactivity-".concat(a)), i.forEach(function(f) {
414
- return f.classList.remove("allow-interactivity-".concat(a));
415
- });
416
- };
417
- }
418
- }, [e.inert, e.lockRef.current, e.shards]);
419
- var c = u.useCallback(function(i, f) {
420
- if ("touches" in i && i.touches.length === 2 || i.type === "wheel" && i.ctrlKey)
421
- return !l.current.allowPinchZoom;
422
- var g = N(i), b = r.current, S = "deltaX" in i ? i.deltaX : b[0] - g[0], E = "deltaY" in i ? i.deltaY : b[1] - g[1], h, k = i.target, W = Math.abs(S) > Math.abs(E) ? "h" : "v";
423
- if ("touches" in i && W === "h" && k.type === "range")
424
- return !1;
425
- var x = J(W, k);
426
- if (!x)
427
- return !0;
428
- if (x ? h = W : (h = W === "v" ? "h" : "v", x = J(W, k)), !x)
429
- return !1;
430
- if (!n.current && "changedTouches" in i && (S || E) && (n.current = h), !h)
431
- return !0;
432
- var F = n.current || h;
433
- return Ze(F, f, i, F === "h" ? S : E);
434
- }, []), p = u.useCallback(function(i) {
435
- var f = i;
436
- if (!(!A.length || A[A.length - 1] !== o)) {
437
- var g = "deltaY" in f ? ee(f) : N(f), b = t.current.filter(function(h) {
438
- return h.name === f.type && (h.target === f.target || f.target === h.shadowParent) && _e(h.delta, g);
439
- })[0];
440
- if (b && b.should) {
441
- f.cancelable && f.preventDefault();
442
- return;
443
- }
444
- if (!b) {
445
- var S = (l.current.shards || []).map(te).filter(Boolean).filter(function(h) {
446
- return h.contains(f.target);
447
- }), E = S.length > 0 ? c(f, S[0]) : !l.current.noIsolation;
448
- E && f.cancelable && f.preventDefault();
449
- }
450
- }
451
- }, []), m = u.useCallback(function(i, f, g, b) {
452
- var S = { name: i, delta: f, target: g, should: b, shadowParent: qe(g) };
453
- t.current.push(S), setTimeout(function() {
454
- t.current = t.current.filter(function(E) {
455
- return E !== S;
456
- });
457
- }, 1);
458
- }, []), v = u.useCallback(function(i) {
459
- r.current = N(i), n.current = void 0;
460
- }, []), s = u.useCallback(function(i) {
461
- m(i.type, ee(i), i.target, c(i, e.lockRef.current));
462
- }, []), d = u.useCallback(function(i) {
463
- m(i.type, N(i), i.target, c(i, e.lockRef.current));
464
- }, []);
465
- u.useEffect(function() {
466
- return A.push(o), e.setCallbacks({
467
- onScrollCapture: s,
468
- onWheelCapture: s,
469
- onTouchMoveCapture: d
470
- }), document.addEventListener("wheel", p, R), document.addEventListener("touchmove", p, R), document.addEventListener("touchstart", v, R), function() {
471
- A = A.filter(function(i) {
472
- return i !== o;
473
- }), document.removeEventListener("wheel", p, R), document.removeEventListener("touchmove", p, R), document.removeEventListener("touchstart", v, R);
474
- };
475
- }, []);
476
- var y = e.removeScrollBar, w = e.inert;
477
- return u.createElement(
478
- u.Fragment,
479
- null,
480
- w ? u.createElement(o, { styles: Qe(a) }) : null,
481
- y ? u.createElement(je, { gapMode: e.gapMode }) : null
482
- );
483
- }
484
- function qe(e) {
485
- for (var t = null; e !== null; )
486
- e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
487
- return t;
488
- }
489
- const Ue = Re(ae, Ke);
490
- var $e = u.forwardRef(function(e, t) {
491
- return u.createElement(j, C({}, e, { ref: t, sideCar: Ue }));
492
- });
493
- $e.classNames = j.classNames;
494
- var Je = function(e) {
495
- if (typeof document == "undefined")
496
- return null;
497
- var t = Array.isArray(e) ? e[0] : e;
498
- return t.ownerDocument.body;
499
- }, M = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), I = {}, H = 0, le = function(e) {
500
- return e && (e.host || le(e.parentNode));
501
- }, et = function(e, t) {
502
- return t.map(function(r) {
503
- if (e.contains(r))
504
- return r;
505
- var n = le(r);
506
- return n && e.contains(n) ? n : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
507
- }).filter(function(r) {
508
- return !!r;
509
- });
510
- }, tt = function(e, t, r, n) {
511
- var a = et(t, Array.isArray(e) ? e : [e]);
512
- I[r] || (I[r] = /* @__PURE__ */ new WeakMap());
513
- var o = I[r], l = [], c = /* @__PURE__ */ new Set(), p = new Set(a), m = function(s) {
514
- !s || c.has(s) || (c.add(s), m(s.parentNode));
515
- };
516
- a.forEach(m);
517
- var v = function(s) {
518
- !s || p.has(s) || Array.prototype.forEach.call(s.children, function(d) {
519
- if (c.has(d))
520
- v(d);
521
- else
522
- try {
523
- var y = d.getAttribute(n), w = y !== null && y !== "false", i = (M.get(d) || 0) + 1, f = (o.get(d) || 0) + 1;
524
- M.set(d, i), o.set(d, f), l.push(d), i === 1 && w && T.set(d, !0), f === 1 && d.setAttribute(r, "true"), w || d.setAttribute(n, "true");
525
- } catch (g) {
526
- console.error("aria-hidden: cannot operate on ", d, g);
527
- }
528
- });
529
- };
530
- return v(t), c.clear(), H++, function() {
531
- l.forEach(function(s) {
532
- var d = M.get(s) - 1, y = o.get(s) - 1;
533
- M.set(s, d), o.set(s, y), d || (T.has(s) || s.removeAttribute(n), T.delete(s)), y || s.removeAttribute(r);
534
- }), H--, H || (M = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), I = {});
535
- };
536
- }, it = function(e, t, r) {
537
- r === void 0 && (r = "data-aria-hidden");
538
- var n = Array.from(Array.isArray(e) ? e : [e]), a = Je(e);
539
- return a ? (n.push.apply(n, Array.from(a.querySelectorAll("[aria-live]"))), tt(n, a, r, "aria-hidden")) : function() {
540
- return null;
541
- };
542
- };
543
- const rt = u.forwardRef(
544
- (a, n) => {
545
- var o = a, { children: e, className: t } = o, r = q(o, ["children", "className"]);
546
- return /* @__PURE__ */ he("div", K(G({ ref: n, className: me("ui-kit fixed left-0 top-0", t) }, r), { children: e }));
547
- }
548
- );
549
- rt.displayName = "IsolatedStylesWrapper";
550
- export {
551
- rt as I,
552
- $e as R,
553
- it as h
554
- };
555
- //# sourceMappingURL=IsolatedStylesWrapper-B_Qu75eR.js.map