@namuna-nur/ui-kit 1.10.5 → 1.10.7

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 (72) hide show
  1. package/lib/atoms/index.js +403 -408
  2. package/lib/index.js +175 -161
  3. package/lib/molecules/index.js +3168 -2543
  4. package/lib/shared/assets-icons-0.js +13 -12
  5. package/lib/shared/assets-icons-2.js +11 -9
  6. package/lib/shared/assets-icons-3.js +10 -7
  7. package/lib/shared/assets-icons-4.js +14 -14
  8. package/lib/src/assets/icons/index.d.ts +6 -1
  9. package/lib/src/atoms/ReplyMessage/ReplyMessage.d.ts +2 -0
  10. package/lib/src/atoms/ReplyMessage/ReplyMessage.data.d.ts +1 -0
  11. package/lib/src/atoms/ReplyMessage/ReplyMessage.stories.d.ts +11 -0
  12. package/lib/src/atoms/ReplyMessage/ReplyMessage.tokens.d.ts +11 -0
  13. package/lib/src/atoms/ReplyMessage/ReplyMessage.types.d.ts +25 -0
  14. package/lib/src/atoms/ReplyMessage/ReplyMessage.utils.d.ts +1 -0
  15. package/lib/src/atoms/ReplyMessage/index.d.ts +3 -0
  16. package/lib/src/atoms/index.d.ts +1 -1
  17. package/lib/src/molecules/AudioMessage/AudioMessage.d.ts +2 -0
  18. package/lib/src/molecules/AudioMessage/AudioMessage.data.d.ts +4 -0
  19. package/lib/src/molecules/AudioMessage/AudioMessage.stories.d.ts +7 -0
  20. package/lib/src/molecules/AudioMessage/AudioMessage.test.d.ts +1 -0
  21. package/lib/src/molecules/AudioMessage/AudioMessage.tokens.d.ts +16 -0
  22. package/lib/src/molecules/AudioMessage/AudioMessage.types.d.ts +24 -0
  23. package/lib/src/molecules/AudioMessage/index.d.ts +3 -0
  24. package/lib/src/molecules/CardFiles/CardFiles.types.d.ts +2 -2
  25. package/lib/src/molecules/ChatList/ChatList.d.ts +0 -1
  26. package/lib/src/molecules/ChatMessage/ChatMessage.d.ts +1 -1
  27. package/lib/src/molecules/ChatMessage/ChatMessage.data.d.ts +1 -1
  28. package/lib/src/molecules/ChatMessage/ChatMessage.types.d.ts +7 -2
  29. package/lib/src/molecules/Combobox/Combobox.tokens.d.ts +2 -0
  30. package/lib/src/molecules/Combobox/Combobox.types.d.ts +4 -0
  31. package/lib/src/molecules/DocumentMessage/DocumentMessage.d.ts +2 -0
  32. package/lib/src/molecules/DocumentMessage/DocumentMessage.data.d.ts +4 -0
  33. package/lib/src/molecules/DocumentMessage/DocumentMessage.stories.d.ts +7 -0
  34. package/lib/src/molecules/DocumentMessage/DocumentMessage.test.d.ts +1 -0
  35. package/lib/src/molecules/DocumentMessage/DocumentMessage.tokens.d.ts +9 -0
  36. package/lib/src/molecules/DocumentMessage/DocumentMessage.types.d.ts +22 -0
  37. package/lib/src/molecules/DocumentMessage/index.d.ts +3 -0
  38. package/lib/src/molecules/FileCard/FileCard.d.ts +11 -0
  39. package/lib/src/molecules/FileCard/FileCard.stories.d.ts +7 -0
  40. package/lib/src/molecules/FileCard/FileCard.test.d.ts +1 -0
  41. package/lib/src/molecules/FileCard/FileCard.tokens.d.ts +9 -0
  42. package/lib/src/molecules/FileCard/FileCard.types.d.ts +15 -0
  43. package/lib/src/molecules/FileCard/index.d.ts +3 -0
  44. package/lib/src/molecules/ImageMessage/ImageMessage.d.ts +2 -0
  45. package/lib/src/molecules/ImageMessage/ImageMessage.data.d.ts +4 -0
  46. package/lib/src/molecules/ImageMessage/ImageMessage.stories.d.ts +7 -0
  47. package/lib/src/molecules/ImageMessage/ImageMessage.test.d.ts +1 -0
  48. package/lib/src/molecules/ImageMessage/ImageMessage.tokens.d.ts +6 -0
  49. package/lib/src/molecules/ImageMessage/ImageMessage.types.d.ts +17 -0
  50. package/lib/src/molecules/ImageMessage/index.d.ts +3 -0
  51. package/lib/src/{atoms → molecules}/Message/Message.stories.d.ts +1 -0
  52. package/lib/src/molecules/Message/Message.test.d.ts +1 -0
  53. package/lib/src/{atoms → molecules}/Message/Message.types.d.ts +5 -1
  54. package/lib/src/molecules/MessageSettings/MessageSettings.d.ts +1 -1
  55. package/lib/src/molecules/MessageSettings/MessageSettings.types.d.ts +2 -1
  56. package/lib/src/molecules/PaymentCard/PaymentCard.d.ts +1 -1
  57. package/lib/src/molecules/PaymentCard/PaymentCard.types.d.ts +1 -1
  58. package/lib/src/molecules/VideoMessage/VideoMessage.d.ts +2 -0
  59. package/lib/src/molecules/VideoMessage/VideoMessage.data.d.ts +4 -0
  60. package/lib/src/molecules/VideoMessage/VideoMessage.stories.d.ts +7 -0
  61. package/lib/src/molecules/VideoMessage/VideoMessage.test.d.ts +1 -0
  62. package/lib/src/molecules/VideoMessage/VideoMessage.tokens.d.ts +9 -0
  63. package/lib/src/molecules/VideoMessage/VideoMessage.types.d.ts +25 -0
  64. package/lib/src/molecules/VideoMessage/index.d.ts +3 -0
  65. package/lib/src/molecules/index.d.ts +6 -0
  66. package/lib/src/utils/date.d.ts +2 -0
  67. package/lib/utils/index.js +37 -29
  68. package/package.json +1 -1
  69. /package/lib/src/atoms/{Message/Message.test.d.ts → ReplyMessage/ReplyMessage.test.d.ts} +0 -0
  70. /package/lib/src/{atoms → molecules}/Message/Message.d.ts +0 -0
  71. /package/lib/src/{atoms → molecules}/Message/Message.tokens.d.ts +0 -0
  72. /package/lib/src/{atoms → molecules}/Message/index.d.ts +0 -0
@@ -1,19 +1,18 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
2
- import * as F from "react";
3
- import { forwardRef as z, useState as re, useRef as U } from "react";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import * as W from "react";
3
+ import { forwardRef as F, useState as te, useRef as G } from "react";
4
4
  import { cn as n } from "../utils/index.js";
5
- import { S as X, a as te, b as oe, c as E } from "../shared/assets-icons-4.js";
6
- import { S as G, a as ae, b as ne, c as ie, d as de } from "../shared/assets-icons-0.js";
7
- import { T as le, a as se, P as be, b as ce, c as pe } from "../shared/shared.js";
8
- import { format as ue } from "date-fns";
5
+ import { S as X, a as H, b as oe } from "../shared/assets-icons-4.js";
6
+ import { S as U, a as ie, b as ae, c as ne, d as de } from "../shared/assets-icons-0.js";
7
+ import { T as le, a as se, P as be, b as ce, c as ue } from "../shared/shared.js";
9
8
  import * as Y from "@radix-ui/react-switch";
