prometeo-design-system 7.2.9 → 7.3.1

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 (111) hide show
  1. package/dist/AttachInput.es.js +8 -8
  2. package/dist/Autocomplete.d.ts +4 -0
  3. package/dist/Autocomplete.es.js +83 -0
  4. package/dist/Badge.d.ts +2 -0
  5. package/dist/Badge.es.js +48 -0
  6. package/dist/Button.es.js +35 -32
  7. package/dist/Card.es.js +12 -12
  8. package/dist/CardBackground.d.ts +6 -0
  9. package/dist/{CardBackground-D5SgTU1i.js → CardBackground.es.js} +4 -3
  10. package/dist/Chat.d.ts +6 -0
  11. package/dist/Chat.es.js +20 -0
  12. package/dist/ChatCard.d.ts +6 -0
  13. package/dist/ChatCard.es.js +167 -0
  14. package/dist/DesktopModal.d.ts +6 -0
  15. package/dist/DesktopModal.es.js +10 -0
  16. package/dist/DialogModal.es.js +4 -5
  17. package/dist/Divider.d.ts +6 -0
  18. package/dist/{Divider-BxsuAgUn.js → Divider.es.js} +1 -1
  19. package/dist/{DrawerMobile-CVujgYFG.js → DrawerMobile-BzwNbhK7.js} +1 -1
  20. package/dist/DrawerMobile.es.js +1 -1
  21. package/dist/FAButton.d.ts +2 -0
  22. package/dist/FileCard.d.ts +6 -0
  23. package/dist/FileCard.es.js +176 -0
  24. package/dist/HelperComponent.d.ts +6 -0
  25. package/dist/{HelperComponent-DaFtt5zg.js → HelperComponent.es.js} +1 -1
  26. package/dist/IconButton.es.js +32 -27
  27. package/dist/Image.d.ts +2 -0
  28. package/dist/Input.es.js +9 -9
  29. package/dist/InputLegacy.d.ts +4 -0
  30. package/dist/InputLegacy.es.js +257 -0
  31. package/dist/InputMultiple.es.js +9 -9
  32. package/dist/InputPassword.d.ts +6 -0
  33. package/dist/InputPassword.es.js +42 -0
  34. package/dist/InputSearch.d.ts +6 -0
  35. package/dist/InputSearch.es.js +96 -0
  36. package/dist/Link.d.ts +6 -0
  37. package/dist/Link.es.js +143 -0
  38. package/dist/ListItem.d.ts +6 -0
  39. package/dist/{ListItem-DiQTFzmP.js → ListItem.es.js} +7 -7
  40. package/dist/Menu.d.ts +4 -0
  41. package/dist/Menu.es.js +3 -2
  42. package/dist/MenuList.css +1 -0
  43. package/dist/MenuList.d.ts +6 -0
  44. package/dist/MenuList.es.js +123 -0
  45. package/dist/MessageCard.d.ts +6 -0
  46. package/dist/MessageCard.es.js +83 -0
  47. package/dist/Modal.es.js +3 -3
  48. package/dist/NavigationDrawer-BaEoMYbB.js +335 -0
  49. package/dist/NavigationDrawer.d.ts +6 -0
  50. package/dist/NavigationDrawer.es.js +4 -0
  51. package/dist/NotificationCard.es.js +23 -23
  52. package/dist/PLNotificationsList.es.js +7 -7
  53. package/dist/PyrionLayout.es.js +591 -917
  54. package/dist/RadioButton.es.js +1 -1
  55. package/dist/RecurrentDatePicker.d.ts +4 -0
  56. package/dist/RecurrentDatePicker.es.js +4 -3
  57. package/dist/RecurrentDatePickerRRule.d.ts +4 -0
  58. package/dist/RecurrentDatePickerRRule.es.js +100 -99
  59. package/dist/Scrollable.es.js +13 -2
  60. package/dist/Select.css +1 -1
  61. package/dist/Select.es.js +1379 -2
  62. package/dist/SelectLegacy.es.js +1 -1
  63. package/dist/SelectSearch.es.js +13 -13
  64. package/dist/Switch.es.js +3 -78
  65. package/dist/TabLinks.es.js +3 -2
  66. package/dist/TabSwitch.es.js +86 -222
  67. package/dist/Table.es.js +2 -2
  68. package/dist/Tabs.d.ts +6 -0
  69. package/dist/{TabLinks-DCCTKkqk.js → Tabs.es.js} +83 -124
  70. package/dist/TextArea.es.js +5 -5
  71. package/dist/Toggle.d.ts +6 -0
  72. package/dist/Toggle.es.js +80 -0
  73. package/dist/UserAccountMenu.d.ts +6 -0
  74. package/dist/UserAccountMenu.es.js +142 -0
  75. package/dist/components/ActionInput/ActionInput.AttachFields.d.ts +6 -0
  76. package/dist/components/ActionInput/ActionInput.Footer.d.ts +6 -0
  77. package/dist/components/ActionInput/ActionInput.d.ts +14 -0
  78. package/dist/components/ActionInput/ActionInput.types.d.ts +28 -0
  79. package/dist/components/Button/Button.d.ts +2 -2
  80. package/dist/components/Divider/Divider.d.ts +1 -1
  81. package/dist/components/IconButton/IconButton.d.ts +2 -2
  82. package/dist/exports/ActionInput.d.ts +2 -0
  83. package/dist/exports/Badge.d.ts +2 -0
  84. package/dist/exports/CardBackground.d.ts +3 -0
  85. package/dist/exports/DialogModal.d.ts +1 -1
  86. package/dist/exports/Divider.d.ts +2 -0
  87. package/dist/exports/FAButton.d.ts +1 -0
  88. package/dist/exports/FileCard.d.ts +3 -0
  89. package/dist/exports/Image.d.ts +1 -0
  90. package/dist/exports/ImageGallery.d.ts +1 -0
  91. package/dist/exports/InputLegacy.d.ts +1 -0
  92. package/dist/exports/InputPassword.d.ts +2 -0
  93. package/dist/exports/ListItem.d.ts +1 -1
  94. package/dist/exports/Menu.d.ts +1 -0
  95. package/dist/exports/MenuList.d.ts +1 -0
  96. package/dist/exports/MessageCard.d.ts +2 -0
  97. package/dist/exports/NavigationDrawer.d.ts +2 -0
  98. package/dist/exports/RecurrentDatePicker.d.ts +2 -0
  99. package/dist/exports/RecurrentDatePickerRRule.d.ts +1 -0
  100. package/dist/exports/TabLinks.d.ts +1 -1
  101. package/dist/exports/Tabs.d.ts +4 -0
  102. package/dist/exports/Toggle.d.ts +1 -1
  103. package/dist/exports/UserAccountMenu.d.ts +2 -0
  104. package/dist/index.d.ts +124 -120
  105. package/dist/prometeo-design-system.es.js +407 -1088
  106. package/dist/useAutocomplete-5HfWBKc-.js +175 -0
  107. package/dist/{useModalControl-Bmu_6wf8.js → useModalControl-BE-IfhuR.js} +20 -20
  108. package/dist/useScrollable.d.ts +2 -0
  109. package/dist/{Scrollable-BaO4iaOO.js → useScrollable.es.js} +199 -210
  110. package/package.json +76 -4
  111. package/dist/Select-BwLe1K7c.js +0 -1496
