@internxt/ui 0.1.11 → 0.1.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 (104) hide show
  1. package/dist/components/{list → data-display/list}/List.d.ts +1 -1
  2. package/dist/components/{list → data-display/list}/ListHeader.d.ts +1 -1
  3. package/dist/components/{list → data-display/list}/ListItem.d.ts +1 -1
  4. package/dist/components/index.d.ts +30 -30
  5. package/dist/components/mail/cheaps/MessageCheap.d.ts +1 -1
  6. package/dist/components/mail/tray/TrayList.d.ts +1 -1
  7. package/dist/components/{dropdown → navigation/dropdown}/Dropdown.d.ts +1 -1
  8. package/dist/components/{contextMenu → overlay/contextMenu}/ContextMenu.d.ts +1 -1
  9. package/dist/index.cjs.js +44 -44
  10. package/dist/index.cjs.js.map +1 -1
  11. package/dist/index.es.js +1814 -1814
  12. package/dist/index.es.js.map +1 -1
  13. package/dist/stories/components/avatar/Avatar.stories.d.ts +1 -1
  14. package/dist/stories/components/baseDialog/BaseDialog.stories.d.ts +1 -1
  15. package/dist/stories/components/breadcrumbs/breadcrumbs.stories.d.ts +1 -1
  16. package/dist/stories/components/button/Button.stories.d.ts +1 -1
  17. package/dist/stories/components/buttonCircle/ButtonCircle.stories.d.ts +1 -1
  18. package/dist/stories/components/card/Card.stories.d.ts +1 -1
  19. package/dist/stories/components/checkbox/Checkbox.stories.d.ts +1 -1
  20. package/dist/stories/components/copyable/Copyable.stories.d.ts +1 -1
  21. package/dist/stories/components/dialog/Dialog.stories.d.ts +1 -1
  22. package/dist/stories/components/dropdown/Dropdown.stories.d.ts +1 -1
  23. package/dist/stories/components/empty/Empty.stories.d.ts +1 -1
  24. package/dist/stories/components/header/Header.stories.d.ts +1 -1
  25. package/dist/stories/components/infiniteScroll/InfiniteScroll.stories.d.ts +1 -1
  26. package/dist/stories/components/input/Input.stories.d.ts +1 -1
  27. package/dist/stories/components/list/List.stories.d.ts +1 -1
  28. package/dist/stories/components/loader/Loader.stories.d.ts +1 -1
  29. package/dist/stories/components/menu/Menu.stories.d.ts +1 -1
  30. package/dist/stories/components/modal/Modal.stories.d.ts +1 -1
  31. package/dist/stories/components/modalTransparent/TransparentModal.stories.d.ts +1 -1
  32. package/dist/stories/components/popover/Popover.stories.d.ts +1 -1
  33. package/dist/stories/components/radioButton/RadioButton.stories.d.ts +1 -1
  34. package/dist/stories/components/sidenav/Sidenav.stories.d.ts +1 -1
  35. package/dist/stories/components/skeletonLoader/SkeletonLoader.stories.d.ts +1 -1
  36. package/dist/stories/components/slider/RangeSlider.stories.d.ts +1 -1
  37. package/dist/stories/components/switch/Switch.stories.d.ts +1 -1
  38. package/dist/stories/components/textArea/TextArea.stories.d.ts +1 -1
  39. package/dist/stories/components/tooltip/Tooltip.stories.d.ts +1 -1
  40. package/package.json +1 -1
  41. /package/dist/components/{avatar → data-display/avatar}/Avatar.d.ts +0 -0
  42. /package/dist/components/{avatar → data-display/avatar}/components/DefaultAvatar.d.ts +0 -0
  43. /package/dist/components/{avatar → data-display/avatar}/components/PictureAvatar.d.ts +0 -0
  44. /package/dist/components/{avatar → data-display/avatar}/index.d.ts +0 -0
  45. /package/dist/components/{card → data-display/card}/Card.d.ts +0 -0
  46. /package/dist/components/{card → data-display/card}/index.d.ts +0 -0
  47. /package/dist/components/{list → data-display/list}/index.d.ts +0 -0
  48. /package/dist/components/{table → data-display/table}/Table.d.ts +0 -0
  49. /package/dist/components/{table → data-display/table}/index.d.ts +0 -0
  50. /package/dist/components/{empty → feedback/empty}/Empty.d.ts +0 -0
  51. /package/dist/components/{empty → feedback/empty}/index.d.ts +0 -0
  52. /package/dist/components/{loader → feedback/loader}/Loader.d.ts +0 -0
  53. /package/dist/components/{loader → feedback/loader}/index.d.ts +0 -0
  54. /package/dist/components/{skeletonLoader → feedback/skeletonLoader}/SkeletonLoader.d.ts +0 -0
  55. /package/dist/components/{skeletonLoader → feedback/skeletonLoader}/index.d.ts +0 -0
  56. /package/dist/components/{button → input/button}/Button.d.ts +0 -0
  57. /package/dist/components/{button → input/button}/index.d.ts +0 -0
  58. /package/dist/components/{buttonCircle → input/buttonCircle}/CircleButton.d.ts +0 -0
  59. /package/dist/components/{buttonCircle → input/buttonCircle}/index.d.ts +0 -0
  60. /package/dist/components/{checkbox → input/checkbox}/Checkbox.d.ts +0 -0
  61. /package/dist/components/{checkbox → input/checkbox}/index.d.ts +0 -0
  62. /package/dist/components/{copyable → input/copyable}/Copyable.d.ts +0 -0
  63. /package/dist/components/{copyable → input/copyable}/index.d.ts +0 -0
  64. /package/dist/components/input/{Input.d.ts → input/Input.d.ts} +0 -0
  65. /package/dist/components/input/{index.d.ts → input/index.d.ts} +0 -0
  66. /package/dist/components/{radioButton → input/radioButton}/RadioButton.d.ts +0 -0
  67. /package/dist/components/{radioButton → input/radioButton}/index.d.ts +0 -0
  68. /package/dist/components/{slider → input/slider}/RangeSlider.d.ts +0 -0
  69. /package/dist/components/{slider → input/slider}/index.d.ts +0 -0
  70. /package/dist/components/{switch → input/switch}/Switch.d.ts +0 -0
  71. /package/dist/components/{switch → input/switch}/index.d.ts +0 -0
  72. /package/dist/components/{textArea → input/textArea}/TextArea.d.ts +0 -0
  73. /package/dist/components/{textArea → input/textArea}/index.d.ts +0 -0
  74. /package/dist/components/{header → layout/header}/Header.d.ts +0 -0
  75. /package/dist/components/{header → layout/header}/index.d.ts +0 -0
  76. /package/dist/components/{infiniteScroll → layout/infiniteScroll}/InfiniteScroll.d.ts +0 -0
  77. /package/dist/components/{infiniteScroll → layout/infiniteScroll}/index.d.ts +0 -0
  78. /package/dist/components/{breadcrumbs → navigation/breadcrumbs}/Breadcrumbs.d.ts +0 -0
  79. /package/dist/components/{breadcrumbs → navigation/breadcrumbs}/BreadcrumbsItem.d.ts +0 -0
  80. /package/dist/components/{breadcrumbs → navigation/breadcrumbs}/index.d.ts +0 -0
  81. /package/dist/components/{dropdown → navigation/dropdown}/index.d.ts +0 -0
  82. /package/dist/components/{menu → navigation/menu}/Menu.d.ts +0 -0
  83. /package/dist/components/{menu → navigation/menu}/index.d.ts +0 -0
  84. /package/dist/components/{sidenav → navigation/sidenav}/Sidenav.d.ts +0 -0
  85. /package/dist/components/{sidenav → navigation/sidenav}/SidenavHeader.d.ts +0 -0
  86. /package/dist/components/{sidenav → navigation/sidenav}/SidenavItem.d.ts +0 -0
  87. /package/dist/components/{sidenav → navigation/sidenav}/SidenavOptions.d.ts +0 -0
  88. /package/dist/components/{sidenav → navigation/sidenav}/SidenavStorage.d.ts +0 -0
  89. /package/dist/components/{sidenav → navigation/sidenav}/index.d.ts +0 -0
  90. /package/dist/components/{suiteLauncher → navigation/suiteLauncher}/SuiteLauncher.d.ts +0 -0
  91. /package/dist/components/{suiteLauncher → navigation/suiteLauncher}/index.d.ts +0 -0
  92. /package/dist/components/{baseDialog → overlay/baseDialog}/BaseDialog.d.ts +0 -0
  93. /package/dist/components/{baseDialog → overlay/baseDialog}/index.d.ts +0 -0
  94. /package/dist/components/{contextMenu → overlay/contextMenu}/index.d.ts +0 -0
  95. /package/dist/components/{dialog → overlay/dialog}/Dialog.d.ts +0 -0
  96. /package/dist/components/{dialog → overlay/dialog}/index.d.ts +0 -0
  97. /package/dist/components/{modal → overlay/modal}/Modal.d.ts +0 -0
  98. /package/dist/components/{modal → overlay/modal}/index.d.ts +0 -0
  99. /package/dist/components/{modalTransparent → overlay/modalTransparent}/TransparentModal.d.ts +0 -0
  100. /package/dist/components/{modalTransparent → overlay/modalTransparent}/index.d.ts +0 -0
  101. /package/dist/components/{popover → overlay/popover}/Popover.d.ts +0 -0
  102. /package/dist/components/{popover → overlay/popover}/index.d.ts +0 -0
  103. /package/dist/components/{tooltip → overlay/tooltip}/Tooltip.d.ts +0 -0
  104. /package/dist/components/{tooltip → overlay/tooltip}/index.d.ts +0 -0