10
- import { S as fe, a as ge } from "../shared/assets-icons-3.js";
11
- import * as he from "@radix-ui/react-tooltip";
12
- import { S as xe, a as ve } from "../shared/assets-icons-2.js";
13
- import { useOption as ye } from "../hooks/index.js";
14
- import { Avatar as me, AvatarImage as ke, AvatarFallback as we } from "@radix-ui/react-avatar";
15
- import * as _ from "@radix-ui/react-tabs";
16
- const O = {
9
+ import { S as pe, a as fe } from "../shared/assets-icons-3.js";
10
+ import * as ge from "@radix-ui/react-tooltip";
11
+ import { S as he, a as xe } from "../shared/assets-icons-2.js";
12
+ import { useOption as ve } from "../hooks/index.js";
13
+ import { Avatar as ye, AvatarImage as me, AvatarFallback as ke } from "@radix-ui/react-avatar";
14
+ import * as V from "@radix-ui/react-tabs";
15
+ const L = {
17
16
  base: "group inline-flex items-center justify-center transition-colors rounded-[10px] border outline-none",
18
17
  icon: {
19
18
  disabled: {
@@ -64,30 +63,30 @@ const O = {
64
63
  hover: "hover:bg-transparent hover:text-primary-20 hover:border-transparent"
65
64
  }
66
65
  }
67
- }, Ze = z(
66
+ }, Xe = F(
68
67
  ({
69
68
  children: e,
70
69
  classNames: r,
71
70
  disabled: a = !1,
72
- icon: t,
71
+ icon: o,
73
72
  iconDimensions: d = { height: 15, width: 15 },
74
73
  iconPosition: s = "right",
75
74
  size: l = "medium",
76
- variant: i = "primary",
75
+ variant: t = "primary",
77
76
  isShadow: b = !1,
78
- ...p
79
- }, u) => {
80
- const f = O.icon, g = O.sizes[l], h = O.variants[i] || O.variants.primary, v = f.variants[i], x = f.disabled[i];
77
+ ...u
78
+ }, p) => {
79
+ const f = L.icon, g = L.sizes[l], h = L.variants[t] || L.variants.primary, y = f.variants[t], x = f.disabled[t];
81
80
  return /* @__PURE__ */ c(
82
81
  "button",
83
82
  {
84
83
  role: "button",
85
- ...p,
86
- type: p.type || "button",
87
- ref: u,
84
+ ...u,
85
+ type: u.type || "button",
86
+ ref: p,
88
87
  disabled: a,
89
88
  className: n(
90
- O.base,
89
+ L.base,
91
90
  g.padding,
92
91
  g.fontSize,
93
92
  h.base,
@@ -95,19 +94,19 @@ const O = {
95
94
  !a && h.hover,
96
95
  !a && h.active,
97
96
  a && h.disabled,
98
- !!t && f.parent,
99
- !!t && !e && "min-w-0",
100
- i === "primary" && b && "shadow-3xl",
97
+ !!o && f.parent,
98
+ !!o && !e && "min-w-0",
99
+ t === "primary" && b && "shadow-3xl",
101
100
  r == null ? void 0 : r.base
102
101
  ),
103
102
  children: [
104
- !!t && s === "left" && /* @__PURE__ */ o(
105
- t,
103
+ !!o && s === "left" && /* @__PURE__ */ i(
104
+ o,
106
105
  {
107
106
  "aria-label": "icon",
108
107
  "aria-hidden": !0,
109
108
  className: n(
110
- !a && v,
109
+ !a && y,
111
110
  a && x,
112
111
  r == null ? void 0 : r.icon
113
112
  ),
@@ -117,13 +116,13 @@ const O = {
117
116
  }
118
117
  ),
119
118
  e,
120
- !!t && s === "right" && /* @__PURE__ */ o(
121
- t,
119
+ !!o && s === "right" && /* @__PURE__ */ i(
120
+ o,
122
121
  {
123
122
  "aria-label": "icon",
124
123
  "aria-hidden": !0,
125
124
  className: n(
126
- !a && v,
125
+ !a && y,
127
126
  a && x,
128
127
  r == null ? void 0 : r.icon
129
128
  ),
@@ -136,27 +135,27 @@ const O = {
136
135
  }
137
136
  );
138
137
  }
139
- ), Me = z(
138
+ ), we = F(
140
139
  ({
141
140
  classNames: e,
142
141
  disabled: r = !1,
143
142
  icon: a,
144
- variant: t = "default",
143
+ variant: o = "default",
145
144
  shape: d,
146
145
  badge: s,
147
146
  iconSizes: l,
148
- text: i,
147
+ text: t,
149
148
  ...b
150
- }, p) => {
149
+ }, u) => {
151
150
  var x;
152
- const u = R.icon, f = R.variants[t], g = u.variants[t], h = (x = R.shape) == null ? void 0 : x[d], v = u.disabled[t];
151
+ const p = R.icon, f = R.variants[o], g = p.variants[o], h = (x = R.shape) == null ? void 0 : x[d], y = p.disabled[o];
153
152
  return /* @__PURE__ */ c(
154
153
  "button",
155
154
  {
156
155
  ...b,
157
156
  role: "button",
158
157
  type: b.type || "button",
159
- ref: p,
158
+ ref: u,
160
159
  disabled: r,
161
160
  className: n(
162
161
  R.base,
@@ -170,16 +169,16 @@ const O = {
170
169
  e == null ? void 0 : e.button
171
170
  ),
172
171
  children: [
173
- s && /* @__PURE__ */ o("span", { className: R.badgeStyles.badgeStyles, children: s }),
174
- !!a && /* @__PURE__ */ o(
172
+ s && /* @__PURE__ */ i("span", { className: R.badgeStyles.badgeStyles, children: s }),
173
+ !!a && /* @__PURE__ */ i(
175
174
  a,
176
175
  {
177
176
  "aria-label": "icon",
178
177
  "aria-hidden": !0,
179
178
  className: n(
180
- u.base,
179
+ p.base,
181
180
  !r && g,
182
- r && v,
181
+ r && y,
183
182
  e == null ? void 0 : e.icon
184
183
  ),
185
184
  height: l == null ? void 0 : l.height,
@@ -187,7 +186,7 @@ const O = {
187
186
  viewBox: l == null ? void 0 : l.viewBox
188
187
  }
189
188
  ),
190
- !!i && /* @__PURE__ */ o(C, { className: e == null ? void 0 : e.text, children: i })
189
+ !!t && /* @__PURE__ */ i(w, { className: e == null ? void 0 : e.text, children: t })
191
190
  ]
192
191
  }
193
192
  );
@@ -238,7 +237,7 @@ const O = {
238
237
  disabled: "disabled:border-transparent disabled:cursor-default"
239
238
  }
240
239
  }
241
- }, A = {
240
+ }, B = {
242
241
  active: "active:bg-tertiary-10 active:border-tertiary-10 outline-none",
243
242
  base: "border border-secondary-10/[.25] hover:border-primary-10 flex items-center justify-center rounded-[6px] cursor-pointer",
244
243
  checked: "bg-primary-10 border-primary-10",
@@ -255,48 +254,48 @@ const O = {
255
254
  label: "size-2.5"
256
255
  }
257
256
  }
258
- }, Ne = z(
257
+ }, Ye = F(
259
258
  ({
260
259
  checked: e = !1,
261
260
  className: r = "",
262
261
  disabled: a,
263
- id: t,
262
+ id: o,
264
263
  onChange: d,
265
264
  size: s = "large",
266
265
  ...l
267
- }, i) => {
268
- const b = A.base, p = A.sizes[s];
266
+ }, t) => {
267
+ const b = B.base, u = B.sizes[s];
269
268
  return /* @__PURE__ */ c(
270
269
  "label",
271
270
  {
272
271
  "aria-label": "checkbox-label",
273
- htmlFor: t,
272
+ htmlFor: o,
274
273
  tabIndex: 0,
275
274
  className: n(
276
- p.label,
275
+ u.label,
277
276
  b,
278
- e && A.checked,
279
- !a && A.active,
280
- !a && e && A.hover,
281
- a && A.disabled,
277
+ e && B.checked,
278
+ !a && B.active,
279
+ !a && e && B.hover,
280
+ a && B.disabled,
282
281
  r
283
282
  ),
284
283
  children: [
285
- /* @__PURE__ */ o(
284
+ /* @__PURE__ */ i(
286
285
  "input",
287
286
  {
288
287
  ...l,
289
288
  role: "checkbox",
290
- id: t,
289
+ id: o,
291
290
  disabled: a,
292
291
  checked: !!e,
293
292
  onChange: d,
294
- ref: i,
293
+ ref: t,
295
294
  type: "checkbox",
296
295
  className: "hidden peer"
297
296
  }
298
297
  ),
299
- /* @__PURE__ */ o(
298
+ /* @__PURE__ */ i(
300
299
  X,
301
300
  {
302
301
  width: 20,
@@ -316,57 +315,57 @@ const O = {
316
315
  h4: "text-h4",
317
316
  h5: "text-h5",
318
317
  h6: "text-h6"
319
- }, er = ({
318
+ }, Ze = ({
320
319
  children: e,
321
320
  className: r = "",
322
321
  variant: a = "h1",
323
- weight: t = "font-regular",
322
+ weight: o = "font-regular",
324
323
  ...d
325
- }) => /* @__PURE__ */ o(
324
+ }) => /* @__PURE__ */ i(
326
325
  a,
327
326
  {
328
327
  ...d,
329
- className: n(Se[a], t, r),
328
+ className: n(Se[a], o, r),
330
329
  children: e
331
330
  }
332
- ), rr = z(
331
+ ), Ne = F(
333
332
  ({
334
333
  disabled: e,
335
334
  onChange: r,
336
335
  placeholder: a,
337
- autoFocus: t = !1,
336
+ autoFocus: o = !1,
338
337
  status: d,
339
338
  maxLength: s,
340
339
  id: l,
341
- classNames: i,
340
+ classNames: t,
342
341
  ...b
343
- }, p) => {
344
- const u = B.parent, f = B.base, g = B.state, h = B.disabled, v = B.styles, x = B.maxLength;
345
- return /* @__PURE__ */ c("div", { className: n(u, i == null ? void 0 : i.parent), children: [
346
- /* @__PURE__ */ o(
342
+ }, u) => {
343
+ const p = z.parent, f = z.base, g = z.state, h = z.disabled, y = z.styles, x = z.maxLength;
344
+ return /* @__PURE__ */ c("div", { className: n(p, t == null ? void 0 : t.parent), children: [
345
+ /* @__PURE__ */ i(
347
346
  "input",
348
347
  {
349
348
  ...b,
350
349
  role: "textbox",
351
- ref: p,
350
+ ref: u,
352
351
  id: l,
353
352
  disabled: e,
354
- autoFocus: t,
353
+ autoFocus: o,
355
354
  onChange: r,
356
355
  maxLength: s,
357
356
  className: n(
358
357
  f,
359
358
  g.focus,
360
359
  !e && g.hover,
361
- d && (v == null ? void 0 : v[d]),
360
+ d && (y == null ? void 0 : y[d]),
362
361
  e && h,
363
- i == null ? void 0 : i.target
362
+ t == null ? void 0 : t.target
364
363
  ),
365
364
  placeholder: a
366
365
  }
367
366
  ),
368
367
  s && /* @__PURE__ */ c(
369
- C,
368
+ w,
370
369
  {
371
370
  variant: "span",
372
371
  className: n(
@@ -382,7 +381,7 @@ const O = {
382
381
  )
383
382
  ] });
384
383
  }
385
- ), B = {
384
+ ), z = {
386
385
  parent: "relative flex flex-col items-start w-full",
387
386
  base: "text-dark-10 text-sm leading-none w-full rounded-[10px] bg-gray-50 border border-gray-50 p-[12.5px] placeholder:text-dark-10/[.40]",
388
387
  disabled: "bg-secondary-10/[.08] text-gray-30 cursor-not-allowed",
@@ -397,10 +396,10 @@ const O = {
397
396
  success: "bg-white border-success-10 ring-2 ring-success-10/[.20] hover:border-success-10"
398
397
  },
399
398
  maxLength: "ml-auto px-1 mt-1 text-body-10 text-white rounded"
400
- }, tr = F.forwardRef(
401
- ({ htmlFor: e, className: r, children: a, disabled: t, ...d }, s) => {
402
- const l = J.base, i = J.disabled;
403
- return /* @__PURE__ */ o(
399
+ }, er = W.forwardRef(
400
+ ({ htmlFor: e, className: r, children: a, disabled: o, ...d }, s) => {
401
+ const l = J.base, t = J.disabled;
402
+ return /* @__PURE__ */ i(
404
403
  "label",
405
404
  {
406
405
  ...d,
@@ -408,7 +407,7 @@ const O = {
408
407
  "aria-label": "input-label",
409
408
  ref: s,
410
409
  htmlFor: e,
411
- className: n(l, t && i, r),
410
+ className: n(l, o && t, r),
412
411
  children: a
413
412
  }
414
413
  );
@@ -417,168 +416,71 @@ const O = {
417
416
  base: "text-secondary-10 text-sm font-sans font-semibold leading-none",
418
417
  disabled: "text-dark-30/25 cursor-not-allowed"
419
418
  }, Te = {
420
- success: /* @__PURE__ */ o(G, { className: "text-sidebar-10 fill-sidebar-10" }),
421
- danger: /* @__PURE__ */ o(ie, { className: "text-sidebar-10 fill-sidebar-10" }),
422
- info: /* @__PURE__ */ o(ne, { className: "text-sidebar-10 fill-sidebar-10" }),
423
- warning: /* @__PURE__ */ o(ae, { className: "text-sidebar-10 fill-sidebar-10" }),
424
- default: /* @__PURE__ */ o(G, { className: "text-sidebar-10 fill-sidebar-10" })
425
- }, or = ({
419
+ success: /* @__PURE__ */ i(U, { className: "text-sidebar-10 fill-sidebar-10" }),
420
+ danger: /* @__PURE__ */ i(ne, { className: "text-sidebar-10 fill-sidebar-10" }),
421
+ info: /* @__PURE__ */ i(ae, { className: "text-sidebar-10 fill-sidebar-10" }),
422
+ warning: /* @__PURE__ */ i(ie, { className: "text-sidebar-10 fill-sidebar-10" }),
423
+ default: /* @__PURE__ */ i(U, { className: "text-sidebar-10 fill-sidebar-10" })
424
+ }, rr = ({
426
425
  type: e = "info",
427
426
  title: r,
428
427
  description: a,
429
- withIcon: t = !0
428
+ withIcon: o = !0
430
429
  }) => /* @__PURE__ */ c(
431
430
  "div",
432
431
  {
433
432
  className: n(
434
- t ? "items-start" : "justify-center",
433
+ o ? "items-start" : "justify-center",
435
434
  "flex items-center gap-1.5"
436
435
  ),
437
436
  children: [
438
- t && /* @__PURE__ */ o("div", { "data-testid": "notification-icon", children: e && Te[e] }),
437
+ o && /* @__PURE__ */ i("div", { "data-testid": "notification-icon", children: e && Te[e] }),
439
438
  /* @__PURE__ */ c("div", { className: "flex flex-col", children: [
440
- /* @__PURE__ */ o(le, { className: t ? "text-left" : "text-center", children: r }),
441
- /* @__PURE__ */ o(se, { className: t ? "text-left" : "text-center", children: a })
439
+ /* @__PURE__ */ i(le, { className: o ? "text-left" : "text-center", children: r }),
440
+ /* @__PURE__ */ i(se, { className: o ? "text-left" : "text-center", children: a })
442
441
  ] })
443
442
  ]
444
443
  }
445
- ), je = F.forwardRef(
446
- ({
447
- id: e,
448
- text: r,
449
- timestamp: a,
450
- senderName: t,
451
- status: d,
452
- isMine: s = !1,
453
- selected: l = !1,
454
- firstMessage: i = !1,
455
- classNames: b,
456
- ...p
457
- }, u) => {
458
- const f = W.base, g = W.wrapper, h = W.sender, v = W.message, x = W.timestamp;
459
- return /* @__PURE__ */ c(
460
- "div",
461
- {
462
- ref: u,
463
- id: e,
464
- "data-testid": "message",
465
- className: n(
466
- f,
467
- s && "bg-primary-10/[.15] border-dark-40/[.25]",
468
- l && !s && "bg-dark-40/[.25]",
469
- l && s && "bg-primary-10/[.55]",
470
- b == null ? void 0 : b.base
471
- ),
472
- ...p,
473
- children: [
474
- /* @__PURE__ */ c("div", { className: n(g.above), children: [
475
- !s && i && !!t && /* @__PURE__ */ o(
476
- "span",
477
- {
478
- "data-testid": "sender-name",
479
- className: n(h, b == null ? void 0 : b.sender),
480
- children: t
481
- }
482
- ),
483
- !!r && /* @__PURE__ */ o(
484
- "span",
485
- {
486
- "data-testid": "message-text",
487
- className: n(v, b == null ? void 0 : b.message),
488
- children: r
489
- }
490
- )
491
- ] }),
492
- /* @__PURE__ */ c("div", { className: g.below, children: [
493
- !!a && /* @__PURE__ */ o(
494
- "span",
495
- {
496
- "data-testid": "message-timestamp",
497
- className: n(
498
- x,
499
- b == null ? void 0 : b.timestamp,
500
- s ? "text-primary-10" : "text-dark-40/50",
501
- l && "text-dark-30"
502
- ),
503
- children: ue(a, "HH:mm")
504
- }
505
- ),
506
- s && !!d && /* @__PURE__ */ c("div", { "data-testid": "message-status", className: "translate-y-0.5", children: [
507
- d === "delivered" && /* @__PURE__ */ o(
508
- te,
509
- {
510
- className: "fill-primary-10",
511
- width: 16,
512
- height: 16,
513
- viewBox: "0 0 24 24"
514
- }
515
- ),
516
- d === "read" && /* @__PURE__ */ o(
517
- oe,
518
- {
519
- className: "fill-transparent text-primary-10",
520
- width: 16,
521
- height: 16,
522
- viewBox: "0 0 16 16"
523
- }
524
- )
525
- ] })
526
- ] })
527
- ]
528
- }
529
- );
530
- }
531
- );
532
- je.displayName = "Message";
533
- const W = {
534
- base: "relative flex gap-3 bg-sidebar-10 border border-dark-40/[.25] rounded-[10px] px-2.5 py-2 min-h-10 w-max",
535
- wrapper: {
536
- above: "flex flex-col justify-center gap-0.5",
537
- below: "flex items-end justify-end gap-px"
538
- },
539
- sender: "text-primary-10 text-sm font-sans font-medium",
540
- message: "text-dark-30 text-sm font-sans font-medium",
541
- timestamp: "text-xs leading-none"
542
- }, Ce = z(
543
- ({ checked: e, disabled: r, id: a, onChange: t, size: d = "large", className: s, ...l }, i) => {
544
- const b = k.sizes[d];
444
+ ), je = F(
445
+ ({ checked: e, disabled: r, id: a, onChange: o, size: d = "large", className: s, ...l }, t) => {
446
+ const b = S.sizes[d];
545
447
  return /* @__PURE__ */ c(
546
448
  "label",
547
449
  {
548
450
  htmlFor: a,
549
451
  "aria-label": "radio-label",
550
452
  className: n(
551
- k.base,
453
+ S.base,
552
454
  b.label,
553
- r && k.disabled,
554
- !r && k.active,
555
- !e && !r && k.hover,
556
- !r && e && k.checked,
455
+ r && S.disabled,
456
+ !r && S.active,
457
+ !e && !r && S.hover,
458
+ !r && e && S.checked,
557
459
  s
558
460
  ),
559
461
  children: [
560
- /* @__PURE__ */ o(
462
+ /* @__PURE__ */ i(
561
463
  "input",
562
464
  {
563
465
  ...l,
564
466
  id: a,
565
- ref: i,
467
+ ref: t,
566
468
  type: "radio",
567
469
  role: "radio",
568
470
  checked: e,
569
471
  disabled: r,
570
- onChange: t,
472
+ onChange: o,
571
473
  className: "hidden peer",
572
474
  "aria-checked": e,
573
- readOnly: !t
475
+ readOnly: !o
574
476
  }
575
477
  ),
576
- /* @__PURE__ */ o(
478
+ /* @__PURE__ */ i(
577
479
  "span",
578
480
  {
579
481
  "aria-hidden": "true",
580
482
  className: n(
581
- e ? [k.radio.base, k.radio[d]] : "opacity-0",
483
+ e ? [S.radio.base, S.radio[d]] : "opacity-0",
582
484
  r && "bg-primary-30"
583
485
  )
584
486
  }
@@ -588,8 +490,8 @@ const W = {
588
490
  );
589
491
  }
590
492
  );
591
- Ce.displayName = "Radio";
592
- const k = {
493
+ je.displayName = "Radio";
494
+ const S = {
593
495
  base: "border-2 border-dark-30/[.15] flex items-center justify-center rounded-full cursor-pointer outline-none bg-sidebar-10/[.08]",
594
496
  active: "active:border-primary-10",
595
497
  hover: "hover:border-primary-20/[.30]",
@@ -608,12 +510,12 @@ const k = {
608
510
  label: "size-5 min-w-5"
609
511
  }
610
512
  }
611
- }, ar = ({
513
+ }, tr = ({
612
514
  text: e,
613
515
  variant: r = "default",
614
516
  className: a
615
- }) => /* @__PURE__ */ o(
616
- C,
517
+ }) => /* @__PURE__ */ i(
518
+ w,
617
519
  {
618
520
  className: n(K.base, K.status[r], a),
619
521
  "data-testid": "status",
@@ -628,47 +530,47 @@ const k = {
628
530
  warning: "bg-status-30",
629
531
  default: "bg-dark-30/[.15]"
630
532
  }
631
- }, { Root: Re, Thumb: Ae } = Y, nr = F.forwardRef(({ classNames: e, ...r }, a) => {
632
- const t = r.checked ?? !1;
633
- return /* @__PURE__ */ c(Re, { ref: a, className: n(T.base, e == null ? void 0 : e.root), ...r, children: [
634
- /* @__PURE__ */ o(
533
+ }, { Root: Ce, Thumb: Ae } = Y, or = W.forwardRef(({ classNames: e, ...r }, a) => {
534
+ const o = r.checked ?? !1;
535
+ return /* @__PURE__ */ c(Ce, { ref: a, className: n(C.base, e == null ? void 0 : e.root), ...r, children: [
536
+ /* @__PURE__ */ i(
635
537
  "div",
636
538
  {
637
539
  className: n(
638
- T.iconWrapper.base,
540
+ C.iconWrapper.base,
639
541
  "left-0",
640
- !t && T.iconWrapper.checked
542
+ !o && C.iconWrapper.checked
641
543
  ),
642
- children: /* @__PURE__ */ o(
643
- fe,
544
+ children: /* @__PURE__ */ i(
545
+ pe,
644
546
  {
645
547
  "data-testid": "list-icon",
646
- className: n(t ? "fill-dark-30/25" : "fill-dark-30/[.80]")
548
+ className: n(o ? "fill-dark-30/25" : "fill-dark-30/[.80]")
647
549
  }
648
550
  )
649
551
  }
650
552
  ),
651
- /* @__PURE__ */ o(
553
+ /* @__PURE__ */ i(
652
554
  "div",
653
555
  {
654
556
  className: n(
655
- T.iconWrapper.base,
557
+ C.iconWrapper.base,
656
558
  "right-0",
657
- t && T.iconWrapper.checked
559
+ o && C.iconWrapper.checked
658
560
  ),
659
- children: /* @__PURE__ */ o(
660
- ge,
561
+ children: /* @__PURE__ */ i(
562
+ fe,
661
563
  {
662
564
  "data-testid": "grid-icon",
663
- className: n(t ? "fill-dark-30/[.80]" : "fill-dark-30/25")
565
+ className: n(o ? "fill-dark-30/[.80]" : "fill-dark-30/25")
664
566
  }
665
567
  )
666
568
  }
667
569
  ),
668
- /* @__PURE__ */ o("div", { className: n(T.borderLine) }),
669
- /* @__PURE__ */ o(Ae, { tabIndex: 1, className: n(T.thumb, e == null ? void 0 : e.thumb) })
570
+ /* @__PURE__ */ i("div", { className: n(C.borderLine) }),
571
+ /* @__PURE__ */ i(Ae, { tabIndex: 1, className: n(C.thumb, e == null ? void 0 : e.thumb) })
670
572
  ] });
671
- }), T = {
573
+ }), C = {
672
574
  base: "group relative inline-flex w-20 h-[38px] shrink-0 cursor-pointer items-center bg-gray-50 rounded-[10px] transition-colors duration-200 transition-colors",
673
575
  thumb: "pointer-events-none block z-50 size-10 bg-transparent border border-secondary-10/[.15] transition-transform rounded-[10px] ring-0 data-[state=checked]:translate-x-full data-[state=unchecked]:translate-x-0",
674
576
  iconWrapper: {
@@ -676,7 +578,7 @@ const k = {
676
578
  checked: "bg-sidebar-10 rounded-[10px] overflow-hidden"
677
579
  },
678
580
  borderLine: "pointer-events-none absolute z-0 left-0 top-0 w-full h-full group-hover:border group-hover:border-primary-20/[.30] rounded-[10px] transition-colors duration-200"
679
- }, P = {
581
+ }, O = {
680
582
  sizes: {
681
583
  small: {
682
584
  base: "flex items-center justify-center min-w-32 bg-sidebar-10 text-xs font-medium leading-none border-[1px] rounded-md py-[7px] px-5",
@@ -706,18 +608,18 @@ const k = {
706
608
  active: "fill-white",
707
609
  disabled: "fill-dark-30/25"
708
610
  }
709
- }, ir = z(
611
+ }, ir = F(
710
612
  ({
711
613
  variant: e = "small",
712
614
  active: r,
713
615
  icon: a,
714
- disabled: t,
616
+ disabled: o,
715
617
  children: d,
716
618
  className: s,
717
619
  iconDimensions: l,
718
- ...i
620
+ ...t
719
621
  }, b) => {
720
- const p = P.sizes[e];
622
+ const u = O.sizes[e];
721
623
  return /* @__PURE__ */ c(
722
624
  "button",
723
625
  {
@@ -725,25 +627,25 @@ const k = {
725
627
  "aria-selected": r,
726
628
  ref: b,
727
629
  className: n(
728
- p.base,
729
- p.default,
730
- !t && !r && p.hover,
731
- r && !t && p.active,
732
- r && !t && P.focus,
733
- t && p.disabled,
630
+ u.base,
631
+ u.default,
632
+ !o && !r && u.hover,
633
+ r && !o && u.active,
634
+ r && !o && O.focus,
635
+ o && u.disabled,
734
636
  s
735
637
  ),
736
- ...i,
638
+ ...t,
737
639
  children: [
738
- !!a && /* @__PURE__ */ o(
640
+ !!a && /* @__PURE__ */ i(
739
641
  a,
740
642
  {
741
643
  "aria-label": "icon",
742
644
  "aria-hidden": !0,
743
645
  className: n(
744
- P.icon.default,
745
- r && P.icon.active,
746
- t && P.icon.disabled
646
+ O.icon.default,
647
+ r && O.icon.active,
648
+ o && O.icon.disabled
747
649
  ),
748
650
  ...l
749
651
  }
@@ -753,56 +655,56 @@ const k = {
753
655
  }
754
656
  );
755
657
  }
756
- ), C = ({
658
+ ), w = ({
757
659
  children: e,
758
660
  className: r = "",
759
661
  variant: a = "p",
760
- ...t
761
- }) => /* @__PURE__ */ o(a, { ...t, className: n(r), children: e }), dr = F.forwardRef(
662
+ ...o
663
+ }) => /* @__PURE__ */ i(a, { ...o, className: n(r), children: e }), ar = W.forwardRef(
762
664
  ({
763
665
  className: e = "",
764
666
  disabled: r,
765
667
  onChange: a,
766
- placeholder: t = "Введите текст",
668
+ placeholder: o = "Введите текст",
767
669
  autoFocus: d = !1,
768
670
  status: s,
769
671
  maxLength: l,
770
- ...i
672
+ ...t
771
673
  }, b) => {
772
- var x, y;
773
- const p = j.base, u = j.state, f = j.disabled, g = j.styles, h = j.maxLength;
774
- return /* @__PURE__ */ c("div", { className: j.root, children: [
775
- /* @__PURE__ */ o(
674
+ var x, v;
675
+ const u = A.base, p = A.state, f = A.disabled, g = A.styles, h = A.maxLength;
676
+ return /* @__PURE__ */ c("div", { className: A.root, children: [
677
+ /* @__PURE__ */ i(
776
678
  "textarea",
777
679
  {
778
- ...i,
680
+ ...t,
779
681
  role: "textbox",
780
682
  ref: b,
781
683
  maxLength: l,
782
684
  disabled: r,
783
685
  autoFocus: d,
784
- placeholder: t,
686
+ placeholder: o,
785
687
  onChange: a,
786
688
  className: n(
787
- p,
788
- u.focus,
789
- !r && u.hover,
689
+ u,
690
+ p.focus,
691
+ !r && p.hover,
790
692
  s && (g == null ? void 0 : g[s]),
791
693
  r && f,
792
694
  e
793
695
  )
794
696
  }
795
697
  ),
796
- /* @__PURE__ */ o("div", { className: j.messageContainer, children: l && /* @__PURE__ */ c(
797
- C,
698
+ /* @__PURE__ */ i("div", { className: A.messageContainer, children: l && /* @__PURE__ */ c(
699
+ w,
798
700
  {
799
701
  variant: "span",
800
702
  className: n(
801
703
  h,
802
- String(i.value).length === l ? "bg-danger-10 text-sidebar-10" : "bg-transparent"
704
+ String(t.value).length === l ? "bg-danger-10 text-sidebar-10" : "bg-transparent"
803
705
  ),
804
706
  children: [
805
- (y = (x = i.value || "") == null ? void 0 : x.toString()) == null ? void 0 : y.length,
707
+ (v = (x = t.value || "") == null ? void 0 : x.toString()) == null ? void 0 : v.length,
806
708
  "/",
807
709
  l
808
710
  ]
@@ -810,7 +712,7 @@ const k = {
810
712
  ) })
811
713
  ] });
812
714
  }
813
- ), j = {
715
+ ), A = {
814
716
  root: "flex flex-col gap-1 w-full",
815
717
  base: "w-full min-h-[60px] bg-gray-50 text-sm text-dark-10 font-sans font-medium leading-none px-3.5 py-3 border border-gray-50 rounded-[10px] placeholder:text-sm placeholder:text-dark-40/50 transition-colors duration-200",
816
718
  disabled: "text-dark-40/25 bg-dark-30/[.08] cursor-not-allowed",
@@ -830,8 +732,8 @@ const k = {
830
732
  },
831
733
  messageContainer: "flex items-center leading-none",
832
734
  maxLength: "ml-auto p-1 text-dark-40/50 text-sm font-regular leading-none rounded"
833
- }, { Root: Be, Thumb: De } = Y, lr = F.forwardRef(
834
- ({ label: e = "", labelPosition: r = "right", disabled: a, classNames: t, ...d }, s) => /* @__PURE__ */ c(
735
+ }, { Root: Re, Thumb: Be } = Y, nr = W.forwardRef(
736
+ ({ label: e = "", labelPosition: r = "right", disabled: a, classNames: o, ...d }, s) => /* @__PURE__ */ c(
835
737
  "div",
836
738
  {
837
739
  className: n(
@@ -839,30 +741,30 @@ const k = {
839
741
  r === "right" && "flex-row-reverse"
840
742
  ),
841
743
  children: [
842
- !!e && /* @__PURE__ */ o(
744
+ !!e && /* @__PURE__ */ i(
843
745
  "span",
844
746
  {
845
747
  className: n(
846
- $.label,
748
+ _.label,
847
749
  r === "right" && "ml-2",
848
750
  a && "cursor-not-allowed text-dark-30/[.20]",
849
- t == null ? void 0 : t.label
751
+ o == null ? void 0 : o.label
850
752
  ),
851
753
  children: e
852
754
  }
853
755
  ),
854
- /* @__PURE__ */ o(
855
- Be,
756
+ /* @__PURE__ */ i(
757
+ Re,
856
758
  {
857
759
  ref: s,
858
760
  disabled: a,
859
- className: n($.base, t == null ? void 0 : t.base),
761
+ className: n(_.base, o == null ? void 0 : o.base),
860
762
  ...d,
861
- children: /* @__PURE__ */ o(
862
- De,
763
+ children: /* @__PURE__ */ i(
764
+ Be,
863
765
  {
864
766
  tabIndex: 1,
865
- className: n($.thumb, t == null ? void 0 : t.thumb)
767
+ className: n(_.thumb, o == null ? void 0 : o.thumb)
866
768
  }
867
769
  )
868
770
  }
@@ -870,29 +772,29 @@ const k = {
870
772
  ]
871
773
  }
872
774
  )
873
- ), $ = {
775
+ ), _ = {
874
776
  base: "inline-flex h-8 w-[52px] shrink-0 p-1 cursor-pointer items-center rounded-full border border-success-20 transition-colors focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-success-20 data-[state=unchecked]:bg-secondary-10/[.08] data-[state=unchecked]:border-secondary-10/[.30] disabled:data-[state=unchecked]:bg-secondary-10/[.15] disabled:data-[state=unchecked]:border-transparent",
875
777
  label: "mr-2 text-dark-30 text-sm",
876
778
  thumb: "pointer-events-none block size-6 transition-transform rounded-full ring-0 data-[state=checked]:translate-x-3/4 data-[state=unchecked]:translate-x-0 data-[state=checked]:bg-white data-[state=unchecked]:bg-secondary-10/[.30]"
877
- }, { Provider: Fe, Root: ze, Trigger: Oe, Portal: We, Content: Pe, Arrow: Le } = he, sr = ({
779
+ }, { Provider: ze, Root: De, Trigger: Fe, Portal: Le, Content: Oe, Arrow: We } = ge, dr = ({
878
780
  children: e,
879
781
  className: r,
880
782
  defaultOpen: a,
881
- side: t,
783
+ side: o,
882
784
  content: d,
883
785
  delayDuration: s = 0,
884
786
  isDisabled: l = !1
885
- }) => /* @__PURE__ */ o(Fe, { children: /* @__PURE__ */ c(ze, { defaultOpen: a, delayDuration: s, children: [
886
- /* @__PURE__ */ o(Oe, { asChild: !0, children: /* @__PURE__ */ o("div", { children: e }) }),
887
- !l && /* @__PURE__ */ o(We, { children: /* @__PURE__ */ c(
888
- Pe,
787
+ }) => /* @__PURE__ */ i(ze, { children: /* @__PURE__ */ c(De, { defaultOpen: a, delayDuration: s, children: [
788
+ /* @__PURE__ */ i(Fe, { asChild: !0, children: /* @__PURE__ */ i("div", { children: e }) }),
789
+ !l && /* @__PURE__ */ i(Le, { children: /* @__PURE__ */ c(
790
+ Oe,
889
791
  {
890
- side: t,
792
+ side: o,
891
793
  sideOffset: 5,
892
794
  className: n(Q.content, r),
893
795
  children: [
894
796
  d,
895
- /* @__PURE__ */ o(Le, { className: Q.arrow })
797
+ /* @__PURE__ */ i(We, { className: Q.arrow })
896
798
  ]
897
799
  }
898
800
  ) })
@@ -905,38 +807,38 @@ const k = {
905
807
  "data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade"
906
808
  ),
907
809
  arrow: "fill-dark-30"
908
- }, br = ({
810
+ }, lr = ({
909
811
  classNames: e,
910
812
  disabled: r,
911
813
  status: a,
912
- onChange: t,
814
+ onChange: o,
913
815
  options: d,
914
816
  placeholder: s = "Choose",
915
817
  value: l,
916
- isDotable: i,
818
+ isDotable: t,
917
819
  isLoading: b,
918
- autoFocusValue: p
820
+ autoFocusValue: u
919
821
  }) => {
920
- const [u, f] = re(!1), h = ye(d)(l), v = U(null), x = U(null), y = D.base, w = D.options, Z = D.status.styles, M = D.disabled.trigger, N = D.disabled.triggerText, H = ({
822
+ const [p, f] = te(!1), h = ve(d)(l), y = G(null), x = G(null), v = D.base, T = D.options, Z = D.status.styles, N = D.disabled.trigger, ee = D.disabled.triggerText, M = ({
921
823
  className: m,
922
- text: S = ""
923
- }) => /* @__PURE__ */ o(
924
- C,
824
+ text: j = ""
825
+ }) => /* @__PURE__ */ i(
826
+ w,
925
827
  {
926
828
  className: n(
927
- y.placeholder,
928
- r && N,
829
+ v.placeholder,
830
+ r && ee,
929
831
  "truncate min-w-0 flex-1",
930
832
  m
931
833
  ),
932
- children: S
834
+ children: j
933
835
  }
934
- ), ee = (m) => {
836
+ ), re = (m) => {
935
837
  if (m.preventDefault(), x.current) {
936
- const S = l || p;
937
- if (S) {
838
+ const j = l || u;
839
+ if (j) {
938
840
  const q = x.current.querySelector(
939
- `[data-value="${S}"]`
841
+ `[data-value="${j}"]`
940
842
  );
941
843
  q && q.scrollIntoView({
942
844
  block: "center",
@@ -945,48 +847,48 @@ const k = {
945
847
  }
946
848
  }
947
849
  };
948
- return /* @__PURE__ */ o("div", { className: n("w-full", e == null ? void 0 : e.parent), children: /* @__PURE__ */ c(be, { open: u, onOpenChange: f, children: [
850
+ return /* @__PURE__ */ i("div", { className: n("w-full", e == null ? void 0 : e.parent), children: /* @__PURE__ */ c(be, { open: p, onOpenChange: f, children: [
949
851
  /* @__PURE__ */ c(
950
852
  ce,
951
853
  {
952
854
  role: "listbox",
953
855
  disabled: r,
954
856
  className: n(
955
- y.trigger,
956
- r && M,
957
- u && y.focus,
958
- !u && !r && y.hover,
959
- !u && a && Z[a],
857
+ v.trigger,
858
+ r && N,
859
+ p && v.focus,
860
+ !p && !r && v.hover,
861
+ !p && a && Z[a],
960
862
  e == null ? void 0 : e.trigger
961
863
  ),
962
864
  children: [
963
- /* @__PURE__ */ o("div", { className: y == null ? void 0 : y.textWrapper, children: l ? /* @__PURE__ */ o(
964
- H,
865
+ /* @__PURE__ */ i("div", { className: v == null ? void 0 : v.textWrapper, children: l ? /* @__PURE__ */ i(
866
+ M,
965
867
  {
966
868
  text: h == null ? void 0 : h.label,
967
869
  className: n(
968
- y.selected,
870
+ v.selected,
969
871
  r && D.disabled.selectedDisabled,
970
872
  e == null ? void 0 : e.selected
971
873
  )
972
874
  }
973
- ) : /* @__PURE__ */ o(
974
- H,
875
+ ) : /* @__PURE__ */ i(
876
+ M,
975
877
  {
976
878
  text: s,
977
879
  className: e == null ? void 0 : e.placeholder
978
880
  }
979
881
  ) }),
980
- /* @__PURE__ */ o(
981
- xe,
882
+ /* @__PURE__ */ i(
883
+ he,
982
884
  {
983
885
  width: 20,
984
886
  height: 20,
985
887
  viewBox: "0 0 20 20",
986
888
  className: n(
987
- y.icon,
988
- r && y.iconDisabled,
989
- u && "-rotate-180",
889
+ v.icon,
890
+ r && v.iconDisabled,
891
+ p && "-rotate-180",
990
892
  "flex-shrink-0"
991
893
  )
992
894
  }
@@ -994,39 +896,39 @@ const k = {
994
896
  ]
995
897
  }
996
898
  ),
997
- /* @__PURE__ */ o("div", { ref: v, children: /* @__PURE__ */ c(
998
- pe,
899
+ /* @__PURE__ */ i("div", { ref: y, children: /* @__PURE__ */ c(
900
+ ue,
999
901
  {
1000
- container: v.current,
1001
- className: n(w.content, e == null ? void 0 : e.content),
902
+ container: y.current,
903
+ className: n(T.content, e == null ? void 0 : e.content),
1002
904
  style: { minWidth: "var(--radix-popper-anchor-width)" },
1003
- onOpenAutoFocus: ee,
905
+ onOpenAutoFocus: re,
1004
906
  ref: x,
1005
907
  children: [
1006
- b && /* @__PURE__ */ o(Ie, { width: 30, height: 30 }),
1007
- !b && (d != null && d.length) ? d.map((m) => /* @__PURE__ */ o(
908
+ b && /* @__PURE__ */ i(Ve, { width: 30, height: 30 }),
909
+ !b && (d != null && d.length) ? d.map((m) => /* @__PURE__ */ i(
1008
910
  "div",
1009
911
  {
1010
912
  "data-value": m.value,
1011
- className: w.items,
1012
- onClick: (S) => {
1013
- S.preventDefault(), S.stopPropagation(), t(m.value), f(!1);
913
+ className: T.items,
914
+ onClick: (j) => {
915
+ j.preventDefault(), j.stopPropagation(), o(m.value), f(!1);
1014
916
  },
1015
- children: /* @__PURE__ */ o(
1016
- C,
917
+ children: /* @__PURE__ */ i(
918
+ w,
1017
919
  {
1018
920
  className: n(
1019
- w.itemsText,
1020
- !i && l === m.value && w.active,
1021
- i && w.dot,
1022
- i && l === m.value && "before:bg-dark-10 !font-bold"
921
+ T.itemsText,
922
+ !t && l === m.value && T.active,
923
+ t && T.dot,
924
+ t && l === m.value && "before:bg-dark-10 !font-bold"
1023
925
  ),
1024
926
  children: m.label
1025
927
  }
1026
928
  )
1027
929
  },
1028
930
  m.value
1029
- )) : !b && /* @__PURE__ */ o("div", { className: n(w.items, "cursor-default"), children: /* @__PURE__ */ o(C, { className: n(w.itemsText), children: "Нет данных" }) })
931
+ )) : !b && /* @__PURE__ */ i("div", { className: n(T.items, "cursor-default"), children: /* @__PURE__ */ i(w, { className: n(T.itemsText), children: "Нет данных" }) })
1030
932
  ]
1031
933
  }
1032
934
  ) })
@@ -1064,20 +966,20 @@ const k = {
1064
966
  success: "border-success-20 ring-2 ring-success-10/[.20] hover:border-success-20"
1065
967
  }
1066
968
  }
1067
- }, _e = F.forwardRef(
969
+ }, Ie = W.forwardRef(
1068
970
  ({
1069
971
  imageSrc: e,
1070
972
  alt: r,
1071
973
  hasBadge: a = !1,
1072
- iconSize: t,
974
+ iconSize: o,
1073
975
  isActive: d,
1074
976
  isHasCamera: s = !1,
1075
977
  onAvatarChange: l,
1076
- classNames: i
978
+ classNames: t
1077
979
  }, b) => {
1078
- const p = L.root, u = L.image, f = L.badge;
980
+ const u = I.root, p = I.image, f = I.badge;
1079
981
  return /* @__PURE__ */ c(
1080
- me,
982
+ ye,
1081
983
  {
1082
984
  role: "group",
1083
985
  "data-testid": "avatar-root",
@@ -1086,13 +988,13 @@ const k = {
1086
988
  return (g = b == null ? void 0 : b.current) == null ? void 0 : g.click();
1087
989
  },
1088
990
  className: n(
1089
- p,
991
+ u,
1090
992
  a && "bg-dark-30/[.10]",
1091
- d && L.active,
1092
- i == null ? void 0 : i.wrapper
993
+ d && I.active,
994
+ t == null ? void 0 : t.wrapper
1093
995
  ),
1094
996
  children: [
1095
- !!b && /* @__PURE__ */ o(
997
+ !!b && /* @__PURE__ */ i(
1096
998
  "input",
1097
999
  {
1098
1000
  ref: b,
@@ -1102,43 +1004,43 @@ const k = {
1102
1004
  onChange: l
1103
1005
  }
1104
1006
  ),
1105
- e ? /* @__PURE__ */ o(
1106
- ke,
1007
+ e ? /* @__PURE__ */ i(
1008
+ me,
1107
1009
  {
1108
1010
  role: "img",
1109
1011
  "data-testid": "avatar-img",
1110
1012
  src: e,
1111
1013
  alt: r ?? "empty-avatar",
1112
- className: n(u, i == null ? void 0 : i.img)
1014
+ className: n(p, t == null ? void 0 : t.img)
1113
1015
  }
1114
- ) : /* @__PURE__ */ o(we, { children: s ? /* @__PURE__ */ o(
1115
- E,
1016
+ ) : /* @__PURE__ */ i(ke, { children: s ? /* @__PURE__ */ i(
1017
+ H,
1116
1018
  {
1117
1019
  width: 38,
1118
1020
  height: 30,
1119
- className: n("fill-dark-30/[.20]", i == null ? void 0 : i.badgeIcon),
1021
+ className: n("fill-dark-30/[.20]", t == null ? void 0 : t.badgeIcon),
1120
1022
  viewBox: "0 0 38 30"
1121
1023
  }
1122
- ) : /* @__PURE__ */ o(
1123
- ve,
1024
+ ) : /* @__PURE__ */ i(
1025
+ xe,
1124
1026
  {
1125
1027
  "data-testid": "icon-avatar",
1126
1028
  "aria-label": "icon-avatar",
1127
- height: (t == null ? void 0 : t.height) ?? 17,
1128
- width: (t == null ? void 0 : t.width) ?? 17,
1029
+ height: (o == null ? void 0 : o.height) ?? 17,
1030
+ width: (o == null ? void 0 : o.width) ?? 17,
1129
1031
  className: n(
1130
1032
  "fill-sidebar-10",
1131
1033
  a && "fill-dark-30/[.15]",
1132
- i == null ? void 0 : i.fallbackIcon
1034
+ t == null ? void 0 : t.fallbackIcon
1133
1035
  )
1134
1036
  }
1135
1037
  ) }),
1136
- a && /* @__PURE__ */ o(
1038
+ a && /* @__PURE__ */ i(
1137
1039
  "div",
1138
1040
  {
1139
1041
  "data-testid": "avatar-badge",
1140
- className: n(f.wrapper, i == null ? void 0 : i.badge),
1141
- children: d ? /* @__PURE__ */ o(
1042
+ className: n(f.wrapper, t == null ? void 0 : t.badge),
1043
+ children: d ? /* @__PURE__ */ i(
1142
1044
  X,
1143
1045
  {
1144
1046
  width: 14,
@@ -1146,13 +1048,13 @@ const k = {
1146
1048
  viewBox: "0 0 20 20",
1147
1049
  className: "fill-sidebar-10"
1148
1050
  }
1149
- ) : /* @__PURE__ */ o(
1150
- E,
1051
+ ) : /* @__PURE__ */ i(
1052
+ H,
1151
1053
  {
1152
1054
  width: 16,
1153
1055
  height: 13,
1154
1056
  viewBox: "0 0 38 30",
1155
- className: n("fill-sidebar-10", i == null ? void 0 : i.badgeIcon)
1057
+ className: n("fill-sidebar-10", t == null ? void 0 : t.badgeIcon)
1156
1058
  }
1157
1059
  )
1158
1060
  }
@@ -1162,107 +1064,200 @@ const k = {
1162
1064
  );
1163
1065
  }
1164
1066
  );
1165
- _e.displayName = "Avatar";
1166
- const L = {
1067
+ Ie.displayName = "Avatar";
1068
+ const I = {
1167
1069
  root: "size-9 relative flex items-center justify-center bg-dark-30/[.10] rounded-full",
1168
1070
  image: "size-full object-center object-cover rounded-full",
1169
1071
  badge: {
1170
1072
  wrapper: "absolute bottom-2 right-2 transform translate-x-1/4 translate-y-1/4 flex items-center justify-center bg-primary-10 px-2.5 py-3 border-2 border-sidebar-10 rounded-full"
1171
1073
  },
1172
1074
  active: "ring ring-2 ring-offset-1 ring-primary-10"
1173
- }, cr = ({
1075
+ }, sr = ({
1174
1076
  value: e,
1175
1077
  onValueChange: r,
1176
1078
  classNames: a = {},
1177
- count: t = 3,
1079
+ count: o = 3,
1178
1080
  ...d
1179
- }) => /* @__PURE__ */ o(_.Root, { value: e, onValueChange: r, children: /* @__PURE__ */ o(
1180
- _.List,
1081
+ }) => /* @__PURE__ */ i(V.Root, { value: e, onValueChange: r, children: /* @__PURE__ */ i(
1082
+ V.List,
1181
1083
  {
1182
- className: n(I.container, a.container),
1084
+ className: n($.container, a.container),
1183
1085
  ...d,
1184
- children: Array.from({ length: t }).map((s, l) => /* @__PURE__ */ o(
1185
- _.Trigger,
1086
+ children: Array.from({ length: o }).map((s, l) => /* @__PURE__ */ i(
1087
+ V.Trigger,
1186
1088
  {
1187
1089
  value: String(l),
1188
1090
  className: n(
1189
- I.dot,
1190
- l <= Number(e) && I.dotActive,
1091
+ $.dot,
1092
+ l <= Number(e) && $.dotActive,
1191
1093
  a.trigger
1192
1094
  )
1193
1095
  },
1194
1096
  l
1195
1097
  ))
1196
1098
  }
1197
- ) }), I = {
1099
+ ) }), $ = {
1198
1100
  container: "flex items-center gap-1",
1199
1101
  dot: "size-2 rounded-full bg-dark-30/[.20] transition-colors focus:outline-none focus:ring-offset-0 focus:ring-primary-10",
1200
1102
  dotActive: "bg-primary-10"
1201
- }, pr = ({ className: e, children: r, ...a }) => /* @__PURE__ */ o("div", { ...a, "data-slot": "skeleton", className: n($e.base, e), children: r }), $e = {
1103
+ }, br = ({ className: e, children: r, ...a }) => /* @__PURE__ */ i("div", { ...a, "data-slot": "skeleton", className: n(Pe.base, e), children: r }), Pe = {
1202
1104
  base: "bg-gray-200 animate-pulse rounded-md"
1203
- }, Ie = ({
1105
+ }, Ve = ({
1204
1106
  classNames: e,
1205
1107
  width: r = 73,
1206
1108
  height: a = 73,
1207
- isBlur: t = !1
1208
- }) => /* @__PURE__ */ o(
1109
+ isBlur: o = !1
1110
+ }) => /* @__PURE__ */ i(
1209
1111
  "div",
1210
1112
  {
1211
1113
  "data-testid": "spinner",
1212
- className: n(t ? V.blur : V.wrapper, e == null ? void 0 : e.wrapper),
1213
- children: /* @__PURE__ */ o(
1114
+ className: n(o ? E.blur : E.wrapper, e == null ? void 0 : e.wrapper),
1115
+ children: /* @__PURE__ */ i(
1214
1116
  de,
1215
1117
  {
1216
1118
  "data-testid": "spinner-icon",
1217
1119
  height: a,
1218
1120
  width: r,
1219
- className: n(V.icon, e == null ? void 0 : e.icon)
1121
+ className: n(E.icon, e == null ? void 0 : e.icon)
1220
1122
  }
1221
1123
  )
1222
1124
  }
1223
- ), V = {
1125
+ ), E = {
1224
1126
  wrapper: "flex flex-col gap-1 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 items-center justify-center",
1225
1127
  blur: "absolute inset-0 z-51 flex items-center justify-center bg-background/60 backdrop-blur-sm rounded-[20px]",
1226
1128
  icon: "fill-primary-10"
1129
+ }, P = {
1130
+ image: "Photo",
1131
+ video: "Video",
1132
+ audio: "Voice message",
1133
+ file: "Файл"
1134
+ }, _e = (e, r, a) => {
1135
+ switch (e) {
1136
+ case "image":
1137
+ return P.image;
1138
+ case "video":
1139
+ return P.video;
1140
+ case "audio":
1141
+ return P.audio;
1142
+ case "file":
1143
+ return r || P.file;
1144
+ default:
1145
+ return a || null;
1146
+ }
1147
+ }, cr = ({
1148
+ senderName: e,
1149
+ messageText: r,
1150
+ contentType: a = "text",
1151
+ fileUrl: o,
1152
+ fileName: d,
1153
+ onClose: s,
1154
+ showCloseButton: l = !0,
1155
+ classNames: t
1156
+ }) => {
1157
+ const b = _e(a, d, r);
1158
+ return /* @__PURE__ */ c(
1159
+ "div",
1160
+ {
1161
+ className: n(k.wrapper, t == null ? void 0 : t.wrapper),
1162
+ "data-testid": "chat-edit-row",
1163
+ children: [
1164
+ /* @__PURE__ */ c("div", { className: n(k.message, t == null ? void 0 : t.message), children: [
1165
+ (a === "image" || a === "video") && o && /* @__PURE__ */ i(
1166
+ "img",
1167
+ {
1168
+ src: o,
1169
+ alt: d || "thumbnail",
1170
+ "data-testid": "reply-thumbnail",
1171
+ className: n(k.thumbnail, t == null ? void 0 : t.thumbnail)
1172
+ }
1173
+ ),
1174
+ /* @__PURE__ */ c("div", { className: n(k.content, t == null ? void 0 : t.content), children: [
1175
+ /* @__PURE__ */ i(
1176
+ w,
1177
+ {
1178
+ variant: "span",
1179
+ className: n(k.title, t == null ? void 0 : t.title),
1180
+ "data-testid": "chat-edit-title",
1181
+ children: e
1182
+ }
1183
+ ),
1184
+ /* @__PURE__ */ i(
1185
+ w,
1186
+ {
1187
+ variant: "span",
1188
+ className: n(k.subtitle, t == null ? void 0 : t.subtitle),
1189
+ "data-testid": "chat-edit-subtitle",
1190
+ children: a !== "text" ? /* @__PURE__ */ i("span", { className: k.mediaLabel, children: b }) : b
1191
+ }
1192
+ )
1193
+ ] })
1194
+ ] }),
1195
+ l && /* @__PURE__ */ i(
1196
+ we,
1197
+ {
1198
+ "data-testid": "chat-close-edit",
1199
+ shape: "circle",
1200
+ classNames: {
1201
+ button: n(k.closeButton, t == null ? void 0 : t.closeButton),
1202
+ icon: n(k.closeIcon, t == null ? void 0 : t.closeIcon)
1203
+ },
1204
+ icon: oe,
1205
+ iconSizes: { width: 24, height: 24, viewBox: "0 0 20 20" },
1206
+ onClick: s
1207
+ }
1208
+ )
1209
+ ]
1210
+ }
1211
+ );
1212
+ }, k = {
1213
+ wrapper: "w-full h-14 flex flex-row justify-between items-center",
1214
+ message: "flex border-s-[3px] border-s-primary-10 w-full pr-2 py-1.5 bg-primary-10/[.10] rounded-[5px]",
1215
+ title: "text-sm text-primary-10 font-medium truncate w-full",
1216
+ content: "flex flex-col items-start gap-1 ml-2 text-sm text-dark-40",
1217
+ subtitle: "text-sm text-dark-30 font-medium",
1218
+ closeButton: "border-0 p-3 shadow-none focus:border-0 active:border-0",
1219
+ closeIcon: "text-primary-10 fill-primary-10",
1220
+ thumbnail: "size-[46px] ml-2 rounded object-cover flex-shrink-0",
1221
+ mediaLabel: "inline-flex items-center gap-1 text-sm text-dark-40 font-medium"
1227
1222
  };
1228
1223
  export {
1229
- _e as Avatar,
1230
- Ze as Button,
1231
- Ne as Checkbox,
1232
- er as Headline,
1233
- Me as IconButton,
1234
- rr as Input,
1235
- tr as Label,
1236
- je as Message,
1237
- or as Notification,
1238
- Ce as Radio,
1239
- br as Select,
1240
- pr as Skeleton,
1241
- Ie as Spinner,
1242
- ar as Status,
1243
- nr as Switch,
1224
+ Ie as Avatar,
1225
+ Xe as Button,
1226
+ Ye as Checkbox,
1227
+ Ze as Headline,
1228
+ we as IconButton,
1229
+ Ne as Input,
1230
+ er as Label,
1231
+ rr as Notification,
1232
+ je as Radio,
1233
+ cr as ReplyMessage,
1234
+ lr as Select,
1235
+ br as Skeleton,
1236
+ Ve as Spinner,
1237
+ tr as Status,
1238
+ or as Switch,
1244
1239
  ir as Tab,
1245
- cr as TabDots,
1246
- C as Text,
1247
- dr as Textarea,
1248
- lr as Toggle,
1249
- sr as Tooltip,
1250
- L as avatarIconTokens,
1251
- O as buttonTokens,
1252
- A as checkboxTokens,
1240
+ sr as TabDots,
1241
+ w as Text,
1242
+ ar as Textarea,
1243
+ nr as Toggle,
1244
+ dr as Tooltip,
1245
+ I as avatarIconTokens,
1246
+ L as buttonTokens,
1247
+ B as checkboxTokens,
1253
1248
  R as iconButtonTokens,
1254
- B as inputTokens,
1249
+ z as inputTokens,
1255
1250
  J as labelTokens,
1256
- W as messageTokens,
1257
- k as radioTokens,
1251
+ S as radioTokens,
1252
+ k as replyMessageTokens,
1258
1253
  D as selectTokens,
1259
- $e as skeletonTokens,
1260
- V as spinnerTokens,
1254
+ Pe as skeletonTokens,
1255
+ E as spinnerTokens,
1261
1256
  K as statusTokens,
1262
- T as switchTokens,
1263
- I as tabDotsTokens,
1264
- P as tabTokens,
1265
- j as textareaTokens,
1266
- $ as toggleTokens,
1257
+ C as switchTokens,
1258
+ $ as tabDotsTokens,
1259
+ O as tabTokens,
1260
+ A as textareaTokens,
1261
+ _ as toggleTokens,
1267
1262
  Q as tooltipTokens
1268
1263
  };