@apia/components 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,10 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { Box as Box$1, Input, getVariant, makeStyledComponent, Button, Flex, spacing, Spinner, IconButton as IconButton$2, Image, useBreakpointIndex, Close, responsive, Heading as Heading$1, useThemeUI, injectStyles, Select, focusOutline, Label, Progress, Grid } from '@apia/theme';
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
3
2
  import * as React from 'react';
4
- import React__default, { useRef, useCallback, useState, useEffect, createContext, useContext, useMemo, forwardRef, useTransition, useDeferredValue, Children, memo, isValidElement, cloneElement, createElement, lazy } from 'react';
5
- import { ApiaApi, makeApiaUrl } from '@apia/api';
6
- import { useMount, useLatest, arrayOrArray, findScrollContainer, getSpecificParent, getLabel, useUpdateEffect, debugDispatcher, useCombinedRefs, focus, focusSelector, getFocusSelector, screenLocker, customEvents, isChild, getDateFormat, persistentStorage, disableChildrenFocus, enableChildrenFocus, EventEmitter, useDebouncedCallback, getIndex, addBoundary, noNaN, usePrevious, useUnmount, usePropsSelector, PropsStore } from '@apia/util';
7
- import { Box, Heading, Input as Input$1 } from 'theme-ui';
8
- import { IconButton as IconButton$1, ApiaUtil as ApiaUtil$1 } from '@apia/components';
9
- import { Icon as Icon$1, icons, isIconName } from '@apia/icons';
3
+ import React__default, { createContext, useContext, useMemo, useEffect, useState, useRef, forwardRef, useCallback, useTransition, useDeferredValue, Children, memo, isValidElement, cloneElement, createElement, lazy } from 'react';
10
4
  import { shallowEqual } from '@apia/store';
5
+ import { Box, getVariant, Button, Flex, spacing, Spinner, IconButton as IconButton$1, Image, Input, useBreakpointIndex, Close, responsive, Heading, useThemeUI, injectStyles, Select, focusOutline, makeStyledComponent, Label, Progress, Grid } from '@apia/theme';
6
+ import { findScrollContainer, getSpecificParent, getLabel, useUpdateEffect, debugDispatcher, useCombinedRefs, focus, focusSelector, getFocusSelector, screenLocker, customEvents, isChild, getDateFormat, persistentStorage, disableChildrenFocus, enableChildrenFocus, EventEmitter, useDebouncedCallback, getIndex, addBoundary, noNaN, usePrevious, useMount, useUnmount, useLatest, usePropsSelector, PropsStore } from '@apia/util';
7
+ import { icons, Icon as Icon$1, isIconName } from '@apia/icons';
11
8
  import { uniqueId as uniqueId$1, isFunction as isFunction$1, clone } from 'lodash-es';
12
9
  import dayjs from 'dayjs';
13
10
  import { isFunction, uniqueId as uniqueId$2 } from 'lodash';
@@ -19,908 +16,11 @@ import { BarLoader } from 'react-spinners';
19
16
  import AnimateHeight from 'react-animate-height';
20
17
  import { useUpdateEffect as useUpdateEffect$1 } from 'ahooks';
21
18
  import { createFAsomeStore } from '@apia/dom-store';
19
+ import { IconButton as IconButton$2 } from '@apia/components';
22
20
  import { defaultNotifier, NotificationsList } from '@apia/notifications';
23
21
  import { ControlledMenu, MenuDivider, SubMenu, MenuItem, useMenuState } from '@szhsin/react-menu';
24
22
  import { shallowEqual as shallowEqual$1 } from 'react-redux';
25
23
 
