@studiolxd/brand 48.1.0 → 49.0.0

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 (31) hide show
  1. package/CHANGELOG.md +137 -0
  2. package/dist/_shared/untrustedtext.js +27 -26
  3. package/dist/_types/atoms/TypingIndicator/TypingIndicator.d.ts +29 -2
  4. package/dist/_types/messages/BrandMessages.d.ts +25 -1
  5. package/dist/_types/messages/index.d.ts +1 -1
  6. package/dist/_types/molecules/AssistantMessage/AssistantMessage.d.ts +15 -1
  7. package/dist/_types/molecules/ConversationList/ConversationList.d.ts +42 -8
  8. package/dist/_types/molecules/MessageComposer/MessageComposer.d.ts +24 -1
  9. package/dist/_types/organisms/AnnotationThread/AnnotationThread.d.ts +52 -7
  10. package/dist/_types/organisms/ConversationThread/ConversationThread.d.ts +26 -3
  11. package/dist/_types/templates/ChatShell/ChatShell.d.ts +22 -4
  12. package/dist/_types/templates/ConnectorAuth/ConnectorAuthShell.d.ts +6 -1
  13. package/dist/_types/templates/ConnectorAuth/ConnectorConsentPage.d.ts +52 -18
  14. package/dist/_types/templates/ConnectorAuth/ConnectorExternalSignInPage.d.ts +57 -17
  15. package/dist/_types/templates/ConnectorAuth/ConnectorRejectionPage.d.ts +59 -15
  16. package/dist/_types/templates/ConnectorAuth/ConnectorRequestSummary.d.ts +43 -12
  17. package/dist/_types/templates/ConnectorAuth/ConnectorSignInPage.d.ts +46 -12
  18. package/dist/_types/templates/ConnectorAuth/UntrustedText.d.ts +31 -4
  19. package/dist/annotation-thread.js +49 -46
  20. package/dist/assistant-message.js +12 -9
  21. package/dist/chat-shell.js +50 -49
  22. package/dist/connector-consent-page.js +58 -68
  23. package/dist/connector-external-sign-in-page.js +22 -28
  24. package/dist/connector-rejection-page.js +31 -62
  25. package/dist/connector-request-summary.js +22 -20
  26. package/dist/connector-sign-in-page.js +21 -25
  27. package/dist/conversation-list.js +56 -55
  28. package/dist/conversation-thread.js +33 -31
  29. package/dist/message-composer.js +38 -37
  30. package/dist/typing-indicator.js +12 -9
  31. package/package.json +1 -1
@@ -1,109 +1,112 @@
1
+ 'use client';
1
2
  import './annotation-thread.css';
2
- import { Tag as e } from "./tag.js";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Tag as t } from "./tag.js";
3
5
  import "react";
4
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
6
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
7
  //#region src/stories/organisms/AnnotationThread/AnnotationThread.tsx