@@ -1,9 +1,9 @@
1
1
  import { j as r } from "./jsx-runtime-GkKLlHH4.js";
2
2
  import { c as s } from "./cn-B6yFEsav.js";
3
- import { memo as T, forwardRef as H, useCallback as P } from "react";
4
- import { useDropzone as E } from "react-dropzone";
5
- import G from "./PlainTooltip.es.js";
6
- import { H as _ } from "./HelperComponent-DaFtt5zg.js";
3
+ import { memo as T, forwardRef as P, useCallback as E } from "react";
4
+ import { useDropzone as G } from "react-dropzone";
5
+ import H from "./PlainTooltip.es.js";
6
+ import _ from "./HelperComponent.es.js";
7
7
  import { c as i } from "./index-BOQuZ0gG.js";
8
8
  import { UploadCloud as q } from "./Icons/UploadCloud.es.js";
9
9
  import { Info as K } from "./Icons/Info.es.js";
@@ -76,7 +76,7 @@ const O = i(
76
76
  return `Máximo ${e} ${e === 1 ? "archivo" : "archivos"} permitido${e === 1 ? "" : "s"}`;
77
77
  const o = t.length;
78
78
  return o === 1 ? "El archivo no pudo cargarse" : `${o} archivos no pudieron cargarse`;
79
- }, Z = (t, e) => e ? "reject" : t ? "active" : "idle", N = H(
79
+ }, Z = (t, e) => e ? "reject" : t ? "active" : "idle", N = P(
80
80
  ({
81
81
  onFilesAccepted: t,
82
82
  onFilesRejected: e,
@@ -93,7 +93,7 @@ const O = i(
93
93
  maxSize: p,
94
94
  ...M
95
95
  }, C) => {
96
- const D = P(
96
+ const D = E(
97
97
  (g, j) => {
98
98
  g.length > 0 && t?.(g), j.length > 0 && e?.(j);
99
99
  },
@@ -104,7 +104,7 @@ const O = i(
104
104
  isDragActive: k,
105
105
  isDragReject: A,
106
106
  fileRejections: b
107
- } = E({
107
+ } = G({
108
108
  onDrop: D,
109
109
  accept: m,
110
110
  maxFiles: h,
@@ -183,7 +183,7 @@ const O = i(
183
183
  X(p)
184
184
  ] })
185
185
  ] }),
186
- /* @__PURE__ */ r.jsx(G, { title: B, children: /* @__PURE__ */ r.jsx(
186
+ /* @__PURE__ */ r.jsx(H, { title: B, children: /* @__PURE__ */ r.jsx(
187
187
  K,
188
188
  {
189
189
  size: 12,
@@ -0,0 +1,4 @@
1
+ export {}
2
+ import PrometeoDesignSystem from './exports/Autocomplete'
3
+ export default PrometeoDesignSystem
4
+ export {}
@@ -0,0 +1,83 @@
1
+ import { j as b } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { useRef as x, useMemo as f } from "react";
3
+ import V from "./Select.es.js";
4
+ import { u as y } from "./useAutocomplete-5HfWBKc-.js";
5
+ import { g as l } from "./utils-X4-h3cum.js";
6
+ const _ = (e) => {
7
+ const a = x(void 0), { asyncMode: u = "fetch_in_open" } = e, { inputValue: r, setInputValue: i, filteredOptions: c, isLoading: s, value: n, onOptionClick: g } = y({
8
+ fetcher: e.fetcher,
9
+ asyncMode: u,
10
+ debounceDelay: e.debounceDelay,
11
+ disabled: e.disabled,
12
+ multiple: e.multiple,
13
+ optionValue: e.optionValue,
14
+ optionLabel: e.optionLabel,
15
+ onFetchingStart: () => {
16
+ u === "fetch_on_type" && a.current?.open();
17
+ },
18
+ onTypeStart: () => {
19
+ !e?.fetcher && a.current?.open();
20
+ }
21
+ }), d = e.multiple ? f(() => n.map((o) => l(o, e.optionValue)), [n, e.optionValue]) : f(() => l(n, e.optionValue), [n, e.optionValue]), h = (o) => {
22
+ const t = c.find((m) => l(m, e.optionValue) === o.id);
23
+ t && g(t);
24
+ }, S = (o) => {
25
+ o && h(o);
26
+ }, C = (o) => {
27
+ for (const t of o)
28
+ n.some(
29
+ (O) => l(O, e.optionValue) === t.id
30
+ ) || h(t);
31
+ }, p = () => {
32
+ i("");
33
+ };
34
+ return e.multiple ? /* @__PURE__ */ b.jsx(
35
+ V,
36
+ {
37
+ multiple: !0,
38
+ label: e.label || "",
39
+ value: d,
40
+ options: c,
41
+ optionValue: e.optionValue,
42
+ optionLabel: e.optionLabel,
43
+ renderOption: e.renderOption,
44
+ onChange: C,
45
+ displayMode: "chips",
46
+ controls: a,
47
+ emptyMessage: "Use el buscador para obtener las opciones disponibles",
48
+ dropdownOptions: {
49
+ controledSearchValue: r,
50
+ onSearchValueChange: i,
51
+ onSearchClear: p,
52
+ dropdownHeight: "600px",
53
+ inputSearchPlaceholder: "Buscar pokemons"
54
+ },
55
+ isLoading: s
56
+ }
57
+ ) : /* @__PURE__ */ b.jsx(
58
+ V,
59
+ {
60
+ label: e.label || "",
61
+ value: d,
62
+ options: c,
63
+ optionValue: e.optionValue,
64
+ optionLabel: e.optionLabel,
65
+ renderOption: e.renderOption,
66
+ onChange: S,
67
+ displayMode: "compact",
68
+ controls: a,
69
+ emptyMessage: "Use el buscador para obtener las opciones disponibles",
70
+ dropdownOptions: {
71
+ controledSearchValue: r,
72
+ onSearchValueChange: i,
73
+ onSearchClear: p,
74
+ dropdownHeight: "600px",
75
+ inputSearchPlaceholder: "Buscar pokemons"
76
+ },
77
+ isLoading: s
78
+ }
79
+ );
80
+ };
81
+ export {
82
+ _ as default
83
+ };
@@ -0,0 +1,2 @@
1
+ export * from './exports/Badge'
2
+ export {}
@@ -0,0 +1,48 @@
1
+ import { j as t } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { c as l } from "./index-BOQuZ0gG.js";
3
+ import { c as m } from "./cn-B6yFEsav.js";
4
+ const u = "brand", o = 99, d = l("radius-full flex items-center justify-center font-medium select-none", {
5
+ variants: {
6
+ size: {
7
+ small: "size-2",
8
+ medium: "size-[20px] p-1"
9
+ },
10
+ color: {
11
+ neutral: "bg-neutral-tertiary-default text-neutral-default-default icon-neutral-default-default",
12
+ brand: "bg-brand-primary-default text-neutral-default-default icon-brand-primary-default",
13
+ warning: "bg-warning-primary-default text-semantic-warning-primary-default icon-semantic-warning-primary-default",
14
+ success: "bg-success-primary-default text-semantic-success-primary-default icon-semantic-success-primary-default",
15
+ error: "bg-error-primary-default text-semantic-error-primary-default icon-semantic-error-primary-default"
16
+ },
17
+ isTextVariant: {
18
+ true: " min-w-max px-1 py-0.5",
19
+ false: ""
20
+ }
21
+ },
22
+ compoundVariants: []
23
+ }), N = (e) => {
24
+ const a = e.color ?? u;
25
+ if (x(e))
26
+ return /* @__PURE__ */ t.jsx(i, { size: "small", color: a, isTextVariant: !1, className: e.className });
27
+ if (y(e)) {
28
+ const n = e.icon;
29
+ return /* @__PURE__ */ t.jsx(i, { size: "medium", color: a, isTextVariant: !1, className: e.className, children: n && /* @__PURE__ */ t.jsx(n, { size: 14 }) });
30
+ }
31
+ const s = f(e), r = !c(e);
32
+ return /* @__PURE__ */ t.jsx(i, { size: "medium", color: a, isTextVariant: r, className: e.className, children: /* @__PURE__ */ t.jsx("span", { className: "pyrion-fonts-label-small text-center", children: s }) });
33
+ }, f = (e) => {
34
+ if (c(e)) {
35
+ const a = e.maxCount ?? o;
36
+ return e.count > a ? `+${a}` : e.count;
37
+ }
38
+ return e.text;
39
+ }, x = (e) => e.size === "small", y = (e) => e.variant === "icon", c = (e) => typeof e.count == "number", i = ({
40
+ size: e,
41
+ color: a,
42
+ isTextVariant: s,
43
+ children: r,
44
+ className: n
45
+ }) => /* @__PURE__ */ t.jsx("div", { className: m(d({ size: e, color: a, isTextVariant: s }), n), children: r });
46
+ export {
47
+ N as Badge
48
+ };
package/dist/Button.es.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { j as a } from "./jsx-runtime-GkKLlHH4.js";
2
- import { memo as G, useMemo as H, createElement as J, isValidElement as K } from "react";
2
+ import { memo as J, forwardRef as K, useMemo as O, createElement as P, isValidElement as Q } from "react";
3
3
  import { c as V } from "./cn-B6yFEsav.js";
4
4
  import { c as g } from "./index-BOQuZ0gG.js";
5
- import O from "./Spinner.es.js";
6
- const P = (r) => K(r), B = {
5
+ import U from "./Spinner.es.js";
6
+ const W = (r) => Q(r), B = {
7
7
  primary: "brand",
8
8
  secondary: "neutral"
9
- }, Q = (r) => r in B, U = (r) => Q(r) ? B[r] : r, o = {
9
+ }, X = (r) => r in B, Y = (r) => X(r) ? B[r] : r, o = {
10
10
  small: {
11
11
  container: "h-8 px-3 py-1.5 spacing-x-2 radius-small",
12
12
  icon: ""
@@ -156,7 +156,7 @@ const P = (r) => K(r), B = {
156
156
  false: {
157
157
  icon: ""
158
158
  }
159
- }, W = g(f.icon, {
159
+ }, Z = g(f.icon, {
160
160
  variants: {
161
161
  size: {
162
162
  small: `${n.small.icon} ${o.small.icon}`,
@@ -207,7 +207,7 @@ const P = (r) => K(r), B = {
207
207
  color: "brand",
208
208
  animateIcon: !0
209
209
  }
210
- }), X = g(f.container, {
210
+ }), _ = g(f.container, {
211
211
  variants: {
212
212
  size: {
213
213
  small: `${n.small.container} ${o.small.container}`,
@@ -304,36 +304,36 @@ const P = (r) => K(r), B = {
304
304
  variant: "fill",
305
305
  color: "brand"
306
306
  }
307
- }), Y = ({
307
+ }), I = K(({
308
308
  label: r,
309
- onClick: I,
309
+ onClick: z,
310
310
  icon: h,
311
- contentClassName: Z,
311
+ contentClassName: T,
312
312
  loadingText: x = "Cargando...",
313
- animate: z = !1,
314
- animateIcon: N = !1,
313
+ animate: N = !1,
314
+ animateIcon: S = !1,
315
315
  isLoading: d = !1,
316
316
  children: s,
317
317
  hideSpinner: y = !1,
318
318
  spinner: b,
319
- type: S = "button",
320
- className: E,
321
- disabled: M,
319
+ type: E = "button",
320
+ className: M,
321
+ disabled: F,
322
322
  variant: l = "fill",
323
- form: F,
323
+ form: R,
324
324
  size: t = "medium",
325
325
  color: A = "brand",
326
326
  ...D
327
- }) => {
328
- const c = !!(M || d), w = N && !c, L = z && !c, i = c ? "disabled" : U(A), v = typeof s == "string" ? s : r, p = typeof s != "string" ? s : void 0, R = H(() => {
327
+ }, L) => {
328
+ const c = !!(F || d), w = S && !c, k = N && !c, i = c ? "disabled" : Y(A), v = typeof s == "string" ? s : r, p = typeof s != "string" ? s : void 0, q = O(() => {
329
329
  if (d) {
330
- const q = {
330
+ const H = {
331
331
  small: "small",
332
332
  medium: "medium",
333
333
  large: "medium"
334
334
  };
335
335
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
336
- !y && b ? b : /* @__PURE__ */ a.jsx(O, { size: q[t], variant: "clip", color: "brand" }),
336
+ !y && b ? b : /* @__PURE__ */ a.jsx(U, { size: H[t], variant: "clip", color: "brand" }),
337
337
  /* @__PURE__ */ a.jsx(
338
338
  "span",
339
339
  {
@@ -354,18 +354,18 @@ const P = (r) => K(r), B = {
354
354
  return p;
355
355
  const u = h;
356
356
  let m = null;
357
- const k = {
357
+ const G = {
358
358
  small: 20,
359
359
  medium: 24,
360
360
  large: 24
361
361
  };
362
- return u && (m = P(u) ? u : J(u, {
363
- size: k[t]
362
+ return u && (m = W(u) ? u : P(u, {
363
+ size: G[t]
364
364
  })), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
365
365
  m && /* @__PURE__ */ a.jsx(
366
366
  "span",
367
367
  {
368
- className: W({
368
+ className: Z({
369
369
  size: t,
370
370
  variant: l,
371
371
  color: i,
@@ -402,25 +402,28 @@ const P = (r) => K(r), B = {
402
402
  return /* @__PURE__ */ a.jsx(
403
403
  "button",
404
404
  {
405
- type: S,
405
+ ref: L,
406
+ type: E,
406
407
  className: V(
407
408
  "group",
408
- X({
409
+ _({
409
410
  size: t,
410
411
  variant: l,
411
412
  color: i,
412
- animation: L
413
+ animation: k
413
414
  }),
414
- E
415
+ M
415
416
  ),
416
417
  disabled: c,
417
- form: F,
418
- onClick: I,
418
+ form: R,
419
+ onClick: z,
419
420
  ...D,
420
- children: R
421
+ children: q
421
422
  }
422
423
  );
423
- }, ne = G(Y);
424
+ });
425
+ I.displayName = "Button";
426
+ const oe = J(I);
424
427
  export {
425
- ne as default
428
+ oe as default
426
429
  };
package/dist/Card.es.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { j as o } from "./jsx-runtime-GkKLlHH4.js";
2
- import { createContext as p, useContext as j, memo as d, forwardRef as w, useMemo as z } from "react";
3
- import { c as s } from "./cn-B6yFEsav.js";
2
+ import { createContext as p, useContext as j, memo as s, forwardRef as w, useMemo as z } from "react";
3
+ import { c as d } from "./cn-B6yFEsav.js";
4
4
  import { c as i } from "./index-BOQuZ0gG.js";
5
- import { C as F } from "./CardBackground-D5SgTU1i.js";
5
+ import F from "./CardBackground.es.js";
6
6
  const l = p(null);
7
7
  function C() {
8
8
  const a = j(l);
@@ -55,14 +55,14 @@ const H = i(
55
55
  "div",
56
56
  {
57
57
  ref: h,
58
- className: s(H({ direction: t }), x),
58
+ className: d(H({ direction: t }), x),
59
59
  ...v,
60
60
  children: [
61
61
  /* @__PURE__ */ o.jsx(
62
62
  F,
63
63
  {
64
64
  ...e,
65
- className: s(
65
+ className: d(
66
66
  "inset-0 absolute z-0",
67
67
  e?.className
68
68
  )
@@ -72,31 +72,31 @@ const H = i(
72
72
  ]
73
73
  }
74
74
  ) });
75
- }), m = d(function({
75
+ }), m = s(function({
76
76
  children: r,
77
77
  className: t,
78
78
  ...e
79
79
  }) {
80
80
  const { direction: n } = C();
81
- return /* @__PURE__ */ o.jsx("div", { className: s(V({ direction: n }), t), ...e, children: r });
82
- }), u = d(function({
81
+ return /* @__PURE__ */ o.jsx("div", { className: d(V({ direction: n }), t), ...e, children: r });
82
+ }), u = s(function({
83
83
  children: r,
84
84
  className: t,
85
85
  ...e
86
86
  }) {
87
- return /* @__PURE__ */ o.jsx("div", { className: s(k(), t), ...e, children: r });
88
- }), f = d(function({
87
+ return /* @__PURE__ */ o.jsx("div", { className: d(k(), t), ...e, children: r });
88
+ }), f = s(function({
89
89
  children: r,
90
90
  className: t,
91
91
  ...e
92
92
  }) {
93
93
  const { direction: n } = C();
94
- return /* @__PURE__ */ o.jsx("div", { className: s(b({ direction: n }), t), ...e, children: r });
94
+ return /* @__PURE__ */ o.jsx("div", { className: d(b({ direction: n }), t), ...e, children: r });
95
95
  });
96
96
  function E(a, r) {
97
97
  return a.variant === r.variant && a.direction === r.direction && a.className === r.className && a.children === r.children && a.cardBackground === r.cardBackground;
98
98
  }
99
- const c = d(y, E);
99
+ const c = s(y, E);
100
100
  c.Header = m;
101
101
  c.Content = u;
102
102
  c.Footer = f;
@@ -0,0 +1,6 @@
1
+ export * from './exports/CardBackground'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/CardBackground'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/CardBackground'
6
+ export {}
@@ -256,7 +256,8 @@ const _ = (r) => {
256
256
  }, x = I(_);
257
257
  x.displayName = "CardBackground";
258
258
  export {
259
- x as C,
260
- P as I,
261
- W as i
259
+ P as INTERACTION_EXCLUDE_ATTR,
260
+ N as INTERACTION_GROUP_ATTR,
261
+ x as default,
262
+ W as interactionGroupProps
262
263
  };
package/dist/Chat.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from './exports/Chat'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/Chat'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/Chat'
6
+ export {}
@@ -0,0 +1,20 @@
1
+ import { j as a } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { memo as r, forwardRef as f } from "react";
3
+ import { c as e } from "./cn-B6yFEsav.js";
4
+ import i from "./CardBackground.es.js";
5
+ const c = f(function({ cardBackground: s, children: t, className: o, ...l }, m) {
6
+ return /* @__PURE__ */ a.jsxs("div", { className: e("relative w-full", o), ref: m, ...l, children: [
7
+ s && /* @__PURE__ */ a.jsx(
8
+ i,
9
+ {
10
+ ...s,
11
+ className: e("absolute inset-0 z-0", s.className)
12
+ }
13
+ ),
14
+ /* @__PURE__ */ a.jsx("div", { className: "relative z-10 flex flex-col w-full overflow-y-auto", children: t })
15
+ ] });
16
+ }), n = r(c);
17
+ n.displayName = "Chat";
18
+ export {
19
+ n as default
20
+ };
@@ -0,0 +1,6 @@
1
+ export * from './exports/ChatCard'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/ChatCard'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/ChatCard'
6
+ export {}
@@ -0,0 +1,167 @@
1
+ import { j as r } from "./jsx-runtime-GkKLlHH4.js";
2
+ import { useContext as p, createContext as C, memo as d, forwardRef as v, useMemo as g } from "react";
3
+ import { c as l } from "./cn-B6yFEsav.js";
4
+ import { c as m } from "./index-BOQuZ0gG.js";
5
+ import j from "./Avatar.es.js";
6
+ import y from "./CardBackground.es.js";
7
+ import N from "./Link.es.js";
8
+ const f = C(null);
9
+ function w() {
10
+ const t = p(f);
11
+ if (!t)
12
+ throw new Error("ChatCard must be used inside <ChatCard.Participant>");
13
+ return t;
14
+ }
15
+ function b(t) {
16
+ if (!t) return;
17
+ if (typeof t == "string") return t;
18
+ const a = String(t.getDate()).padStart(2, "0"), e = String(t.getMonth() + 1).padStart(2, "0"), n = t.getFullYear(), s = String(t.getHours()).padStart(2, "0"), i = String(t.getMinutes()).padStart(2, "0");
19
+ return `${a}/${e}/${n}, ${s}:${i}`;
20
+ }
21
+ const S = m("relative flex flex-col gap-1 justify-start", {
22
+ variants: {
23
+ direction: {
24
+ left: "items-start",
25
+ right: "items-end"
26
+ },
27
+ withAvatar: {
28
+ true: "",
29
+ false: ""
30
+ }
31
+ },
32
+ compoundVariants: [
33
+ { direction: "left", withAvatar: !0, class: "pl-12" },
34
+ { direction: "right", withAvatar: !0, class: "pr-12" }
35
+ ]
36
+ }), P = m("flex gap-1", {
37
+ variants: {
38
+ direction: {
39
+ left: "flex-row",
40
+ right: "flex-row-reverse"
41
+ }
42
+ }
43
+ }), z = m("relative overflow-hidden flex flex-col rounded-[var(--radius-large)]", {
44
+ variants: {
45
+ direction: {
46
+ left: "[&:last-child]:rounded-bl-none",
47
+ right: "[&:last-child]:rounded-br-none"
48
+ }
49
+ }
50
+ }), V = m("flex flex-col gap-1 relative z-10 px-3 pt-3"), h = d(function({
51
+ children: a,
52
+ className: e,
53
+ ...n
54
+ }) {
55
+ return /* @__PURE__ */ r.jsx("div", { className: l("flex flex-col gap-2", e), ...n, children: a });
56
+ }), x = d(function({
57
+ children: a,
58
+ className: e,
59
+ ...n
60
+ }) {
61
+ return /* @__PURE__ */ r.jsx(
62
+ "p",
63
+ {
64
+ className: l(
65
+ "pyrion-fonts-body-medium text-neutral-primary-default",
66
+ e
67
+ ),
68
+ ...n,
69
+ children: a
70
+ }
71
+ );
72
+ }), u = d(function({
73
+ date: a,
74
+ leftSlot: e,
75
+ actions: n,
76
+ className: s,
77
+ ...i
78
+ }) {
79
+ const o = b(a);
80
+ return /* @__PURE__ */ r.jsxs(
81
+ "div",
82
+ {
83
+ className: l(
84
+ "flex items-center pl-3 pr-1 pb-1 relative z-10 min-h-[28px]",
85
+ s
86
+ ),
87
+ ...i,
88
+ children: [
89
+ /* @__PURE__ */ r.jsxs("div", { className: "flex items-center gap-1 flex-1 pyrion-fonts-body-small text-neutral-tertiary-default", children: [
90
+ e,
91
+ o && /* @__PURE__ */ r.jsx("span", { children: o })
92
+ ] }),
93
+ n && /* @__PURE__ */ r.jsx("div", { className: "shrink-0", children: n })
94
+ ]
95
+ }
96
+ );
97
+ }), A = v(function({ cardBackground: a, children: e, className: n, ...s }, i) {
98
+ const { direction: o } = w();
99
+ return /* @__PURE__ */ r.jsxs(
100
+ "div",
101
+ {
102
+ className: l(z({ direction: o }), n),
103
+ ref: i,
104
+ ...s,
105
+ children: [
106
+ /* @__PURE__ */ r.jsx(
107
+ y,
108
+ {
109
+ color: "neutral",
110
+ variant: "secondary",
111
+ ...a,
112
+ className: l("absolute inset-0 z-0", a?.className)
113
+ }
114
+ ),
115
+ /* @__PURE__ */ r.jsx("div", { className: V(), children: e })
116
+ ]
117
+ }
118
+ );
119
+ }), c = d(A);
120
+ function F({
121
+ direction: t,
122
+ avatar: a,
123
+ link: e,
124
+ children: n,
125
+ className: s
126
+ }) {
127
+ const i = g(
128
+ () => ({ direction: t, avatar: a, link: e }),
129
+ [t, a, e]
130
+ ), o = e.href ? { href: e.href } : { onClick: e.onClick };
131
+ return /* @__PURE__ */ r.jsx(f.Provider, { value: i, children: /* @__PURE__ */ r.jsxs(
132
+ "div",
133
+ {
134
+ className: l(
135
+ S({ direction: t, withAvatar: !0 }),
136
+ s
137
+ ),
138
+ children: [
139
+ /* @__PURE__ */ r.jsxs("div", { className: P({ direction: t }), children: [
140
+ /* @__PURE__ */ r.jsx("div", { className: "flex items-end shrink-0 self-end", children: /* @__PURE__ */ r.jsx(j, { ...a, size: a.size ?? "small" }) }),
141
+ /* @__PURE__ */ r.jsx("div", { className: "flex flex-col gap-2 flex-1 min-w-0", children: n })
142
+ ] }),
143
+ /* @__PURE__ */ r.jsx(
144
+ N,
145
+ {
146
+ color: "brand",
147
+ size: "medium",
148
+ withBackground: !1,
149
+ ...o,
150
+ children: e.label
151
+ }
152
+ )
153
+ ]
154
+ }
155
+ ) });
156
+ }
157
+ c.Content = h;
158
+ c.Text = x;
159
+ c.Footer = u;
160
+ c.Participant = F;
161
+ c.displayName = "ChatCard";
162
+ h.displayName = "ChatCard.Content";
163
+ x.displayName = "ChatCard.Text";
164
+ u.displayName = "ChatCard.Footer";
165
+ export {
166
+ c as default
167
+ };
@@ -0,0 +1,6 @@
1
+ export * from './exports/DesktopModal'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/DesktopModal'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/DesktopModal'
6
+ export {}
@@ -0,0 +1,10 @@
1
+ import { a as o, u as t } from "./useModalControl-BE-IfhuR.js";
2
+ import { D as u } from "./useModalControl-BE-IfhuR.js";
3
+ const e = o, s = t;
4
+ export {
5
+ u as default,
6
+ e as useDesktopModalControl,
7
+ s as useDesktopModalState,
8
+ o as useModalControl,
9
+ t as useModalState
10
+ };
@@ -1,8 +1,7 @@
1
- import { u as o, a as t } from "./useModalControl-Bmu_6wf8.js";
2
- import { D as u } from "./useModalControl-Bmu_6wf8.js";
3
- const s = o, e = t;
1
+ import { D as t } from "./useModalControl-BE-IfhuR.js";
2
+ import { useDesktopModalControl as s, useDesktopModalState as l } from "./DesktopModal.es.js";
4
3
  export {
5
- u as default,
4
+ t as default,
6
5
  s as useDialogControl,
7
- e as useDialogState
6
+ l as useDialogState
8
7
  };
@@ -0,0 +1,6 @@
1
+ export * from './exports/Divider'
2
+ export {}
3
+ import PrometeoDesignSystem from './exports/Divider'
4
+ export default PrometeoDesignSystem
5
+ export * from './exports/Divider'
6
+ export {}
@@ -20,5 +20,5 @@ const l = n("", {
20
20
  }, m = i(d);
21
21
  m.displayName = "Divider";
22
22
  export {
23
- m as D
23
+ m as default
24
24
  };