26
- var __async$5 = (__this, __arguments, generator) => {
27
- return new Promise((resolve, reject) => {
28
- var fulfilled = (value) => {
29
- try {
30
- step(generator.next(value));
31
- } catch (e) {
32
- reject(e);
33
- }
34
- };
35
- var rejected = (value) => {
36
- try {
37
- step(generator.throw(value));
38
- } catch (e) {
39
- reject(e);
40
- }
41
- };
42
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
43
- step((generator = generator.apply(__this, __arguments)).next());
44
- });
45
- };
46
- const useGetChatData = () => {
47
- const data = useRef(null);
48
- const cbs = useRef([]);
49
- const useData = useCallback(() => {
50
- const [state, setState] = useState(data.current);
51
- useMount(() => {
52
- setState(data.current);
53
- const cb = () => {
54
- setState(data.current);
55
- };
56
- cbs.current.push(cb);
57
- return () => {
58
- cbs.current = cbs.current.filter((search) => search !== cb);
59
- };
60
- });
61
- return state;
62
- }, []);
63
- const setData = useCallback((newData) => {
64
- data.current = newData;
65
- cbs.current.forEach((current) => current(data.current));
66
- }, []);
67
- const setDataRef = useLatest(setData);
68
- const fetchData = useCallback(() => __async$5(void 0, null, function* () {
69
- try {
70
- const newData = yield ApiaApi.post(
71
- makeApiaUrl({
72
- ajaxUrl: "apia/server.chat",
73
- action: "callback",
74
- tabId: window.TAB_ID
75
- }),
76
- { postDataTreatement: "stringify" }
77
- );
78
- if (!(newData == null ? void 0 : newData.data))
79
- return;
80
- setDataRef.current({
81
- status: newData.data.status,
82
- users: arrayOrArray(newData.data.users.user),
83
- groups: arrayOrArray(newData.data.groups.group),
84
- conversations: arrayOrArray(newData.data.conversations.conversation)
85
- });
86
- } catch (error) {
87
- }
88
- }), [setDataRef]);
89
- useMount(() => {
90
- const interval = setInterval(() => __async$5(void 0, null, function* () {
91
- yield fetchData();
92
- }), 1e3);
93
- return () => {
94
- clearInterval(interval);
95
- };
96
- });
97
- return { fetchData, useData };
98
- };
99
-
100
- var __async$4 = (__this, __arguments, generator) => {
101
- return new Promise((resolve, reject) => {
102
- var fulfilled = (value) => {
103
- try {
104
- step(generator.next(value));
105
- } catch (e) {
106
- reject(e);
107
- }
108
- };
109
- var rejected = (value) => {
110
- try {
111
- step(generator.throw(value));
112
- } catch (e) {
113
- reject(e);
114
- }
115
- };
116
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
117
- step((generator = generator.apply(__this, __arguments)).next());
118
- });
119
- };
120
- const chatRequestHandlers = {
121
- closeChat: (conversationId) => __async$4(void 0, null, function* () {
122
- const newData = yield ApiaApi.post(
123
- makeApiaUrl({
124
- ajaxUrl: "apia/server.chat",
125
- action: "quitConversation",
126
- tabId: window.TAB_ID,
127
- conversationId
128
- }),
129
- { postDataTreatement: "stringify" }
130
- );
131
- return newData;
132
- }),
133
- sendMessage: (conversationId, message) => __async$4(void 0, null, function* () {
134
- const newData = yield ApiaApi.post(
135
- makeApiaUrl({
136
- ajaxUrl: "apia/server.chat",
137
- action: "sendMessage",
138
- tabId: window.TAB_ID,
139
- conversationId,
140
- message
141
- }),
142
- { postDataTreatement: "stringify" }
143
- );
144
- return newData;
145
- }),
146
- openConversation: (userId, title) => __async$4(void 0, null, function* () {
147
- const newData = yield ApiaApi.post(
148
- makeApiaUrl({
149
- ajaxUrl: "apia/server.chat",
150
- action: "startConversation",
151
- tabId: window.TAB_ID,
152
- title,
153
- userId
154
- }),
155
- { postDataTreatement: "stringify" }
156
- );
157
- return newData;
158
- })
159
- };
160
-
161
- var __async$3 = (__this, __arguments, generator) => {
162
- return new Promise((resolve, reject) => {
163
- var fulfilled = (value) => {
164
- try {
165
- step(generator.next(value));
166
- } catch (e) {
167
- reject(e);
168
- }
169
- };
170
- var rejected = (value) => {
171
- try {
172
- step(generator.throw(value));
173
- } catch (e) {
174
- reject(e);
175
- }
176
- };
177
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
178
- step((generator = generator.apply(__this, __arguments)).next());
179
- });
180
- };
181
- const ChatRoomHeader = ({
182
- conversation,
183
- setShow
184
- }) => {
185
- const { fetchData } = useChatContext();
186
- return /* @__PURE__ */ jsxs(Box, { className: "chatRoom__header", onClick: () => setShow((prev) => !prev), children: [
187
- /* @__PURE__ */ jsx(Heading, { as: "h6", children: conversation == null ? void 0 : conversation.title }),
188
- /* @__PURE__ */ jsx(Box, { className: "chatRoom__header__rightButtons", children: /* @__PURE__ */ jsx(
189
- IconButton$1,
190
- {
191
- className: "closeButton",
192
- variant: "icon-outline-danger",
193
- onClick: (e) => __async$3(void 0, null, function* () {
194
- e.stopPropagation();
195
- e.preventDefault();
196
- if (!(conversation == null ? void 0 : conversation.id))
197
- return;
198
- yield chatRequestHandlers.closeChat(conversation.id);
199
- fetchData();
200
- }),
201
- icon: "CloseThin",
202
- size: "Md"
203
- }
204
- ) })
205
- ] });
206
- };
207
-
208
- var __async$2 = (__this, __arguments, generator) => {
209
- return new Promise((resolve, reject) => {
210
- var fulfilled = (value) => {
211
- try {
212
- step(generator.next(value));
213
- } catch (e) {
214
- reject(e);
215
- }
216
- };
217
- var rejected = (value) => {
218
- try {
219
- step(generator.throw(value));
220
- } catch (e) {
221
- reject(e);
222
- }
223
- };
224
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
225
- step((generator = generator.apply(__this, __arguments)).next());
226
- });
227
- };
228
- const useChatRoomState = (conversation, messagesRef) => {
229
- const { context } = useChatContext();
230
- const [showChat, setShowChat] = useState(true);
231
- const [message, setMessage] = useState("");
232
- const [messageHistory, setMessageHistory] = useState([]);
233
- const localMessagesRef = messagesRef;
234
- const scrollToBottom = useCallback(() => {
235
- if (localMessagesRef == null ? void 0 : localMessagesRef.current) {
236
- localMessagesRef.current.scrollTop = localMessagesRef.current.scrollHeight;
237
- }
238
- }, [localMessagesRef]);
239
- useMount(() => {
240
- var _a;
241
- const messageInput = document.querySelector(
242
- `#id_${(_a = conversation == null ? void 0 : conversation.id) != null ? _a : ""}`
243
- );
244
- if (messageInput) {
245
- messageInput == null ? void 0 : messageInput.focus();
246
- }
247
- });
248
- useEffect(() => {
249
- if (!(conversation == null ? void 0 : conversation.messages))
250
- return;
251
- setMessageHistory((prev) => {
252
- var _a;
253
- return [
254
- ...prev,
255
- ...arrayOrArray((_a = conversation == null ? void 0 : conversation.messages) == null ? void 0 : _a.message).filter((current) => {
256
- return !current.fromMe;
257
- })
258
- ];
259
- });
260
- }, [conversation, conversation == null ? void 0 : conversation.messages, scrollToBottom]);
261
- const chatData = context.useData();
262
- const sendMessageHandler = (e) => __async$2(void 0, null, function* () {
263
- var _a;
264
- if (e.code === "Enter" && ((_a = e == null ? void 0 : e.currentTarget) == null ? void 0 : _a.value.trim())) {
265
- setMessageHistory((prev) => {
266
- var _a2, _b;
267
- return [
268
- ...prev,
269
- {
270
- content: message,
271
- fromMe: true,
272
- extraId: (_b = (_a2 = chatData == null ? void 0 : chatData.status) == null ? void 0 : _a2.id) != null ? _b : "1",
273
- from: window.CURRENT_USER_LOGIN,
274
- type: "text"
275
- }
276
- ];
277
- });
278
- if (!(conversation == null ? void 0 : conversation.id))
279
- return;
280
- yield chatRequestHandlers.sendMessage(conversation.id, message);
281
- scrollToBottom();
282
- setMessage("");
283
- }
284
- });
285
- let initialized = false;
286
- let from = "";
287
- let showFrom = true;
288
- const chatContent = messageHistory == null ? void 0 : messageHistory.map((current, idx) => {
289
- if (!initialized) {
290
- from = current.from;
291
- showFrom = true;
292
- initialized = true;
293
- } else {
294
- if (from !== current.from) {
295
- from = current.from;
296
- showFrom = true;
297
- } else {
298
- showFrom = false;
299
- }
300
- }
301
- return current.content ? /* @__PURE__ */ jsxs(
302
- Box,
303
- {
304
- className: current.fromMe ? "from__me" : "from__notMe",
305
- children: [
306
- /* @__PURE__ */ jsx(Box, { as: "span", className: "userContact", children: showFrom && current.from }),
307
- /* @__PURE__ */ jsx(Box, { as: "span", className: "message", children: current.content })
308
- ]
309
- },
310
- Math.random() + idx
311
- ) : null;
312
- });
313
- return {
314
- chatContent,
315
- showChat,
316
- message,
317
- setShowChat,
318
- setMessage,
319
- sendMessageHandler
320
- };
321
- };
322
-
323
- const ChatRoom = ({
324
- position,
325
- conversation
326
- }) => {
327
- var _a;
328
- const messagesRef = useRef(null);
329
- const {
330
- showChat,
331
- chatContent,
332
- message,
333
- setMessage,
334
- setShowChat,
335
- sendMessageHandler
336
- } = useChatRoomState(conversation, messagesRef);
337
- return /* @__PURE__ */ jsxs(Box$1, { className: "chatRoom", sx: { right: position }, children: [
338
- /* @__PURE__ */ jsx(ChatRoomHeader, { conversation, setShow: setShowChat }),
339
- /* @__PURE__ */ jsxs(Box$1, { className: `chatRoom__content ${showChat ? "show" : ""}`, children: [
340
- /* @__PURE__ */ jsx(Box$1, { className: "chatRoom__messages", ref: messagesRef, children: chatContent }),
341
- /* @__PURE__ */ jsx(
342
- Input,
343
- {
344
- id: `id_${(_a = conversation == null ? void 0 : conversation.id) != null ? _a : ""}`,
345
- className: "messageInput",
346
- type: "text",
347
- value: message,
348
- placeholder: "Escribe un mensaje",
349
- onChange: (e) => setMessage(e.currentTarget.value),
350
- onKeyDown: (e) => sendMessageHandler(e)
351
- }
352
- )
353
- ] })
354
- ] });
355
- };
356
-
357
- var __defProp$W = Object.defineProperty;
358
- var __defProps$L = Object.defineProperties;
359
- var __getOwnPropDescs$L = Object.getOwnPropertyDescriptors;
360
- var __getOwnPropSymbols$X = Object.getOwnPropertySymbols;
361
- var __hasOwnProp$X = Object.prototype.hasOwnProperty;
362
- var __propIsEnum$X = Object.prototype.propertyIsEnumerable;
363
- var __defNormalProp$W = (obj, key, value) => key in obj ? __defProp$W(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
364
- var __spreadValues$W = (a, b) => {
365
- for (var prop in b || (b = {}))
366
- if (__hasOwnProp$X.call(b, prop))
367
- __defNormalProp$W(a, prop, b[prop]);
368
- if (__getOwnPropSymbols$X)
369
- for (var prop of __getOwnPropSymbols$X(b)) {
370
- if (__propIsEnum$X.call(b, prop))
371
- __defNormalProp$W(a, prop, b[prop]);
372
- }
373
- return a;
374
- };
375
- var __spreadProps$L = (a, b) => __defProps$L(a, __getOwnPropDescs$L(b));
376
- const ChatRoomList = () => {
377
- var _a, _b;
378
- const { useData } = useChatContext();
379
- return /* @__PURE__ */ jsx(
380
- Box,
381
- __spreadProps$L(__spreadValues$W({
382
- className: "chatRoom__list"
383
- }, getVariant("layout.common.components.apiaChat.chatRoom")), {
384
- children: (_b = (_a = useData()) == null ? void 0 : _a.conversations) == null ? void 0 : _b.map((current, idx) => {
385
- if (!current)
386
- return;
387
- return /* @__PURE__ */ jsx(
388
- ChatRoom,
389
- {
390
- position: 320 * (idx + 1),
391
- conversation: current
392
- },
393
- current == null ? void 0 : current.id
394
- );
395
- })
396
- })
397
- );
398
- };
399
-
400
- var __async$1 = (__this, __arguments, generator) => {
401
- return new Promise((resolve, reject) => {
402
- var fulfilled = (value) => {
403
- try {
404
- step(generator.next(value));
405
- } catch (e) {
406
- reject(e);
407
- }
408
- };
409
- var rejected = (value) => {
410
- try {
411
- step(generator.throw(value));
412
- } catch (e) {
413
- reject(e);
414
- }
415
- };
416
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
417
- step((generator = generator.apply(__this, __arguments)).next());
418
- });
419
- };
420
- const ChatUsersList = ({ users }) => {
421
- const [showUsers, setShowUsers] = useState(true);
422
- const { fetchData } = useChatContext();
423
- return /* @__PURE__ */ jsxs(Box, { className: "chatManager__users", children: [
424
- /* @__PURE__ */ jsxs(
425
- Heading,
426
- {
427
- className: "chatManager__title",
428
- as: "h6",
429
- onClick: () => setShowUsers((prev) => !prev),
430
- children: [
431
- /* @__PURE__ */ jsx(Icon$1, { name: showUsers ? "ArrowDownThin" : "ArrowRightThin", title: "" }),
432
- "Usuarios"
433
- ]
434
- }
435
- ),
436
- /* @__PURE__ */ jsx(
437
- Box,
438
- {
439
- as: "ul",
440
- className: `chatManager__users__list ${showUsers ? "show" : ""}`,
441
- children: users == null ? void 0 : users.map((current) => {
442
- return current && /* @__PURE__ */ jsx(
443
- Box,
444
- {
445
- as: "li",
446
- className: "chatManager__list__item",
447
- onClick: () => __async$1(void 0, null, function* () {
448
- var _a;
449
- const res = yield chatRequestHandlers.openConversation(
450
- current.id,
451
- current.name
452
- );
453
- if (!((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.status))
454
- return;
455
- fetchData();
456
- }),
457
- children: current == null ? void 0 : current.name
458
- },
459
- current == null ? void 0 : current.id
460
- );
461
- })
462
- }
463
- )
464
- ] });
465
- };
466
-
467
- const ChatGroupsList = ({ groups }) => {
468
- const [showGroups, setShowGroups] = useState(true);
469
- return /* @__PURE__ */ jsxs(Box, { className: "chatManager__groups", children: [
470
- /* @__PURE__ */ jsxs(
471
- Heading,
472
- {
473
- as: "h6",
474
- className: "chatManager__title",
475
- onClick: () => setShowGroups((prev) => !prev),
476
- children: [
477
- /* @__PURE__ */ jsx(Icon$1, { name: showGroups ? "ArrowDownThin" : "ArrowRightThin", title: "" }),
478
- "Grupos"
479
- ]
480
- }
481
- ),
482
- /* @__PURE__ */ jsx(
483
- Box,
484
- {
485
- as: "ul",
486
- className: `chatManager__groups__list ${showGroups ? "show" : ""}`,
487
- children: groups == null ? void 0 : groups.map((current) => {
488
- return /* @__PURE__ */ jsx(Box, { as: "li", className: "chatManager__list__item", children: current == null ? void 0 : current.name }, current.id);
489
- })
490
- }
491
- )
492
- ] });
493
- };
494
-
495
- const ChatSearchBar = ({
496
- show,
497
- setSearchValue
498
- }) => {
499
- return /* @__PURE__ */ jsx(Box, { className: `chatManager__searchBar ${show ? "show" : ""}`, children: /* @__PURE__ */ jsx(
500
- Input$1,
501
- {
502
- placeholder: `${show ? "Buscar" : ""}`,
503
- onChange: (e) => setSearchValue(e.target.value)
504
- }
505
- ) });
506
- };
507
-
508
- const ChatManagerHeader = ({
509
- showSearchBar,
510
- showManager,
511
- setShowManager,
512
- setShowSearchBar
513
- }) => {
514
- return /* @__PURE__ */ jsxs(
515
- Box,
516
- {
517
- className: "chatManager__header",
518
- onClick: () => {
519
- setShowManager((prev) => !prev);
520
- setShowSearchBar(false);
521
- },
522
- children: [
523
- /* @__PURE__ */ jsx(Heading, { as: "h6", children: "Chat" }),
524
- /* @__PURE__ */ jsxs(Box, { className: "chatManager__header__rightButtons", children: [
525
- /* @__PURE__ */ jsx(
526
- IconButton$1,
527
- {
528
- onClick: (e) => {
529
- e.stopPropagation();
530
- e.preventDefault();
531
- setShowSearchBar((prev) => !prev);
532
- const searchBar = document.querySelector(
533
- ".chatManager__searchBar input"
534
- );
535
- if (searchBar && !showSearchBar) {
536
- searchBar == null ? void 0 : searchBar.focus();
537
- }
538
- },
539
- icon: "Search",
540
- size: "Md"
541
- }
542
- ),
543
- /* @__PURE__ */ jsx(
544
- IconButton$1,
545
- {
546
- onClick: (e) => {
547
- e.stopPropagation();
548
- e.preventDefault();
549
- new ApiaUtil$1().menu.open({
550
- menuProps: {
551
- anchorRef: {
552
- current: e.target.closest(
553
- ".ellipsis"
554
- )
555
- }
556
- },
557
- items: [
558
- {
559
- children: /* @__PURE__ */ jsx(Fragment, { children: showManager ? "Minimizar" : "Maximizar" }),
560
- onClick: () => setShowManager((prev) => !prev),
561
- key: "1"
562
- },
563
- {
564
- children: /* @__PURE__ */ jsx(Fragment, { children: "Cerrar" }),
565
- onClick: () => console.log("hola"),
566
- key: "2"
567
- },
568
- {
569
- children: /* @__PURE__ */ jsx(Fragment, { children: "Desconectar" }),
570
- onClick: () => console.log("hola"),
571
- key: "3"
572
- }
573
- ]
574
- });
575
- },
576
- icon: "Ellipsis",
577
- size: "Md",
578
- className: "ellipsis"
579
- }
580
- )
581
- ] })
582
- ]
583
- }
584
- );
585
- };
586
-
587
- const useSearchContacts = (initialUsers, initialGroups) => {
588
- const [filteredUsers, setFilteredUsers] = useState(initialUsers);
589
- const [filteredGroups, setFilteredGroups] = useState(initialGroups);
590
- const [searchValue, setSearchValue] = useState("");
591
- useEffect(() => {
592
- if (searchValue.trim() === "") {
593
- setFilteredUsers(initialUsers);
594
- setFilteredGroups(initialGroups);
595
- } else {
596
- const filtered1 = initialUsers == null ? void 0 : initialUsers.filter(
597
- (item) => item.name.toLowerCase().includes(searchValue.toLowerCase())
598
- );
599
- const filtered2 = initialGroups == null ? void 0 : initialGroups.filter(
600
- (item) => item.name.toLowerCase().includes(searchValue.toLowerCase())
601
- );
602
- setFilteredUsers(filtered1);
603
- setFilteredGroups(filtered2);
604
- }
605
- }, [searchValue, initialUsers, initialGroups]);
606
- return {
607
- filteredUsers,
608
- filteredGroups,
609
- setSearchValue
610
- };
611
- };
612
-
613
- var __defProp$V = Object.defineProperty;
614
- var __defProps$K = Object.defineProperties;
615
- var __getOwnPropDescs$K = Object.getOwnPropertyDescriptors;
616
- var __getOwnPropSymbols$W = Object.getOwnPropertySymbols;
617
- var __hasOwnProp$W = Object.prototype.hasOwnProperty;
618
- var __propIsEnum$W = Object.prototype.propertyIsEnumerable;
619
- var __defNormalProp$V = (obj, key, value) => key in obj ? __defProp$V(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
620
- var __spreadValues$V = (a, b) => {
621
- for (var prop in b || (b = {}))
622
- if (__hasOwnProp$W.call(b, prop))
623
- __defNormalProp$V(a, prop, b[prop]);
624
- if (__getOwnPropSymbols$W)
625
- for (var prop of __getOwnPropSymbols$W(b)) {
626
- if (__propIsEnum$W.call(b, prop))
627
- __defNormalProp$V(a, prop, b[prop]);
628
- }
629
- return a;
630
- };
631
- var __spreadProps$K = (a, b) => __defProps$K(a, __getOwnPropDescs$K(b));
632
- const ChatManager = () => {
633
- const {
634
- context: { useData }
635
- } = useChatContext();
636
- const [showManager, setShowManager] = useState(true);
637
- const [showSearchBar, setShowSearchBar] = useState(false);
638
- const chatData = useData();
639
- const { filteredGroups, filteredUsers, setSearchValue } = useSearchContacts(
640
- chatData == null ? void 0 : chatData.users,
641
- chatData == null ? void 0 : chatData.groups
642
- );
643
- return /* @__PURE__ */ jsxs(
644
- Box,
645
- __spreadProps$K(__spreadValues$V({
646
- className: `chatManager__container `
647
- }, getVariant("layout.common.components.apiaChat.chatManager")), {
648
- children: [
649
- /* @__PURE__ */ jsx(
650
- ChatManagerHeader,
651
- {
652
- showManager,
653
- showSearchBar,
654
- setShowManager,
655
- setShowSearchBar
656
- }
657
- ),
658
- /* @__PURE__ */ jsx(ChatSearchBar, { show: showSearchBar, setSearchValue }),
659
- /* @__PURE__ */ jsxs(Box, { className: `chatManager__content ${showManager ? "show" : ""}`, children: [
660
- /* @__PURE__ */ jsx(ChatUsersList, { users: filteredUsers }),
661
- /* @__PURE__ */ jsx(ChatGroupsList, { groups: filteredGroups }),
662
- /* @__PURE__ */ jsx(Box, { className: "chatManager__requests" })
663
- ] })
664
- ]
665
- })
666
- );
667
- };
668
-
669
- const ChatContext = createContext(null);
670
- function useChatContext() {
671
- const context = useContext(ChatContext);
672
- if (!context)
673
- throw new Error("There is no Chat Context");
674
- return {
675
- context,
676
- useData: context.useData,
677
- fetchData: context.fetchData
678
- };
679
- }
680
- const ChatWrapper = () => {
681
- const { useData, fetchData } = useGetChatData();
682
- return /* @__PURE__ */ jsxs(ChatContext.Provider, { value: { useData, fetchData }, children: [
683
- /* @__PURE__ */ jsx(ChatManager, {}),
684
- /* @__PURE__ */ jsx(ChatRoomList, {})
685
- ] });
686
- };
687
-
688
- const chatRoom = (theme) => {
689
- return {
690
- position: "absolute",
691
- bottom: "0px",
692
- display: "flex",
693
- flexDirection: "row-reverse",
694
- gap: "15px",
695
- alignItems: "end",
696
- ".chatRoom": {
697
- width: "310px",
698
- background: "palette.background.paper",
699
- boxShadow: "rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px",
700
- bottom: "-0px",
701
- transition: "bottom 0.2s ease",
702
- borderTopLeftRadius: "8px",
703
- borderTopRightRadius: "8px",
704
- position: "fixed",
705
- zIndex: "menu",
706
- "&.show": {
707
- bottom: "0px"
708
- }
709
- },
710
- ".chatRoom__header": {
711
- height: "38px",
712
- borderTopLeftRadius: "8px",
713
- borderTopRightRadius: "8px",
714
- display: "flex",
715
- flexDirection: "row",
716
- justifyContent: "space-between",
717
- background: "aliceblue",
718
- alignItems: "center",
719
- border: "1px solid",
720
- borderColor: "palette.gray.750",
721
- h6: {
722
- borderTopLeftRadius: "6px",
723
- borderTopRightRadius: "6px",
724
- pl: "10px"
725
- }
726
- },
727
- ".chatRoom__header__rightButtons": {
728
- ".closeButton": {
729
- background: "none",
730
- border: "none",
731
- height: "38px",
732
- width: "38px",
733
- borderTopRightRadius: "6px",
734
- ":hover, :focus": {
735
- background: "palette.error.dark"
736
- }
737
- }
738
- },
739
- ".chatRoom__content": {
740
- height: "0px",
741
- transition: "height 0.2s ease",
742
- display: "flex",
743
- flexDirection: "column",
744
- justifyContent: "space-between",
745
- border: "1px solid",
746
- borderColor: "palette.gray.750",
747
- borderTop: "none",
748
- "&.show": { height: "330px" }
749
- },
750
- ".chatRoom__messages": {
751
- display: "flex",
752
- flexDirection: "column",
753
- p: "10px",
754
- gap: "10px",
755
- overflow: "auto",
756
- ".from__me": {
757
- alignSelf: "end",
758
- //cambiar
759
- width: "50%",
760
- borderRadius: "8px",
761
- display: "flex",
762
- flexDirection: "column",
763
- ".message": {
764
- background: "#1c6f97",
765
- color: "palette.text.secondary",
766
- borderRadius: "8px",
767
- p: "10px"
768
- }
769
- },
770
- ".from__notMe": {
771
- alignSelf: "start",
772
- //cambiar
773
- width: "50%",
774
- color: "palette.text.primary",
775
- borderRadius: "8px",
776
- display: "flex",
777
- flexDirection: "column",
778
- ".userContact": {
779
- fontSize: "13px",
780
- pl: "7px"
781
- },
782
- ".message": {
783
- background: "aliceblue",
784
- color: "palette.text.primary",
785
- borderRadius: "8px",
786
- p: "10px"
787
- }
788
- }
789
- },
790
- input: {
791
- border: "1px solid",
792
- borderColor: "palette.border.ghost"
793
- }
794
- };
795
- };
796
-
797
- const chatManager = (theme) => {
798
- return {
799
- display: "flex",
800
- flexDirection: "column",
801
- width: "292px",
802
- position: "fixed",
803
- bottom: "0px",
804
- right: "16px",
805
- boxShadow: "rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px",
806
- background: "palette.background.paper",
807
- maxHeight: "438px",
808
- zIndex: "menu",
809
- ".chatManager__header": {
810
- background: "palette.primary.main",
811
- borderTopLeftRadius: "6px",
812
- borderTopRightRadius: "6px",
813
- display: "flex",
814
- flexDirection: "row",
815
- justifyContent: "space-between",
816
- height: "38px",
817
- alignItems: "center",
818
- h6: {
819
- pl: "10px",
820
- color: "palette.text.secondary"
821
- }
822
- },
823
- ".chatManager__header__rightButtons": {
824
- display: "flex",
825
- flexDirection: "row",
826
- itemAlign: "center",
827
- height: "100%",
828
- button: {
829
- background: "none",
830
- width: "38px",
831
- height: "38px",
832
- ":hover": {
833
- background: theme.palette.lightenColor(theme.palette.primary.main, 5)
834
- }
835
- },
836
- ".ellipsis": {
837
- borderTopRightRadius: "6px",
838
- svg: {
839
- width: "25px",
840
- height: "25px",
841
- maxHeight: "25px",
842
- maxWidth: "25px"
843
- }
844
- }
845
- },
846
- ".chatManager__searchBar": {
847
- height: "0px",
848
- transition: "height 0.2s ease",
849
- "&.show": {
850
- height: "35px"
851
- },
852
- input: {
853
- height: "35px",
854
- border: "none",
855
- borderBottom: "1px solid",
856
- borderColor: "palette.border.ghost"
857
- }
858
- },
859
- ".chatManager__title": {
860
- py: "10px",
861
- pl: "10px",
862
- border: "1px solid",
863
- borderColor: "palette.gray.850",
864
- //todo cambiar
865
- background: "aliceblue",
866
- display: "flex",
867
- alignItems: "center"
868
- },
869
- ".chatManager__content": {
870
- display: "flex",
871
- flexDirection: "column",
872
- overflow: "auto",
873
- height: "0px",
874
- transition: "height 0.2s ease",
875
- "&.show": {
876
- height: "400px"
877
- }
878
- },
879
- ".chatManager__users": {
880
- display: "flex",
881
- flexDirection: "column",
882
- ".chatManager__users__list": {
883
- display: "none",
884
- flexDirection: "column",
885
- "&.show": {
886
- display: "flex"
887
- }
888
- }
889
- },
890
- ".chatManager__groups": {
891
- display: "flex",
892
- flexDirection: "column",
893
- ".chatManager__groups__list": {
894
- display: "none",
895
- flexDirection: "column",
896
- "&.show": {
897
- display: "flex"
898
- }
899
- }
900
- },
901
- ".chatManager__list__item": {
902
- p: "5px 10px",
903
- borderBottom: "1px solid",
904
- borderColor: "palette.border.ghost",
905
- ":hover": {
906
- background: "palette.gray.900"
907
- }
908
- }
909
- };
910
- };
911
-
912
- const styles$5 = {
913
- chatManager,
914
- chatRoom
915
- };
916
-
917
- const ApiaChat = makeStyledComponent(
918
- "ApiaChat",
919
- "layout.common.components.apiaChat",
920
- styles$5,
921
- () => /* @__PURE__ */ jsx(ChatWrapper, {})
922
- );
923
-
924
24
  const AccordionContext = createContext(null);
925
25
  const AccordionItemContext = createContext(null);
926
26
  const useAccordionContext = () => {
@@ -1116,7 +216,7 @@ const KeyHandler$1 = (props) => {
1116
216
  }, [handler, ref]);
1117
217
  const variant = handler.hooks.usePropsSelector((current) => current.variant);
1118
218
  return /* @__PURE__ */ jsx(
1119
- Box$1,
219
+ Box,
1120
220
  __spreadValues$U(__spreadProps$J(__spreadValues$U({}, props), {
1121
221
  ref: setRef
1122
222
  }), variant ? getVariant(variant) : void 0)
@@ -1494,7 +594,7 @@ const IconButton = React.forwardRef(
1494
594
  return typeof icon === "string" ? icons[icon] : icon;
1495
595
  }, [icon]);
1496
596
  return /* @__PURE__ */ jsx(
1497
- IconButton$2,
597
+ IconButton$1,
1498
598
  __spreadProps$G(__spreadValues$R(__spreadProps$G(__spreadValues$R({
1499
599
  id,
1500
600
  ref,
@@ -1650,9 +750,9 @@ const SimpleButton = React.forwardRef(
1650
750
  sx: __spreadValues$Q(__spreadValues$Q({}, simpleButton), buttonSx),
1651
751
  children: [
1652
752
  Icon && iconPosition === "left" && /* @__PURE__ */ jsx(Icon, { title: "", size: iconSize, color: iconColor }),
1653
- /* @__PURE__ */ jsx(Box$1, { as: "span", className: "button__content", sx: spanSx, children: children != null ? children : title }),
753
+ /* @__PURE__ */ jsx(Box, { as: "span", className: "button__content", sx: spanSx, children: children != null ? children : title }),
1654
754
  Icon && iconPosition === "right" && /* @__PURE__ */ jsx(Icon, { title: "", size: iconSize, color: iconColor }),
1655
- isLoading && /* @__PURE__ */ jsx(Box$1, { className: "spinner", sx: loadingSx, children: /* @__PURE__ */ jsx(Spinner, { size: spinnerSize, color: "inherit" }) })
755
+ isLoading && /* @__PURE__ */ jsx(Box, { className: "spinner", sx: loadingSx, children: /* @__PURE__ */ jsx(Spinner, { size: spinnerSize, color: "inherit" }) })
1656
756
  ]
1657
757
  })
1658
758
  );
@@ -2188,7 +1288,7 @@ const Overlay = React.forwardRef(
2188
1288
  nodeRef: innerRef,
2189
1289
  unmountOnExit: true,
2190
1290
  children: /* @__PURE__ */ jsx(
2191
- Box$1,
1291
+ Box,
2192
1292
  __spreadProps$C(__spreadValues$N(__spreadProps$C(__spreadValues$N({
2193
1293
  className: `${className} overlay`,
2194
1294
  ref: assignRefs
@@ -2233,7 +1333,7 @@ const DialogHeader = ({
2233
1333
  }) => {
2234
1334
  const breakpointIndex = useBreakpointIndex();
2235
1335
  const Title = /* @__PURE__ */ jsx(
2236
- Heading$1,
1336
+ Heading,
2237
1337
  {
2238
1338
  as: "h3",
2239
1339
  sx: {
@@ -2265,7 +1365,7 @@ const DialogHeader = ({
2265
1365
  [close, hideCloseButton]
2266
1366
  );
2267
1367
  const NavBarElement = NavBar && /* @__PURE__ */ jsx(
2268
- Box$1,
1368
+ Box,
2269
1369
  {
2270
1370
  sx: {
2271
1371
  display: "flex",
@@ -2281,7 +1381,7 @@ const DialogHeader = ({
2281
1381
  }
2282
1382
  );
2283
1383
  return breakpointIndex > 3 ? /* @__PURE__ */ jsxs(
2284
- Box$1,
1384
+ Box,
2285
1385
  {
2286
1386
  className,
2287
1387
  sx: {
@@ -2301,7 +1401,7 @@ const DialogHeader = ({
2301
1401
  ]
2302
1402
  }
2303
1403
  ) : /* @__PURE__ */ jsxs(
2304
- Box$1,
1404
+ Box,
2305
1405
  {
2306
1406
  className,
2307
1407
  sx: {
@@ -2315,7 +1415,7 @@ const DialogHeader = ({
2315
1415
  },
2316
1416
  children: [
2317
1417
  /* @__PURE__ */ jsxs(
2318
- Box$1,
1418
+ Box,
2319
1419
  {
2320
1420
  sx: {
2321
1421
  display: "flex",
@@ -2486,13 +1586,13 @@ const Modal = forwardRef(
2486
1586
  unmountOnExit: true,
2487
1587
  nodeRef,
2488
1588
  children: /* @__PURE__ */ jsx(
2489
- Box$1,
1589
+ Box,
2490
1590
  __spreadProps$B(__spreadValues$M({
2491
1591
  ref: nodeRef,
2492
1592
  className: "modal__variantWrapper"
2493
1593
  }, variant ? getVariant(variant) : {}), {
2494
1594
  children: /* @__PURE__ */ jsxs(
2495
- Box$1,
1595
+ Box,
2496
1596
  {
2497
1597
  id,
2498
1598
  role: "dialog",
@@ -2521,7 +1621,7 @@ const Modal = forwardRef(
2521
1621
  }
2522
1622
  ),
2523
1623
  /* @__PURE__ */ jsx(
2524
- Box$1,
1624
+ Box,
2525
1625
  {
2526
1626
  className: "modal__content",
2527
1627
  id: typeof children === "string" ? `${innerId}_Description` : void 0,
@@ -2719,7 +1819,7 @@ const DialogButtonBar = ({
2719
1819
  className
2720
1820
  }) => {
2721
1821
  return /* @__PURE__ */ jsx(
2722
- Box$1,
1822
+ Box,
2723
1823
  __spreadProps$y(__spreadValues$J({
2724
1824
  className: `${className != null ? className : ""} buttonsBar`
2725
1825
  }, getVariant("layout.common.modals.buttonsBar")), {
@@ -2766,14 +1866,14 @@ const Confirm = ({
2766
1866
  }) => {
2767
1867
  const { descriptionId } = useModalContext();
2768
1868
  return /* @__PURE__ */ jsxs(
2769
- Box$1,
1869
+ Box,
2770
1870
  __spreadProps$x(__spreadValues$I({}, getVariant(variant != null ? variant : "layout.common.modals.confirm")), {
2771
1871
  className: `${className != null ? className : ""} confirm`,
2772
1872
  children: [
2773
- /* @__PURE__ */ jsx(Box$1, { ref: contentRef, className: "confirm__content", id: descriptionId, children }),
1873
+ /* @__PURE__ */ jsx(Box, { ref: contentRef, className: "confirm__content", id: descriptionId, children }),
2774
1874
  /* @__PURE__ */ jsxs(DialogButtonBar, { className: "confirm__buttonBar", children: [
2775
1875
  /* @__PURE__ */ jsx(
2776
- Box$1,
1876
+ Box,
2777
1877
  {
2778
1878
  className: "confirm__customButtons",
2779
1879
  onClick: useCallback(
@@ -2786,9 +1886,9 @@ const Confirm = ({
2786
1886
  children: additionalButtons
2787
1887
  }
2788
1888
  ),
2789
- /* @__PURE__ */ jsxs(Box$1, { className: "confirm__defaultButtons", children: [
1889
+ /* @__PURE__ */ jsxs(Box, { className: "confirm__defaultButtons", children: [
2790
1890
  /* @__PURE__ */ jsx(
2791
- Box$1,
1891
+ Box,
2792
1892
  {
2793
1893
  className: "confirm__customButtonsOnRight",
2794
1894
  onClick: useCallback(
@@ -2835,13 +1935,13 @@ const Confirm = ({
2835
1935
  const LinearLoader = () => {
2836
1936
  const theme = useThemeUI();
2837
1937
  return /* @__PURE__ */ jsx(
2838
- Box$1,
1938
+ Box,
2839
1939
  {
2840
1940
  sx: {
2841
1941
  "*": { height: "6.5px !important" }
2842
1942
  },
2843
1943
  children: /* @__PURE__ */ jsx(
2844
- Box$1,
1944
+ Box,
2845
1945
  {
2846
1946
  sx: {
2847
1947
  zIndex: "tooltip",
@@ -2910,7 +2010,7 @@ const ScreenLock = () => {
2910
2010
  }, [locks.linear, hasReleasedFirstTime]);
2911
2011
  if (!locks.linear && !locks.common && !locks.white && !locks.forced)
2912
2012
  return null;
2913
- return /* @__PURE__ */ jsx(Box$1, { children: /* @__PURE__ */ jsxs(
2013
+ return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(
2914
2014
  Overlay,
2915
2015
  {
2916
2016
  isOpen: true,
@@ -2923,7 +2023,7 @@ const ScreenLock = () => {
2923
2023
  transitionDuration: hasReleasedFirstTime ? void 0 : 0,
2924
2024
  children: [
2925
2025
  locks.linear ? /* @__PURE__ */ jsx(LinearLoader, {}) : /* @__PURE__ */ jsx(Spinner, { ref, sx: { "*": { color: "primary" } } }),
2926
- /* @__PURE__ */ jsx(Box$1, { tabIndex: 0, title: window.WAIT_A_SECOND })
2026
+ /* @__PURE__ */ jsx(Box, { tabIndex: 0, title: window.WAIT_A_SECOND })
2927
2027
  ]
2928
2028
  }
2929
2029
  ) });
@@ -2939,7 +2039,7 @@ const FieldErrorMessage = ({ children, name }) => {
2939
2039
  }, [children, ref]);
2940
2040
  if (children) {
2941
2041
  return /* @__PURE__ */ jsx(
2942
- Box$1,
2042
+ Box,
2943
2043
  {
2944
2044
  ref: setRef,
2945
2045
  role: "alert",
@@ -3038,7 +2138,7 @@ const IconInput = (_a) => {
3038
2138
  [onBlur]
3039
2139
  );
3040
2140
  return /* @__PURE__ */ jsxs(
3041
- Box$1,
2141
+ Box,
3042
2142
  __spreadProps$v(__spreadValues$G({}, getVariant("forms.iconInput")), {
3043
2143
  className: `${className != null ? className : ""} iconInput`,
3044
2144
  ref: parentRef,
@@ -3329,7 +2429,7 @@ const DateInput = React__default.forwardRef(
3329
2429
  })
3330
2430
  ),
3331
2431
  /* @__PURE__ */ jsxs(
3332
- Box$1,
2432
+ Box,
3333
2433
  __spreadProps$u(__spreadValues$F({}, getVariant("forms.dateInput")), {
3334
2434
  className: `${className != null ? className : ""} dateInput`,
3335
2435
  id: `DateInput${id}`,
@@ -3611,7 +2711,7 @@ const FieldLabel = forwardRef(
3611
2711
  ]);
3612
2712
  var _a2, _b2;
3613
2713
  return /* @__PURE__ */ jsxs(
3614
- Box$1,
2714
+ Box,
3615
2715
  __spreadProps$s(__spreadValues$D(__spreadProps$s(__spreadValues$D({
3616
2716
  as: as != null ? as : "label"
3617
2717
  }, props), {
@@ -3620,7 +2720,7 @@ const FieldLabel = forwardRef(
3620
2720
  "aria-label": (_b2 = props["aria-label"]) != null ? _b2 : label,
3621
2721
  ref,
3622
2722
  children: [
3623
- /* @__PURE__ */ jsxs(Box$1, { className: "fieldLabel__label", children: [
2723
+ /* @__PURE__ */ jsxs(Box, { className: "fieldLabel__label", children: [
3624
2724
  requiredMarkPosition === "before" && /* @__PURE__ */ jsx(
3625
2725
  RequiredMark,
3626
2726
  {
@@ -3640,8 +2740,8 @@ const FieldLabel = forwardRef(
3640
2740
  ),
3641
2741
  !avoidSemicolon && ":"
3642
2742
  ] }),
3643
- /* @__PURE__ */ jsx(Box$1, { children }),
3644
- error && /* @__PURE__ */ jsx(Box$1, { className: "fieldLabel__error", children: error })
2743
+ /* @__PURE__ */ jsx(Box, { children }),
2744
+ error && /* @__PURE__ */ jsx(Box, { className: "fieldLabel__error", children: error })
3645
2745
  ]
3646
2746
  })
3647
2747
  );
@@ -3651,7 +2751,7 @@ FieldLabel.displayName = "FieldLabel";
3651
2751
 
3652
2752
  const Checkbox = (props) => {
3653
2753
  return /* @__PURE__ */ jsx(
3654
- Box$1,
2754
+ Box,
3655
2755
  {
3656
2756
  className: "accordion__item__button__check",
3657
2757
  onClick: (ev) => {
@@ -3788,7 +2888,7 @@ const AutoEllipsis = ({
3788
2888
  };
3789
2889
  }, []);
3790
2890
  return /* @__PURE__ */ jsx(
3791
- Box$1,
2891
+ Box,
3792
2892
  {
3793
2893
  ref,
3794
2894
  sx: {
@@ -3892,7 +2992,7 @@ const makeResponsiveComponent = ({
3892
2992
  }, [innerBreakpoints]);
3893
2993
  const deferBreakPoint = useDeferredValue(breakPoint);
3894
2994
  const deferContainerWidth = useDeferredValue(containerWidth);
3895
- return /* @__PURE__ */ jsx(Box$1, { ref, children: hasRendered ? /* @__PURE__ */ jsx(
2995
+ return /* @__PURE__ */ jsx(Box, { ref, children: hasRendered ? /* @__PURE__ */ jsx(
3896
2996
  Component,
3897
2997
  __spreadProps$r(__spreadValues$C({}, props), {
3898
2998
  breakPoint: deferBreakPoint,
@@ -3966,7 +3066,7 @@ const DefaultAccordionItemButton = (props) => {
3966
3066
  "aria-label": props.ariaLabel,
3967
3067
  tabIndex: props.tabIndex,
3968
3068
  children: [
3969
- /* @__PURE__ */ jsxs(Box$1, { className: "accordion__item__button__leftGroup", children: [
3069
+ /* @__PURE__ */ jsxs(Box, { className: "accordion__item__button__leftGroup", children: [
3970
3070
  props.checked !== void 0 && /* @__PURE__ */ jsx(
3971
3071
  Checkbox,
3972
3072
  {
@@ -3975,9 +3075,9 @@ const DefaultAccordionItemButton = (props) => {
3975
3075
  onChange: setIsChecked
3976
3076
  }
3977
3077
  ),
3978
- /* @__PURE__ */ jsx(Box$1, { as: "h3", className: "accordion__item__button__label", children: /* @__PURE__ */ jsx(AutoEllipsis, { overrideStyles: () => ({ textAlign: "left" }), children: (_e = (_d = props.label) != null ? _d : props.title) != null ? _e : props.ariaLabel }) })
3078
+ /* @__PURE__ */ jsx(Box, { as: "h3", className: "accordion__item__button__label", children: /* @__PURE__ */ jsx(AutoEllipsis, { overrideStyles: () => ({ textAlign: "left" }), children: (_e = (_d = props.label) != null ? _d : props.title) != null ? _e : props.ariaLabel }) })
3979
3079
  ] }),
3980
- /* @__PURE__ */ jsxs(Box$1, { className: "accordion__item__button__rightGroup", children: [
3080
+ /* @__PURE__ */ jsxs(Box, { className: "accordion__item__button__rightGroup", children: [
3981
3081
  props.rightButtons,
3982
3082
  /* @__PURE__ */ jsx(
3983
3083
  Icon$1,
@@ -4034,7 +3134,7 @@ const AccordionItemContent = ({
4034
3134
  (current) => current.animationDuration
4035
3135
  );
4036
3136
  const id = handler.hooks.useItemId();
4037
- return /* @__PURE__ */ jsxs(Box$1, { className: "accordion__item", "data-id": id, children: [
3137
+ return /* @__PURE__ */ jsxs(Box, { className: "accordion__item", "data-id": id, children: [
4038
3138
  button,
4039
3139
  /* @__PURE__ */ jsx(
4040
3140
  AnimateHeight,
@@ -4384,7 +3484,7 @@ const CollapsiblePanel = React__default.forwardRef(
4384
3484
  };
4385
3485
  }, [id, isCollapsed, onClose, onOpen, ref]);
4386
3486
  return /* @__PURE__ */ jsxs(
4387
- Box$1,
3487
+ Box,
4388
3488
  __spreadProps$n(__spreadValues$x({
4389
3489
  className: `collapsiblePanel ${className != null ? className : ""}`
4390
3490
  }, getVariant("layout.common.components.collapsiblePanel")), {
@@ -4394,7 +3494,7 @@ const CollapsiblePanel = React__default.forwardRef(
4394
3494
  setRef(el);
4395
3495
  },
4396
3496
  children: [
4397
- /* @__PURE__ */ jsxs(Box$1, { className: "collapsiblePanel__label", children: [
3497
+ /* @__PURE__ */ jsxs(Box, { className: "collapsiblePanel__label", children: [
4398
3498
  /* @__PURE__ */ jsxs(
4399
3499
  Button,
4400
3500
  __spreadProps$n(__spreadValues$x({}, getVariant("inherit")), {
@@ -4782,7 +3882,7 @@ const ListboxKeyhandler = ({ children, className }) => {
4782
3882
  [getState, id, onConfirmSelection]
4783
3883
  );
4784
3884
  return /* @__PURE__ */ jsx(
4785
- Box$1,
3885
+ Box,
4786
3886
  __spreadProps$j(__spreadValues$t({}, getVariant(variant)), {
4787
3887
  className,
4788
3888
  id,
@@ -4946,7 +4046,7 @@ const Combobox = (_a) => {
4946
4046
  }
4947
4047
  ),
4948
4048
  /* @__PURE__ */ jsx(
4949
- Box$1,
4049
+ Box,
4950
4050
  __spreadProps$i(__spreadValues$s({
4951
4051
  as: "ul",
4952
4052
  id: `${id}__list__container`,
@@ -5554,7 +4654,7 @@ const NoMemoListbox = makeStyledComponent(
5554
4654
  className: `listbox ${props.showSearchbox ? "withSearchbox" : ""} ${(_a = props.className) != null ? _a : ""}`
5555
4655
  }, props.ulProps), {
5556
4656
  children: props.showSearchbox ? /* @__PURE__ */ jsx(Combobox, __spreadProps$g(__spreadValues$q({}, props.ulProps), { children: indexedChildren })) : /* @__PURE__ */ jsx(
5557
- Box$1,
4657
+ Box,
5558
4658
  __spreadProps$g(__spreadValues$q({
5559
4659
  ref,
5560
4660
  as: "ul",
@@ -6805,7 +5905,7 @@ const Tooltip = ({
6805
5905
  onClose
6806
5906
  });
6807
5907
  return /* @__PURE__ */ jsx(
6808
- Box$1,
5908
+ Box,
6809
5909
  __spreadProps$9(__spreadValues$h({
6810
5910
  className: `tooltip__wrapper ${className != null ? className : ""}`
6811
5911
  }, getVariant(variant)), {
@@ -7129,7 +6229,7 @@ const KeyHandler = ({
7129
6229
  [onIconGetDetails, storeId]
7130
6230
  );
7131
6231
  return /* @__PURE__ */ jsx(
7132
- Box$1,
6232
+ Box,
7133
6233
  {
7134
6234
  className: "iconsList__keyHandler",
7135
6235
  tabIndex: 0,
@@ -7362,7 +6462,7 @@ const Icon = (props) => {
7362
6462
  });
7363
6463
  const Renderer = useIconRendererContext();
7364
6464
  return /* @__PURE__ */ jsx(
7365
- Box$1,
6465
+ Box,
7366
6466
  {
7367
6467
  ref,
7368
6468
  role: "gridcell",
@@ -7410,7 +6510,7 @@ const IconWrapper = ({
7410
6510
  rowIndex,
7411
6511
  colIndex
7412
6512
  }) => {
7413
- return icon === justToFillTheRow ? /* @__PURE__ */ jsx(Box$1, { sx: { width: `${iconWidth}px` }, className: "fill__the__row" }) : /* @__PURE__ */ jsx(
6513
+ return icon === justToFillTheRow ? /* @__PURE__ */ jsx(Box, { sx: { width: `${iconWidth}px` }, className: "fill__the__row" }) : /* @__PURE__ */ jsx(
7414
6514
  Icon,
7415
6515
  __spreadValues$c({
7416
6516
  rowIndex,
@@ -7425,8 +6525,8 @@ const DefaultIconRendererNoMemo = (props) => {
7425
6525
  console.error({ props });
7426
6526
  throw new Error("The icon has no imageUrl nor icon defined");
7427
6527
  }
7428
- return /* @__PURE__ */ jsxs(Box$1, { title: props.label, className: "iconsList__icon__wrapper", children: [
7429
- /* @__PURE__ */ jsxs(Box$1, { className: "iconsList__icon__image__wrapper", children: [
6528
+ return /* @__PURE__ */ jsxs(Box, { title: props.label, className: "iconsList__icon__wrapper", children: [
6529
+ /* @__PURE__ */ jsxs(Box, { className: "iconsList__icon__image__wrapper", children: [
7430
6530
  props.imageUrl && /* @__PURE__ */ jsx(
7431
6531
  Image,
7432
6532
  {
@@ -7438,7 +6538,7 @@ const DefaultIconRendererNoMemo = (props) => {
7438
6538
  ),
7439
6539
  props.icon && /* @__PURE__ */ jsx(Icon$1, { icon: props.icon, title: props.ariaLabel })
7440
6540
  ] }),
7441
- /* @__PURE__ */ jsx(Box$1, { className: "iconsList__icon__label", children: props.label })
6541
+ /* @__PURE__ */ jsx(Box, { className: "iconsList__icon__label", children: props.label })
7442
6542
  ] });
7443
6543
  };
7444
6544
  const DefaultIconRenderer = memo(DefaultIconRendererNoMemo);
@@ -7490,7 +6590,7 @@ const IconsListNonForwarded = (props, ref) => {
7490
6590
  onIconGetDetails: propsRef.current.onIconGetDetails,
7491
6591
  onIconKeyDown: propsRef.current.onIconKeyDown,
7492
6592
  storeId,
7493
- children: /* @__PURE__ */ jsx(Box$1, { ref: gridRef, children: Array(rows).fill(1).map((_, i) => {
6593
+ children: /* @__PURE__ */ jsx(Box, { ref: gridRef, children: Array(rows).fill(1).map((_, i) => {
7494
6594
  const icons = getRowIcons({
7495
6595
  breakPoint,
7496
6596
  i,
@@ -7808,7 +6908,7 @@ const ToolbarItemButton = ({
7808
6908
  }, context.itemsState[id]);
7809
6909
  });
7810
6910
  return /* @__PURE__ */ jsx(
7811
- IconButton$1,
6911
+ IconButton$2,
7812
6912
  {
7813
6913
  className: `toolbar__button ${innerIsToggled ? "toggled" : ""}`,
7814
6914
  size: iconSize != null ? iconSize : "Md",
@@ -7850,7 +6950,7 @@ const ToolbarItem = (props) => {
7850
6950
  return /* @__PURE__ */ jsx(ToolbarInput, { tool: props });
7851
6951
  }
7852
6952
  if (isSeparator(props)) {
7853
- return /* @__PURE__ */ jsx(Box$1, { className: "toolbar__separator", children: "\xA0" });
6953
+ return /* @__PURE__ */ jsx(Box, { className: "toolbar__separator", children: "\xA0" });
7854
6954
  }
7855
6955
  return /* @__PURE__ */ jsx(ToolbarItemButton, __spreadValues$7({}, props));
7856
6956
  };
@@ -7883,7 +6983,7 @@ const Toolbar = makeStyledComponent(
7883
6983
  useMount(() => {
7884
6984
  getController == null ? void 0 : getController(controller);
7885
6985
  });
7886
- return /* @__PURE__ */ jsx(controller.Context, { children: /* @__PURE__ */ jsx(Box$1, __spreadProps$6(__spreadValues$6({ className: "toolbar" }, getVariant("layout.components.toolbar")), { children })) });
6986
+ return /* @__PURE__ */ jsx(controller.Context, { children: /* @__PURE__ */ jsx(Box, __spreadProps$6(__spreadValues$6({ className: "toolbar" }, getVariant("layout.components.toolbar")), { children })) });
7887
6987
  },
7888
6988
  true
7889
6989
  );
@@ -8203,7 +7303,7 @@ const TabsList = ({
8203
7303
  const [isOpen, setIsOpen] = React__default.useState(false);
8204
7304
  const [targetId, setTargetId] = React__default.useState("");
8205
7305
  return /* @__PURE__ */ jsxs(
8206
- Box$1,
7306
+ Box,
8207
7307
  __spreadProps$3(__spreadValues$3({
8208
7308
  id: `tabsList-${id}`,
8209
7309
  className: "tabsList__wrapper",
@@ -8217,7 +7317,7 @@ const TabsList = ({
8217
7317
  )) ;
8218
7318
  }, []),
8219
7319
  children: [
8220
- /* @__PURE__ */ jsx(Box$1, { className: "tabsList__fixedTabs", children: fixedTabs.map((current) => /* @__PURE__ */ jsx(Item, { tabId: current.id }, current.id)) }),
7320
+ /* @__PURE__ */ jsx(Box, { className: "tabsList__fixedTabs", children: fixedTabs.map((current) => /* @__PURE__ */ jsx(Item, { tabId: current.id }, current.id)) }),
8221
7321
  /* @__PURE__ */ jsx(
8222
7322
  ContextMenu,
8223
7323
  {
@@ -8228,7 +7328,7 @@ const TabsList = ({
8228
7328
  }
8229
7329
  ),
8230
7330
  /* @__PURE__ */ jsx(
8231
- Box$1,
7331
+ Box,
8232
7332
  {
8233
7333
  className: `noScrollbar tabs__list ${orientation === "vertical" ? "vertical" : ""}`,
8234
7334
  onContextMenu: React__default.useCallback((e) => {
@@ -8658,14 +7758,14 @@ const TabsContent = (props) => {
8658
7758
  }
8659
7759
  });
8660
7760
  return /* @__PURE__ */ jsx(
8661
- Box$1,
7761
+ Box,
8662
7762
  __spreadProps$1(__spreadValues$1(__spreadValues$1({
8663
7763
  className: "tabs__content__wrapper"
8664
7764
  }, getVariant("layout.common.tabs.primary.content")), props), {
8665
7765
  children: tabs == null ? void 0 : tabs.map((current) => {
8666
7766
  const Render = current.content;
8667
7767
  return /* @__PURE__ */ jsxs(
8668
- Box$1,
7768
+ Box,
8669
7769
  {
8670
7770
  "aria-hidden": !current.isOpen,
8671
7771
  "aria-labelledby": `tab-${id}-${current.id}`,
@@ -8675,7 +7775,7 @@ const TabsContent = (props) => {
8675
7775
  role: "tabpanel",
8676
7776
  children: [
8677
7777
  /* @__PURE__ */ jsx(Render, { tab: current }),
8678
- current.isLoading && /* @__PURE__ */ jsx(Box$1, { className: "tabs__content__spinner__wrapper", children: /* @__PURE__ */ jsx(Spinner, {}) })
7778
+ current.isLoading && /* @__PURE__ */ jsx(Box, { className: "tabs__content__spinner__wrapper", children: /* @__PURE__ */ jsx(Spinner, {}) })
8679
7779
  ]
8680
7780
  },
8681
7781
  current.id
@@ -8776,7 +7876,7 @@ const NonForwardedTabs = (_a, ref) => {
8776
7876
  [handler, id, isMultiple, onOpenTab, orientation]
8777
7877
  ),
8778
7878
  children: /* @__PURE__ */ jsx(
8779
- Box$1,
7879
+ Box,
8780
7880
  __spreadProps(__spreadValues({}, props), {
8781
7881
  onKeyDown: React__default.useCallback(
8782
7882
  (ev) => {
@@ -8795,4 +7895,4 @@ const Tabs = React__default.forwardRef(
8795
7895
  NonForwardedTabs
8796
7896
  );
8797
7897
 
8798
- export { Accordion, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaChat, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, AutoEllipsis, BaseButton, CalendarModal, Captcha, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, DateInput, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, FieldErrorMessage, FieldLabel, IconButton, IconInput, IconsList, LinearLoader, Listbox, ListboxItem, LoaderSpinner, Modal, NumberInput, Overlay, ProgressBar, RequiredMark, ScreenLock, SimpleButton, Tabs, TabsContent, TabsController, TabsList, Toolbar, ToolbarController, ToolbarItem, WaiTypeAhead, getFieldErrorStyles, getFieldTouchedStyles, importComponent, makeResponsiveComponent, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useModal, useModalContext, useOtherTagButton };
7898
+ export { Accordion, AccordionContext, AccordionItem, AccordionItemButton, AccordionItemContent, AccordionItemContext, AlertModal, ApiaFilter, ApiaUtil, ApiaUtilModalHandler, ApiaUtilTooltip, AutoEllipsis, BaseButton, CalendarModal, Captcha, Checkbox$1 as Checkbox, CollapsiblePanel, Confirm, ConfirmModal, DateInput, DefaultIconRenderer, DefaultTabsLabelRenderer, DialogButtonBar, FieldErrorMessage, FieldLabel, IconButton, IconInput, IconsList, LinearLoader, Listbox, ListboxItem, LoaderSpinner, Modal, NumberInput, Overlay, ProgressBar, RequiredMark, ScreenLock, SimpleButton, Tabs, TabsContent, TabsController, TabsList, Toolbar, ToolbarController, ToolbarItem, WaiTypeAhead, getFieldErrorStyles, getFieldTouchedStyles, importComponent, makeResponsiveComponent, parseNumberInputValueToNumber, parseNumberValueToNumberInput, useAccordionContext, useModal, useModalContext, useOtherTagButton };