6
- var r = {
8
+ var i = {
7
9
  open: "warning",
8
10
  acknowledged: "info",
9
11
  resolved: "success"
10
- }, i = {
12
+ }, a = {
11
13
  day: "numeric",
12
14
  month: "short",
13
15
  hour: "2-digit",
14
16
  minute: "2-digit"
15
17
  };
16
- function a({ entry: e, locale: r, dateFormat: i, editedLabel: a }) {
17
- let o = e.date instanceof Date ? e.date : new Date(e.date), s = new Intl.DateTimeFormat(r, i).format(o);
18
- return /* @__PURE__ */ n("article", {
18
+ function o({ entry: e, locale: t, dateFormat: i, editedLabel: a }) {
19
+ let o = e.date instanceof Date ? e.date : new Date(e.date), s = new Intl.DateTimeFormat(t, i).format(o);
20
+ return /* @__PURE__ */ r("article", {
19
21
  className: "annotation-thread__item",
20
22
  children: [
21
- /* @__PURE__ */ n("header", {
23
+ /* @__PURE__ */ r("header", {
22
24
  className: "annotation-thread__header",
23
25
  children: [
24
- e.avatar && /* @__PURE__ */ t("span", {
26
+ e.avatar && /* @__PURE__ */ n("span", {
25
27
  className: "annotation-thread__avatar",
26
28
  children: e.avatar
27
29
  }),
28
- /* @__PURE__ */ t("span", {
30
+ /* @__PURE__ */ n("span", {
29
31
  className: "annotation-thread__author",
30
32
  children: e.author
31
33
  }),
32
- /* @__PURE__ */ t("time", {
34
+ /* @__PURE__ */ n("time", {
33
35
  className: "annotation-thread__date",
34
36
  dateTime: o.toISOString(),
35
37
  children: s
36
38
  }),
37
- e.edited && /* @__PURE__ */ t("span", {
39
+ e.edited && /* @__PURE__ */ n("span", {
38
40
  className: "annotation-thread__edited",
39
- children: a
41
+ children: a()
40
42
  }),
41
- e.meta && /* @__PURE__ */ t("span", {
43
+ e.meta && /* @__PURE__ */ n("span", {
42
44
  className: "annotation-thread__meta",
43
45
  children: e.meta
44
46
  })
45
47
  ]
46
48
  }),
47
- /* @__PURE__ */ t("div", {
49
+ /* @__PURE__ */ n("div", {
48
50
  className: "annotation-thread__body",
49
51
  children: e.body
50
52
  }),
51
- e.actions && /* @__PURE__ */ t("div", {
53
+ e.actions && /* @__PURE__ */ n("div", {
52
54
  className: "annotation-thread__item-actions",
53
55
  children: e.actions
54
56
  })
55
57
  ]
56
58
  });
57
59
  }
58
- function o({ annotation: o, replies: s = [], status: c = "open", actions: l, reply: u, locale: d = "es-ES", dateFormat: f = i, openLabel: p = "Abierta", acknowledgedLabel: m = "Atendida", resolvedLabel: h = "Resuelta", editedLabel: g = "editada", repliesLabel: _ = (e) => e === 1 ? "1 respuesta" : `${e} respuestas`, label: v = "Hilo de anotaciones", className: y, ...b }) {
59
- return /* @__PURE__ */ n("article", {
60
+ function s({ annotation: s, replies: c = [], status: l = "open", actions: u, reply: d, locale: f = "es-ES", dateFormat: p = a, openLabel: m, acknowledgedLabel: h, resolvedLabel: g, editedLabel: _, repliesLabel: v, label: y, className: b, ...x }) {
61
+ let S = e("annotationThread");
62
+ return /* @__PURE__ */ r("article", {
60
63
  className: [
61
64
  "annotation-thread",
62
- c === "open" ? "" : `annotation-thread--${c}`,
63
- y ?? ""
65
+ l === "open" ? "" : `annotation-thread--${l}`,
66
+ b ?? ""
64
67
  ].filter(Boolean).join(" "),
65
- "aria-label": v,
66
- ...b,
68
+ "aria-label": S("label", y),
69
+ ...x,
67
70
  children: [
68
- /* @__PURE__ */ t("div", {
71
+ /* @__PURE__ */ n("div", {
69
72
  className: "annotation-thread__status",
70
- children: /* @__PURE__ */ t(e, {
71
- variant: r[c],
73
+ children: /* @__PURE__ */ n(t, {
74
+ variant: i[l],
72
75
  children: {
73
- open: p,
74
- acknowledged: m,
75
- resolved: h
76
- }[c]
76
+ open: () => S("open", m),
77
+ acknowledged: () => S("acknowledged", h),
78
+ resolved: () => S("resolved", g)
79
+ }[l]()
77
80
  })
78
81
  }),
79
- /* @__PURE__ */ t(a, {
80
- entry: o,
81
- locale: d,
82
- dateFormat: f,
83
- editedLabel: g
82
+ /* @__PURE__ */ n(o, {
83
+ entry: s,
84
+ locale: f,
85
+ dateFormat: p,
86
+ editedLabel: () => S("edited", _)
84
87
  }),
85
- s.length > 0 && /* @__PURE__ */ n("div", {
88
+ c.length > 0 && /* @__PURE__ */ r("div", {
86
89
  className: "annotation-thread__replies",
87
- children: [/* @__PURE__ */ t("p", {
90
+ children: [/* @__PURE__ */ n("p", {
88
91
  className: "annotation-thread__replies-label",
89
- children: _(s.length)
90
- }), s.map((e) => /* @__PURE__ */ t(a, {
92
+ children: S("replies", v)(c.length)
93
+ }), c.map((e) => /* @__PURE__ */ n(o, {
91
94
  entry: e,
92
- locale: d,
93
- dateFormat: f,
94
- editedLabel: g
95
+ locale: f,
96
+ dateFormat: p,
97
+ editedLabel: () => S("edited", _)
95
98
  }, e.id))]
96
99
  }),
97
- u && /* @__PURE__ */ t("div", {
100
+ d && /* @__PURE__ */ n("div", {
98
101
  className: "annotation-thread__reply",
99
- children: u
102
+ children: d
100
103
  }),
101
- l && /* @__PURE__ */ t("footer", {
104
+ u && /* @__PURE__ */ n("footer", {
102
105
  className: "annotation-thread__actions",
103
- children: l
106
+ children: u
104
107
  })
105
108
  ]
106
109
  });
107
110
  }
108
111
  //#endregion
109
- export { o as AnnotationThread };
112
+ export { s as AnnotationThread };
@@ -5,12 +5,12 @@ import { t as n } from "./_shared/messagetimestamp.js";
5
5
  import { forwardRef as r } from "react";
6
6
  import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
7
  //#region src/stories/molecules/AssistantMessage/AssistantMessage.tsx
8
- var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1, streamingLabel: d, className: f, ...p }, m) {
9
- let h = n(s, c, l);
8
+ var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFormat: l, isStreaming: u = !1, streamingName: d, streamingLabel: f, className: p, ...m }, h) {
9
+ let g = n(s, c, l);
10
10
  return /* @__PURE__ */ a("div", {
11
- ref: m,
12
- className: `assistant-message${f ? ` ${f}` : ""}`,
13
- ...p,
11
+ ref: h,
12
+ className: `assistant-message${p ? ` ${p}` : ""}`,
13
+ ...m,
14
14
  children: [
15
15
  o && /* @__PURE__ */ i("span", {
16
16
  className: "assistant-message__model",
@@ -18,12 +18,15 @@ var o = r(function({ children: r, model: o, timestamp: s, locale: c, timestampFo
18
18
  }),
19
19
  /* @__PURE__ */ i(e, {
20
20
  role: "assistant",
21
- children: u ? /* @__PURE__ */ i(t, { label: d }) : r
21
+ children: u ? /* @__PURE__ */ i(t, {
22
+ name: d,
23
+ label: f
24
+ }) : r
22
25
  }),
23
- h && !u && /* @__PURE__ */ i("time", {
26
+ g && !u && /* @__PURE__ */ i("time", {
24
27
  className: "assistant-message__timestamp",
25
- dateTime: h.dateTime,
26
- children: h.label
28
+ dateTime: g.dateTime,
29
+ children: g.label
27
30
  })
28
31
  ]
29
32
  });
@@ -1,102 +1,103 @@
1
1
  'use client';
2
2
  import './chat-shell.css';
3
- import { Icon as e } from "./icon.js";
4
- import { Button as t } from "./button.js";
5
- import { Sheet as n } from "./sheet.js";
6
- import { forwardRef as r, useCallback as i, useEffect as a, useState as o } from "react";
7
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { Icon as t } from "./icon.js";
5
+ import { Button as n } from "./button.js";
6
+ import { Sheet as r } from "./sheet.js";
7
+ import { forwardRef as i, useCallback as a, useEffect as o, useState as s } from "react";
8
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
8
9
  //#region src/stories/templates/ChatShell/ChatShell.tsx
9
- var l = "(min-width: 1024px)", u = r(function({ list: r, header: u, children: d, composer: f, listLabel: p = "Conversaciones", listTriggerLabel: m = "Abrir conversaciones", listOpen: h, onListOpenChange: g, className: _, ...v }, y) {
10
- let [b, x] = o(() => typeof window > "u" ? !0 : window.matchMedia(l).matches), [S, C] = o(!1), [w, T] = o(null), E = i((e) => {
11
- T(e), typeof y == "function" ? y(e) : y && (y.current = e);
12
- }, [y]);
13
- a(() => {
14
- let e = window.matchMedia(l), t = () => {
15
- x(e.matches), e.matches && C(!1);
10
+ var u = "(min-width: 1024px)", d = i(function({ list: i, header: d, children: f, composer: p, listLabel: m, listTriggerLabel: h, listOpen: g, onListOpenChange: _, className: v, ...y }, b) {
11
+ let x = e("chatShell"), [S, C] = s(() => typeof window > "u" ? !0 : window.matchMedia(u).matches), [w, T] = s(!1), [E, D] = s(null), O = a((e) => {
12
+ D(e), typeof b == "function" ? b(e) : b && (b.current = e);
13
+ }, [b]);
14
+ o(() => {
15
+ let e = window.matchMedia(u), t = () => {
16
+ C(e.matches), e.matches && T(!1);
16
17
  };
17
18
  return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
18
19
  }, []);
19
- let D = i((e) => {
20
- h === void 0 && C(e), g?.(e);
21
- }, [h, g]), O = !b && (h ?? S), k = r != null && b, A = r != null && !b;
22
- return /* @__PURE__ */ c("div", {
23
- ref: E,
20
+ let k = a((e) => {
21
+ g === void 0 && T(e), _?.(e);
22
+ }, [g, _]), A = !S && (g ?? w), j = i != null && S, M = i != null && !S;
23
+ return /* @__PURE__ */ l("div", {
24
+ ref: O,
24
25
  className: [
25
26
  "chat-shell",
26
- k ? "chat-shell--with-list" : "",
27
- _ ?? ""
27
+ j ? "chat-shell--with-list" : "",
28
+ v ?? ""
28
29
  ].filter(Boolean).join(" "),
29
- ...v,
30
+ ...y,
30
31
  children: [
31
- k && /* @__PURE__ */ s("aside", {
32
+ j && /* @__PURE__ */ c("aside", {
32
33
  className: "chat-shell__list",
33
- "aria-label": p,
34
- children: r
34
+ "aria-label": x("list", m),
35
+ children: i
35
36
  }),
36
- /* @__PURE__ */ c("div", {
37
+ /* @__PURE__ */ l("div", {
37
38
  className: "chat-shell__main",
38
39
  children: [
39
- (u || A) && /* @__PURE__ */ c("header", {
40
+ (d || M) && /* @__PURE__ */ l("header", {
40
41
  className: "chat-shell__header",
41
- children: [A && /* @__PURE__ */ s(t, {
42
+ children: [M && /* @__PURE__ */ c(n, {
42
43
  variant: "ghost",
43
44
  size: "sm",
44
45
  iconOnly: !0,
45
- "aria-label": m,
46
+ "aria-label": x("listTrigger", h),
46
47
  "aria-haspopup": "dialog",
47
- "aria-expanded": O,
48
+ "aria-expanded": A,
48
49
  className: "chat-shell__list-trigger",
49
- onClick: () => D(!0),
50
- children: /* @__PURE__ */ s(e, {
50
+ onClick: () => k(!0),
51
+ children: /* @__PURE__ */ c(t, {
51
52
  name: "layout-sidebar",
52
53
  size: "sm"
53
54
  })
54
- }), u && /* @__PURE__ */ s("div", {
55
+ }), d && /* @__PURE__ */ c("div", {
55
56
  className: "chat-shell__header-content",
56
- children: u
57
+ children: d
57
58
  })]
58
59
  }),
59
- /* @__PURE__ */ s("div", {
60
+ /* @__PURE__ */ c("div", {
60
61
  className: "chat-shell__thread",
61
- children: d
62
+ children: f
62
63
  }),
63
- f && /* @__PURE__ */ s("div", {
64
+ p && /* @__PURE__ */ c("div", {
64
65
  className: "chat-shell__composer",
65
- children: f
66
+ children: p
66
67
  })
67
68
  ]
68
69
  }),
69
- A && /* @__PURE__ */ c(n, {
70
+ M && /* @__PURE__ */ l(r, {
70
71
  side: "left",
71
- open: O,
72
- onOpenChange: D,
73
- title: p,
72
+ open: A,
73
+ onOpenChange: k,
74
+ title: x("list", m),
74
75
  titleHidden: !0,
75
- container: w ?? void 0,
76
+ container: E ?? void 0,
76
77
  hideClose: !0,
77
78
  className: "chat-shell__drawer",
78
- children: [/* @__PURE__ */ s("header", {
79
+ children: [/* @__PURE__ */ c("header", {
79
80
  className: "chat-shell__header",
80
- children: /* @__PURE__ */ s(t, {
81
+ children: /* @__PURE__ */ c(n, {
81
82
  variant: "ghost",
82
83
  size: "sm",
83
84
  iconOnly: !0,
84
- "aria-label": m,
85
+ "aria-label": x("listTrigger", h),
85
86
  "aria-expanded": !0,
86
87
  className: "chat-shell__list-trigger",
87
- onClick: () => D(!1),
88
- children: /* @__PURE__ */ s(e, {
88
+ onClick: () => k(!1),
89
+ children: /* @__PURE__ */ c(t, {
89
90
  name: "layout-sidebar",
90
91
  size: "sm"
91
92
  })
92
93
  })
93
- }), /* @__PURE__ */ s("div", {
94
+ }), /* @__PURE__ */ c("div", {
94
95
  className: "chat-shell__drawer-list",
95
- children: r
96
+ children: i
96
97
  })]
97
98
  })
98
99
  ]
99
100
  });
100
101
  });
101
102
  //#endregion
102
- export { u as ChatShell };
103
+ export { d as ChatShell };
@@ -1,89 +1,79 @@
1
1
  'use client';
2
- import { Button as e } from "./button.js";
3
- import { Paragraph as t } from "./paragraph.js";
4
- import { Form as n } from "./form.js";
5
- import { ConnectorAuthShell as r } from "./connector-auth-shell.js";
6
- import { t as i } from "./_shared/untrustedtext.js";
7
- import { ConnectorRequestSummary as a } from "./connector-request-summary.js";
8
- import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
2
+ import { n as e } from "./_shared/brandmessagescontext.js";
3
+ import { Button as t } from "./button.js";
4
+ import { Paragraph as n } from "./paragraph.js";
5
+ import { Form as r } from "./form.js";
6
+ import { ConnectorAuthShell as i } from "./connector-auth-shell.js";
7
+ import { t as a } from "./_shared/untrustedtext.js";
8
+ import { ConnectorRequestSummary as o } from "./connector-request-summary.js";
9
+ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
9
10
  //#region src/stories/templates/ConnectorAuth/ConnectorConsentPage.tsx
10
- function l({ clientName: l, productName: u, accountEmail: d, scope: f = "read", redirectHost: p, action: m, hiddenFields: h, decisionName: g = "decision", approveValue: _ = "approve", denyValue: v = "deny", onApprove: y, onDeny: b, denyHref: x, initialFocus: S = "none", title: C = "Conectar una herramienta", intro: w = ({ client: e, what: t, email: n }) => /* @__PURE__ */ c(o, { children: [
11
- e,
12
- " quiere ",
13
- t,
14
- " como ",
15
- n,
16
- "."
17
- ] }), redirectNotice: T = ({ host: e }) => /* @__PURE__ */ c(o, { children: [
18
- "El acceso se enviará a ",
19
- e,
20
- ". Continúa solo si lo reconoces."
21
- ] }), approveLabel: E = "Permitir acceso", denyLabel: D = "Denegar", scopeReadLabel: O = "leer los datos de este producto", scopeWriteLabel: k = "leer y modificar los datos de este producto", expandLabel: A, collapseLabel: j, valueQuotes: M, summaryLabels: N, links: P, header: F, footer: I, preferences: L, preferencesLabel: R, id: z, shell: B }) {
22
- let V = m !== void 0, H = f === "read" ? O : k, U = (e) => /* @__PURE__ */ s(i, {
11
+ function u({ clientName: u, productName: d, accountEmail: f, scope: p = "read", redirectHost: m, action: h, hiddenFields: g, decisionName: _ = "decision", approveValue: v = "approve", denyValue: y = "deny", onApprove: b, onDeny: x, denyHref: S, initialFocus: C = "none", title: w, intro: T, redirectNotice: E, approveLabel: D, denyLabel: O, scopeReadLabel: k, scopeWriteLabel: A, expandLabel: j, collapseLabel: M, valueQuotes: N, summaryLabels: P, links: F, header: I, footer: L, preferences: R, preferencesLabel: z, id: B, shell: V }) {
12
+ let H = e("connectorConsent"), U = h !== void 0, W = p === "read" ? k : A, G = (e) => /* @__PURE__ */ c(a, {
23
13
  value: e,
24
- quotes: M
25
- }), W = x === void 0 ? /* @__PURE__ */ s(e, {
14
+ quotes: N
15
+ }), K = S === void 0 ? /* @__PURE__ */ c(t, {
26
16
  variant: "outline",
27
- type: V ? "submit" : "button",
28
- name: V ? g : void 0,
29
- value: V ? v : void 0,
30
- onClick: b,
31
- autoFocus: S === "deny",
32
- children: D
33
- }) : /* @__PURE__ */ s(e, {
17
+ type: U ? "submit" : "button",
18
+ name: U ? _ : void 0,
19
+ value: U ? y : void 0,
20
+ onClick: x,
21
+ autoFocus: C === "deny",
22
+ children: H("deny", O)
23
+ }) : /* @__PURE__ */ c(t, {
34
24
  variant: "outline",
35
- href: x,
25
+ href: S,
26
+ children: H("deny", O)
27
+ }), q = /* @__PURE__ */ c(t, {
28
+ type: U ? "submit" : "button",
29
+ name: U ? _ : void 0,
30
+ value: U ? v : void 0,
31
+ onClick: b,
36
32
  children: D
37
- }), G = /* @__PURE__ */ s(e, {
38
- type: V ? "submit" : "button",
39
- name: V ? g : void 0,
40
- value: V ? _ : void 0,
41
- onClick: y,
42
- children: E
43
33
  });
44
- return /* @__PURE__ */ s(r, {
45
- title: C,
46
- description: w({
47
- client: /* @__PURE__ */ s("strong", { children: U(l) }),
48
- what: H,
49
- email: /* @__PURE__ */ s("strong", { children: U(d) })
34
+ return /* @__PURE__ */ c(i, {
35
+ title: w ?? H("title"),
36
+ description: T({
37
+ client: /* @__PURE__ */ c("strong", { children: G(u) }),
38
+ what: W,
39
+ email: /* @__PURE__ */ c("strong", { children: G(f) })
50
40
  }),
51
- header: F,
52
- footer: I,
53
- preferences: L,
54
- preferencesLabel: R,
55
- id: z,
56
- shell: B,
57
- children: /* @__PURE__ */ c(n, {
41
+ header: I,
42
+ footer: L,
43
+ preferences: R,
44
+ preferencesLabel: z,
45
+ id: B,
46
+ shell: V,
47
+ children: /* @__PURE__ */ l(r, {
58
48
  size: "lg",
59
49
  blockActions: !0,
60
- method: typeof m == "string" ? "post" : void 0,
61
- action: m,
62
- links: P,
63
- actions: /* @__PURE__ */ c(o, { children: [W, G] }),
50
+ method: typeof h == "string" ? "post" : void 0,
51
+ action: h,
52
+ links: F,
53
+ actions: /* @__PURE__ */ l(s, { children: [K, q] }),
64
54
  children: [
65
- h && Object.entries(h).map(([e, t]) => /* @__PURE__ */ s("input", {
55
+ g && Object.entries(g).map(([e, t]) => /* @__PURE__ */ c("input", {
66
56
  type: "hidden",
67
57
  name: e,
68
58
  value: t
69
59
  }, e)),
70
- /* @__PURE__ */ s(a, {
71
- clientName: l,
72
- productName: u,
73
- accountEmail: d,
74
- scope: f,
75
- redirectHost: p,
76
- scopeReadLabel: O,
77
- scopeWriteLabel: k,
78
- expandLabel: A,
79
- collapseLabel: j,
80
- valueQuotes: M,
81
- ...N
60
+ /* @__PURE__ */ c(o, {
61
+ clientName: u,
62
+ productName: d,
63
+ accountEmail: f,
64
+ scope: p,
65
+ redirectHost: m,
66
+ scopeReadLabel: k,
67
+ scopeWriteLabel: A,
68
+ expandLabel: j,
69
+ collapseLabel: M,
70
+ valueQuotes: N,
71
+ ...P
82
72
  }),
83
- /* @__PURE__ */ s(t, { children: T({ host: /* @__PURE__ */ s("strong", { children: U(p) }) }) })
73
+ /* @__PURE__ */ c(n, { children: E({ host: /* @__PURE__ */ c("strong", { children: G(m) }) }) })
84
74
  ]
85
75
  })
86
76
  });
87
77
  }
88
78
  //#endregion
89
- export { l as ConnectorConsentPage };
79
+ export { u as ConnectorConsentPage };
@@ -1,25 +1,19 @@
1
1
  'use client';
2
- import { Button as e } from "./button.js";
3
- import { Stack as t } from "./stack.js";
4
- import { Paragraph as n } from "./paragraph.js";
5
- import { Alert as r } from "./alert.js";
6
- import { Form as i } from "./form.js";
7
- import { InputField as a } from "./input-field.js";
8
- import { ConnectorAuthShell as o } from "./connector-auth-shell.js";
9
- import { t as s } from "./_shared/untrustedtext.js";
10
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
2
+ import { n as e } from "./_shared/brandmessagescontext.js";
3
+ import { Button as t } from "./button.js";
4
+ import { Stack as n } from "./stack.js";
5
+ import { Paragraph as r } from "./paragraph.js";
6
+ import { Alert as i } from "./alert.js";
7
+ import { Form as a } from "./form.js";
8
+ import { InputField as o } from "./input-field.js";
9
+ import { ConnectorAuthShell as s } from "./connector-auth-shell.js";
10
+ import { t as c } from "./_shared/untrustedtext.js";
11
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
11
12
  //#region src/stories/templates/ConnectorAuth/ConnectorExternalSignInPage.tsx
12
- function d({ platformName: d = "tu Moodle", organization: f, organizationDefaultValue: p, organizationName: m = "org", action: h, onSubmit: g, hiddenFields: _, error: v, title: y = "Autorizar la conexión", intro: b = ({ platform: e }) => /* @__PURE__ */ u(c, { children: [
13
- "Tu asistente de IA solicita acceso a ",
14
- e,
15
- ". Inicia sesión con tu cuenta para autorizarlo."
16
- ] }), signingInTo: x = ({ organization: e }) => /* @__PURE__ */ u(c, { children: [
17
- "Iniciarás sesión en ",
18
- e,
19
- "."
20
- ] }), valueQuotes: S, organizationLabel: C = "Tu organización", submitLabel: w = ({ platform: e }) => /* @__PURE__ */ u(c, { children: ["Iniciar sesión con ", e] }), extra: T, links: E, header: D, footer: O, preferences: k, preferencesLabel: A, id: j, shell: M }) {
21
- return /* @__PURE__ */ l(o, {
22
- title: y,
13
+ function d({ platformName: d, organization: f, organizationDefaultValue: p, organizationName: m = "org", action: h, onSubmit: g, hiddenFields: _, error: v, title: y, intro: b, signingInTo: x, valueQuotes: S, organizationLabel: C, submitLabel: w, extra: T, links: E, header: D, footer: O, preferences: k, preferencesLabel: A, id: j, shell: M }) {
14
+ let N = e("connectorExternalSignIn");
15
+ return /* @__PURE__ */ l(s, {
16
+ title: y ?? N("title"),
23
17
  description: b({ platform: d }),
24
18
  header: D,
25
19
  footer: O,
@@ -27,37 +21,37 @@ function d({ platformName: d = "tu Moodle", organization: f, organizationDefault
27
21
  preferencesLabel: A,
28
22
  id: j,
29
23
  shell: M,
30
- children: /* @__PURE__ */ u(t, {
24
+ children: /* @__PURE__ */ u(n, {
31
25
  align: "stretch",
32
26
  children: [
33
- v !== void 0 && /* @__PURE__ */ l(r, {
27
+ v !== void 0 && /* @__PURE__ */ l(i, {
34
28
  role: "alert",
35
29
  variant: "error",
36
30
  description: v
37
31
  }),
38
- /* @__PURE__ */ u(i, {
32
+ /* @__PURE__ */ u(a, {
39
33
  size: "lg",
40
34
  blockActions: !0,
41
35
  method: typeof h == "string" ? "post" : void 0,
42
36
  action: h,
43
37
  onSubmit: g,
44
38
  links: E,
45
- actions: /* @__PURE__ */ l(e, {
39
+ actions: /* @__PURE__ */ l(t, {
46
40
  type: "submit",
47
- children: w({ platform: d })
41
+ children: N("submit", w)(d)
48
42
  }),
49
43
  children: [_ && Object.entries(_).map(([e, t]) => /* @__PURE__ */ l("input", {
50
44
  type: "hidden",
51
45
  name: e,
52
46
  value: t
53
- }, e)), f === void 0 ? /* @__PURE__ */ l(a, {
47
+ }, e)), f === void 0 ? /* @__PURE__ */ l(o, {
54
48
  id: m,
55
49
  name: m,
56
- label: C,
50
+ label: N("organization", C),
57
51
  defaultValue: p,
58
52
  autoComplete: "off",
59
53
  required: !0
60
- }) : /* @__PURE__ */ l(n, { children: x({ organization: /* @__PURE__ */ l("strong", { children: /* @__PURE__ */ l(s, {
54
+ }) : /* @__PURE__ */ l(r, { children: x({ organization: /* @__PURE__ */ l("strong", { children: /* @__PURE__ */ l(c, {
61
55
  value: f,
62
56
  quotes: S
63
57
  }) }) }) })]