package/dist/index.es.js CHANGED
@@ -1,8 +1,8 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.loader-container{width:100%;height:90%}.loader06{position:absolute;left:49%;top:50%}.loader06:before{content:"";border:4px solid rgba(0,82,236,.5);border-radius:50%;width:67.2px;height:67.2px;position:absolute;top:-9.6px;left:-9.6px;animation:loader-scale 1s ease-out infinite;animation-delay:1s;opacity:0}.loader06:after{content:"";border:4px solid #0052ec;border-radius:50%;width:56px;height:56px;position:absolute;top:-4px;left:-4px;animation:loader-scale 1s ease-out infinite;animation-delay:.5s}.loader-text{position:absolute;top:calc(50% + 3rem);left:50%;transform:translate(-50%)}@keyframes loader-scale{0%{transform:scale(0);opacity:0}50%{opacity:1}to{transform:scale(1);opacity:0}}.custom-range-slider{width:100%;height:6px;background-color:#fff;border-radius:50%;outline:none;position:relative}input[type=range]{position:relative;-webkit-appearance:none;-moz-appearance:none;appearance:none;display:block;width:"100%";background:#d5d5d5;border-radius:16px;outline:none}input[type=range]::-webkit-slider-runnable-track{-webkit-appearance:none;height:6px}input[type=range]::-moz-track{appearance:none;height:6px}input[type=range]::-ms-track{appearance:none;height:6px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;height:24px;width:24px;background-color:#3264fe;border-radius:50%;pointer-events:auto;cursor:pointer;margin-top:-9px;border:none}input[type=range]::-moz-range-thumb{appearance:none;height:24px;width:24px;background-color:#3264fe;border-radius:50%;pointer-events:auto;cursor:pointer;margin-top:-9px;border:none}input[type=range]::-ms-thumb{appearance:none;height:24px;width:24px;background-color:#3264fe;border-radius:50%;pointer-events:auto;cursor:pointer;margin-top:-9px;border:none}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
2
  import { jsx as f, jsxs as R, Fragment as mn } from "react/jsx-runtime";
3
- import { X as $a, CaretRight as S0, DotsThree as Da, CaretUp as I0, Warning as Oa, Copy as A0, Eye as T0, EyeSlash as E0, MagnifyingGlass as L0, WarningOctagon as R0, CheckCircle as $0, ArrowUp as D0, ArrowDown as O0, LockIcon as k0, DotsNineIcon as M0, SidebarSimpleIcon as Aa } from "@phosphor-icons/react";
4
3
  import * as Ir from "react";
5
- import Ta, { useState as ue, useRef as en, useEffect as Ce, forwardRef as P0, isValidElement as ka, cloneElement as B0 } from "react";
4
+ import Aa, { useEffect as Ce, useState as ue, isValidElement as $a, useRef as en, forwardRef as S0, cloneElement as I0 } from "react";
5
+ import { DotsThree as Da, ArrowUp as A0, ArrowDown as T0, CaretUp as E0, Warning as Oa, Copy as L0, Eye as R0, EyeSlash as $0, MagnifyingGlass as D0, X as ka, WarningOctagon as O0, CheckCircle as k0, CaretRight as M0, LockIcon as P0, DotsNineIcon as B0, SidebarSimpleIcon as Ta } from "@phosphor-icons/react";
6
6
  function W0({
7
7
  fullName: s,
8
8
  diameter: g,
@@ -64,915 +64,21 @@ const H0 = {
64
64
  }) => {
65
65
  const w = l ? H0[l] : g;
66
66
  return s ? /* @__PURE__ */ f(U0, { src: s, diameter: w, className: p, style: N }) : /* @__PURE__ */ f(W0, { diameter: w, className: p, fullName: x });
67
- }, vp = ({
68
- isOpen: s,
69
- title: g,
70
- subTitle: l,
71
- dialogRounded: p,
72
- children: x,
73
- onClose: N,
74
- classes: w,
75
- panelClasses: C,
76
- titleClasses: A,
77
- closeClass: D,
78
- weightIcon: O,
79
- bgColor: T,
80
- dataTest: M,
81
- hideCloseButton: z
82
- }) => /* @__PURE__ */ f(
67
+ }, vp = ({ className: s = "", children: g }) => /* @__PURE__ */ f(
83
68
  "div",
84
69
  {
85
- "data-test": M,
86
- className: `${s ? "flex" : "hidden"} ${w || ""} absolute bottom-0 left-0 right-0 top-0 z-50 bg-black/40`,
87
- children: /* @__PURE__ */ R(
88
- "div",
89
- {
90
- className: `${C || ""} absolute left-1/2 top-1/2 flex w-104 -translate-x-1/2
91
- -translate-y-1/2 flex-col overflow-hidden ${p ? "rounded-2xl" : "rounded-lg pt-8"} text-gray-100 ${T || "bg-surface"}`,
92
- children: [
93
- /* @__PURE__ */ R("div", { className: `${l ? "justify-between bg-gray-1 p-5" : ""} flex flex-row items-start`, children: [
94
- g ? /* @__PURE__ */ R("div", { className: "relative flex max-w-full flex-1 flex-col truncate", children: [
95
- /* @__PURE__ */ f("span", { className: `${A || ""} truncate text-xl`, title: g, children: g }),
96
- /* @__PURE__ */ f("span", { className: "max-w-fit flex-1 truncate text-base font-normal text-gray-50", children: l })
97
- ] }) : null,
98
- z ? null : /* @__PURE__ */ f(
99
- "div",
100
- {
101
- className: `relative ml-auto cursor-pointer bg-surface
102
- transition duration-200 ease-in-out ${D || "text-primary hover:text-primary-dark"} `,
103
- children: /* @__PURE__ */ f($a, { role: "button", onClick: N, size: 28, weight: O })
104
- }
105
- )
106
- ] }),
107
- x
108
- ]
109
- }
110
- )
70
+ className: `rounded-xl border border-gray-10 bg-surface p-5 shadow-[0_12px_20px_0_rgba(0,0,0,0.02)] dark:bg-gray-1 ${s}`,
71
+ children: g
111
72
  }
112
- ), z0 = (s) => {
113
- const g = s.match(/px-(\d+(\.\d+)?)/), l = s.match(/py-(\d+(\.\d+)?)/), p = g ? g[1] : void 0, x = l ? l[1] : void 0;
114
- return { px: p, py: x };
115
- }, G0 = ({
116
- children: s,
117
- options: g,
118
- classButton: l,
119
- menuItems: p,
120
- classMenuItems: x,
121
- openDirection: N,
122
- dropdownActionsContext: w,
123
- item: C = {}
124
- }) => {
125
- const [A, D] = ue(!1), O = N === "left" ? "origin-top-left" : "origin-top-right", T = en(null);
126
- Ce(() => {
127
- const ie = (se) => {
128
- T.current && !T.current.contains(se.target) && D(!1);
129
- };
130
- return document.addEventListener("mousedown", ie), document.addEventListener("contextmenu", ie), () => {
131
- document.removeEventListener("mousedown", ie), document.removeEventListener("contextmenu", ie);
132
- };
133
- }, []);
134
- const M = g ? g.map((ie) => ({
135
- name: ie.text,
136
- action: () => ie.onClick()
137
- })) : [], z = p ? p.map((ie) => ({
138
- node: ie
139
- })) : [], W = w || [], ne = [...M, ...z, ...W], S = () => D((ie) => !ie), E = () => D(!1), { px: j, py: V } = z0(x);
140
- return /* @__PURE__ */ R("div", { className: "relative outline-none min-w-breadcrumb", ref: T, children: [
141
- /* @__PURE__ */ f(
142
- "button",
143
- {
144
- className: `cursor-pointer outline-none ${l}`,
145
- onClick: S,
146
- "aria-expanded": A,
147
- "aria-haspopup": "menu",
148
- children: typeof s == "function" ? s({ open: A }) : s
149
- }
150
- ),
151
- /* @__PURE__ */ f(
152
- "div",
153
- {
154
- className: `absolute ${N === "left" ? "left-0" : "right-0"}
155
- transform shadow-subtle-hard transition-all duration-100 ease-in-out ${A ? `scale-100 opacity-100 ${O}` : "pointer-events-none scale-95 opacity-0"}`,
156
- "data-testid": "menu-dropdown",
157
- children: /* @__PURE__ */ f("div", { className: `absolute ${x}`, children: /* @__PURE__ */ f(Ba, { item: C, isOpen: A, handleMenuClose: E, menu: ne, paddingX: j, paddingY: V }) })
158
- }
159
- )
160
- ] });
161
- }, Ea = (s) => {
162
- const [{ isOver: g, canDrop: l }, p] = s.useDrop(
163
- () => ({
164
- accept: s.acceptedTypes,
165
- collect: (w) => ({
166
- isOver: w.isOver(),
167
- canDrop: w.canDrop()
168
- }),
169
- canDrop: s.canItemDrop(s.item),
170
- drop: s.onItemDropped(
171
- s.item,
172
- s.namePath,
173
- s.isSomeItemSelected,
174
- s.selectedItems,
175
- s.dispatch
176
- )
177
- }),
178
- [s.selectedItems]
179
- ), x = (w) => {
180
- w.active && w.onClick && w.onClick();
181
- }, N = g && l ? "drag-over-effect" : "";
182
- return /* @__PURE__ */ f(mn, { children: !s.item.active && !s.item.dialog && s.menu ? /* @__PURE__ */ f(s.menu, { item: s.item, items: s.items, onItemClicked: x }) : /* @__PURE__ */ R(
183
- "div",
184
- {
185
- ref: p,
186
- className: `flex ${s.isHiddenInList ? "w-full" : "max-w-fit"} ${s.item.isFirstPath ? "shrink-0 pr-1" : "min-w-breadcrumb flex-1 px-1.5 py-1.5"} cursor-pointer flex-row items-center truncate font-medium ${N}
187
- ${!s.item.active || s.item.isFirstPath && s.totalBreadcrumbsLength === 1 ? "text-gray-80" : "text-gray-50 hover:text-gray-80"}`,
188
- onClick: () => x(s.item),
189
- onKeyDown: () => {
190
- },
191
- "data-cy": s?.breadcrumbButtonDataCy,
192
- children: [
193
- s.itemComponent && /* @__PURE__ */ f(s.itemComponent, { className: "h-5 w-5" }),
194
- s.item.icon ? s.item.icon : null,
195
- s.item.label ? /* @__PURE__ */ f(
196
- "span",
197
- {
198
- className: `max-w-sm flex-1 cursor-pointer truncate ${s.isHiddenInList && "pl-3 text-base"}`,
199
- title: s.item.label,
200
- children: s.item.label
201
- }
202
- ) : null
203
- ]
204
- },
205
- s.item.uuid
206
- ) });
207
- }, xp = (s) => {
208
- const g = P0((p, x) => /* @__PURE__ */ f(
209
- "div",
210
- {
211
- ref: x,
212
- className: "flex cursor-pointer items-center hover:bg-gray-5 hover:text-gray-80 dark:hover:bg-gray-10",
213
- children: p.children
214
- }
215
- ));
216
- return /* @__PURE__ */ f("div", { className: "flex w-full items-center", children: (() => {
217
- const p = s.items, x = [], N = [], w = (C) => /* @__PURE__ */ f("div", { className: "text-dgray-50 flex items-center", children: /* @__PURE__ */ f(S0, { weight: "bold", className: "h-4 w-4", "data-testid": "caret-right" }) }, C);
218
- for (let C = 0; C < p.length; C++) {
219
- const A = "breadcrumbSeparator-" + p[C].uuid + C.toString(), D = "breadcrumbItem-" + p[C].uuid + C.toString();
220
- p.length > 3 && C !== 0 && C < p.length - 2 ? (C === 1 && x.push(w(A)), N.push(
221
- /* @__PURE__ */ f(g, { children: /* @__PURE__ */ f(
222
- Ea,
223
- {
224
- item: p[C],
225
- isHiddenInList: !0,
226
- totalBreadcrumbsLength: p.length,
227
- items: p,
228
- namePath: s.namePath,
229
- isSomeItemSelected: s.isSomeItemSelected,
230
- selectedItems: s.selectedItems,
231
- onItemDropped: s.onItemDropped,
232
- canItemDrop: s.canItemDrop,
233
- itemComponent: s.itemComponent,
234
- acceptedTypes: s.acceptedTypes,
235
- dispatch: s.dispatch,
236
- useDrop: s.useDrop
237
- },
238
- D
239
- ) })
240
- )) : (x.push(
241
- /* @__PURE__ */ f(
242
- Ea,
243
- {
244
- breadcrumbButtonDataCy: C === 0 ? s?.rootBreadcrumbItemDataCy : void 0,
245
- item: p[C],
246
- totalBreadcrumbsLength: p.length,
247
- items: p,
248
- menu: s.menu,
249
- namePath: s.namePath,
250
- isSomeItemSelected: s.isSomeItemSelected,
251
- selectedItems: s.selectedItems,
252
- onItemDropped: s.onItemDropped,
253
- canItemDrop: s.canItemDrop,
254
- acceptedTypes: s.acceptedTypes,
255
- dispatch: s.dispatch,
256
- useDrop: s.useDrop
257
- },
258
- D
259
- )
260
- ), C < p.length - 1 && x.push(w(A)));
261
- }
262
- if (N.length > 0) {
263
- const C = /* @__PURE__ */ f(
264
- G0,
265
- {
266
- openDirection: "left",
267
- classMenuItems: `left-0 top-1 w-max max-h-80 overflow-y-auto
268
- rounded-md border border-gray-10 bg-surface dark:bg-gray-5 shadow-subtle-hard z-10`,
269
- menuItems: N,
270
- children: ({ open: A }) => /* @__PURE__ */ f(
271
- "div",
272
- {
273
- className: `flex h-8 w-8 items-center justify-center
274
- rounded-full text-gray-60 transition-all duration-75 ease-in-out hover:bg-gray-5 hover:text-gray-80 ${A ? "bg-gray-5" : ""}`,
275
- children: /* @__PURE__ */ f(Da, { weight: "bold", className: "h-5 w-5" })
276
- }
277
- )
278
- },
279
- "breadcrumbDropdownItems"
280
- );
281
- x.splice(2, 0, C);
282
- }
283
- return x;
284
- })() });
285
- }, K0 = ({
286
- classNameContainer: s,
287
- classNameLoader: g,
288
- classNameText: l,
289
- type: p = "spinner",
290
- text: x,
291
- size: N = 32
292
- }) => /* @__PURE__ */ f("div", { className: s, children: p === "spinner" ? /* @__PURE__ */ R(mn, { children: [
293
- /* @__PURE__ */ R(
294
- "svg",
295
- {
296
- className: `animate-spin ${g}`,
297
- width: N,
298
- height: N,
299
- xmlns: "http://www.w3.org/2000/svg",
300
- fill: "none",
301
- viewBox: "0 0 24 24",
302
- role: "img",
303
- children: [
304
- /* @__PURE__ */ f("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
305
- /* @__PURE__ */ f(
306
- "path",
307
- {
308
- className: "opacity-75",
309
- fill: "currentColor",
310
- d: `M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824
311
- 3 7.938l3-2.647z`
312
- }
313
- )
314
- ]
315
- }
316
- ),
317
- x && /* @__PURE__ */ f("p", { className: l, children: x })
318
- ] }) : /* @__PURE__ */ R("div", { className: `loader-container ${g}`, children: [
319
- /* @__PURE__ */ f("div", { className: "loader06" }),
320
- x && /* @__PURE__ */ f("p", { className: `loader-text ${l}`, children: x })
321
- ] }) }), Xi = ({
322
- variant: s = "primary",
323
- type: g = "button",
324
- id: l,
325
- children: p,
326
- className: x = "",
327
- disabled: N = !1,
328
- onClick: w = () => {
329
- },
330
- onKeyDown: C = () => {
331
- },
332
- size: A = "default",
333
- loading: D,
334
- dataTest: O,
335
- autofocus: T,
336
- buttonDataCy: M,
337
- buttonChildrenDataCy: z
338
- }) => {
339
- let W = "";
340
- return s === "primary" && !N ? W = `${D ? "bg-primary-dark" : "bg-primary"} active:bg-primary-dark text-white shadow-sm` : s === "primary" && N ? W = "bg-gray-30 text-white shadow-sm" : s === "destructive" && !N ? W = `${D ? "bg-red-dark" : "bg-red"} active:bg-red-dark text-white shadow-sm` : s === "destructive" && N ? W = "bg-gray-30 text-white shadow-sm" : s === "secondary" && !N ? W = "bg-surface dark:bg-gray-5 border border-gray-10 hover:border-gray-20 active:bg-gray-1 dark:active:bg-gray-10 text-gray-80 shadow-sm" : s === "secondary" && N ? W = "bg-surface dark:bg-gray-5 text-gray-30 border border-gray-5 shadow-sm" : s === "ghost" && !N ? W = "hover:bg-gray-5 active:bg-gray-10 focus-visible:bg-gray-10" : s === "ghost" && N ? W = "text-gray-30" : s === "tertiary" && !N ? W = `${D ? "bg-white/45" : "bg-white/15"} active:bg-white/25 text-white shadow-sm border border-white/20 active:border-white hover:border-white/40 active:border-white
341
- transition-all duration-200` : s === "tertiary" && N && (W = "bg-white/45 text-white shadow-sm border border-white/20"), /* @__PURE__ */ R(
342
- "button",
343
- {
344
- "data-cy": M,
345
- id: l,
346
- onClick: w,
347
- onKeyDown: C,
348
- disabled: N || D,
349
- type: g,
350
- "data-test": O,
351
- autoFocus: T,
352
- className: `${A === "default" ? "h-10 px-5" : "h-8 px-3.5"} relative flex shrink-0 select-none flex-row items-center justify-center space-x-2
353
- whitespace-nowrap rounded-lg text-base font-medium outline-none ring-2 ring-primary/0
354
- ring-offset-2 ring-offset-transparent transition-all duration-100 ease-in-out
355
- focus-visible:ring-primary/50 ${W} ${x}`,
356
- children: [
357
- D && /* @__PURE__ */ f(K0, { size: 18 }),
358
- /* @__PURE__ */ f("div", { className: "flex items-center justify-center space-x-2", "data-cy": z, children: p })
359
- ]
360
- }
361
- );
362
- }, wp = ({
363
- children: s,
364
- variant: g = "default",
365
- active: l = !1,
366
- onClick: p,
367
- onClickToggleButton: x,
368
- className: N = "",
369
- dropdown: w,
370
- indicator: C,
371
- isOpen: A = !1,
372
- handleOpen: D = () => {
373
- },
374
- handleClose: O = () => {
375
- }
376
- }) => {
377
- Ce(() => {
378
- const S = (E) => {
379
- if (A) {
380
- const j = E.target, V = document.querySelector(`[data-circle-button="${g}"]`);
381
- V && !V.contains(j) && O();
382
- }
383
- };
384
- return document.addEventListener("click", S), () => {
385
- document.removeEventListener("click", S);
386
- };
387
- }, [A, g]);
388
- const T = (S) => {
389
- S.stopPropagation(), w && (x?.(), A ? O() : D());
390
- }, M = () => {
391
- p?.();
392
- }, z = () => {
393
- switch (g) {
394
- case "cancel":
395
- return "bg-red hover:bg-red/85";
396
- case "warning":
397
- return l ? "bg-white/85" : "bg-white/25 hover:bg-white/35";
398
- default:
399
- return l ? "bg-white/85" : "bg-white/25 hover:bg-white/35";
400
- }
401
- }, W = () => C ? g === "warning" ? /* @__PURE__ */ f("div", { className: "absolute -top-1 -right-1 h-5 w-5 bg-orange border border-black/35 rounded-full flex items-center justify-center", children: /* @__PURE__ */ f(Oa, { size: 12, color: "black", weight: "bold" }) }) : /* @__PURE__ */ f(
402
- "div",
403
- {
404
- className: `absolute -top-1 -right-1 h-5 w-5 flex items-center justify-center rounded-full ${C.className || ""}`,
405
- children: C.icon
406
- }
407
- ) : null, ne = () => !w || g === "cancel" || g === "warning" ? null : /* @__PURE__ */ f(
408
- "button",
409
- {
410
- onClick: T,
411
- className: "absolute -top-1 -right-1 h-5 w-5 border bg-white border-black/35 rounded-full flex items-center justify-center hover:bg-gray-50",
412
- children: /* @__PURE__ */ f(I0, { size: 10, color: "black", weight: "fill" })
413
- }
414
- );
415
- return /* @__PURE__ */ R("div", { className: "relative w-11 h-11", "data-circle-button": g, children: [
416
- /* @__PURE__ */ f(
417
- "button",
418
- {
419
- onClick: M,
420
- className: `
421
- h-11 w-11
422
- flex items-center justify-center
423
- rounded-full
424
- transition-all duration-200
425
- ${z()}
426
- ${N}
427
- `,
428
- children: s
429
- }
430
- ),
431
- ne(),
432
- W(),
433
- A && w && g !== "cancel" && /* @__PURE__ */ f("div", { className: "absolute bottom-full mb-2 left-0", children: w })
434
- ] });
435
- }, _p = ({ className: s = "", children: g }) => /* @__PURE__ */ f(
436
- "div",
437
- {
438
- className: `rounded-xl border border-gray-10 bg-surface p-5 shadow-[0_12px_20px_0_rgba(0,0,0,0.02)] dark:bg-gray-1 ${s}`,
439
- children: g
440
- }
441
- ), q0 = (s) => /* @__PURE__ */ Ir.createElement("svg", { fill: "none", height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...s }, /* @__PURE__ */ Ir.createElement("path", { d: "m8.85955 15c.38202 0 .67978-.1461.88202-.4551l5.23593-8.00557c.1461-.22472.2079-.43259.2079-.62922 0-.52809-.3933-.91011-.9326-.91011-.3708 0-.6011.13483-.8258.48876l-4.59554 7.24724-2.33146-2.8933c-.20787-.24719-.43259-.35955-.74719-.35955-.54495 0-.9382.38764-.9382.91575 0 .2359.07303.4438.27528.6741l2.89887 3.5113c.24158.2865.51124.4157.87079.4157z", fill: "currentColor" })), Y0 = (s) => /* @__PURE__ */ Ir.createElement("svg", { fill: "none", height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...s }, /* @__PURE__ */ Ir.createElement("rect", { fill: "currentColor", height: 2, rx: 1, width: 12, x: 4, y: 9 })), Pa = ({
442
- id: s,
443
- checked: g = !0,
444
- indeterminate: l = !1,
445
- onClick: p,
446
- required: x,
447
- className: N,
448
- checkboxDataCy: w,
449
- disabled: C = !1
450
- }) => /* @__PURE__ */ R(
451
- "label",
452
- {
453
- className: `relative h-5 w-5 rounded focus-within:outline-primary ${N}`,
454
- onClick: C ? void 0 : p,
455
- onKeyDown: () => {
456
- },
457
- children: [
458
- /* @__PURE__ */ f(
459
- "div",
460
- {
461
- onClick: (A) => A.preventDefault(),
462
- "data-cy": w,
463
- onKeyDown: () => {
464
- },
465
- className: `relative flex h-5 w-5 cursor-pointer flex-col items-center justify-center rounded border text-white ${C ? l || g ? "bg-gray-20 cursor-auto" : "border-gray-10 cursor-auto" : l || g ? "border-primary bg-primary" : "border-gray-30 hover:border-gray-40"}`,
466
- children: l ? /* @__PURE__ */ f(Y0, { className: "absolute -inset-px" }) : g && /* @__PURE__ */ f(q0, { className: "absolute -inset-px" })
467
- }
468
- ),
469
- /* @__PURE__ */ f(
470
- "input",
471
- {
472
- id: s,
473
- checked: g,
474
- type: "checkbox",
475
- required: x ?? !1,
476
- readOnly: !0,
477
- className: "base-checkbox h-0 w-0 appearance-none opacity-0",
478
- disabled: C
479
- }
480
- )
481
- ]
482
- }
483
- ), Ji = (s, g = []) => {
484
- const l = (p) => {
485
- if (["input", "textarea"].includes(document.activeElement?.tagName.toLowerCase() ?? "") && p.key.toLowerCase() !== "escape")
486
- return;
487
- const N = `${p.ctrlKey ? "ctrl+" : ""}${p.metaKey ? "meta+" : ""}${p.key.toLowerCase()}`;
488
- s[N] && (p.preventDefault(), s[N]());
489
- };
490
- Ce(() => (window.addEventListener("keydown", l), () => {
491
- window.removeEventListener("keydown", l);
492
- }), g);
493
- }, Ba = ({
494
- item: s,
495
- menu: g,
496
- isOpen: l,
497
- genericEnterKey: p,
498
- handleMenuClose: x,
499
- paddingX: N = "px-4",
500
- paddingY: w = "py-1.5"
501
- }) => {
502
- const [C, A] = ue(null), [D, O] = ue(!1), T = (S) => {
503
- A(S);
504
- }, M = (S) => S?.separator || s && S?.disabled?.(s) || s && S?.isTitle?.(s), z = () => {
505
- g && l && A((S) => {
506
- const E = (se) => {
507
- let fe = se, ge = g[fe];
508
- for (; M(ge) && (fe = (fe + 1) % g.length, ge = g[fe], se !== fe); )
509
- ;
510
- return fe;
511
- }, j = S === null ? 0 : (S + 1) % g.length, V = E(j), ie = g[V];
512
- return M(ie) ? null : V;
513
- });
514
- }, W = () => {
515
- g && l && A((S) => {
516
- const E = (se) => {
517
- let fe = se, ge = g[fe];
518
- for (; M(ge) && (fe = (fe - 1 + g.length) % g.length, ge = g[fe], se !== fe); )
519
- ;
520
- return fe;
521
- }, j = S === null ? g.length - 1 : (S - 1 + g.length) % g.length, V = E(j), ie = g[V];
522
- return M(ie) ? null : V;
523
- });
524
- }, ne = () => {
525
- g && l && A((S) => {
526
- if (S !== null) {
527
- const E = g ? g[S] : void 0;
528
- if (s && E && "action" in E && E.action && E.action(s), s && E && "node" in E && E.node && ka(E.node)) {
529
- const j = E.node.props.onClick;
530
- j && j();
531
- }
532
- } else p && p();
533
- return O(!0), null;
534
- });
535
- };
536
- return Ce(() => {
537
- D && (x(), O(!1));
538
- }, [D]), Ji(
539
- {
540
- arrowdown: z,
541
- arrowup: W,
542
- enter: ne
543
- },
544
- [l]
545
- ), /* @__PURE__ */ f("div", { className: `z-20 mt-0 flex flex-col rounded-lg bg-surface ${w} outline-none dark:bg-gray-5`, children: g?.map((S, E) => /* @__PURE__ */ f("div", { children: S && S.separator ? /* @__PURE__ */ f("div", { className: "my-0.5 flex w-full flex-row px-4", children: /* @__PURE__ */ f("div", { className: "h-px w-full bg-gray-10" }) }) : S && /* @__PURE__ */ f(
546
- "div",
547
- {
548
- className: `${M(S) ? "pointer-events-none" : ""}`,
549
- onClick: (j) => {
550
- M(S) || (j.stopPropagation(), s && S.action?.(s), S.onClick && S.onClick(), x());
551
- },
552
- onMouseEnter: () => T(E),
553
- children: /* @__PURE__ */ R(
554
- "div",
555
- {
556
- className: `flex cursor-pointer flex-row whitespace-nowrap ${N} ${w} text-base
557
- ${s && S.disabled?.(s) && "font-medium text-gray-50"}
558
- ${s && S.isTitle?.(s) && !S.disabled?.(s) && "font-medium text-gray-100"}
559
- ${C === E && s && !S.disabled?.(s) && "bg-gray-5 text-gray-100 dark:bg-gray-10"}
560
- ${s && !S.disabled?.(s) && !S.isTitle?.(s) && C !== E && "text-gray-80"}
561
- `,
562
- children: [
563
- S.node ? S.node : /* @__PURE__ */ R("div", { className: "flex flex-row items-center space-x-2", children: [
564
- S.icon && /* @__PURE__ */ f(S.icon, { size: 20 }),
565
- /* @__PURE__ */ f("span", { children: S.name })
566
- ] }),
567
- S.keyboardShortcutOptions && /* @__PURE__ */ R("span", { className: "ml-5 flex grow items-center justify-end text-sm text-gray-40", children: [
568
- S.keyboardShortcutOptions?.keyboardShortcutIcon && /* @__PURE__ */ f(S.keyboardShortcutOptions.keyboardShortcutIcon, { size: 14 }),
569
- S.keyboardShortcutOptions?.keyboardShortcutText ?? ""
570
- ] })
571
- ]
572
- }
573
- )
574
- }
575
- ) }, E)) });
576
- }, Z0 = 40, X0 = ({
577
- item: s,
578
- menuItemsRef: g,
579
- menu: l,
580
- openedFromRightClick: p,
581
- posX: x,
582
- posY: N,
583
- isContextMenuCutOff: w,
584
- isOpen: C,
585
- genericEnterKey: A,
586
- handleMenuClose: D
587
- }) => /* @__PURE__ */ f(
588
- "div",
589
- {
590
- className: "z-20 mt-0 flex flex-col rounded-lg bg-surface py-1.5 shadow-subtle-hard outline-none dark:bg-gray-5",
591
- style: p ? { position: "absolute", left: x, top: N, zIndex: 99 } : {
592
- position: "absolute",
593
- right: 20,
594
- [w ? "bottom" : "top"]: Z0,
595
- zIndex: 9999
596
- },
597
- ref: g,
598
- children: /* @__PURE__ */ f(
599
- Ba,
600
- {
601
- item: s,
602
- isOpen: C,
603
- genericEnterKey: A,
604
- handleMenuClose: D,
605
- menu: l
606
- }
607
- )
608
- }
609
- ), J0 = ({
610
- children: s,
611
- title: g,
612
- subtitle: l,
613
- popsFrom: p,
614
- className: x,
615
- delayInMs: N,
616
- arrow: w = !0
617
- }) => {
618
- const [C, A] = ue(!1), D = en(null);
619
- function O() {
620
- A(!0);
621
- }
622
- function T() {
623
- A(!1);
624
- }
625
- function M() {
626
- D.current !== null && clearTimeout(D.current), O();
627
- }
628
- function z() {
629
- N ? D.current = setTimeout(() => {
630
- D.current = null, T();
631
- }, N) : T();
632
- }
633
- let W = "", ne = "", S = "";
634
- switch (p) {
635
- case "right":
636
- W = "left-full top-1/2 -translate-y-1/2 ml-1.5", ne = "flex-row-reverse", S = "polygon(100% 0%, 100% 100%, 0% 50%)";
637
- break;
638
- case "left":
639
- W = "right-full top-1/2 -translate-y-1/2 mr-1.5", ne = "flex-row", S = "polygon(0% 0%, 0% 100%, 100% 50%)";
640
- break;
641
- case "top":
642
- W = "bottom-full left-1/2 -translate-x-1/2 mb-1.5 origin-bottom", ne = "flex-col", S = "polygon(0% 0%, 100% 0%, 50% 100%)";
643
- break;
644
- case "bottom":
645
- W = "top-full left-1/2 -translate-x-1/2 mt-1.5", ne = "flex-col-reverse", S = "polygon(50% 0%, 0% 100%, 100% 100%)";
646
- break;
647
- }
648
- return /* @__PURE__ */ R(
649
- "div",
650
- {
651
- className: `relative w-max ${x}`,
652
- onMouseEnter: M,
653
- onMouseLeave: z,
654
- style: { lineHeight: 0 },
655
- children: [
656
- /* @__PURE__ */ R(
657
- "div",
658
- {
659
- className: `pointer-events-none absolute ${W} flex items-center ${ne} drop-shadow-tooltip transition-all duration-150 ${C ? "scale-100 opacity-100" : "scale-50 opacity-0"}`,
660
- children: [
661
- /* @__PURE__ */ R("div", { className: "w-max rounded-lg bg-gray-90 px-4 py-1.5 text-center dark:bg-gray-5", children: [
662
- /* @__PURE__ */ f("p", { className: "text-base text-white", children: g }),
663
- l && /* @__PURE__ */ f("p", { className: "-mt-1 text-sm text-gray-40", children: l })
664
- ] }),
665
- w && /* @__PURE__ */ f(
666
- "div",
667
- {
668
- className: `bg-gray-90 dark:bg-gray-5 ${p === "bottom" || p === "top" ? "h-1.5 w-4" : "h-4 w-1.5"}`,
669
- style: { clipPath: S, marginTop: p === "top" ? "-1px" : void 0 },
670
- "data-testid": "tooltip-arrow"
671
- }
672
- )
673
- ]
674
- }
675
- ),
676
- s
677
- ]
678
- }
679
- );
680
- }, yp = ({
681
- className: s = "",
682
- classText: g = "select-text text-gray-80",
683
- text: l,
684
- copiedText: p = "Copied!",
685
- copyToClipboardText: x = "Copy to clipboard"
686
- }) => {
687
- const [N, w] = ue(!1);
688
- async function C() {
689
- await navigator.clipboard.writeText(l), w(!0), setTimeout(() => w(!1), 1e3);
690
- }
691
- return /* @__PURE__ */ R(
692
- "div",
693
- {
694
- className: `${s} flex h-11 items-center justify-between rounded-md border border-gray-10 bg-gray-5 px-4`,
695
- children: [
696
- /* @__PURE__ */ f("p", { className: `${g}`, children: l }),
697
- /* @__PURE__ */ f(
698
- J0,
699
- {
700
- className: "ml-6",
701
- popsFrom: "bottom",
702
- title: N ? p : x,
703
- delayInMs: N ? 500 : void 0,
704
- children: /* @__PURE__ */ f("button", { disabled: N, onClick: C, children: /* @__PURE__ */ f(A0, { className: "shrink-0 text-gray-50 hover:text-gray-60", size: 24 }) })
705
- }
706
- )
707
- ]
708
- }
709
- );
710
- }, bp = ({
711
- isOpen: s,
712
- onClose: g,
713
- onPrimaryAction: l,
714
- onSecondaryAction: p,
715
- title: x,
716
- subtitle: N,
717
- primaryAction: w,
718
- secondaryAction: C,
719
- primaryActionColor: A,
720
- isLoading: D,
721
- maxWidth: O = "sm"
722
- }) => {
723
- const [T, M] = ue(s), [z, W] = ue("opacity-0"), [ne, S] = ue("scale-95");
724
- return Ce(() => {
725
- if (s) {
726
- const E = setTimeout(() => {
727
- W("opacity-100"), S("scale-100");
728
- }, 10);
729
- return M(!0), () => clearTimeout(E);
730
- } else {
731
- W("opacity-0"), S("scale-95");
732
- const E = setTimeout(() => {
733
- M(!1);
734
- }, 150);
735
- return () => clearTimeout(E);
736
- }
737
- }, [s]), Ce(() => {
738
- const E = (j) => {
739
- j.key === "Escape" && g();
740
- };
741
- return s && window.addEventListener("keydown", E), () => {
742
- window.removeEventListener("keydown", E);
743
- };
744
- }, [s, g]), /* @__PURE__ */ f(mn, { children: T && /* @__PURE__ */ R("div", { className: `fixed inset-0 z-50 ${s ? "" : "pointer-events-none"}`, children: [
745
- /* @__PURE__ */ f(
746
- "div",
747
- {
748
- className: `absolute inset-0 bg-gray-100/50 transition-opacity duration-150 dark:bg-black/75 ${z}`,
749
- onClick: g,
750
- "data-testid": "dialog-overlay"
751
- }
752
- ),
753
- /* @__PURE__ */ R(
754
- "div",
755
- {
756
- className: `absolute left-1/2 top-1/2 w-full max-w-${O} -translate-x-1/2 -translate-y-1/2 transform rounded-2xl bg-surface p-5 transition-all duration-150 dark:bg-gray-1 ${ne} ${z}`,
757
- children: [
758
- /* @__PURE__ */ R("div", { className: "flex flex-col space-y-2", children: [
759
- /* @__PURE__ */ f("p", { className: "text-2xl font-medium text-gray-100", children: x }),
760
- /* @__PURE__ */ f("p", { className: "text-gray-60", children: N })
761
- ] }),
762
- /* @__PURE__ */ R("div", { className: "mt-5 flex justify-end space-x-2", children: [
763
- /* @__PURE__ */ f(Xi, { variant: "secondary", onClick: p, disabled: D, children: C }),
764
- /* @__PURE__ */ f(
765
- Xi,
766
- {
767
- onClick: l,
768
- loading: D,
769
- variant: A === "primary" ? "primary" : "destructive",
770
- children: w
771
- }
772
- )
773
- ] })
774
- ]
775
- }
776
- )
777
- ] }) });
778
- }, Np = ({ icon: s, title: g, subtitle: l, action: p, contextMenuClick: x }) => {
779
- let N = null;
780
- return p && (N = /* @__PURE__ */ R(Xi, { variant: "secondary", onClick: p.onClick, children: [
781
- /* @__PURE__ */ f("span", { children: p.text }),
782
- /* @__PURE__ */ f(p.icon, { size: 20 })
783
- ] })), /* @__PURE__ */ f("div", { className: "h-full w-full p-8", onContextMenu: x, children: /* @__PURE__ */ R("div", { className: "flex h-full flex-col items-center justify-center space-y-6 pb-20", children: [
784
- /* @__PURE__ */ f("div", { className: "pointer-events-none mx-auto w-max", children: s }),
785
- /* @__PURE__ */ R("div", { className: "pointer-events-none space-y-1 text-center", children: [
786
- /* @__PURE__ */ f("p", { className: "text-2xl font-medium text-gray-100", children: g }),
787
- /* @__PURE__ */ f("p", { className: "text-lg text-gray-60", children: l })
788
- ] }),
789
- N
790
- ] }) });
791
- }, Cp = ({ leftContent: s, rightContent: g, className: l = "" }) => /* @__PURE__ */ R(
792
- "header",
793
- {
794
- className: `
795
- flex
796
- items-center
797
- justify-between
798
- ${l}
799
- `,
800
- children: [
801
- /* @__PURE__ */ f("div", { className: "flex items-center space-x-4", children: s }),
802
- /* @__PURE__ */ f("div", { className: "flex items-center space-x-4", children: g })
803
- ]
804
- }
805
- ), Wa = ({
806
- children: s,
807
- handleNextPage: g,
808
- hasMoreItems: l,
809
- loader: p,
810
- scrollableTarget: x,
811
- classNameLoader: N
812
- }) => {
813
- const w = en(null), C = en(null), [A, D] = ue(!1);
814
- Ce(() => {
815
- x && (C.current = document.getElementById(x));
816
- const T = new IntersectionObserver(
817
- ([z]) => {
818
- z.isIntersecting && (l ? (g(), D(!0)) : D(!1));
819
- },
820
- {
821
- root: C.current || null,
822
- rootMargin: "100px",
823
- threshold: 0
824
- }
825
- ), M = w.current;
826
- return M && T.observe(M), () => {
827
- M && T.unobserve(M);
828
- };
829
- }, [l, g, x]);
830
- const O = Ta.Children.map(s, (T, M) => M === Ta.Children.count(s) - 1 && l ? /* @__PURE__ */ R(mn, { children: [
831
- T,
832
- /* @__PURE__ */ f("div", { ref: w, className: N, children: A && p })
833
- ] }) : T);
834
- return /* @__PURE__ */ f("div", { children: O });
835
- }, Sp = ({
836
- className: s = "",
837
- label: g,
838
- variant: l = "default",
839
- accent: p,
840
- disabled: x,
841
- placeholder: N,
842
- value: w,
843
- maxLength: C,
844
- onChange: A,
845
- onClear: D,
846
- message: O,
847
- onFocus: T,
848
- onBlur: M,
849
- autofocus: z = !1,
850
- autoComplete: W = "on",
851
- dataTest: ne,
852
- name: S,
853
- required: E = !1,
854
- labelDataCy: j,
855
- inputDataCy: V,
856
- onKeyDown: ie,
857
- inputClassName: se = "",
858
- borderRadius: fe = "rounded-md",
859
- fontClasses: ge = "text-lg font-normal"
860
- }) => {
861
- const we = en(null), nn = () => {
862
- we && we.current && (l !== "email" && (we.current.selectionStart = we.current.value.length, we.current.selectionEnd = we.current.value.length), we.current.focus());
863
- };
864
- Ce(() => {
865
- (O || z) && nn();
866
- }, [O, z, x]);
867
- let Ae;
868
- switch (p) {
869
- case "error":
870
- Ae = "border-red focus:border-red ring-red";
871
- break;
872
- case "warning":
873
- Ae = "focus:border-orange ring-orange";
874
- break;
875
- case "success":
876
- Ae = "focus:border-green ring-green";
877
- break;
878
- default:
879
- Ae = "focus:border-primary ring-primary";
880
- break;
881
- }
882
- const tn = l === "search" ? "border-transparent" : "border-gray-20 disabled:border-gray-10 hover:border-gray-30", vn = l === "search" ? "placeholder-gray-40" : "placeholder-gray-30", Fn = l === "search" ? "pr-4 pl-10" : "px-4", [rn, Un] = ue(!1), [Ke, Oe] = ue(!1), _e = /* @__PURE__ */ R("div", { className: "relative", children: [
883
- /* @__PURE__ */ f(
884
- "input",
885
- {
886
- ref: we,
887
- disabled: x,
888
- className: `inxt-input h-10 w-full border bg-transparent ${ge} text-gray-80 outline-none ring-opacity-10 focus:ring-3 disabled:text-gray-40 disabled:placeholder-gray-20 dark:ring-opacity-20
889
- ${tn} ${Ae} ${vn} ${Fn} ${fe} ${se}`,
890
- type: l === "password" && !rn ? "password" : l === "email" ? "email" : "text",
891
- placeholder: N,
892
- onChange: (le) => A && A(le.target.value),
893
- onFocus: () => {
894
- T && T(), Oe(!0);
895
- },
896
- onBlur: () => {
897
- M && M(), Oe(!1);
898
- },
899
- autoComplete: W,
900
- value: w,
901
- maxLength: C,
902
- "data-test": ne,
903
- "data-cy": V,
904
- name: S,
905
- required: E,
906
- onKeyDown: ie ?? void 0
907
- }
908
- ),
909
- l === "password" && Ke && /* @__PURE__ */ f(
910
- "div",
911
- {
912
- role: "button",
913
- tabIndex: 0,
914
- onMouseDown: (le) => {
915
- le.preventDefault(), Un(!rn);
916
- },
917
- className: "absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer bg-transparent py-2 pl-2 text-gray-80",
918
- children: rn ? /* @__PURE__ */ f(T0, { size: 24 }) : /* @__PURE__ */ f(E0, { size: 24 })
919
- }
920
- ),
921
- l === "search" && /* @__PURE__ */ f(
922
- L0,
923
- {
924
- className: `absolute left-4 top-1/2 -translate-y-1/2 ${x ? "text-gray-20" : "text-gray-40"}`,
925
- size: 20
926
- }
927
- ),
928
- l === "search" && w && !x && /* @__PURE__ */ f(
929
- "div",
930
- {
931
- role: "button",
932
- tabIndex: 0,
933
- onMouseDown: (le) => {
934
- le.preventDefault(), D && D();
935
- },
936
- className: `absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer py-2 pl-2 text-gray-40
937
- ${Ke ? "bg-white" : "bg-gray-5"}`,
938
- children: /* @__PURE__ */ f($a, { size: 20 })
939
- }
940
- )
941
- ] });
942
- let fn, Z;
943
- switch (p) {
944
- case "success":
945
- fn = "text-green", Z = $0;
946
- break;
947
- case "warning":
948
- fn = "text-orange", Z = Oa;
949
- break;
950
- case "error":
951
- fn = "text-red", Z = R0;
952
- break;
953
- default:
954
- fn = "text-gray-80";
955
- }
956
- return /* @__PURE__ */ R("div", { className: `${s}`, children: [
957
- g ? /* @__PURE__ */ R("label", { children: [
958
- /* @__PURE__ */ f("span", { "data-cy": j, className: `text-sm ${x ? "text-gray-40" : "text-gray-80"}`, children: g }),
959
- _e
960
- ] }) : _e,
961
- C && /* @__PURE__ */ f("p", { className: "font-regular mt-1 text-right text-sm text-gray-50", children: `${w?.length ?? 0}/${C}` }),
962
- O && /* @__PURE__ */ R("div", { className: `mt-0.5 flex items-center ${fn}`, children: [
963
- Z && /* @__PURE__ */ f(Z, { size: 16, weight: "fill" }),
964
- /* @__PURE__ */ f("p", { className: "ml-1 text-sm", children: O })
965
- ] })
966
- ] });
967
- };
73
+ );
968
74
  var Sr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
969
- function Q0(s) {
75
+ function z0(s) {
970
76
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
971
77
  }
972
78
  var kt = { exports: {} };
973
- var V0 = kt.exports, La;
974
- function j0() {
975
- return La || (La = 1, function(s, g) {
79
+ var G0 = kt.exports, Ea;
80
+ function K0() {
81
+ return Ea || (Ea = 1, function(s, g) {
976
82
  (function() {
977
83
  var l, p = "4.17.23", x = 200, N = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", w = "Expected a function", C = "Invalid `variable` option passed into `_.template`", A = "__lodash_hash_undefined__", D = 500, O = "__lodash_placeholder__", T = 1, M = 2, z = 4, W = 1, ne = 2, S = 1, E = 2, j = 4, V = 8, ie = 16, se = 32, fe = 64, ge = 128, we = 256, nn = 512, Ae = 30, tn = "...", vn = 800, Fn = 16, rn = 1, Un = 2, Ke = 3, Oe = 1 / 0, _e = 9007199254740991, fn = 17976931348623157e292, Z = NaN, le = 4294967295, Tn = le - 1, cn = le >>> 1, Hn = [
978
84
  ["ary", ge],
@@ -4632,979 +3738,1873 @@ function print() { __p += __j.call(arguments, '') }
4632
3738
  var a = this.value();
4633
3739
  return n.apply(H(a) ? a : [], i);
4634
3740
  }
4635
- return this[t](function(o) {
4636
- return n.apply(H(o) ? o : [], i);
4637
- });
4638
- };
4639
- }), dn(J.prototype, function(e, n) {
4640
- var t = u[n];
4641
- if (t) {
4642
- var r = t.name + "";
4643
- te.call(st, r) || (st[r] = []), st[r].push({ name: n, func: t });
3741
+ return this[t](function(o) {
3742
+ return n.apply(H(o) ? o : [], i);
3743
+ });
3744
+ };
3745
+ }), dn(J.prototype, function(e, n) {
3746
+ var t = u[n];
3747
+ if (t) {
3748
+ var r = t.name + "";
3749
+ te.call(st, r) || (st[r] = []), st[r].push({ name: n, func: t });
3750
+ }
3751
+ }), st[fr(l, E).name] = [{
3752
+ name: "wrapper",
3753
+ func: l
3754
+ }], J.prototype.clone = Ps, J.prototype.reverse = Bs, J.prototype.value = Ws, u.prototype.at = ph, u.prototype.chain = mh, u.prototype.commit = vh, u.prototype.next = xh, u.prototype.plant = _h, u.prototype.reverse = yh, u.prototype.toJSON = u.prototype.valueOf = u.prototype.value = bh, u.prototype.first = u.prototype.head, yt && (u.prototype[yt] = wh), u;
3755
+ }, ut = ms();
3756
+ Kn ? ((Kn.exports = ut)._ = ut, Gr._ = ut) : Se._ = ut;
3757
+ }).call(G0);
3758
+ }(kt, kt.exports)), kt.exports;
3759
+ }
3760
+ var q0 = K0();
3761
+ const Y0 = /* @__PURE__ */ z0(q0), Ji = (s, g = []) => {
3762
+ const l = (p) => {
3763
+ if (["input", "textarea"].includes(document.activeElement?.tagName.toLowerCase() ?? "") && p.key.toLowerCase() !== "escape")
3764
+ return;
3765
+ const N = `${p.ctrlKey ? "ctrl+" : ""}${p.metaKey ? "meta+" : ""}${p.key.toLowerCase()}`;
3766
+ s[N] && (p.preventDefault(), s[N]());
3767
+ };
3768
+ Ce(() => (window.addEventListener("keydown", l), () => {
3769
+ window.removeEventListener("keydown", l);
3770
+ }), g);
3771
+ }, Pa = ({
3772
+ item: s,
3773
+ menu: g,
3774
+ isOpen: l,
3775
+ genericEnterKey: p,
3776
+ handleMenuClose: x,
3777
+ paddingX: N = "px-4",
3778
+ paddingY: w = "py-1.5"
3779
+ }) => {
3780
+ const [C, A] = ue(null), [D, O] = ue(!1), T = (S) => {
3781
+ A(S);
3782
+ }, M = (S) => S?.separator || s && S?.disabled?.(s) || s && S?.isTitle?.(s), z = () => {
3783
+ g && l && A((S) => {
3784
+ const E = (se) => {
3785
+ let fe = se, ge = g[fe];
3786
+ for (; M(ge) && (fe = (fe + 1) % g.length, ge = g[fe], se !== fe); )
3787
+ ;
3788
+ return fe;
3789
+ }, j = S === null ? 0 : (S + 1) % g.length, V = E(j), ie = g[V];
3790
+ return M(ie) ? null : V;
3791
+ });
3792
+ }, W = () => {
3793
+ g && l && A((S) => {
3794
+ const E = (se) => {
3795
+ let fe = se, ge = g[fe];
3796
+ for (; M(ge) && (fe = (fe - 1 + g.length) % g.length, ge = g[fe], se !== fe); )
3797
+ ;
3798
+ return fe;
3799
+ }, j = S === null ? g.length - 1 : (S - 1 + g.length) % g.length, V = E(j), ie = g[V];
3800
+ return M(ie) ? null : V;
3801
+ });
3802
+ }, ne = () => {
3803
+ g && l && A((S) => {
3804
+ if (S !== null) {
3805
+ const E = g ? g[S] : void 0;
3806
+ if (s && E && "action" in E && E.action && E.action(s), s && E && "node" in E && E.node && $a(E.node)) {
3807
+ const j = E.node.props.onClick;
3808
+ j && j();
3809
+ }
3810
+ } else p && p();
3811
+ return O(!0), null;
3812
+ });
3813
+ };
3814
+ return Ce(() => {
3815
+ D && (x(), O(!1));
3816
+ }, [D]), Ji(
3817
+ {
3818
+ arrowdown: z,
3819
+ arrowup: W,
3820
+ enter: ne
3821
+ },
3822
+ [l]
3823
+ ), /* @__PURE__ */ f("div", { className: `z-20 mt-0 flex flex-col rounded-lg bg-surface ${w} outline-none dark:bg-gray-5`, children: g?.map((S, E) => /* @__PURE__ */ f("div", { children: S && S.separator ? /* @__PURE__ */ f("div", { className: "my-0.5 flex w-full flex-row px-4", children: /* @__PURE__ */ f("div", { className: "h-px w-full bg-gray-10" }) }) : S && /* @__PURE__ */ f(
3824
+ "div",
3825
+ {
3826
+ className: `${M(S) ? "pointer-events-none" : ""}`,
3827
+ onClick: (j) => {
3828
+ M(S) || (j.stopPropagation(), s && S.action?.(s), S.onClick && S.onClick(), x());
3829
+ },
3830
+ onMouseEnter: () => T(E),
3831
+ children: /* @__PURE__ */ R(
3832
+ "div",
3833
+ {
3834
+ className: `flex cursor-pointer flex-row whitespace-nowrap ${N} ${w} text-base
3835
+ ${s && S.disabled?.(s) && "font-medium text-gray-50"}
3836
+ ${s && S.isTitle?.(s) && !S.disabled?.(s) && "font-medium text-gray-100"}
3837
+ ${C === E && s && !S.disabled?.(s) && "bg-gray-5 text-gray-100 dark:bg-gray-10"}
3838
+ ${s && !S.disabled?.(s) && !S.isTitle?.(s) && C !== E && "text-gray-80"}
3839
+ `,
3840
+ children: [
3841
+ S.node ? S.node : /* @__PURE__ */ R("div", { className: "flex flex-row items-center space-x-2", children: [
3842
+ S.icon && /* @__PURE__ */ f(S.icon, { size: 20 }),
3843
+ /* @__PURE__ */ f("span", { children: S.name })
3844
+ ] }),
3845
+ S.keyboardShortcutOptions && /* @__PURE__ */ R("span", { className: "ml-5 flex grow items-center justify-end text-sm text-gray-40", children: [
3846
+ S.keyboardShortcutOptions?.keyboardShortcutIcon && /* @__PURE__ */ f(S.keyboardShortcutOptions.keyboardShortcutIcon, { size: 14 }),
3847
+ S.keyboardShortcutOptions?.keyboardShortcutText ?? ""
3848
+ ] })
3849
+ ]
3850
+ }
3851
+ )
3852
+ }
3853
+ ) }, E)) });
3854
+ }, Z0 = 40, X0 = ({
3855
+ item: s,
3856
+ menuItemsRef: g,
3857
+ menu: l,
3858
+ openedFromRightClick: p,
3859
+ posX: x,
3860
+ posY: N,
3861
+ isContextMenuCutOff: w,
3862
+ isOpen: C,
3863
+ genericEnterKey: A,
3864
+ handleMenuClose: D
3865
+ }) => /* @__PURE__ */ f(
3866
+ "div",
3867
+ {
3868
+ className: "z-20 mt-0 flex flex-col rounded-lg bg-surface py-1.5 shadow-subtle-hard outline-none dark:bg-gray-5",
3869
+ style: p ? { position: "absolute", left: x, top: N, zIndex: 99 } : {
3870
+ position: "absolute",
3871
+ right: 20,
3872
+ [w ? "bottom" : "top"]: Z0,
3873
+ zIndex: 9999
3874
+ },
3875
+ ref: g,
3876
+ children: /* @__PURE__ */ f(
3877
+ Pa,
3878
+ {
3879
+ item: s,
3880
+ isOpen: C,
3881
+ genericEnterKey: A,
3882
+ handleMenuClose: D,
3883
+ menu: l
3884
+ }
3885
+ )
3886
+ }
3887
+ ), J0 = (s) => /* @__PURE__ */ Ir.createElement("svg", { fill: "none", height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...s }, /* @__PURE__ */ Ir.createElement("path", { d: "m8.85955 15c.38202 0 .67978-.1461.88202-.4551l5.23593-8.00557c.1461-.22472.2079-.43259.2079-.62922 0-.52809-.3933-.91011-.9326-.91011-.3708 0-.6011.13483-.8258.48876l-4.59554 7.24724-2.33146-2.8933c-.20787-.24719-.43259-.35955-.74719-.35955-.54495 0-.9382.38764-.9382.91575 0 .2359.07303.4438.27528.6741l2.89887 3.5113c.24158.2865.51124.4157.87079.4157z", fill: "currentColor" })), Q0 = (s) => /* @__PURE__ */ Ir.createElement("svg", { fill: "none", height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...s }, /* @__PURE__ */ Ir.createElement("rect", { fill: "currentColor", height: 2, rx: 1, width: 12, x: 4, y: 9 })), Ba = ({
3888
+ id: s,
3889
+ checked: g = !0,
3890
+ indeterminate: l = !1,
3891
+ onClick: p,
3892
+ required: x,
3893
+ className: N,
3894
+ checkboxDataCy: w,
3895
+ disabled: C = !1
3896
+ }) => /* @__PURE__ */ R(
3897
+ "label",
3898
+ {
3899
+ className: `relative h-5 w-5 rounded focus-within:outline-primary ${N}`,
3900
+ onClick: C ? void 0 : p,
3901
+ onKeyDown: () => {
3902
+ },
3903
+ children: [
3904
+ /* @__PURE__ */ f(
3905
+ "div",
3906
+ {
3907
+ onClick: (A) => A.preventDefault(),
3908
+ "data-cy": w,
3909
+ onKeyDown: () => {
3910
+ },
3911
+ className: `relative flex h-5 w-5 cursor-pointer flex-col items-center justify-center rounded border text-white ${C ? l || g ? "bg-gray-20 cursor-auto" : "border-gray-10 cursor-auto" : l || g ? "border-primary bg-primary" : "border-gray-30 hover:border-gray-40"}`,
3912
+ children: l ? /* @__PURE__ */ f(Q0, { className: "absolute -inset-px" }) : g && /* @__PURE__ */ f(J0, { className: "absolute -inset-px" })
3913
+ }
3914
+ ),
3915
+ /* @__PURE__ */ f(
3916
+ "input",
3917
+ {
3918
+ id: s,
3919
+ checked: g,
3920
+ type: "checkbox",
3921
+ required: x ?? !1,
3922
+ readOnly: !0,
3923
+ className: "base-checkbox h-0 w-0 appearance-none opacity-0",
3924
+ disabled: C
3925
+ }
3926
+ )
3927
+ ]
3928
+ }
3929
+ ), V0 = 500, j0 = ({
3930
+ item: s,
3931
+ listIndex: g,
3932
+ itemComposition: l,
3933
+ selected: p,
3934
+ isOpen: x,
3935
+ columnsWidth: N,
3936
+ onClose: w,
3937
+ onSelectedChanged: C,
3938
+ onDoubleClick: A,
3939
+ onClick: D,
3940
+ onClickContextMenu: O,
3941
+ onThreeDotsButtonPressed: T,
3942
+ disableItemCompositionStyles: M,
3943
+ menu: z,
3944
+ onMouseEnter: W,
3945
+ onMouseLeave: ne,
3946
+ genericEnterKey: S
3947
+ }) => {
3948
+ const E = en(), j = en(null), V = en(null), [ie, se] = ue(!1), [fe, ge] = ue(0), [we, nn] = ue(0), [Ae, tn] = ue({ width: 0, height: 0 }), [vn, Fn] = ue(!1);
3949
+ Ce(() => {
3950
+ V.current && (V.current.offsetHeight !== Ae.height || V.current?.offsetWidth !== Ae.width) && tn({
3951
+ width: V.current.offsetWidth,
3952
+ height: V.current.offsetHeight
3953
+ });
3954
+ }, [Ae.height, Ae.width]), Ce(() => {
3955
+ ie || rn(), x || (se(!1), ge(0), nn(0));
3956
+ }, [x]);
3957
+ function rn() {
3958
+ const Z = E.current, le = V?.current?.offsetHeight || 300;
3959
+ if (!Z) return;
3960
+ const { bottom: Tn } = Z.getBoundingClientRect(), cn = window.innerHeight, Hn = Tn + le > cn;
3961
+ Fn(Hn);
3962
+ }
3963
+ const Un = (Z) => {
3964
+ Z.preventDefault(), O?.(Z);
3965
+ const le = V?.current?.offsetWidth || 240, Tn = V?.current?.offsetHeight || 300, cn = j?.current?.getBoundingClientRect(), { innerWidth: Hn, innerHeight: hn } = window;
3966
+ let Le = Z.clientX - (cn?.left || 0), zn = Z.clientY - (cn?.top || 0);
3967
+ Z.clientX + le > Hn && (Le = Le - le), Z.clientY + Tn > hn && Z.clientY > V0 && (zn = zn - Tn), ge(Le), nn(zn), se(!0);
3968
+ }, Ke = (Z) => {
3969
+ Z.preventDefault(), T?.(Z), se(!1);
3970
+ }, Oe = (Z) => {
3971
+ D?.(Z), ie && _e();
3972
+ }, _e = () => {
3973
+ w();
3974
+ };
3975
+ return Ji(
3976
+ {
3977
+ r: _e,
3978
+ backspace: _e,
3979
+ enter: () => {
3980
+ x || S();
3981
+ }
3982
+ },
3983
+ []
3984
+ ), /* @__PURE__ */ R(
3985
+ "div",
3986
+ {
3987
+ onDoubleClick: A,
3988
+ onClick: Oe,
3989
+ onContextMenu: Un,
3990
+ ref: j,
3991
+ className: `group relative flex h-14 flex-row items-center pl-14 pr-5 ${p ? "bg-primary/10 text-gray-100 dark:bg-primary/20" : "focus-within:bg-gray-1 hover:bg-gray-1"} ${x ? "z-40" : ""}`,
3992
+ onMouseEnter: W,
3993
+ onMouseLeave: ne,
3994
+ children: [
3995
+ x && p && /* @__PURE__ */ f(
3996
+ X0,
3997
+ {
3998
+ item: s,
3999
+ menu: z,
4000
+ menuItemsRef: V,
4001
+ openedFromRightClick: ie,
4002
+ isOpen: x,
4003
+ posX: fe,
4004
+ posY: we,
4005
+ isContextMenuCutOff: vn,
4006
+ genericEnterKey: S,
4007
+ handleMenuClose: _e
4008
+ }
4009
+ ),
4010
+ /* @__PURE__ */ f(
4011
+ "div",
4012
+ {
4013
+ className: `absolute left-5 top-0 flex h-full w-0 flex-row items-center justify-start p-0 opacity-0 focus-within:opacity-100 group-hover:opacity-100 ${p && "opacity-100"}`,
4014
+ children: /* @__PURE__ */ f(
4015
+ Ba,
4016
+ {
4017
+ onClick: (Z) => {
4018
+ Z.stopPropagation(), C(!p);
4019
+ },
4020
+ checked: p,
4021
+ checkboxDataCy: `driveListItemCheckbox${g}`
4022
+ }
4023
+ )
4024
+ }
4025
+ ),
4026
+ M ? /* @__PURE__ */ f(
4027
+ "div",
4028
+ {
4029
+ className: `grow-1 relative flex h-full w-full flex-row items-center border-b ${p ? "border-primary/5" : "border-gray-5"}`,
4030
+ children: l[0](s)
4031
+ },
4032
+ 0
4033
+ ) : new Array(l.length).fill(0).map((Z, le) => /* @__PURE__ */ f(
4034
+ "div",
4035
+ {
4036
+ className: `relative flex h-full shrink-0 flex-row items-center border-b ${p ? "border-primary/5" : "border-gray-5"} ${N[le]}`,
4037
+ children: l[le](s)
4038
+ },
4039
+ le
4040
+ )),
4041
+ /* @__PURE__ */ f(
4042
+ "div",
4043
+ {
4044
+ className: `flex h-14 w-12 shrink-0 flex-col items-center justify-center border-b ${p ? "border-primary/5" : "border-gray-5"}`,
4045
+ children: /* @__PURE__ */ f(
4046
+ "button",
4047
+ {
4048
+ ref: E,
4049
+ className: `flex h-10 w-10 flex-col items-center justify-center rounded-md opacity-0 outline-none focus-visible:opacity-100 group-hover:opacity-100 ${p ? "text-gray-80 hover:bg-primary/10 focus-visible:bg-primary/10" : "text-gray-60 hover:bg-gray-10 focus-visible:bg-gray-10"}`,
4050
+ onClick: (Z) => {
4051
+ Ke(Z);
4052
+ },
4053
+ children: /* @__PURE__ */ f(Da, { size: 24, weight: "bold" })
4054
+ }
4055
+ )
4056
+ }
4057
+ )
4058
+ ]
4059
+ }
4060
+ );
4061
+ }, ep = ({
4062
+ selectedItems: s,
4063
+ onTopSelectionCheckboxClick: g,
4064
+ items: l,
4065
+ header: p,
4066
+ orderBy: x,
4067
+ onOrderableColumnClicked: N,
4068
+ menu: w,
4069
+ displayMenuDiv: C,
4070
+ isVerticalScrollbarVisible: A,
4071
+ checkboxDataCy: D,
4072
+ onClose: O
4073
+ }) => /* @__PURE__ */ f("div", { onClick: O, onContextMenu: O, className: "flex min-w-max h-12 shrink-0 flex-row px-5", children: /* @__PURE__ */ R("div", { className: "flex h-full min-w-full flex-row items-center border-b border-gray-10", children: [
4074
+ /* @__PURE__ */ f("div", { className: "flex h-full flex-row items-center justify-between pr-4", children: /* @__PURE__ */ f(
4075
+ Ba,
4076
+ {
4077
+ checked: s.length > 0,
4078
+ indeterminate: l.length > s.length && s.length > 0,
4079
+ onClick: g,
4080
+ checkboxDataCy: D
4081
+ }
4082
+ ) }),
4083
+ p.map((T) => /* @__PURE__ */ R(
4084
+ "button",
4085
+ {
4086
+ onClick: T.orderable ? () => {
4087
+ N(T);
4088
+ } : void 0,
4089
+ "data-cy": "buttonDataCy" in T && T?.buttonDataCy,
4090
+ className: `flex h-full shrink-0 flex-row items-center space-x-1.5 text-base font-medium text-gray-60 ${T.width} ${T.orderable ? "cursor-pointer hover:text-gray-80" : ""}`,
4091
+ children: [
4092
+ /* @__PURE__ */ f("span", { "data-cy": "textDataCy" in T && T?.textDataCy, children: T.label }),
4093
+ T.name === x?.field && T.orderable && (x?.direction === "ASC" ? /* @__PURE__ */ f(A0, { size: 14, weight: "bold" }) : /* @__PURE__ */ f(T0, { size: 14, weight: "bold" }))
4094
+ ]
4095
+ },
4096
+ T.name.toString()
4097
+ )),
4098
+ A && /* @__PURE__ */ f("div", { className: "mr-15px" }),
4099
+ (w || C) && /* @__PURE__ */ f("div", { className: "flex h-full w-12 shrink-0" })
4100
+ ] }) }), np = ({ skeletonItem: s, columns: g }) => /* @__PURE__ */ R(
4101
+ "div",
4102
+ {
4103
+ "data-testid": "skeleton-loader-item",
4104
+ className: "group relative flex h-14 animate-pulse flex-row items-center px-5",
4105
+ children: [
4106
+ /* @__PURE__ */ f("div", { className: "w-9 shrink-0" }),
4107
+ new Array(g.length).fill(0).map((l, p) => /* @__PURE__ */ f(
4108
+ "div",
4109
+ {
4110
+ className: `relative flex h-full shrink-0 flex-row items-center overflow-hidden whitespace-nowrap border-b border-gray-5 ${g[p]}`,
4111
+ children: s?.[p]
4112
+ },
4113
+ `${l}-${p}`
4114
+ )),
4115
+ /* @__PURE__ */ f("div", { className: "flex h-14 w-12 shrink-0 flex-col items-center justify-center border-b border-gray-5" })
4116
+ ]
4117
+ }
4118
+ ), tp = ({ skeleton: s }) => /* @__PURE__ */ f(mn, { children: new Array(s.length).fill(0).map((g, l) => /* @__PURE__ */ f(
4119
+ np,
4120
+ {
4121
+ skeletonItem: s[l].skeletonItem,
4122
+ columns: s[l].columns
4123
+ },
4124
+ `skinSkeletonRow${l}`
4125
+ )) }), Wa = ({
4126
+ children: s,
4127
+ handleNextPage: g,
4128
+ hasMoreItems: l,
4129
+ loader: p,
4130
+ scrollableTarget: x,
4131
+ classNameLoader: N
4132
+ }) => {
4133
+ const w = en(null), C = en(null), [A, D] = ue(!1);
4134
+ Ce(() => {
4135
+ x && (C.current = document.getElementById(x));
4136
+ const T = new IntersectionObserver(
4137
+ ([z]) => {
4138
+ z.isIntersecting && (l ? (g(), D(!0)) : D(!1));
4139
+ },
4140
+ {
4141
+ root: C.current || null,
4142
+ rootMargin: "100px",
4143
+ threshold: 0
4144
+ }
4145
+ ), M = w.current;
4146
+ return M && T.observe(M), () => {
4147
+ M && T.unobserve(M);
4148
+ };
4149
+ }, [l, g, x]);
4150
+ const O = Aa.Children.map(s, (T, M) => M === Aa.Children.count(s) - 1 && l ? /* @__PURE__ */ R(mn, { children: [
4151
+ T,
4152
+ /* @__PURE__ */ f("div", { ref: w, className: N, children: A && p })
4153
+ ] }) : T);
4154
+ return /* @__PURE__ */ f("div", { children: O });
4155
+ }, xp = ({
4156
+ header: s,
4157
+ checkboxDataCy: g,
4158
+ items: l,
4159
+ itemComposition: p,
4160
+ selectedItems: x,
4161
+ onClick: N,
4162
+ onDoubleClick: w,
4163
+ onEnterPressed: C,
4164
+ onSelectedItemsChanged: A,
4165
+ isLoading: D,
4166
+ forceLoading: O,
4167
+ skinSkeleton: T,
4168
+ emptyState: M,
4169
+ orderBy: z,
4170
+ onOrderByChanged: W,
4171
+ onNextPage: ne,
4172
+ hasMoreItems: S,
4173
+ menu: E,
4174
+ displayMenuDiv: j,
4175
+ className: V,
4176
+ disableItemCompositionStyles: ie,
4177
+ onMouseEnter: se,
4178
+ onMouseLeave: fe,
4179
+ headerBackgroundColor: ge = "bg-surface",
4180
+ keyBoardShortcutActions: we,
4181
+ disableKeyboardShortcuts: nn
4182
+ }) => {
4183
+ const Ae = en(null), tn = (F) => x.some((X) => F.id === X.id), vn = document.getElementById("scrollableList"), Fn = vn && vn.scrollHeight > vn.clientHeight, rn = !S && l.length === 0 && !D, [Un, Ke] = ue(null), Oe = new Array(25).fill(0).map(() => ({
4184
+ skeletonItem: T,
4185
+ columns: s.map((F) => F.width)
4186
+ })), _e = /* @__PURE__ */ f(tp, { skeleton: Oe });
4187
+ Ce(() => {
4188
+ const F = (X) => {
4189
+ Ae.current && !Ae.current.contains(X.target) && Ke(null);
4190
+ };
4191
+ return document.addEventListener("mousedown", F), document.addEventListener("contextmenu", F), () => {
4192
+ document.removeEventListener("mousedown", F), document.removeEventListener("contextmenu", F);
4193
+ };
4194
+ }, []);
4195
+ const fn = () => {
4196
+ ne?.();
4197
+ }, Z = () => {
4198
+ const F = x.map((X) => ({ props: X, value: !1 }));
4199
+ A(F);
4200
+ }, le = (F) => {
4201
+ const X = [...x.map((me) => ({ props: me, value: !1 })), { props: F, value: !0 }];
4202
+ A(X);
4203
+ }, Tn = () => {
4204
+ if (x.length === 1) {
4205
+ const X = x[0];
4206
+ C?.(X);
4207
+ }
4208
+ }, cn = () => {
4209
+ const X = Y0.difference(l, x).map((me) => ({ props: me, value: !0 }));
4210
+ A(X);
4211
+ }, Hn = () => {
4212
+ x.length === l.length ? Z() : cn();
4213
+ }, hn = (F) => {
4214
+ if (Ln(), !F.orderable || !W) return;
4215
+ const X = z?.field === F.name;
4216
+ W(X ? { field: F.name, direction: z.direction === "ASC" ? "DESC" : "ASC" } : { field: F.name, direction: F.defaultDirection ?? "ASC" });
4217
+ }, Le = (F) => {
4218
+ nn || F();
4219
+ }, zn = () => {
4220
+ we?.onRKeyPressed?.();
4221
+ }, En = () => {
4222
+ we?.onBackspaceKeyPressed?.();
4223
+ };
4224
+ Ji(
4225
+ {
4226
+ "ctrl+a": () => Le(cn),
4227
+ "meta+a": () => Le(cn),
4228
+ esc: () => Le(Z),
4229
+ r: () => Le(zn),
4230
+ backspace: () => Le(En),
4231
+ delete: () => Le(En)
4232
+ },
4233
+ [l, x, nn]
4234
+ );
4235
+ const Gn = (F, X) => {
4236
+ X.metaKey || X.ctrlKey ? A([{ props: F, value: !tn(F) }]) : tn(F) || N?.(F), Ke(null);
4237
+ }, Ar = (F, X) => {
4238
+ X.preventDefault(), tn(F) || le(F), Ke(F.id);
4239
+ }, Ln = () => {
4240
+ Ke(null);
4241
+ }, et = (F, X) => {
4242
+ F.stopPropagation(), Ke((me) => me ? null : X.id), tn(X) || le(X);
4243
+ };
4244
+ return /* @__PURE__ */ f(
4245
+ "div",
4246
+ {
4247
+ id: "generic-list-component",
4248
+ className: `relative isolate flex h-full flex-col overflow-x-auto overflow-y-hidden ${V}`,
4249
+ ref: Ae,
4250
+ children: /* @__PURE__ */ R("div", { id: "scrollableList", className: "flex h-full flex-col min-w-max overflow-x-hidden overflow-y-auto", children: [
4251
+ /* @__PURE__ */ f("div", { className: `sticky top-0 z-50 ${ge}`, children: rn ? null : /* @__PURE__ */ f(
4252
+ ep,
4253
+ {
4254
+ selectedItems: x,
4255
+ onTopSelectionCheckboxClick: Hn,
4256
+ items: l,
4257
+ header: s,
4258
+ orderBy: z,
4259
+ onOrderableColumnClicked: hn,
4260
+ menu: E,
4261
+ displayMenuDiv: j,
4262
+ isVerticalScrollbarVisible: Fn,
4263
+ checkboxDataCy: g,
4264
+ onClose: Ln
4265
+ }
4266
+ ) }),
4267
+ rn ? M : l.length > 0 && !O ? /* @__PURE__ */ f(
4268
+ Wa,
4269
+ {
4270
+ handleNextPage: fn,
4271
+ hasMoreItems: !!S,
4272
+ loader: _e,
4273
+ scrollableTarget: "scrollableList",
4274
+ children: l.map((F, X) => /* @__PURE__ */ f(
4275
+ j0,
4276
+ {
4277
+ item: F,
4278
+ listIndex: X,
4279
+ isOpen: Un === F.id,
4280
+ onClose: Ln,
4281
+ itemComposition: p,
4282
+ selected: tn(F),
4283
+ onDoubleClick: w && (() => w(F)),
4284
+ onClick: (me) => Gn(F, me),
4285
+ onClickContextMenu: (me) => Ar(F, me),
4286
+ onThreeDotsButtonPressed: (me) => et(me, F),
4287
+ columnsWidth: s.map((me) => me.width),
4288
+ menu: E,
4289
+ onSelectedChanged: (me) => A([{ props: F, value: me }]),
4290
+ disableItemCompositionStyles: ie,
4291
+ onMouseEnter: se,
4292
+ onMouseLeave: fe,
4293
+ genericEnterKey: Tn
4294
+ },
4295
+ F.id
4296
+ ))
4297
+ }
4298
+ ) : /* @__PURE__ */ f("div", { children: _e }),
4299
+ l.length > 0 && /* @__PURE__ */ f(
4300
+ "div",
4301
+ {
4302
+ "data-testid": "outside-click-element",
4303
+ className: "h-full w-full py-6",
4304
+ onClick: Z,
4305
+ onContextMenu: (F) => {
4306
+ F.preventDefault(), Z();
4307
+ }
4308
+ }
4309
+ )
4310
+ ] })
4311
+ }
4312
+ );
4313
+ }, wp = ({ children: s, className: g, ...l }) => /* @__PURE__ */ f("div", { className: g, children: /* @__PURE__ */ f("table", { className: "w-full", ...l, children: s }) }), _p = ({ children: s, className: g, ...l }) => /* @__PURE__ */ f("thead", { className: g, ...l, children: s }), yp = ({ children: s, className: g, ...l }) => /* @__PURE__ */ f("tbody", { className: g, ...l, children: s }), bp = ({ children: s, className: g, onClick: l, ...p }) => /* @__PURE__ */ f("tr", { onClick: l, className: g, ...p, children: s }), Np = ({ children: s, className: g, isHeader: l = !1, onClick: p, ...x }) => /* @__PURE__ */ f(l ? "th" : "td", { onClick: p, className: g, ...x, children: s }), rp = ({
4314
+ classNameContainer: s,
4315
+ classNameLoader: g,
4316
+ classNameText: l,
4317
+ type: p = "spinner",
4318
+ text: x,
4319
+ size: N = 32
4320
+ }) => /* @__PURE__ */ f("div", { className: s, children: p === "spinner" ? /* @__PURE__ */ R(mn, { children: [
4321
+ /* @__PURE__ */ R(
4322
+ "svg",
4323
+ {
4324
+ className: `animate-spin ${g}`,
4325
+ width: N,
4326
+ height: N,
4327
+ xmlns: "http://www.w3.org/2000/svg",
4328
+ fill: "none",
4329
+ viewBox: "0 0 24 24",
4330
+ role: "img",
4331
+ children: [
4332
+ /* @__PURE__ */ f("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
4333
+ /* @__PURE__ */ f(
4334
+ "path",
4335
+ {
4336
+ className: "opacity-75",
4337
+ fill: "currentColor",
4338
+ d: `M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824
4339
+ 3 7.938l3-2.647z`
4340
+ }
4341
+ )
4342
+ ]
4343
+ }
4344
+ ),
4345
+ x && /* @__PURE__ */ f("p", { className: l, children: x })
4346
+ ] }) : /* @__PURE__ */ R("div", { className: `loader-container ${g}`, children: [
4347
+ /* @__PURE__ */ f("div", { className: "loader06" }),
4348
+ x && /* @__PURE__ */ f("p", { className: `loader-text ${l}`, children: x })
4349
+ ] }) }), Xi = ({
4350
+ variant: s = "primary",
4351
+ type: g = "button",
4352
+ id: l,
4353
+ children: p,
4354
+ className: x = "",
4355
+ disabled: N = !1,
4356
+ onClick: w = () => {
4357
+ },
4358
+ onKeyDown: C = () => {
4359
+ },
4360
+ size: A = "default",
4361
+ loading: D,
4362
+ dataTest: O,
4363
+ autofocus: T,
4364
+ buttonDataCy: M,
4365
+ buttonChildrenDataCy: z
4366
+ }) => {
4367
+ let W = "";
4368
+ return s === "primary" && !N ? W = `${D ? "bg-primary-dark" : "bg-primary"} active:bg-primary-dark text-white shadow-sm` : s === "primary" && N ? W = "bg-gray-30 text-white shadow-sm" : s === "destructive" && !N ? W = `${D ? "bg-red-dark" : "bg-red"} active:bg-red-dark text-white shadow-sm` : s === "destructive" && N ? W = "bg-gray-30 text-white shadow-sm" : s === "secondary" && !N ? W = "bg-surface dark:bg-gray-5 border border-gray-10 hover:border-gray-20 active:bg-gray-1 dark:active:bg-gray-10 text-gray-80 shadow-sm" : s === "secondary" && N ? W = "bg-surface dark:bg-gray-5 text-gray-30 border border-gray-5 shadow-sm" : s === "ghost" && !N ? W = "hover:bg-gray-5 active:bg-gray-10 focus-visible:bg-gray-10" : s === "ghost" && N ? W = "text-gray-30" : s === "tertiary" && !N ? W = `${D ? "bg-white/45" : "bg-white/15"} active:bg-white/25 text-white shadow-sm border border-white/20 active:border-white hover:border-white/40 active:border-white
4369
+ transition-all duration-200` : s === "tertiary" && N && (W = "bg-white/45 text-white shadow-sm border border-white/20"), /* @__PURE__ */ R(
4370
+ "button",
4371
+ {
4372
+ "data-cy": M,
4373
+ id: l,
4374
+ onClick: w,
4375
+ onKeyDown: C,
4376
+ disabled: N || D,
4377
+ type: g,
4378
+ "data-test": O,
4379
+ autoFocus: T,
4380
+ className: `${A === "default" ? "h-10 px-5" : "h-8 px-3.5"} relative flex shrink-0 select-none flex-row items-center justify-center space-x-2
4381
+ whitespace-nowrap rounded-lg text-base font-medium outline-none ring-2 ring-primary/0
4382
+ ring-offset-2 ring-offset-transparent transition-all duration-100 ease-in-out
4383
+ focus-visible:ring-primary/50 ${W} ${x}`,
4384
+ children: [
4385
+ D && /* @__PURE__ */ f(rp, { size: 18 }),
4386
+ /* @__PURE__ */ f("div", { className: "flex items-center justify-center space-x-2", "data-cy": z, children: p })
4387
+ ]
4388
+ }
4389
+ );
4390
+ }, Cp = ({ icon: s, title: g, subtitle: l, action: p, contextMenuClick: x }) => {
4391
+ let N = null;
4392
+ return p && (N = /* @__PURE__ */ R(Xi, { variant: "secondary", onClick: p.onClick, children: [
4393
+ /* @__PURE__ */ f("span", { children: p.text }),
4394
+ /* @__PURE__ */ f(p.icon, { size: 20 })
4395
+ ] })), /* @__PURE__ */ f("div", { className: "h-full w-full p-8", onContextMenu: x, children: /* @__PURE__ */ R("div", { className: "flex h-full flex-col items-center justify-center space-y-6 pb-20", children: [
4396
+ /* @__PURE__ */ f("div", { className: "pointer-events-none mx-auto w-max", children: s }),
4397
+ /* @__PURE__ */ R("div", { className: "pointer-events-none space-y-1 text-center", children: [
4398
+ /* @__PURE__ */ f("p", { className: "text-2xl font-medium text-gray-100", children: g }),
4399
+ /* @__PURE__ */ f("p", { className: "text-lg text-gray-60", children: l })
4400
+ ] }),
4401
+ N
4402
+ ] }) });
4403
+ }, Sp = ({
4404
+ children: s,
4405
+ variant: g = "default",
4406
+ active: l = !1,
4407
+ onClick: p,
4408
+ onClickToggleButton: x,
4409
+ className: N = "",
4410
+ dropdown: w,
4411
+ indicator: C,
4412
+ isOpen: A = !1,
4413
+ handleOpen: D = () => {
4414
+ },
4415
+ handleClose: O = () => {
4416
+ }
4417
+ }) => {
4418
+ Ce(() => {
4419
+ const S = (E) => {
4420
+ if (A) {
4421
+ const j = E.target, V = document.querySelector(`[data-circle-button="${g}"]`);
4422
+ V && !V.contains(j) && O();
4423
+ }
4424
+ };
4425
+ return document.addEventListener("click", S), () => {
4426
+ document.removeEventListener("click", S);
4427
+ };
4428
+ }, [A, g]);
4429
+ const T = (S) => {
4430
+ S.stopPropagation(), w && (x?.(), A ? O() : D());
4431
+ }, M = () => {
4432
+ p?.();
4433
+ }, z = () => {
4434
+ switch (g) {
4435
+ case "cancel":
4436
+ return "bg-red hover:bg-red/85";
4437
+ case "warning":
4438
+ return l ? "bg-white/85" : "bg-white/25 hover:bg-white/35";
4439
+ default:
4440
+ return l ? "bg-white/85" : "bg-white/25 hover:bg-white/35";
4441
+ }
4442
+ }, W = () => C ? g === "warning" ? /* @__PURE__ */ f("div", { className: "absolute -top-1 -right-1 h-5 w-5 bg-orange border border-black/35 rounded-full flex items-center justify-center", children: /* @__PURE__ */ f(Oa, { size: 12, color: "black", weight: "bold" }) }) : /* @__PURE__ */ f(
4443
+ "div",
4444
+ {
4445
+ className: `absolute -top-1 -right-1 h-5 w-5 flex items-center justify-center rounded-full ${C.className || ""}`,
4446
+ children: C.icon
4447
+ }
4448
+ ) : null, ne = () => !w || g === "cancel" || g === "warning" ? null : /* @__PURE__ */ f(
4449
+ "button",
4450
+ {
4451
+ onClick: T,
4452
+ className: "absolute -top-1 -right-1 h-5 w-5 border bg-white border-black/35 rounded-full flex items-center justify-center hover:bg-gray-50",
4453
+ children: /* @__PURE__ */ f(E0, { size: 10, color: "black", weight: "fill" })
4454
+ }
4455
+ );
4456
+ return /* @__PURE__ */ R("div", { className: "relative w-11 h-11", "data-circle-button": g, children: [
4457
+ /* @__PURE__ */ f(
4458
+ "button",
4459
+ {
4460
+ onClick: M,
4461
+ className: `
4462
+ h-11 w-11
4463
+ flex items-center justify-center
4464
+ rounded-full
4465
+ transition-all duration-200
4466
+ ${z()}
4467
+ ${N}
4468
+ `,
4469
+ children: s
4470
+ }
4471
+ ),
4472
+ ne(),
4473
+ W(),
4474
+ A && w && g !== "cancel" && /* @__PURE__ */ f("div", { className: "absolute bottom-full mb-2 left-0", children: w })
4475
+ ] });
4476
+ }, ip = ({
4477
+ children: s,
4478
+ title: g,
4479
+ subtitle: l,
4480
+ popsFrom: p,
4481
+ className: x,
4482
+ delayInMs: N,
4483
+ arrow: w = !0
4484
+ }) => {
4485
+ const [C, A] = ue(!1), D = en(null);
4486
+ function O() {
4487
+ A(!0);
4488
+ }
4489
+ function T() {
4490
+ A(!1);
4491
+ }
4492
+ function M() {
4493
+ D.current !== null && clearTimeout(D.current), O();
4494
+ }
4495
+ function z() {
4496
+ N ? D.current = setTimeout(() => {
4497
+ D.current = null, T();
4498
+ }, N) : T();
4499
+ }
4500
+ let W = "", ne = "", S = "";
4501
+ switch (p) {
4502
+ case "right":
4503
+ W = "left-full top-1/2 -translate-y-1/2 ml-1.5", ne = "flex-row-reverse", S = "polygon(100% 0%, 100% 100%, 0% 50%)";
4504
+ break;
4505
+ case "left":
4506
+ W = "right-full top-1/2 -translate-y-1/2 mr-1.5", ne = "flex-row", S = "polygon(0% 0%, 0% 100%, 100% 50%)";
4507
+ break;
4508
+ case "top":
4509
+ W = "bottom-full left-1/2 -translate-x-1/2 mb-1.5 origin-bottom", ne = "flex-col", S = "polygon(0% 0%, 100% 0%, 50% 100%)";
4510
+ break;
4511
+ case "bottom":
4512
+ W = "top-full left-1/2 -translate-x-1/2 mt-1.5", ne = "flex-col-reverse", S = "polygon(50% 0%, 0% 100%, 100% 100%)";
4513
+ break;
4514
+ }
4515
+ return /* @__PURE__ */ R(
4516
+ "div",
4517
+ {
4518
+ className: `relative w-max ${x}`,
4519
+ onMouseEnter: M,
4520
+ onMouseLeave: z,
4521
+ style: { lineHeight: 0 },
4522
+ children: [
4523
+ /* @__PURE__ */ R(
4524
+ "div",
4525
+ {
4526
+ className: `pointer-events-none absolute ${W} flex items-center ${ne} drop-shadow-tooltip transition-all duration-150 ${C ? "scale-100 opacity-100" : "scale-50 opacity-0"}`,
4527
+ children: [
4528
+ /* @__PURE__ */ R("div", { className: "w-max rounded-lg bg-gray-90 px-4 py-1.5 text-center dark:bg-gray-5", children: [
4529
+ /* @__PURE__ */ f("p", { className: "text-base text-white", children: g }),
4530
+ l && /* @__PURE__ */ f("p", { className: "-mt-1 text-sm text-gray-40", children: l })
4531
+ ] }),
4532
+ w && /* @__PURE__ */ f(
4533
+ "div",
4534
+ {
4535
+ className: `bg-gray-90 dark:bg-gray-5 ${p === "bottom" || p === "top" ? "h-1.5 w-4" : "h-4 w-1.5"}`,
4536
+ style: { clipPath: S, marginTop: p === "top" ? "-1px" : void 0 },
4537
+ "data-testid": "tooltip-arrow"
4538
+ }
4539
+ )
4540
+ ]
4644
4541
  }
4645
- }), st[fr(l, E).name] = [{
4646
- name: "wrapper",
4647
- func: l
4648
- }], J.prototype.clone = Ps, J.prototype.reverse = Bs, J.prototype.value = Ws, u.prototype.at = ph, u.prototype.chain = mh, u.prototype.commit = vh, u.prototype.next = xh, u.prototype.plant = _h, u.prototype.reverse = yh, u.prototype.toJSON = u.prototype.valueOf = u.prototype.value = bh, u.prototype.first = u.prototype.head, yt && (u.prototype[yt] = wh), u;
4649
- }, ut = ms();
4650
- Kn ? ((Kn.exports = ut)._ = ut, Gr._ = ut) : Se._ = ut;
4651
- }).call(V0);
4652
- }(kt, kt.exports)), kt.exports;
4653
- }
4654
- var ep = j0();
4655
- const np = /* @__PURE__ */ Q0(ep), tp = 500, rp = ({
4656
- item: s,
4657
- listIndex: g,
4658
- itemComposition: l,
4659
- selected: p,
4660
- isOpen: x,
4661
- columnsWidth: N,
4662
- onClose: w,
4663
- onSelectedChanged: C,
4664
- onDoubleClick: A,
4665
- onClick: D,
4666
- onClickContextMenu: O,
4667
- onThreeDotsButtonPressed: T,
4668
- disableItemCompositionStyles: M,
4669
- menu: z,
4670
- onMouseEnter: W,
4671
- onMouseLeave: ne,
4672
- genericEnterKey: S
4542
+ ),
4543
+ s
4544
+ ]
4545
+ }
4546
+ );
4547
+ }, Ip = ({
4548
+ className: s = "",
4549
+ classText: g = "select-text text-gray-80",
4550
+ text: l,
4551
+ copiedText: p = "Copied!",
4552
+ copyToClipboardText: x = "Copy to clipboard"
4673
4553
  }) => {
4674
- const E = en(), j = en(null), V = en(null), [ie, se] = ue(!1), [fe, ge] = ue(0), [we, nn] = ue(0), [Ae, tn] = ue({ width: 0, height: 0 }), [vn, Fn] = ue(!1);
4675
- Ce(() => {
4676
- V.current && (V.current.offsetHeight !== Ae.height || V.current?.offsetWidth !== Ae.width) && tn({
4677
- width: V.current.offsetWidth,
4678
- height: V.current.offsetHeight
4679
- });
4680
- }, [Ae.height, Ae.width]), Ce(() => {
4681
- ie || rn(), x || (se(!1), ge(0), nn(0));
4682
- }, [x]);
4683
- function rn() {
4684
- const Z = E.current, le = V?.current?.offsetHeight || 300;
4685
- if (!Z) return;
4686
- const { bottom: Tn } = Z.getBoundingClientRect(), cn = window.innerHeight, Hn = Tn + le > cn;
4687
- Fn(Hn);
4554
+ const [N, w] = ue(!1);
4555
+ async function C() {
4556
+ await navigator.clipboard.writeText(l), w(!0), setTimeout(() => w(!1), 1e3);
4688
4557
  }
4689
- const Un = (Z) => {
4690
- Z.preventDefault(), O?.(Z);
4691
- const le = V?.current?.offsetWidth || 240, Tn = V?.current?.offsetHeight || 300, cn = j?.current?.getBoundingClientRect(), { innerWidth: Hn, innerHeight: hn } = window;
4692
- let Le = Z.clientX - (cn?.left || 0), zn = Z.clientY - (cn?.top || 0);
4693
- Z.clientX + le > Hn && (Le = Le - le), Z.clientY + Tn > hn && Z.clientY > tp && (zn = zn - Tn), ge(Le), nn(zn), se(!0);
4694
- }, Ke = (Z) => {
4695
- Z.preventDefault(), T?.(Z), se(!1);
4696
- }, Oe = (Z) => {
4697
- D?.(Z), ie && _e();
4698
- }, _e = () => {
4699
- w();
4558
+ return /* @__PURE__ */ R(
4559
+ "div",
4560
+ {
4561
+ className: `${s} flex h-11 items-center justify-between rounded-md border border-gray-10 bg-gray-5 px-4`,
4562
+ children: [
4563
+ /* @__PURE__ */ f("p", { className: `${g}`, children: l }),
4564
+ /* @__PURE__ */ f(
4565
+ ip,
4566
+ {
4567
+ className: "ml-6",
4568
+ popsFrom: "bottom",
4569
+ title: N ? p : x,
4570
+ delayInMs: N ? 500 : void 0,
4571
+ children: /* @__PURE__ */ f("button", { disabled: N, onClick: C, children: /* @__PURE__ */ f(L0, { className: "shrink-0 text-gray-50 hover:text-gray-60", size: 24 }) })
4572
+ }
4573
+ )
4574
+ ]
4575
+ }
4576
+ );
4577
+ }, Ap = ({
4578
+ className: s = "",
4579
+ label: g,
4580
+ variant: l = "default",
4581
+ accent: p,
4582
+ disabled: x,
4583
+ placeholder: N,
4584
+ value: w,
4585
+ maxLength: C,
4586
+ onChange: A,
4587
+ onClear: D,
4588
+ message: O,
4589
+ onFocus: T,
4590
+ onBlur: M,
4591
+ autofocus: z = !1,
4592
+ autoComplete: W = "on",
4593
+ dataTest: ne,
4594
+ name: S,
4595
+ required: E = !1,
4596
+ labelDataCy: j,
4597
+ inputDataCy: V,
4598
+ onKeyDown: ie,
4599
+ inputClassName: se = "",
4600
+ borderRadius: fe = "rounded-md",
4601
+ fontClasses: ge = "text-lg font-normal"
4602
+ }) => {
4603
+ const we = en(null), nn = () => {
4604
+ we && we.current && (l !== "email" && (we.current.selectionStart = we.current.value.length, we.current.selectionEnd = we.current.value.length), we.current.focus());
4700
4605
  };
4701
- return Ji(
4606
+ Ce(() => {
4607
+ (O || z) && nn();
4608
+ }, [O, z, x]);
4609
+ let Ae;
4610
+ switch (p) {
4611
+ case "error":
4612
+ Ae = "border-red focus:border-red ring-red";
4613
+ break;
4614
+ case "warning":
4615
+ Ae = "focus:border-orange ring-orange";
4616
+ break;
4617
+ case "success":
4618
+ Ae = "focus:border-green ring-green";
4619
+ break;
4620
+ default:
4621
+ Ae = "focus:border-primary ring-primary";
4622
+ break;
4623
+ }
4624
+ const tn = l === "search" ? "border-transparent" : "border-gray-20 disabled:border-gray-10 hover:border-gray-30", vn = l === "search" ? "placeholder-gray-40" : "placeholder-gray-30", Fn = l === "search" ? "pr-4 pl-10" : "px-4", [rn, Un] = ue(!1), [Ke, Oe] = ue(!1), _e = /* @__PURE__ */ R("div", { className: "relative", children: [
4625
+ /* @__PURE__ */ f(
4626
+ "input",
4627
+ {
4628
+ ref: we,
4629
+ disabled: x,
4630
+ className: `inxt-input h-10 w-full border bg-transparent ${ge} text-gray-80 outline-none ring-opacity-10 focus:ring-3 disabled:text-gray-40 disabled:placeholder-gray-20 dark:ring-opacity-20
4631
+ ${tn} ${Ae} ${vn} ${Fn} ${fe} ${se}`,
4632
+ type: l === "password" && !rn ? "password" : l === "email" ? "email" : "text",
4633
+ placeholder: N,
4634
+ onChange: (le) => A && A(le.target.value),
4635
+ onFocus: () => {
4636
+ T && T(), Oe(!0);
4637
+ },
4638
+ onBlur: () => {
4639
+ M && M(), Oe(!1);
4640
+ },
4641
+ autoComplete: W,
4642
+ value: w,
4643
+ maxLength: C,
4644
+ "data-test": ne,
4645
+ "data-cy": V,
4646
+ name: S,
4647
+ required: E,
4648
+ onKeyDown: ie ?? void 0
4649
+ }
4650
+ ),
4651
+ l === "password" && Ke && /* @__PURE__ */ f(
4652
+ "div",
4653
+ {
4654
+ role: "button",
4655
+ tabIndex: 0,
4656
+ onMouseDown: (le) => {
4657
+ le.preventDefault(), Un(!rn);
4658
+ },
4659
+ className: "absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer bg-transparent py-2 pl-2 text-gray-80",
4660
+ children: rn ? /* @__PURE__ */ f(R0, { size: 24 }) : /* @__PURE__ */ f($0, { size: 24 })
4661
+ }
4662
+ ),
4663
+ l === "search" && /* @__PURE__ */ f(
4664
+ D0,
4665
+ {
4666
+ className: `absolute left-4 top-1/2 -translate-y-1/2 ${x ? "text-gray-20" : "text-gray-40"}`,
4667
+ size: 20
4668
+ }
4669
+ ),
4670
+ l === "search" && w && !x && /* @__PURE__ */ f(
4671
+ "div",
4672
+ {
4673
+ role: "button",
4674
+ tabIndex: 0,
4675
+ onMouseDown: (le) => {
4676
+ le.preventDefault(), D && D();
4677
+ },
4678
+ className: `absolute right-4 top-1/2 -translate-y-1/2 cursor-pointer py-2 pl-2 text-gray-40
4679
+ ${Ke ? "bg-white" : "bg-gray-5"}`,
4680
+ children: /* @__PURE__ */ f(ka, { size: 20 })
4681
+ }
4682
+ )
4683
+ ] });
4684
+ let fn, Z;
4685
+ switch (p) {
4686
+ case "success":
4687
+ fn = "text-green", Z = k0;
4688
+ break;
4689
+ case "warning":
4690
+ fn = "text-orange", Z = Oa;
4691
+ break;
4692
+ case "error":
4693
+ fn = "text-red", Z = O0;
4694
+ break;
4695
+ default:
4696
+ fn = "text-gray-80";
4697
+ }
4698
+ return /* @__PURE__ */ R("div", { className: `${s}`, children: [
4699
+ g ? /* @__PURE__ */ R("label", { children: [
4700
+ /* @__PURE__ */ f("span", { "data-cy": j, className: `text-sm ${x ? "text-gray-40" : "text-gray-80"}`, children: g }),
4701
+ _e
4702
+ ] }) : _e,
4703
+ C && /* @__PURE__ */ f("p", { className: "font-regular mt-1 text-right text-sm text-gray-50", children: `${w?.length ?? 0}/${C}` }),
4704
+ O && /* @__PURE__ */ R("div", { className: `mt-0.5 flex items-center ${fn}`, children: [
4705
+ Z && /* @__PURE__ */ f(Z, { size: 16, weight: "fill" }),
4706
+ /* @__PURE__ */ f("p", { className: "ml-1 text-sm", children: O })
4707
+ ] })
4708
+ ] });
4709
+ }, Tp = ({ checked: s, id: g, disabled: l = !1, onClick: p }) => /* @__PURE__ */ R("div", { id: g, className: "flex cursor-pointer", children: [
4710
+ /* @__PURE__ */ f(
4711
+ "button",
4712
+ {
4713
+ disabled: l,
4714
+ onClick: p,
4715
+ className: `flex h-5 w-5 items-center justify-center rounded-full border ${l && s ? "border-0 bg-gray-20" : s && "border-0 bg-primary active:bg-primary-dark"} ${l ? "border-gray-10" : "border-gray-40"}`,
4716
+ children: /* @__PURE__ */ f("div", { className: `h-2.5 w-2.5 rounded-full ${s || l ? "bg-white" : "hover:bg-gray-10"}` })
4717
+ }
4718
+ ),
4719
+ /* @__PURE__ */ f("input", { type: "radio", className: "h-0 w-0 appearance-none opacity-0", checked: !0, readOnly: !0 })
4720
+ ] }), Ep = ({
4721
+ value: s,
4722
+ min: g = 0,
4723
+ max: l,
4724
+ step: p,
4725
+ className: x,
4726
+ disabled: N = !1,
4727
+ ariaLabel: w = "Range slider",
4728
+ onChange: C
4729
+ }) => {
4730
+ const A = (s - g) / (l - g) * 100, D = `linear-gradient(to right, #3264fe ${A}%, #d5d5d5 ${A}%)`;
4731
+ return /* @__PURE__ */ f("div", { className: x, children: /* @__PURE__ */ f(
4732
+ "input",
4702
4733
  {
4703
- r: _e,
4704
- backspace: _e,
4705
- enter: () => {
4706
- x || S();
4707
- }
4708
- },
4709
- []
4710
- ), /* @__PURE__ */ R(
4711
- "div",
4734
+ id: "my-slider",
4735
+ type: "range",
4736
+ min: g,
4737
+ max: l,
4738
+ value: s,
4739
+ step: p,
4740
+ onInput: (O) => C(Number(O.target.value)),
4741
+ disabled: N,
4742
+ "aria-label": w,
4743
+ style: { background: D }
4744
+ }
4745
+ ) });
4746
+ }, Lp = ({
4747
+ disabled: s = !1,
4748
+ id: g,
4749
+ dataTestId: l = "switch",
4750
+ size: p = "md",
4751
+ onClick: x,
4752
+ onCheckedChange: N
4753
+ }) => {
4754
+ const [w, C] = ue(!1), A = (z) => {
4755
+ const W = z.target.checked;
4756
+ C(W), N && N(W);
4757
+ }, D = s ? "bg-gray-5" : w ? "bg-green" : "bg-gray-10", O = {
4758
+ md: "w-8 h-5",
4759
+ lg: "w-12 h-7",
4760
+ xl: "w-14 h-8"
4761
+ }, T = {
4762
+ md: "w-4 h-4",
4763
+ lg: "w-6 h-6",
4764
+ xl: "w-7 h-7"
4765
+ }, M = {
4766
+ md: "translate-x-[13px]",
4767
+ lg: "translate-x-[21px]",
4768
+ xl: "translate-x-[25px]"
4769
+ };
4770
+ return /* @__PURE__ */ R(
4771
+ "label",
4712
4772
  {
4713
- onDoubleClick: A,
4714
- onClick: Oe,
4715
- onContextMenu: Un,
4716
- ref: j,
4717
- className: `group relative flex h-14 flex-row items-center pl-14 pr-5 ${p ? "bg-primary/10 text-gray-100 dark:bg-primary/20" : "focus-within:bg-gray-1 hover:bg-gray-1"} ${x ? "z-40" : ""}`,
4718
- onMouseEnter: W,
4719
- onMouseLeave: ne,
4773
+ htmlFor: g,
4774
+ className: `relative inline-flex items-center cursor-pointer ${O[p]}`,
4775
+ "data-testid": l,
4720
4776
  children: [
4721
- x && p && /* @__PURE__ */ f(
4722
- X0,
4777
+ /* @__PURE__ */ f(
4778
+ "input",
4723
4779
  {
4724
- item: s,
4725
- menu: z,
4726
- menuItemsRef: V,
4727
- openedFromRightClick: ie,
4728
- isOpen: x,
4729
- posX: fe,
4730
- posY: we,
4731
- isContextMenuCutOff: vn,
4732
- genericEnterKey: S,
4733
- handleMenuClose: _e
4780
+ type: "checkbox",
4781
+ id: g,
4782
+ disabled: s,
4783
+ checked: w,
4784
+ onChange: A,
4785
+ onClick: x,
4786
+ className: "sr-only"
4734
4787
  }
4735
4788
  ),
4736
4789
  /* @__PURE__ */ f(
4737
4790
  "div",
4738
4791
  {
4739
- className: `absolute left-5 top-0 flex h-full w-0 flex-row items-center justify-start p-0 opacity-0 focus-within:opacity-100 group-hover:opacity-100 ${p && "opacity-100"}`,
4740
- children: /* @__PURE__ */ f(
4741
- Pa,
4742
- {
4743
- onClick: (Z) => {
4744
- Z.stopPropagation(), C(!p);
4745
- },
4746
- checked: p,
4747
- checkboxDataCy: `driveListItemCheckbox${g}`
4748
- }
4749
- )
4792
+ className: `absolute inset-0 rounded-full transition-colors duration-200 ${D} ${s ? "data-[state=checked]:bg-green/50" : ""}`
4750
4793
  }
4751
4794
  ),
4752
- M ? /* @__PURE__ */ f(
4753
- "div",
4795
+ /* @__PURE__ */ f(
4796
+ "span",
4754
4797
  {
4755
- className: `grow-1 relative flex h-full w-full flex-row items-center border-b ${p ? "border-primary/5" : "border-gray-5"}`,
4756
- children: l[0](s)
4757
- },
4758
- 0
4759
- ) : new Array(l.length).fill(0).map((Z, le) => /* @__PURE__ */ f(
4760
- "div",
4798
+ className: `block bg-white rounded-full transition-transform duration-200 transform ${w ? M[p] : "translate-x-[3px]"} ${T[p]} ${s ? "pointer-events-none" : ""}`
4799
+ }
4800
+ )
4801
+ ]
4802
+ }
4803
+ );
4804
+ }, Rp = ({
4805
+ disabled: s = !1,
4806
+ accentColor: g,
4807
+ placeholder: l = "",
4808
+ value: p = "",
4809
+ onChange: x,
4810
+ name: N
4811
+ }) => /* @__PURE__ */ f(
4812
+ "textarea",
4813
+ {
4814
+ disabled: s,
4815
+ placeholder: l,
4816
+ className: `
4817
+ w-full h-full py-4 px-3.5 bg-transparent border rounded-md outline-none text-lg font-regular resize-none
4818
+ placeholder:text-gray-30
4819
+ ${s ? "border-gray-5 text-gray-40" : "border-gray-20 text-gray-100"}
4820
+ ${!g && "border-gray-20 focus:border-primary focus:ring focus:ring-primary/10"}
4821
+ ${g === "red" && "border-red focus:ring focus:ring-red/10"}
4822
+ `,
4823
+ value: p,
4824
+ onChange: x,
4825
+ name: N
4826
+ }
4827
+ ), $p = ({ leftContent: s, rightContent: g, className: l = "" }) => /* @__PURE__ */ R(
4828
+ "header",
4829
+ {
4830
+ className: `
4831
+ flex
4832
+ items-center
4833
+ justify-between
4834
+ ${l}
4835
+ `,
4836
+ children: [
4837
+ /* @__PURE__ */ f("div", { className: "flex items-center space-x-4", children: s }),
4838
+ /* @__PURE__ */ f("div", { className: "flex items-center space-x-4", children: g })
4839
+ ]
4840
+ }
4841
+ ), lp = (s) => {
4842
+ const g = s.match(/px-(\d+(\.\d+)?)/), l = s.match(/py-(\d+(\.\d+)?)/), p = g ? g[1] : void 0, x = l ? l[1] : void 0;
4843
+ return { px: p, py: x };
4844
+ }, up = ({
4845
+ children: s,
4846
+ options: g,
4847
+ classButton: l,
4848
+ menuItems: p,
4849
+ classMenuItems: x,
4850
+ openDirection: N,
4851
+ dropdownActionsContext: w,
4852
+ item: C = {}
4853
+ }) => {
4854
+ const [A, D] = ue(!1), O = N === "left" ? "origin-top-left" : "origin-top-right", T = en(null);
4855
+ Ce(() => {
4856
+ const ie = (se) => {
4857
+ T.current && !T.current.contains(se.target) && D(!1);
4858
+ };
4859
+ return document.addEventListener("mousedown", ie), document.addEventListener("contextmenu", ie), () => {
4860
+ document.removeEventListener("mousedown", ie), document.removeEventListener("contextmenu", ie);
4861
+ };
4862
+ }, []);
4863
+ const M = g ? g.map((ie) => ({
4864
+ name: ie.text,
4865
+ action: () => ie.onClick()
4866
+ })) : [], z = p ? p.map((ie) => ({
4867
+ node: ie
4868
+ })) : [], W = w || [], ne = [...M, ...z, ...W], S = () => D((ie) => !ie), E = () => D(!1), { px: j, py: V } = lp(x);
4869
+ return /* @__PURE__ */ R("div", { className: "relative outline-none min-w-breadcrumb", ref: T, children: [
4870
+ /* @__PURE__ */ f(
4871
+ "button",
4872
+ {
4873
+ className: `cursor-pointer outline-none ${l}`,
4874
+ onClick: S,
4875
+ "aria-expanded": A,
4876
+ "aria-haspopup": "menu",
4877
+ children: typeof s == "function" ? s({ open: A }) : s
4878
+ }
4879
+ ),
4880
+ /* @__PURE__ */ f(
4881
+ "div",
4882
+ {
4883
+ className: `absolute ${N === "left" ? "left-0" : "right-0"}
4884
+ transform shadow-subtle-hard transition-all duration-100 ease-in-out ${A ? `scale-100 opacity-100 ${O}` : "pointer-events-none scale-95 opacity-0"}`,
4885
+ "data-testid": "menu-dropdown",
4886
+ children: /* @__PURE__ */ f("div", { className: `absolute ${x}`, children: /* @__PURE__ */ f(Pa, { item: C, isOpen: A, handleMenuClose: E, menu: ne, paddingX: j, paddingY: V }) })
4887
+ }
4888
+ )
4889
+ ] });
4890
+ }, La = (s) => {
4891
+ const [{ isOver: g, canDrop: l }, p] = s.useDrop(
4892
+ () => ({
4893
+ accept: s.acceptedTypes,
4894
+ collect: (w) => ({
4895
+ isOver: w.isOver(),
4896
+ canDrop: w.canDrop()
4897
+ }),
4898
+ canDrop: s.canItemDrop(s.item),
4899
+ drop: s.onItemDropped(
4900
+ s.item,
4901
+ s.namePath,
4902
+ s.isSomeItemSelected,
4903
+ s.selectedItems,
4904
+ s.dispatch
4905
+ )
4906
+ }),
4907
+ [s.selectedItems]
4908
+ ), x = (w) => {
4909
+ w.active && w.onClick && w.onClick();
4910
+ }, N = g && l ? "drag-over-effect" : "";
4911
+ return /* @__PURE__ */ f(mn, { children: !s.item.active && !s.item.dialog && s.menu ? /* @__PURE__ */ f(s.menu, { item: s.item, items: s.items, onItemClicked: x }) : /* @__PURE__ */ R(
4912
+ "div",
4913
+ {
4914
+ ref: p,
4915
+ className: `flex ${s.isHiddenInList ? "w-full" : "max-w-fit"} ${s.item.isFirstPath ? "shrink-0 pr-1" : "min-w-breadcrumb flex-1 px-1.5 py-1.5"} cursor-pointer flex-row items-center truncate font-medium ${N}
4916
+ ${!s.item.active || s.item.isFirstPath && s.totalBreadcrumbsLength === 1 ? "text-gray-80" : "text-gray-50 hover:text-gray-80"}`,
4917
+ onClick: () => x(s.item),
4918
+ onKeyDown: () => {
4919
+ },
4920
+ "data-cy": s?.breadcrumbButtonDataCy,
4921
+ children: [
4922
+ s.itemComponent && /* @__PURE__ */ f(s.itemComponent, { className: "h-5 w-5" }),
4923
+ s.item.icon ? s.item.icon : null,
4924
+ s.item.label ? /* @__PURE__ */ f(
4925
+ "span",
4761
4926
  {
4762
- className: `relative flex h-full shrink-0 flex-row items-center border-b ${p ? "border-primary/5" : "border-gray-5"} ${N[le]}`,
4763
- children: l[le](s)
4927
+ className: `max-w-sm flex-1 cursor-pointer truncate ${s.isHiddenInList && "pl-3 text-base"}`,
4928
+ title: s.item.label,
4929
+ children: s.item.label
4930
+ }
4931
+ ) : null
4932
+ ]
4933
+ },
4934
+ s.item.uuid
4935
+ ) });
4936
+ }, Dp = (s) => {
4937
+ const g = S0((p, x) => /* @__PURE__ */ f(
4938
+ "div",
4939
+ {
4940
+ ref: x,
4941
+ className: "flex cursor-pointer items-center hover:bg-gray-5 hover:text-gray-80 dark:hover:bg-gray-10",
4942
+ children: p.children
4943
+ }
4944
+ ));
4945
+ return /* @__PURE__ */ f("div", { className: "flex w-full items-center", children: (() => {
4946
+ const p = s.items, x = [], N = [], w = (C) => /* @__PURE__ */ f("div", { className: "text-dgray-50 flex items-center", children: /* @__PURE__ */ f(M0, { weight: "bold", className: "h-4 w-4", "data-testid": "caret-right" }) }, C);
4947
+ for (let C = 0; C < p.length; C++) {
4948
+ const A = "breadcrumbSeparator-" + p[C].uuid + C.toString(), D = "breadcrumbItem-" + p[C].uuid + C.toString();
4949
+ p.length > 3 && C !== 0 && C < p.length - 2 ? (C === 1 && x.push(w(A)), N.push(
4950
+ /* @__PURE__ */ f(g, { children: /* @__PURE__ */ f(
4951
+ La,
4952
+ {
4953
+ item: p[C],
4954
+ isHiddenInList: !0,
4955
+ totalBreadcrumbsLength: p.length,
4956
+ items: p,
4957
+ namePath: s.namePath,
4958
+ isSomeItemSelected: s.isSomeItemSelected,
4959
+ selectedItems: s.selectedItems,
4960
+ onItemDropped: s.onItemDropped,
4961
+ canItemDrop: s.canItemDrop,
4962
+ itemComponent: s.itemComponent,
4963
+ acceptedTypes: s.acceptedTypes,
4964
+ dispatch: s.dispatch,
4965
+ useDrop: s.useDrop
4764
4966
  },
4765
- le
4766
- )),
4967
+ D
4968
+ ) })
4969
+ )) : (x.push(
4767
4970
  /* @__PURE__ */ f(
4768
- "div",
4971
+ La,
4769
4972
  {
4770
- className: `flex h-14 w-12 shrink-0 flex-col items-center justify-center border-b ${p ? "border-primary/5" : "border-gray-5"}`,
4771
- children: /* @__PURE__ */ f(
4772
- "button",
4773
- {
4774
- ref: E,
4775
- className: `flex h-10 w-10 flex-col items-center justify-center rounded-md opacity-0 outline-none focus-visible:opacity-100 group-hover:opacity-100 ${p ? "text-gray-80 hover:bg-primary/10 focus-visible:bg-primary/10" : "text-gray-60 hover:bg-gray-10 focus-visible:bg-gray-10"}`,
4776
- onClick: (Z) => {
4777
- Ke(Z);
4778
- },
4779
- children: /* @__PURE__ */ f(Da, { size: 24, weight: "bold" })
4780
- }
4781
- )
4782
- }
4973
+ breadcrumbButtonDataCy: C === 0 ? s?.rootBreadcrumbItemDataCy : void 0,
4974
+ item: p[C],
4975
+ totalBreadcrumbsLength: p.length,
4976
+ items: p,
4977
+ menu: s.menu,
4978
+ namePath: s.namePath,
4979
+ isSomeItemSelected: s.isSomeItemSelected,
4980
+ selectedItems: s.selectedItems,
4981
+ onItemDropped: s.onItemDropped,
4982
+ canItemDrop: s.canItemDrop,
4983
+ acceptedTypes: s.acceptedTypes,
4984
+ dispatch: s.dispatch,
4985
+ useDrop: s.useDrop
4986
+ },
4987
+ D
4783
4988
  )
4784
- ]
4989
+ ), C < p.length - 1 && x.push(w(A)));
4785
4990
  }
4786
- );
4787
- }, ip = ({
4788
- selectedItems: s,
4789
- onTopSelectionCheckboxClick: g,
4790
- items: l,
4791
- header: p,
4792
- orderBy: x,
4793
- onOrderableColumnClicked: N,
4794
- menu: w,
4795
- displayMenuDiv: C,
4796
- isVerticalScrollbarVisible: A,
4797
- checkboxDataCy: D,
4798
- onClose: O
4799
- }) => /* @__PURE__ */ f("div", { onClick: O, onContextMenu: O, className: "flex min-w-max h-12 shrink-0 flex-row px-5", children: /* @__PURE__ */ R("div", { className: "flex h-full min-w-full flex-row items-center border-b border-gray-10", children: [
4800
- /* @__PURE__ */ f("div", { className: "flex h-full flex-row items-center justify-between pr-4", children: /* @__PURE__ */ f(
4801
- Pa,
4802
- {
4803
- checked: s.length > 0,
4804
- indeterminate: l.length > s.length && s.length > 0,
4805
- onClick: g,
4806
- checkboxDataCy: D
4991
+ if (N.length > 0) {
4992
+ const C = /* @__PURE__ */ f(
4993
+ up,
4994
+ {
4995
+ openDirection: "left",
4996
+ classMenuItems: `left-0 top-1 w-max max-h-80 overflow-y-auto
4997
+ rounded-md border border-gray-10 bg-surface dark:bg-gray-5 shadow-subtle-hard z-10`,
4998
+ menuItems: N,
4999
+ children: ({ open: A }) => /* @__PURE__ */ f(
5000
+ "div",
5001
+ {
5002
+ className: `flex h-8 w-8 items-center justify-center
5003
+ rounded-full text-gray-60 transition-all duration-75 ease-in-out hover:bg-gray-5 hover:text-gray-80 ${A ? "bg-gray-5" : ""}`,
5004
+ children: /* @__PURE__ */ f(Da, { weight: "bold", className: "h-5 w-5" })
5005
+ }
5006
+ )
5007
+ },
5008
+ "breadcrumbDropdownItems"
5009
+ );
5010
+ x.splice(2, 0, C);
4807
5011
  }
4808
- ) }),
4809
- p.map((T) => /* @__PURE__ */ R(
4810
- "button",
4811
- {
4812
- onClick: T.orderable ? () => {
4813
- N(T);
4814
- } : void 0,
4815
- "data-cy": "buttonDataCy" in T && T?.buttonDataCy,
4816
- className: `flex h-full shrink-0 flex-row items-center space-x-1.5 text-base font-medium text-gray-60 ${T.width} ${T.orderable ? "cursor-pointer hover:text-gray-80" : ""}`,
4817
- children: [
4818
- /* @__PURE__ */ f("span", { "data-cy": "textDataCy" in T && T?.textDataCy, children: T.label }),
4819
- T.name === x?.field && T.orderable && (x?.direction === "ASC" ? /* @__PURE__ */ f(D0, { size: 14, weight: "bold" }) : /* @__PURE__ */ f(O0, { size: 14, weight: "bold" }))
4820
- ]
4821
- },
4822
- T.name.toString()
4823
- )),
4824
- A && /* @__PURE__ */ f("div", { className: "mr-15px" }),
4825
- (w || C) && /* @__PURE__ */ f("div", { className: "flex h-full w-12 shrink-0" })
4826
- ] }) }), lp = ({ skeletonItem: s, columns: g }) => /* @__PURE__ */ R(
4827
- "div",
5012
+ return x;
5013
+ })() });
5014
+ }, ap = ({
5015
+ label: s,
5016
+ Icon: g,
5017
+ onClick: l,
5018
+ notifications: p,
5019
+ iconDataCy: x,
5020
+ isActive: N = !1,
5021
+ isCollapsed: w = !1,
5022
+ subsection: C = !1
5023
+ }) => /* @__PURE__ */ f(
5024
+ "button",
4828
5025
  {
4829
- "data-testid": "skeleton-loader-item",
4830
- className: "group relative flex h-14 animate-pulse flex-row items-center px-5",
4831
- children: [
4832
- /* @__PURE__ */ f("div", { className: "w-9 shrink-0" }),
4833
- new Array(g.length).fill(0).map((l, p) => /* @__PURE__ */ f(
5026
+ onClick: l,
5027
+ "data-cy": x,
5028
+ className: `flex w-full flex-col overflow-hidden focus-visible:bg-gray-10 rounded-lg ${N ? "bg-primary/20" : "hover:bg-gray-5"} ${C ? "pl-5" : ""}`,
5029
+ title: w ? s : void 0,
5030
+ children: /* @__PURE__ */ R("div", { className: "flex flex-row px-2.5 py-2 w-full items-center justify-between min-h-[36px]", children: [
5031
+ /* @__PURE__ */ R("div", { className: `flex flex-row gap-3 items-center ${N ? "text-primary" : "text-gray-80"}`, children: [
5032
+ /* @__PURE__ */ f(g, { size: 20, weight: N ? "fill" : "regular", className: "flex-shrink-0" }),
5033
+ /* @__PURE__ */ f(
5034
+ "p",
5035
+ {
5036
+ className: `font-medium whitespace-nowrap overflow-hidden transition-all duration-300 ${w ? "opacity-0 delay-200" : "opacity-100 delay-0"}`,
5037
+ children: s
5038
+ }
5039
+ )
5040
+ ] }),
5041
+ /* @__PURE__ */ f(
4834
5042
  "div",
4835
5043
  {
4836
- className: `relative flex h-full shrink-0 flex-row items-center overflow-hidden whitespace-nowrap border-b border-gray-5 ${g[p]}`,
4837
- children: s?.[p]
4838
- },
4839
- `${l}-${p}`
4840
- )),
4841
- /* @__PURE__ */ f("div", { className: "flex h-14 w-12 shrink-0 flex-col items-center justify-center border-b border-gray-5" })
4842
- ]
5044
+ className: `flex rounded-full px-2 py-1 transition-all duration-300 ${N ? "text-white bg-primary" : "bg-gray-10 text-gray-60"} ${w || !p ? "opacity-0 invisible delay-300" : "opacity-100 delay-0"}`,
5045
+ children: p && /* @__PURE__ */ f("p", { className: "text-xs font-medium", children: p })
5046
+ }
5047
+ )
5048
+ ] })
4843
5049
  }
4844
- ), up = ({ skeleton: s }) => /* @__PURE__ */ f(mn, { children: new Array(s.length).fill(0).map((g, l) => /* @__PURE__ */ f(
4845
- lp,
5050
+ ), op = ({ options: s, isCollapsed: g, showSubsections: l }) => /* @__PURE__ */ f("div", { className: "flex flex-col w-full", children: s.filter((p) => p.isVisible).map((p, x) => p.subsection && !l || g && p.subsection ? null : /* @__PURE__ */ f(
5051
+ ap,
4846
5052
  {
4847
- skeletonItem: s[l].skeletonItem,
4848
- columns: s[l].columns
5053
+ label: p.label,
5054
+ Icon: p.icon,
5055
+ iconDataCy: p.iconDataCy,
5056
+ isActive: p.isActive,
5057
+ notifications: p.notifications,
5058
+ onClick: p.onClick,
5059
+ isCollapsed: g,
5060
+ subsection: p.subsection
4849
5061
  },
4850
- `skinSkeletonRow${l}`
4851
- )) }), Ip = ({
4852
- header: s,
4853
- checkboxDataCy: g,
4854
- items: l,
4855
- itemComposition: p,
4856
- selectedItems: x,
4857
- onClick: N,
4858
- onDoubleClick: w,
4859
- onEnterPressed: C,
4860
- onSelectedItemsChanged: A,
4861
- isLoading: D,
4862
- forceLoading: O,
4863
- skinSkeleton: T,
4864
- emptyState: M,
4865
- orderBy: z,
4866
- onOrderByChanged: W,
4867
- onNextPage: ne,
4868
- hasMoreItems: S,
4869
- menu: E,
4870
- displayMenuDiv: j,
4871
- className: V,
4872
- disableItemCompositionStyles: ie,
4873
- onMouseEnter: se,
4874
- onMouseLeave: fe,
4875
- headerBackgroundColor: ge = "bg-surface",
4876
- keyBoardShortcutActions: we,
4877
- disableKeyboardShortcuts: nn
4878
- }) => {
4879
- const Ae = en(null), tn = (F) => x.some((X) => F.id === X.id), vn = document.getElementById("scrollableList"), Fn = vn && vn.scrollHeight > vn.clientHeight, rn = !S && l.length === 0 && !D, [Un, Ke] = ue(null), Oe = new Array(25).fill(0).map(() => ({
4880
- skeletonItem: T,
4881
- columns: s.map((F) => F.width)
4882
- })), _e = /* @__PURE__ */ f(up, { skeleton: Oe });
4883
- Ce(() => {
4884
- const F = (X) => {
4885
- Ae.current && !Ae.current.contains(X.target) && Ke(null);
4886
- };
4887
- return document.addEventListener("mousedown", F), document.addEventListener("contextmenu", F), () => {
4888
- document.removeEventListener("mousedown", F), document.removeEventListener("contextmenu", F);
4889
- };
4890
- }, []);
4891
- const fn = () => {
4892
- ne?.();
4893
- }, Z = () => {
4894
- const F = x.map((X) => ({ props: X, value: !1 }));
4895
- A(F);
4896
- }, le = (F) => {
4897
- const X = [...x.map((me) => ({ props: me, value: !1 })), { props: F, value: !0 }];
4898
- A(X);
4899
- }, Tn = () => {
4900
- if (x.length === 1) {
4901
- const X = x[0];
4902
- C?.(X);
4903
- }
4904
- }, cn = () => {
4905
- const X = np.difference(l, x).map((me) => ({ props: me, value: !0 }));
4906
- A(X);
4907
- }, Hn = () => {
4908
- x.length === l.length ? Z() : cn();
4909
- }, hn = (F) => {
4910
- if (Ln(), !F.orderable || !W) return;
4911
- const X = z?.field === F.name;
4912
- W(X ? { field: F.name, direction: z.direction === "ASC" ? "DESC" : "ASC" } : { field: F.name, direction: F.defaultDirection ?? "ASC" });
4913
- }, Le = (F) => {
4914
- nn || F();
4915
- }, zn = () => {
4916
- we?.onRKeyPressed?.();
4917
- }, En = () => {
4918
- we?.onBackspaceKeyPressed?.();
5062
+ `${p.iconDataCy}-${x}`
5063
+ )) }), sp = ({ childrenButton: s, panel: g, className: l, classButton: p, align: x = "right" }) => {
5064
+ const [N, w] = ue(!1), C = en(null), [A, D] = ue(N), [O, T] = ue("opacity-0"), [M, z] = ue("scale-95"), W = () => w((E) => !E), ne = (E) => {
5065
+ C.current && !C.current.contains(E.target) && S();
5066
+ }, S = () => {
5067
+ w(!1);
4919
5068
  };
4920
- Ji(
5069
+ return Ce(() => {
5070
+ if (N) {
5071
+ const E = setTimeout(() => {
5072
+ T("opacity-100"), z("scale-100");
5073
+ }, 10);
5074
+ return D(!0), () => clearTimeout(E);
5075
+ } else {
5076
+ T("opacity-0"), z("scale-95");
5077
+ const E = setTimeout(() => {
5078
+ D(!1);
5079
+ }, 100);
5080
+ return () => clearTimeout(E);
5081
+ }
5082
+ }, [N]), Ce(() => (document.addEventListener("mousedown", ne), () => {
5083
+ document.removeEventListener("mousedown", ne);
5084
+ }), []), /* @__PURE__ */ R("div", { style: { lineHeight: 0 }, className: `relative ${l}`, children: [
5085
+ /* @__PURE__ */ f(
5086
+ "button",
5087
+ {
5088
+ onClick: W,
5089
+ className: `cursor-pointer outline-none ${p}`,
5090
+ "aria-expanded": N,
5091
+ "data-testid": "popover-button",
5092
+ children: s
5093
+ }
5094
+ ),
5095
+ A && /* @__PURE__ */ f(
5096
+ "div",
5097
+ {
5098
+ ref: C,
5099
+ className: `absolute z-50 mt-1 transform rounded-md border border-gray-10 ${x === "left" ? "left-0 origin-top-left" : "right-0 origin-top-right"} bg-surface py-1.5 shadow-subtle duration-100 ease-out dark:bg-gray-5 ${O} ${M}`,
5100
+ children: g(S)
5101
+ }
5102
+ )
5103
+ ] });
5104
+ };
5105
+ function fp({
5106
+ className: s = "",
5107
+ suiteArray: g,
5108
+ soonText: l,
5109
+ align: p = "right"
5110
+ }) {
5111
+ const x = /* @__PURE__ */ f("div", { className: "flex h-10 w-10 items-center justify-center", children: /* @__PURE__ */ f(B0, { size: 26, className: "h-7 w-7", weight: "bold" }) }), N = /* @__PURE__ */ f("div", { className: "w-64 flex flex-wrap p-2", "data-testid": "suite-launcher-panel", children: g.map((w, C) => /* @__PURE__ */ f(
5112
+ "div",
4921
5113
  {
4922
- "ctrl+a": () => Le(cn),
4923
- "meta+a": () => Le(cn),
4924
- esc: () => Le(Z),
4925
- r: () => Le(zn),
4926
- backspace: () => Le(En),
4927
- delete: () => Le(En)
5114
+ className: `w-1/3 flex items-center justify-center rounded-md ${w.isMain ? "bg-primary/10 dark:bg-primary/20" : ""}`,
5115
+ children: /* @__PURE__ */ f(
5116
+ "div",
5117
+ {
5118
+ role: "none",
5119
+ className: `flex items-center px-3 py-2 text-gray-80 w-full rounded-md ${w.availableSoon ? "" : "cursor-pointer hover:bg-gray-1 dark:hover:bg-gray-10"}`,
5120
+ style: { lineHeight: 1.25 },
5121
+ onClick: w.availableSoon ? void 0 : w.onClick,
5122
+ children: /* @__PURE__ */ R("div", { className: "flex flex-col items-center w-full rounded-md", children: [
5123
+ w.isLocked ? /* @__PURE__ */ f(
5124
+ P0,
5125
+ {
5126
+ size: 26,
5127
+ weight: "regular",
5128
+ className: "opacity-50 filter grayscale",
5129
+ "data-testid": "suite-launcher-lock-icon"
5130
+ }
5131
+ ) : $a(w.icon) ? I0(w.icon, {
5132
+ size: 26,
5133
+ className: `${w.icon.props?.className ?? ""} ${w.isMain ? "text-primary" : ""} ${w.availableSoon || w.isLocked ? "opacity-50 filter grayscale" : ""}`,
5134
+ weight: w.isMain ? "fill" : "regular"
5135
+ }) : w.icon,
5136
+ /* @__PURE__ */ R("div", { className: "mt-1 flex items-center", children: [
5137
+ /* @__PURE__ */ f(
5138
+ "span",
5139
+ {
5140
+ className: `text-xs ${w.isMain ? "text-primary font-medium" : "text-gray-60"}`,
5141
+ style: { lineHeight: 1, opacity: w.availableSoon || w.isLocked ? 0.5 : 1 },
5142
+ children: w.title
5143
+ }
5144
+ ),
5145
+ w.availableSoon && /* @__PURE__ */ f("div", { className: "flex rounded-sm px-1 ml-1 py-0.5 bg-purple-1 dark:bg-purple-10 items-center", children: /* @__PURE__ */ f(
5146
+ "span",
5147
+ {
5148
+ className: "font-medium dark:font-normal text-purple-10 dark:text-purple-1",
5149
+ style: { lineHeight: 1, fontSize: "xx-small" },
5150
+ children: l ?? "Soon"
5151
+ }
5152
+ ) })
5153
+ ] })
5154
+ ] })
5155
+ }
5156
+ )
4928
5157
  },
4929
- [l, x, nn]
4930
- );
4931
- const Gn = (F, X) => {
4932
- X.metaKey || X.ctrlKey ? A([{ props: F, value: !tn(F) }]) : tn(F) || N?.(F), Ke(null);
4933
- }, Ar = (F, X) => {
4934
- X.preventDefault(), tn(F) || le(F), Ke(F.id);
4935
- }, Ln = () => {
4936
- Ke(null);
4937
- }, et = (F, X) => {
4938
- F.stopPropagation(), Ke((me) => me ? null : X.id), tn(X) || le(X);
4939
- };
5158
+ C
5159
+ )) });
4940
5160
  return /* @__PURE__ */ f(
5161
+ sp,
5162
+ {
5163
+ className: s,
5164
+ childrenButton: x,
5165
+ panel: () => N,
5166
+ align: p,
5167
+ "data-testid": "app-suite-dropdown"
5168
+ }
5169
+ );
5170
+ }
5171
+ const cp = ({
5172
+ logo: s,
5173
+ title: g,
5174
+ onClick: l,
5175
+ isCollapsed: p,
5176
+ className: x,
5177
+ onToggleCollapse: N,
5178
+ suiteLauncher: w
5179
+ }) => /* @__PURE__ */ R("div", { className: `flex flex-row justify-between w-full py-5 px-2 ${x}`, children: [
5180
+ /* @__PURE__ */ R("div", { className: "relative flex flex-row gap-2 items-center", children: [
5181
+ /* @__PURE__ */ R("button", { className: "flex flex-row gap-2 items-center", onClick: l, children: [
5182
+ /* @__PURE__ */ f(
5183
+ "img",
5184
+ {
5185
+ src: s,
5186
+ width: 28,
5187
+ height: 28,
5188
+ alt: g,
5189
+ className: `flex-shrink-0 min-w-[28px] min-h-[28px] ${p ? "group-hover:hidden" : ""}`
5190
+ }
5191
+ ),
5192
+ !p && /* @__PURE__ */ f("p", { className: "text-xl font-medium text-gray-100 whitespace-nowrap", children: g })
5193
+ ] }),
5194
+ p && N && /* @__PURE__ */ f(
5195
+ "button",
5196
+ {
5197
+ onClick: N,
5198
+ className: "hidden group-hover:flex items-center justify-center text-gray-80 absolute left-0",
5199
+ children: /* @__PURE__ */ f(Ta, { size: 28 })
5200
+ }
5201
+ )
5202
+ ] }),
5203
+ /* @__PURE__ */ R(
4941
5204
  "div",
4942
5205
  {
4943
- id: "generic-list-component",
4944
- className: `relative isolate flex h-full flex-col overflow-x-auto overflow-y-hidden ${V}`,
4945
- ref: Ae,
4946
- children: /* @__PURE__ */ R("div", { id: "scrollableList", className: "flex h-full flex-col min-w-max overflow-x-hidden overflow-y-auto", children: [
4947
- /* @__PURE__ */ f("div", { className: `sticky top-0 z-50 ${ge}`, children: rn ? null : /* @__PURE__ */ f(
4948
- ip,
5206
+ className: `flex z-20 flex-row gap-2 items-center transition-opacity duration-100 ${p ? "opacity-0 invisible" : "opacity-100"}`,
5207
+ children: [
5208
+ w && /* @__PURE__ */ f(
5209
+ fp,
4949
5210
  {
4950
- selectedItems: x,
4951
- onTopSelectionCheckboxClick: Hn,
4952
- items: l,
4953
- header: s,
4954
- orderBy: z,
4955
- onOrderableColumnClicked: hn,
4956
- menu: E,
4957
- displayMenuDiv: j,
4958
- isVerticalScrollbarVisible: Fn,
4959
- checkboxDataCy: g,
4960
- onClose: Ln
5211
+ suiteArray: w?.suiteArray,
5212
+ soonText: w?.soonText,
5213
+ className: `text-gray-80 ${w?.className}`,
5214
+ align: "left"
4961
5215
  }
4962
- ) }),
4963
- rn ? M : l.length > 0 && !O ? /* @__PURE__ */ f(
4964
- Wa,
5216
+ ),
5217
+ N && /* @__PURE__ */ f(
5218
+ "button",
4965
5219
  {
4966
- handleNextPage: fn,
4967
- hasMoreItems: !!S,
4968
- loader: _e,
4969
- scrollableTarget: "scrollableList",
4970
- children: l.map((F, X) => /* @__PURE__ */ f(
4971
- rp,
4972
- {
4973
- item: F,
4974
- listIndex: X,
4975
- isOpen: Un === F.id,
4976
- onClose: Ln,
4977
- itemComposition: p,
4978
- selected: tn(F),
4979
- onDoubleClick: w && (() => w(F)),
4980
- onClick: (me) => Gn(F, me),
4981
- onClickContextMenu: (me) => Ar(F, me),
4982
- onThreeDotsButtonPressed: (me) => et(me, F),
4983
- columnsWidth: s.map((me) => me.width),
4984
- menu: E,
4985
- onSelectedChanged: (me) => A([{ props: F, value: me }]),
4986
- disableItemCompositionStyles: ie,
4987
- onMouseEnter: se,
4988
- onMouseLeave: fe,
4989
- genericEnterKey: Tn
4990
- },
4991
- F.id
4992
- ))
5220
+ onClick: N,
5221
+ className: "flex items-center justify-center text-gray-80 hover:text-gray-90",
5222
+ children: /* @__PURE__ */ f(Ta, { size: 28 })
4993
5223
  }
4994
- ) : /* @__PURE__ */ f("div", { children: _e }),
4995
- l.length > 0 && /* @__PURE__ */ f(
4996
- "div",
5224
+ )
5225
+ ]
5226
+ }
5227
+ )
5228
+ ] }), hp = ({
5229
+ usage: s,
5230
+ limit: g,
5231
+ percentage: l,
5232
+ onUpgradeClick: p,
5233
+ upgradeLabel: x,
5234
+ isLoading: N = !0
5235
+ }) => /* @__PURE__ */ R("div", { className: "flex flex-col w-full gap-2.5 px-2 pb-5", children: [
5236
+ /* @__PURE__ */ R("div", { className: "flex flex-row w-full justify-between", children: [
5237
+ /* @__PURE__ */ f("div", { className: "flex flex-row items-center gap-2", children: N ? /* @__PURE__ */ R("div", { className: "flex flex-row items-center gap-2", children: [
5238
+ /* @__PURE__ */ f("div", { className: "h-3 w-8 rounded-lg bg-gray-5 animate-pulse" }),
5239
+ /* @__PURE__ */ f("div", { className: "h-3 w-2 rounded-lg bg-gray-5 animate-pulse" }),
5240
+ /* @__PURE__ */ f("div", { className: "h-3 w-8 rounded-lg bg-gray-5 animate-pulse" })
5241
+ ] }) : /* @__PURE__ */ R(mn, { children: [
5242
+ /* @__PURE__ */ f("p", { className: "text-gray-60 text-sm font-semibold", children: s }),
5243
+ /* @__PURE__ */ f("p", { className: "text-gray-60 text-sm", children: "/" }),
5244
+ /* @__PURE__ */ f("p", { className: "text-gray-60 text-sm", children: g })
5245
+ ] }) }),
5246
+ x && /* @__PURE__ */ f("button", { className: "text-primary text-sm hover:text-primary-dark font-semibold", onClick: p, children: x })
5247
+ ] }),
5248
+ /* @__PURE__ */ f("div", { className: "flex w-full h-1.5 bg-gray-10 rounded-full", children: /* @__PURE__ */ f(
5249
+ "div",
5250
+ {
5251
+ className: "bg-gray-60 rounded-full",
5252
+ style: {
5253
+ width: `${l}%`
5254
+ }
5255
+ }
5256
+ ) })
5257
+ ] }), Op = ({
5258
+ header: s,
5259
+ primaryAction: g,
5260
+ suiteLauncher: l,
5261
+ collapsedPrimaryAction: p,
5262
+ options: x,
5263
+ showSubsections: N,
5264
+ isCollapsed: w = !1,
5265
+ storage: C,
5266
+ onToggleCollapse: A
5267
+ }) => /* @__PURE__ */ R(
5268
+ "div",
5269
+ {
5270
+ className: `relative flex flex-col p-2 h-full justify-between bg-gray-1 border-r border-gray-10 transition-all duration-300 group ${w ? "w-[60px]" : "w-64"}`,
5271
+ children: [
5272
+ /* @__PURE__ */ R("div", { className: "flex flex-col", children: [
5273
+ /* @__PURE__ */ f(
5274
+ cp,
4997
5275
  {
4998
- "data-testid": "outside-click-element",
4999
- className: "h-full w-full py-6",
5000
- onClick: Z,
5001
- onContextMenu: (F) => {
5002
- F.preventDefault(), Z();
5276
+ logo: s.logo,
5277
+ title: s.title,
5278
+ onClick: s.onClick,
5279
+ isCollapsed: w,
5280
+ onToggleCollapse: A,
5281
+ suiteLauncher: l,
5282
+ className: s.className
5283
+ }
5284
+ ),
5285
+ /* @__PURE__ */ R("div", { className: "flex flex-col gap-4 overflow-hidden", children: [
5286
+ /* @__PURE__ */ R("div", { className: "relative", children: [
5287
+ !w && /* @__PURE__ */ f("div", { className: "transition-opacity duration-300 opacity-100", children: g }),
5288
+ w && /* @__PURE__ */ f("div", { className: "transition-opacity duration-300 opacity-100", children: p })
5289
+ ] }),
5290
+ /* @__PURE__ */ f(op, { options: x, isCollapsed: w, showSubsections: N })
5291
+ ] })
5292
+ ] }),
5293
+ C && /* @__PURE__ */ f(
5294
+ "div",
5295
+ {
5296
+ className: `transition-all overflow-hidden duration-300 ${w ? "opacity-0 invisible delay-200" : "opacity-100 delay-0"}`,
5297
+ children: /* @__PURE__ */ f(
5298
+ hp,
5299
+ {
5300
+ usage: C.usage,
5301
+ limit: C.limit,
5302
+ percentage: C.percentage,
5303
+ onUpgradeClick: C.onUpgradeClick,
5304
+ upgradeLabel: C.upgradeLabel,
5305
+ isLoading: C.isLoading
5003
5306
  }
5004
- }
5005
- )
5006
- ] })
5007
- }
5008
- );
5009
- }, Ap = ({
5307
+ )
5308
+ }
5309
+ )
5310
+ ]
5311
+ }
5312
+ ), kp = ({
5313
+ isOpen: s,
5314
+ title: g,
5315
+ subTitle: l,
5316
+ dialogRounded: p,
5317
+ children: x,
5318
+ onClose: N,
5319
+ classes: w,
5320
+ panelClasses: C,
5321
+ titleClasses: A,
5322
+ closeClass: D,
5323
+ weightIcon: O,
5324
+ bgColor: T,
5325
+ dataTest: M,
5326
+ hideCloseButton: z
5327
+ }) => /* @__PURE__ */ f(
5328
+ "div",
5329
+ {
5330
+ "data-test": M,
5331
+ className: `${s ? "flex" : "hidden"} ${w || ""} absolute bottom-0 left-0 right-0 top-0 z-50 bg-black/40`,
5332
+ children: /* @__PURE__ */ R(
5333
+ "div",
5334
+ {
5335
+ className: `${C || ""} absolute left-1/2 top-1/2 flex w-104 -translate-x-1/2
5336
+ -translate-y-1/2 flex-col overflow-hidden ${p ? "rounded-2xl" : "rounded-lg pt-8"} text-gray-100 ${T || "bg-surface"}`,
5337
+ children: [
5338
+ /* @__PURE__ */ R("div", { className: `${l ? "justify-between bg-gray-1 p-5" : ""} flex flex-row items-start`, children: [
5339
+ g ? /* @__PURE__ */ R("div", { className: "relative flex max-w-full flex-1 flex-col truncate", children: [
5340
+ /* @__PURE__ */ f("span", { className: `${A || ""} truncate text-xl`, title: g, children: g }),
5341
+ /* @__PURE__ */ f("span", { className: "max-w-fit flex-1 truncate text-base font-normal text-gray-50", children: l })
5342
+ ] }) : null,
5343
+ z ? null : /* @__PURE__ */ f(
5344
+ "div",
5345
+ {
5346
+ className: `relative ml-auto cursor-pointer bg-surface
5347
+ transition duration-200 ease-in-out ${D || "text-primary hover:text-primary-dark"} `,
5348
+ children: /* @__PURE__ */ f(ka, { role: "button", onClick: N, size: 28, weight: O })
5349
+ }
5350
+ )
5351
+ ] }),
5352
+ x
5353
+ ]
5354
+ }
5355
+ )
5356
+ }
5357
+ ), Mp = ({
5010
5358
  isOpen: s,
5011
5359
  onClose: g,
5012
- children: l,
5013
- maxWidth: p,
5014
- className: x,
5015
- width: N,
5016
- preventClosing: w = !1,
5017
- stopMouseDownPropagation: C = !1
5360
+ onPrimaryAction: l,
5361
+ onSecondaryAction: p,
5362
+ title: x,
5363
+ subtitle: N,
5364
+ primaryAction: w,
5365
+ secondaryAction: C,
5366
+ primaryActionColor: A,
5367
+ isLoading: D,
5368
+ maxWidth: O = "sm"
5018
5369
  }) => {
5019
- const A = en(null), [D, O] = ue(s), [T, M] = ue("opacity-0"), [z, W] = ue("scale-95"), ne = () => {
5020
- const E = document.querySelectorAll("[data-modal]"), j = E[E.length - 1];
5021
- A.current === j && g();
5022
- }, S = (E) => {
5023
- C && E.stopPropagation();
5024
- };
5370
+ const [T, M] = ue(s), [z, W] = ue("opacity-0"), [ne, S] = ue("scale-95");
5025
5371
  return Ce(() => {
5026
5372
  if (s) {
5027
5373
  const E = setTimeout(() => {
5028
- M("opacity-100"), W("scale-100");
5374
+ W("opacity-100"), S("scale-100");
5029
5375
  }, 10);
5030
- return O(!0), () => clearTimeout(E);
5376
+ return M(!0), () => clearTimeout(E);
5031
5377
  } else {
5032
- M("opacity-0"), W("scale-95");
5378
+ W("opacity-0"), S("scale-95");
5033
5379
  const E = setTimeout(() => {
5034
- O(!1);
5380
+ M(!1);
5035
5381
  }, 150);
5036
5382
  return () => clearTimeout(E);
5037
5383
  }
5038
5384
  }, [s]), Ce(() => {
5039
5385
  const E = (j) => {
5040
- A.current && !A.current.contains(j.target) && !w && (j.preventDefault(), ne());
5041
- };
5042
- return s && document.addEventListener("mousedown", E), () => {
5043
- document.removeEventListener("mousedown", E);
5044
- };
5045
- }, [s, g, w]), Ce(() => {
5046
- const E = (j) => {
5047
- j.key === "Escape" && !w && (j.preventDefault(), ne());
5386
+ j.key === "Escape" && g();
5048
5387
  };
5049
5388
  return s && window.addEventListener("keydown", E), () => {
5050
5389
  window.removeEventListener("keydown", E);
5051
5390
  };
5052
- }, [s, g, w]), /* @__PURE__ */ f(mn, { children: D && /* @__PURE__ */ R("div", { className: "m-0", onMouseDown: S, role: "dialog", "aria-modal": "true", children: [
5391
+ }, [s, g]), /* @__PURE__ */ f(mn, { children: T && /* @__PURE__ */ R("div", { className: `fixed inset-0 z-50 ${s ? "" : "pointer-events-none"}`, children: [
5053
5392
  /* @__PURE__ */ f(
5054
5393
  "div",
5055
5394
  {
5056
- className: `
5057
- fixed
5058
- min-h-full
5059
- inset-0
5060
- z-[9999]
5061
- bg-highlight/40
5062
- transition-opacity
5063
- duration-150
5064
- ease-out
5065
- ${T}
5066
- pointer-events-none
5067
- `
5395
+ className: `absolute inset-0 bg-gray-100/50 transition-opacity duration-150 dark:bg-black/75 ${z}`,
5396
+ onClick: g,
5397
+ "data-testid": "dialog-overlay"
5068
5398
  }
5069
5399
  ),
5070
- /* @__PURE__ */ f(
5400
+ /* @__PURE__ */ R(
5071
5401
  "div",
5072
5402
  {
5073
- className: `
5074
- fixed
5075
- inset-0
5076
- z-[9999]
5077
- flex
5078
- min-h-full
5079
- items-center
5080
- justify-center
5081
- transition-opacity
5082
- duration-150
5083
- ease-out
5084
- overflow-y-auto
5085
- ${T}
5086
- ${z}
5087
- `,
5088
- children: /* @__PURE__ */ f(
5089
- "section",
5090
- {
5091
- "data-testid": "ModalContent",
5092
- ref: A,
5093
- "data-modal": !0,
5094
- className: `
5095
- ${N ?? "w-full"}
5096
- ${p ?? "max-w-lg"}
5097
- ${x ?? "p-5"}
5098
- text-gray-100
5099
- rounded-2xl
5100
- bg-surface
5101
- shadow-subtle-hard
5102
- transform
5103
- transition-all
5104
- duration-150
5105
- ease-out
5106
- ${T}
5107
- ${z}
5108
- `,
5109
- children: l
5110
- }
5111
- )
5403
+ className: `absolute left-1/2 top-1/2 w-full max-w-${O} -translate-x-1/2 -translate-y-1/2 transform rounded-2xl bg-surface p-5 transition-all duration-150 dark:bg-gray-1 ${ne} ${z}`,
5404
+ children: [
5405
+ /* @__PURE__ */ R("div", { className: "flex flex-col space-y-2", children: [
5406
+ /* @__PURE__ */ f("p", { className: "text-2xl font-medium text-gray-100", children: x }),
5407
+ /* @__PURE__ */ f("p", { className: "text-gray-60", children: N })
5408
+ ] }),
5409
+ /* @__PURE__ */ R("div", { className: "mt-5 flex justify-end space-x-2", children: [
5410
+ /* @__PURE__ */ f(Xi, { variant: "secondary", onClick: p, disabled: D, children: C }),
5411
+ /* @__PURE__ */ f(
5412
+ Xi,
5413
+ {
5414
+ onClick: l,
5415
+ loading: D,
5416
+ variant: A === "primary" ? "primary" : "destructive",
5417
+ children: w
5418
+ }
5419
+ )
5420
+ ] })
5421
+ ]
5112
5422
  }
5113
5423
  )
5114
5424
  ] }) });
5115
- }, Tp = ({ isOpen: s, onClose: g, children: l, className: p, disableBackdrop: x = !1 }) => {
5116
- const N = en(null), [w, C] = ue(s), [A, D] = ue("opacity-0"), [O, T] = ue("scale-95");
5117
- return Ce(() => {
5118
- if (s) {
5119
- C(!0);
5120
- const M = setTimeout(() => {
5121
- D("opacity-100"), T("scale-100");
5122
- }, 10);
5123
- return () => clearTimeout(M);
5124
- } else {
5125
- D("opacity-0"), T("scale-95");
5126
- const M = setTimeout(() => {
5127
- C(!1);
5128
- }, 150);
5129
- return () => clearTimeout(M);
5130
- }
5131
- }, [s]), Ce(() => {
5132
- const M = (z) => {
5133
- N.current && !N.current.contains(z.target) && g();
5134
- };
5135
- return s && !x && document.addEventListener("mousedown", M), () => {
5136
- document.removeEventListener("mousedown", M);
5137
- };
5138
- }, [s, g, x]), w ? /* @__PURE__ */ R(
5139
- "div",
5140
- {
5141
- className: `
5142
- fixed
5143
- inset-0
5144
- z-50
5145
- flex
5146
- items-center
5147
- justify-center
5148
- ${x ? "pointer-events-none" : ""}
5149
- `,
5150
- children: [
5151
- !x && /* @__PURE__ */ f(
5152
- "div",
5153
- {
5154
- className: `
5155
- fixed
5156
- inset-0
5157
- bg-black/50
5158
- backdrop-blur-sm
5159
- transition-opacity
5160
- duration-200
5161
- ${A}
5162
- `
5163
- }
5164
- ),
5165
- /* @__PURE__ */ f(
5166
- "div",
5167
- {
5168
- ref: N,
5169
- className: `
5170
- relative
5171
- flex
5172
- bg-black/15
5173
- border
5174
- border-white/15
5175
- rounded-[20px]
5176
- backdrop-blur
5177
- shadow-lg
5178
- transition-all
5179
- duration-200
5180
- pointer-events-auto
5181
- ${A}
5182
- ${O}
5183
- ${p}
5184
- `,
5185
- children: l
5186
- }
5187
- )
5188
- ]
5189
- }
5190
- ) : null;
5191
- }, ap = ({ childrenButton: s, panel: g, className: l, classButton: p, align: x = "right" }) => {
5192
- const [N, w] = ue(!1), C = en(null), [A, D] = ue(N), [O, T] = ue("opacity-0"), [M, z] = ue("scale-95"), W = () => w((E) => !E), ne = (E) => {
5193
- C.current && !C.current.contains(E.target) && S();
5194
- }, S = () => {
5195
- w(!1);
5425
+ }, Pp = ({
5426
+ isOpen: s,
5427
+ onClose: g,
5428
+ children: l,
5429
+ maxWidth: p,
5430
+ className: x,
5431
+ width: N,
5432
+ preventClosing: w = !1,
5433
+ stopMouseDownPropagation: C = !1
5434
+ }) => {
5435
+ const A = en(null), [D, O] = ue(s), [T, M] = ue("opacity-0"), [z, W] = ue("scale-95"), ne = () => {
5436
+ const E = document.querySelectorAll("[data-modal]"), j = E[E.length - 1];
5437
+ A.current === j && g();
5438
+ }, S = (E) => {
5439
+ C && E.stopPropagation();
5196
5440
  };
5197
5441
  return Ce(() => {
5198
- if (N) {
5442
+ if (s) {
5199
5443
  const E = setTimeout(() => {
5200
- T("opacity-100"), z("scale-100");
5444
+ M("opacity-100"), W("scale-100");
5201
5445
  }, 10);
5202
- return D(!0), () => clearTimeout(E);
5446
+ return O(!0), () => clearTimeout(E);
5203
5447
  } else {
5204
- T("opacity-0"), z("scale-95");
5448
+ M("opacity-0"), W("scale-95");
5205
5449
  const E = setTimeout(() => {
5206
- D(!1);
5207
- }, 100);
5450
+ O(!1);
5451
+ }, 150);
5208
5452
  return () => clearTimeout(E);
5209
5453
  }
5210
- }, [N]), Ce(() => (document.addEventListener("mousedown", ne), () => {
5211
- document.removeEventListener("mousedown", ne);
5212
- }), []), /* @__PURE__ */ R("div", { style: { lineHeight: 0 }, className: `relative ${l}`, children: [
5454
+ }, [s]), Ce(() => {
5455
+ const E = (j) => {
5456
+ A.current && !A.current.contains(j.target) && !w && (j.preventDefault(), ne());
5457
+ };
5458
+ return s && document.addEventListener("mousedown", E), () => {
5459
+ document.removeEventListener("mousedown", E);
5460
+ };
5461
+ }, [s, g, w]), Ce(() => {
5462
+ const E = (j) => {
5463
+ j.key === "Escape" && !w && (j.preventDefault(), ne());
5464
+ };
5465
+ return s && window.addEventListener("keydown", E), () => {
5466
+ window.removeEventListener("keydown", E);
5467
+ };
5468
+ }, [s, g, w]), /* @__PURE__ */ f(mn, { children: D && /* @__PURE__ */ R("div", { className: "m-0", onMouseDown: S, role: "dialog", "aria-modal": "true", children: [
5213
5469
  /* @__PURE__ */ f(
5214
- "button",
5215
- {
5216
- onClick: W,
5217
- className: `cursor-pointer outline-none ${p}`,
5218
- "aria-expanded": N,
5219
- "data-testid": "popover-button",
5220
- children: s
5221
- }
5222
- ),
5223
- A && /* @__PURE__ */ f(
5224
5470
  "div",
5225
5471
  {
5226
- ref: C,
5227
- className: `absolute z-50 mt-1 transform rounded-md border border-gray-10 ${x === "left" ? "left-0 origin-top-left" : "right-0 origin-top-right"} bg-surface py-1.5 shadow-subtle duration-100 ease-out dark:bg-gray-5 ${O} ${M}`,
5228
- children: g(S)
5229
- }
5230
- )
5231
- ] });
5232
- }, Ep = ({ checked: s, id: g, disabled: l = !1, onClick: p }) => /* @__PURE__ */ R("div", { id: g, className: "flex cursor-pointer", children: [
5233
- /* @__PURE__ */ f(
5234
- "button",
5235
- {
5236
- disabled: l,
5237
- onClick: p,
5238
- className: `flex h-5 w-5 items-center justify-center rounded-full border ${l && s ? "border-0 bg-gray-20" : s && "border-0 bg-primary active:bg-primary-dark"} ${l ? "border-gray-10" : "border-gray-40"}`,
5239
- children: /* @__PURE__ */ f("div", { className: `h-2.5 w-2.5 rounded-full ${s || l ? "bg-white" : "hover:bg-gray-10"}` })
5240
- }
5241
- ),
5242
- /* @__PURE__ */ f("input", { type: "radio", className: "h-0 w-0 appearance-none opacity-0", checked: !0, readOnly: !0 })
5243
- ] }), Lp = ({
5244
- value: s,
5245
- min: g = 0,
5246
- max: l,
5247
- step: p,
5248
- className: x,
5249
- disabled: N = !1,
5250
- ariaLabel: w = "Range slider",
5251
- onChange: C
5252
- }) => {
5253
- const A = (s - g) / (l - g) * 100, D = `linear-gradient(to right, #3264fe ${A}%, #d5d5d5 ${A}%)`;
5254
- return /* @__PURE__ */ f("div", { className: x, children: /* @__PURE__ */ f(
5255
- "input",
5256
- {
5257
- id: "my-slider",
5258
- type: "range",
5259
- min: g,
5260
- max: l,
5261
- value: s,
5262
- step: p,
5263
- onInput: (O) => C(Number(O.target.value)),
5264
- disabled: N,
5265
- "aria-label": w,
5266
- style: { background: D }
5267
- }
5268
- ) });
5269
- };
5270
- function op({
5271
- className: s = "",
5272
- suiteArray: g,
5273
- soonText: l,
5274
- align: p = "right"
5275
- }) {
5276
- const x = /* @__PURE__ */ f("div", { className: "flex h-10 w-10 items-center justify-center", children: /* @__PURE__ */ f(M0, { size: 26, className: "h-7 w-7", weight: "bold" }) }), N = /* @__PURE__ */ f("div", { className: "w-64 flex flex-wrap p-2", "data-testid": "suite-launcher-panel", children: g.map((w, C) => /* @__PURE__ */ f(
5277
- "div",
5278
- {
5279
- className: `w-1/3 flex items-center justify-center rounded-md ${w.isMain ? "bg-primary/10 dark:bg-primary/20" : ""}`,
5280
- children: /* @__PURE__ */ f(
5281
- "div",
5282
- {
5283
- role: "none",
5284
- className: `flex items-center px-3 py-2 text-gray-80 w-full rounded-md ${w.availableSoon ? "" : "cursor-pointer hover:bg-gray-1 dark:hover:bg-gray-10"}`,
5285
- style: { lineHeight: 1.25 },
5286
- onClick: w.availableSoon ? void 0 : w.onClick,
5287
- children: /* @__PURE__ */ R("div", { className: "flex flex-col items-center w-full rounded-md", children: [
5288
- w.isLocked ? /* @__PURE__ */ f(
5289
- k0,
5290
- {
5291
- size: 26,
5292
- weight: "regular",
5293
- className: "opacity-50 filter grayscale",
5294
- "data-testid": "suite-launcher-lock-icon"
5295
- }
5296
- ) : ka(w.icon) ? B0(w.icon, {
5297
- size: 26,
5298
- className: `${w.icon.props?.className ?? ""} ${w.isMain ? "text-primary" : ""} ${w.availableSoon || w.isLocked ? "opacity-50 filter grayscale" : ""}`,
5299
- weight: w.isMain ? "fill" : "regular"
5300
- }) : w.icon,
5301
- /* @__PURE__ */ R("div", { className: "mt-1 flex items-center", children: [
5302
- /* @__PURE__ */ f(
5303
- "span",
5304
- {
5305
- className: `text-xs ${w.isMain ? "text-primary font-medium" : "text-gray-60"}`,
5306
- style: { lineHeight: 1, opacity: w.availableSoon || w.isLocked ? 0.5 : 1 },
5307
- children: w.title
5308
- }
5309
- ),
5310
- w.availableSoon && /* @__PURE__ */ f("div", { className: "flex rounded-sm px-1 ml-1 py-0.5 bg-purple-1 dark:bg-purple-10 items-center", children: /* @__PURE__ */ f(
5311
- "span",
5312
- {
5313
- className: "font-medium dark:font-normal text-purple-10 dark:text-purple-1",
5314
- style: { lineHeight: 1, fontSize: "xx-small" },
5315
- children: l ?? "Soon"
5316
- }
5317
- ) })
5318
- ] })
5319
- ] })
5320
- }
5321
- )
5322
- },
5323
- C
5324
- )) });
5325
- return /* @__PURE__ */ f(
5326
- ap,
5327
- {
5328
- className: s,
5329
- childrenButton: x,
5330
- panel: () => N,
5331
- align: p,
5332
- "data-testid": "app-suite-dropdown"
5333
- }
5334
- );
5335
- }
5336
- const Rp = ({
5337
- disabled: s = !1,
5338
- id: g,
5339
- dataTestId: l = "switch",
5340
- size: p = "md",
5341
- onClick: x,
5342
- onCheckedChange: N
5343
- }) => {
5344
- const [w, C] = ue(!1), A = (z) => {
5345
- const W = z.target.checked;
5346
- C(W), N && N(W);
5347
- }, D = s ? "bg-gray-5" : w ? "bg-green" : "bg-gray-10", O = {
5348
- md: "w-8 h-5",
5349
- lg: "w-12 h-7",
5350
- xl: "w-14 h-8"
5351
- }, T = {
5352
- md: "w-4 h-4",
5353
- lg: "w-6 h-6",
5354
- xl: "w-7 h-7"
5355
- }, M = {
5356
- md: "translate-x-[13px]",
5357
- lg: "translate-x-[21px]",
5358
- xl: "translate-x-[25px]"
5359
- };
5360
- return /* @__PURE__ */ R(
5361
- "label",
5362
- {
5363
- htmlFor: g,
5364
- className: `relative inline-flex items-center cursor-pointer ${O[p]}`,
5365
- "data-testid": l,
5366
- children: [
5367
- /* @__PURE__ */ f(
5368
- "input",
5369
- {
5370
- type: "checkbox",
5371
- id: g,
5372
- disabled: s,
5373
- checked: w,
5374
- onChange: A,
5375
- onClick: x,
5376
- className: "sr-only"
5377
- }
5378
- ),
5379
- /* @__PURE__ */ f(
5380
- "div",
5381
- {
5382
- className: `absolute inset-0 rounded-full transition-colors duration-200 ${D} ${s ? "data-[state=checked]:bg-green/50" : ""}`
5383
- }
5384
- ),
5385
- /* @__PURE__ */ f(
5386
- "span",
5387
- {
5388
- className: `block bg-white rounded-full transition-transform duration-200 transform ${w ? M[p] : "translate-x-[3px]"} ${T[p]} ${s ? "pointer-events-none" : ""}`
5389
- }
5390
- )
5391
- ]
5392
- }
5393
- );
5394
- }, $p = ({ children: s, className: g, ...l }) => /* @__PURE__ */ f("div", { className: g, children: /* @__PURE__ */ f("table", { className: "w-full", ...l, children: s }) }), Dp = ({ children: s, className: g, ...l }) => /* @__PURE__ */ f("thead", { className: g, ...l, children: s }), Op = ({ children: s, className: g, ...l }) => /* @__PURE__ */ f("tbody", { className: g, ...l, children: s }), kp = ({ children: s, className: g, onClick: l, ...p }) => /* @__PURE__ */ f("tr", { onClick: l, className: g, ...p, children: s }), Mp = ({ children: s, className: g, isHeader: l = !1, onClick: p, ...x }) => /* @__PURE__ */ f(l ? "th" : "td", { onClick: p, className: g, ...x, children: s }), Pp = ({
5395
- disabled: s = !1,
5396
- accentColor: g,
5397
- placeholder: l = "",
5398
- value: p = "",
5399
- onChange: x,
5400
- name: N
5401
- }) => /* @__PURE__ */ f(
5402
- "textarea",
5403
- {
5404
- disabled: s,
5405
- placeholder: l,
5406
- className: `
5407
- w-full h-full py-4 px-3.5 bg-transparent border rounded-md outline-none text-lg font-regular resize-none
5408
- placeholder:text-gray-30
5409
- ${s ? "border-gray-5 text-gray-40" : "border-gray-20 text-gray-100"}
5410
- ${!g && "border-gray-20 focus:border-primary focus:ring focus:ring-primary/10"}
5411
- ${g === "red" && "border-red focus:ring focus:ring-red/10"}
5412
- `,
5413
- value: p,
5414
- onChange: x,
5415
- name: N
5416
- }
5417
- ), sp = ({
5418
- label: s,
5419
- Icon: g,
5420
- onClick: l,
5421
- notifications: p,
5422
- iconDataCy: x,
5423
- isActive: N = !1,
5424
- isCollapsed: w = !1,
5425
- subsection: C = !1
5426
- }) => /* @__PURE__ */ f(
5427
- "button",
5428
- {
5429
- onClick: l,
5430
- "data-cy": x,
5431
- className: `flex w-full flex-col overflow-hidden focus-visible:bg-gray-10 rounded-lg ${N ? "bg-primary/20" : "hover:bg-gray-5"} ${C ? "pl-5" : ""}`,
5432
- title: w ? s : void 0,
5433
- children: /* @__PURE__ */ R("div", { className: "flex flex-row px-2.5 py-2 w-full items-center justify-between min-h-[36px]", children: [
5434
- /* @__PURE__ */ R("div", { className: `flex flex-row gap-3 items-center ${N ? "text-primary" : "text-gray-80"}`, children: [
5435
- /* @__PURE__ */ f(g, { size: 20, weight: N ? "fill" : "regular", className: "flex-shrink-0" }),
5436
- /* @__PURE__ */ f(
5437
- "p",
5472
+ className: `
5473
+ fixed
5474
+ min-h-full
5475
+ inset-0
5476
+ z-[9999]
5477
+ bg-highlight/40
5478
+ transition-opacity
5479
+ duration-150
5480
+ ease-out
5481
+ ${T}
5482
+ pointer-events-none
5483
+ `
5484
+ }
5485
+ ),
5486
+ /* @__PURE__ */ f(
5487
+ "div",
5488
+ {
5489
+ className: `
5490
+ fixed
5491
+ inset-0
5492
+ z-[9999]
5493
+ flex
5494
+ min-h-full
5495
+ items-center
5496
+ justify-center
5497
+ transition-opacity
5498
+ duration-150
5499
+ ease-out
5500
+ overflow-y-auto
5501
+ ${T}
5502
+ ${z}
5503
+ `,
5504
+ children: /* @__PURE__ */ f(
5505
+ "section",
5438
5506
  {
5439
- className: `font-medium whitespace-nowrap overflow-hidden transition-all duration-300 ${w ? "opacity-0 delay-200" : "opacity-100 delay-0"}`,
5440
- children: s
5507
+ "data-testid": "ModalContent",
5508
+ ref: A,
5509
+ "data-modal": !0,
5510
+ className: `
5511
+ ${N ?? "w-full"}
5512
+ ${p ?? "max-w-lg"}
5513
+ ${x ?? "p-5"}
5514
+ text-gray-100
5515
+ rounded-2xl
5516
+ bg-surface
5517
+ shadow-subtle-hard
5518
+ transform
5519
+ transition-all
5520
+ duration-150
5521
+ ease-out
5522
+ ${T}
5523
+ ${z}
5524
+ `,
5525
+ children: l
5441
5526
  }
5442
5527
  )
5443
- ] }),
5444
- /* @__PURE__ */ f(
5445
- "div",
5446
- {
5447
- className: `flex rounded-full px-2 py-1 transition-all duration-300 ${N ? "text-white bg-primary" : "bg-gray-10 text-gray-60"} ${w || !p ? "opacity-0 invisible delay-300" : "opacity-100 delay-0"}`,
5448
- children: p && /* @__PURE__ */ f("p", { className: "text-xs font-medium", children: p })
5449
- }
5450
- )
5451
- ] })
5452
- }
5453
- ), fp = ({ options: s, isCollapsed: g, showSubsections: l }) => /* @__PURE__ */ f("div", { className: "flex flex-col w-full", children: s.filter((p) => p.isVisible).map((p, x) => p.subsection && !l || g && p.subsection ? null : /* @__PURE__ */ f(
5454
- sp,
5455
- {
5456
- label: p.label,
5457
- Icon: p.icon,
5458
- iconDataCy: p.iconDataCy,
5459
- isActive: p.isActive,
5460
- notifications: p.notifications,
5461
- onClick: p.onClick,
5462
- isCollapsed: g,
5463
- subsection: p.subsection
5464
- },
5465
- `${p.iconDataCy}-${x}`
5466
- )) }), cp = ({
5467
- logo: s,
5468
- title: g,
5469
- onClick: l,
5470
- isCollapsed: p,
5471
- className: x,
5472
- onToggleCollapse: N,
5473
- suiteLauncher: w
5474
- }) => /* @__PURE__ */ R("div", { className: `flex flex-row justify-between w-full py-5 px-2 ${x}`, children: [
5475
- /* @__PURE__ */ R("div", { className: "relative flex flex-row gap-2 items-center", children: [
5476
- /* @__PURE__ */ R("button", { className: "flex flex-row gap-2 items-center", onClick: l, children: [
5477
- /* @__PURE__ */ f(
5478
- "img",
5479
- {
5480
- src: s,
5481
- width: 28,
5482
- height: 28,
5483
- alt: g,
5484
- className: `flex-shrink-0 min-w-[28px] min-h-[28px] ${p ? "group-hover:hidden" : ""}`
5485
- }
5486
- ),
5487
- !p && /* @__PURE__ */ f("p", { className: "text-xl font-medium text-gray-100 whitespace-nowrap", children: g })
5488
- ] }),
5489
- p && N && /* @__PURE__ */ f(
5490
- "button",
5491
- {
5492
- onClick: N,
5493
- className: "hidden group-hover:flex items-center justify-center text-gray-80 absolute left-0",
5494
- children: /* @__PURE__ */ f(Aa, { size: 28 })
5495
5528
  }
5496
5529
  )
5497
- ] }),
5498
- /* @__PURE__ */ R(
5530
+ ] }) });
5531
+ }, Bp = ({ isOpen: s, onClose: g, children: l, className: p, disableBackdrop: x = !1 }) => {
5532
+ const N = en(null), [w, C] = ue(s), [A, D] = ue("opacity-0"), [O, T] = ue("scale-95");
5533
+ return Ce(() => {
5534
+ if (s) {
5535
+ C(!0);
5536
+ const M = setTimeout(() => {
5537
+ D("opacity-100"), T("scale-100");
5538
+ }, 10);
5539
+ return () => clearTimeout(M);
5540
+ } else {
5541
+ D("opacity-0"), T("scale-95");
5542
+ const M = setTimeout(() => {
5543
+ C(!1);
5544
+ }, 150);
5545
+ return () => clearTimeout(M);
5546
+ }
5547
+ }, [s]), Ce(() => {
5548
+ const M = (z) => {
5549
+ N.current && !N.current.contains(z.target) && g();
5550
+ };
5551
+ return s && !x && document.addEventListener("mousedown", M), () => {
5552
+ document.removeEventListener("mousedown", M);
5553
+ };
5554
+ }, [s, g, x]), w ? /* @__PURE__ */ R(
5499
5555
  "div",
5500
5556
  {
5501
- className: `flex z-20 flex-row gap-2 items-center transition-opacity duration-100 ${p ? "opacity-0 invisible" : "opacity-100"}`,
5557
+ className: `
5558
+ fixed
5559
+ inset-0
5560
+ z-50
5561
+ flex
5562
+ items-center
5563
+ justify-center
5564
+ ${x ? "pointer-events-none" : ""}
5565
+ `,
5502
5566
  children: [
5503
- w && /* @__PURE__ */ f(
5504
- op,
5567
+ !x && /* @__PURE__ */ f(
5568
+ "div",
5505
5569
  {
5506
- suiteArray: w?.suiteArray,
5507
- soonText: w?.soonText,
5508
- className: `text-gray-80 ${w?.className}`,
5509
- align: "left"
5570
+ className: `
5571
+ fixed
5572
+ inset-0
5573
+ bg-black/50
5574
+ backdrop-blur-sm
5575
+ transition-opacity
5576
+ duration-200
5577
+ ${A}
5578
+ `
5510
5579
  }
5511
5580
  ),
5512
- N && /* @__PURE__ */ f(
5513
- "button",
5581
+ /* @__PURE__ */ f(
5582
+ "div",
5514
5583
  {
5515
- onClick: N,
5516
- className: "flex items-center justify-center text-gray-80 hover:text-gray-90",
5517
- children: /* @__PURE__ */ f(Aa, { size: 28 })
5584
+ ref: N,
5585
+ className: `
5586
+ relative
5587
+ flex
5588
+ bg-black/15
5589
+ border
5590
+ border-white/15
5591
+ rounded-[20px]
5592
+ backdrop-blur
5593
+ shadow-lg
5594
+ transition-all
5595
+ duration-200
5596
+ pointer-events-auto
5597
+ ${A}
5598
+ ${O}
5599
+ ${p}
5600
+ `,
5601
+ children: l
5518
5602
  }
5519
5603
  )
5520
5604
  ]
5521
5605
  }
5522
- )
5523
- ] }), hp = ({
5524
- usage: s,
5525
- limit: g,
5526
- percentage: l,
5527
- onUpgradeClick: p,
5528
- upgradeLabel: x,
5529
- isLoading: N = !0
5530
- }) => /* @__PURE__ */ R("div", { className: "flex flex-col w-full gap-2.5 px-2 pb-5", children: [
5531
- /* @__PURE__ */ R("div", { className: "flex flex-row w-full justify-between", children: [
5532
- /* @__PURE__ */ f("div", { className: "flex flex-row items-center gap-2", children: N ? /* @__PURE__ */ R("div", { className: "flex flex-row items-center gap-2", children: [
5533
- /* @__PURE__ */ f("div", { className: "h-3 w-8 rounded-lg bg-gray-5 animate-pulse" }),
5534
- /* @__PURE__ */ f("div", { className: "h-3 w-2 rounded-lg bg-gray-5 animate-pulse" }),
5535
- /* @__PURE__ */ f("div", { className: "h-3 w-8 rounded-lg bg-gray-5 animate-pulse" })
5536
- ] }) : /* @__PURE__ */ R(mn, { children: [
5537
- /* @__PURE__ */ f("p", { className: "text-gray-60 text-sm font-semibold", children: s }),
5538
- /* @__PURE__ */ f("p", { className: "text-gray-60 text-sm", children: "/" }),
5539
- /* @__PURE__ */ f("p", { className: "text-gray-60 text-sm", children: g })
5540
- ] }) }),
5541
- x && /* @__PURE__ */ f("button", { className: "text-primary text-sm hover:text-primary-dark font-semibold", onClick: p, children: x })
5542
- ] }),
5543
- /* @__PURE__ */ f("div", { className: "flex w-full h-1.5 bg-gray-10 rounded-full", children: /* @__PURE__ */ f(
5544
- "div",
5545
- {
5546
- className: "bg-gray-60 rounded-full",
5547
- style: {
5548
- width: `${l}%`
5549
- }
5550
- }
5551
- ) })
5552
- ] }), Bp = ({
5553
- header: s,
5554
- primaryAction: g,
5555
- suiteLauncher: l,
5556
- collapsedPrimaryAction: p,
5557
- options: x,
5558
- showSubsections: N,
5559
- isCollapsed: w = !1,
5560
- storage: C,
5561
- onToggleCollapse: A
5562
- }) => /* @__PURE__ */ R(
5563
- "div",
5564
- {
5565
- className: `relative flex flex-col p-2 h-full justify-between bg-gray-1 border-r border-gray-10 transition-all duration-300 group ${w ? "w-[60px]" : "w-64"}`,
5566
- children: [
5567
- /* @__PURE__ */ R("div", { className: "flex flex-col", children: [
5568
- /* @__PURE__ */ f(
5569
- cp,
5570
- {
5571
- logo: s.logo,
5572
- title: s.title,
5573
- onClick: s.onClick,
5574
- isCollapsed: w,
5575
- onToggleCollapse: A,
5576
- suiteLauncher: l,
5577
- className: s.className
5578
- }
5579
- ),
5580
- /* @__PURE__ */ R("div", { className: "flex flex-col gap-4 overflow-hidden", children: [
5581
- /* @__PURE__ */ R("div", { className: "relative", children: [
5582
- !w && /* @__PURE__ */ f("div", { className: "transition-opacity duration-300 opacity-100", children: g }),
5583
- w && /* @__PURE__ */ f("div", { className: "transition-opacity duration-300 opacity-100", children: p })
5584
- ] }),
5585
- /* @__PURE__ */ f(fp, { options: x, isCollapsed: w, showSubsections: N })
5586
- ] })
5587
- ] }),
5588
- C && /* @__PURE__ */ f(
5589
- "div",
5590
- {
5591
- className: `transition-all overflow-hidden duration-300 ${w ? "opacity-0 invisible delay-200" : "opacity-100 delay-0"}`,
5592
- children: /* @__PURE__ */ f(
5593
- hp,
5594
- {
5595
- usage: C.usage,
5596
- limit: C.limit,
5597
- percentage: C.percentage,
5598
- onUpgradeClick: C.onUpgradeClick,
5599
- upgradeLabel: C.upgradeLabel,
5600
- isLoading: C.isLoading
5601
- }
5602
- )
5603
- }
5604
- )
5605
- ]
5606
- }
5607
- ), Ra = () => /* @__PURE__ */ f("div", { className: "flex flex-col text-left gap-2 w-full py-3 px-5 border-b border-gray-5", children: /* @__PURE__ */ R("div", { className: "flex flex-row w-full gap-2", children: [
5606
+ ) : null;
5607
+ }, Ra = () => /* @__PURE__ */ f("div", { className: "flex flex-col text-left gap-2 w-full py-3 px-5 border-b border-gray-5", children: /* @__PURE__ */ R("div", { className: "flex flex-row w-full gap-2", children: [
5608
5608
  /* @__PURE__ */ f("div", { className: "flex flex-col h-7 w-8 rounded-full animate-pulse bg-gray-10" }),
5609
5609
  /* @__PURE__ */ R("div", { className: "flex flex-col gap-1 w-full", children: [
5610
5610
  /* @__PURE__ */ R("div", { className: "flex flex-row w-full justify-between", children: [
@@ -5619,7 +5619,7 @@ const Rp = ({
5619
5619
  return /* @__PURE__ */ f(
5620
5620
  "button",
5621
5621
  {
5622
- onClick: () => p(s.id),
5622
+ onClick: () => p(s.id, s.read),
5623
5623
  className: `flex flex-col border-b border-gray-10 text-left gap-2 w-full py-3 px-5 ${x ? "bg-primary/10" : ""}`,
5624
5624
  children: /* @__PURE__ */ R("div", { className: "flex flex-row w-full gap-2", children: [
5625
5625
  /* @__PURE__ */ f(Ma, { fullName: s.from.name, src: s.from.avatar, size: "xxs" }),
@@ -5678,45 +5678,45 @@ const Rp = ({
5678
5678
  ] }) });
5679
5679
  export {
5680
5680
  Ma as Avatar,
5681
- vp as BaseDialog,
5682
- xp as Breadcrumbs,
5681
+ kp as BaseDialog,
5682
+ Dp as Breadcrumbs,
5683
5683
  Xi as Button,
5684
- _p as Card,
5685
- Pa as Checkbox,
5686
- wp as CircleButton,
5684
+ vp as Card,
5685
+ Ba as Checkbox,
5686
+ Sp as CircleButton,
5687
5687
  X0 as ContextMenu,
5688
- yp as Copyable,
5689
- bp as Dialog,
5690
- G0 as Dropdown,
5691
- Np as Empty,
5692
- Cp as Header,
5688
+ Ip as Copyable,
5689
+ Mp as Dialog,
5690
+ up as Dropdown,
5691
+ Cp as Empty,
5692
+ $p as Header,
5693
5693
  Wa as InfiniteScroll,
5694
- Sp as Input,
5695
- Ip as List,
5696
- K0 as Loader,
5697
- Ba as Menu,
5694
+ Ap as Input,
5695
+ xp as List,
5696
+ rp as Loader,
5697
+ Pa as Menu,
5698
5698
  dp as MessageCheap,
5699
5699
  Ra as MessageCheapSkeleton,
5700
- Ap as Modal,
5701
- ap as Popover,
5702
- Ep as RadioButton,
5703
- Lp as RangeSlider,
5704
- Bp as Sidenav,
5700
+ Pp as Modal,
5701
+ sp as Popover,
5702
+ Tp as RadioButton,
5703
+ Ep as RangeSlider,
5704
+ Op as Sidenav,
5705
5705
  cp as SidenavHeader,
5706
- sp as SidenavItem,
5707
- fp as SidenavOptions,
5706
+ ap as SidenavItem,
5707
+ op as SidenavOptions,
5708
5708
  hp as SidenavStorage,
5709
- up as SkeletonLoader,
5710
- op as SuiteLauncher,
5711
- Rp as SwitchComponent,
5712
- $p as Table,
5713
- Op as TableBody,
5714
- Mp as TableCell,
5715
- Dp as TableHeader,
5716
- kp as TableRow,
5717
- Pp as TextArea,
5718
- J0 as Tooltip,
5719
- Tp as TransparentModal,
5709
+ tp as SkeletonLoader,
5710
+ fp as SuiteLauncher,
5711
+ Lp as SwitchComponent,
5712
+ wp as Table,
5713
+ yp as TableBody,
5714
+ Np as TableCell,
5715
+ _p as TableHeader,
5716
+ bp as TableRow,
5717
+ Rp as TextArea,
5718
+ ip as Tooltip,
5719
+ Bp as TransparentModal,
5720
5720
  Wp as Tray,
5721
5721
  Fp as UserCheap
5722
5722
  };