@studiolxd/brand 48.0.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 (42) hide show
  1. package/CHANGELOG.md +170 -0
  2. package/dist/_shared/tokens.js +0 -1
  3. package/dist/_shared/untrustedtext.js +27 -26
  4. package/dist/_types/atoms/TypingIndicator/TypingIndicator.d.ts +29 -2
  5. package/dist/_types/messages/BrandMessages.d.ts +25 -1
  6. package/dist/_types/messages/index.d.ts +1 -1
  7. package/dist/_types/molecules/AssistantMessage/AssistantMessage.d.ts +15 -1
  8. package/dist/_types/molecules/ConversationList/ConversationList.d.ts +42 -8
  9. package/dist/_types/molecules/FilterBar/FilterBar.d.ts +4 -3
  10. package/dist/_types/molecules/MessageComposer/MessageComposer.d.ts +24 -1
  11. package/dist/_types/molecules/Pagination/Pagination.d.ts +16 -2
  12. package/dist/_types/organisms/AnnotationThread/AnnotationThread.d.ts +52 -7
  13. package/dist/_types/organisms/ConversationThread/ConversationThread.d.ts +26 -3
  14. package/dist/_types/templates/ChatShell/ChatShell.d.ts +22 -4
  15. package/dist/_types/templates/ConnectorAuth/ConnectorAuthShell.d.ts +6 -1
  16. package/dist/_types/templates/ConnectorAuth/ConnectorConsentPage.d.ts +52 -18
  17. package/dist/_types/templates/ConnectorAuth/ConnectorExternalSignInPage.d.ts +57 -17
  18. package/dist/_types/templates/ConnectorAuth/ConnectorRejectionPage.d.ts +59 -15
  19. package/dist/_types/templates/ConnectorAuth/ConnectorRequestSummary.d.ts +43 -12
  20. package/dist/_types/templates/ConnectorAuth/ConnectorSignInPage.d.ts +46 -12
  21. package/dist/_types/templates/ConnectorAuth/UntrustedText.d.ts +31 -4
  22. package/dist/annotation-thread.js +49 -46
  23. package/dist/assistant-message.js +12 -9
  24. package/dist/brand.css +2 -4
  25. package/dist/chat-shell.js +50 -49
  26. package/dist/connector-consent-page.js +58 -68
  27. package/dist/connector-external-sign-in-page.js +22 -28
  28. package/dist/connector-rejection-page.js +31 -62
  29. package/dist/connector-request-summary.js +22 -20
  30. package/dist/connector-sign-in-page.js +21 -25
  31. package/dist/conversation-list.js +56 -55
  32. package/dist/conversation-thread.js +33 -31
  33. package/dist/filter-bar.css +1 -1
  34. package/dist/message-composer.js +38 -37
  35. package/dist/pagination.js +12 -12
  36. package/dist/tokens.css +2 -4
  37. package/dist/typing-indicator.js +12 -9
  38. package/package.json +1 -1
  39. package/src/tokens/molecules/filter-bar.css +1 -2
  40. package/src/tokens/scss/molecules/_filter-bar.scss +1 -2
  41. package/src/tokens/surface-public.css +0 -1
  42. package/src/tokens/tokens.json +0 -1
@@ -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
  }) }) }) })]
@@ -1,75 +1,44 @@
1
1
  'use client';
2
- import { Button as e } from "./button.js";
3
- import { Stack as t } from "./stack.js";
4
- import { Code as n } from "./code.js";
5
- import { Paragraph as r } from "./paragraph.js";
6
- import { ConnectorAuthShell as i } from "./connector-auth-shell.js";
7
- import { jsx as a, jsxs as o } 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 { Code as r } from "./code.js";
6
+ import { Paragraph as i } from "./paragraph.js";
7
+ import { ConnectorAuthShell as a } from "./connector-auth-shell.js";
8
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
9
  //#region src/stories/templates/ConnectorAuth/ConnectorRejectionPage.tsx
9
- var s = {
10
- "invalid-client": {
11
- title: "Esta herramienta no está registrada",
12
- description: "La aplicación que pide acceso no consta en este producto. No se ha concedido nada.",
13
- hint: "Vuelve a la herramienta y conéctala otra vez desde el principio. Si el error se repite, quien la mantiene tiene que registrarla de nuevo.",
14
- retryLabel: "Volver a la herramienta"
15
- },
16
- "invalid-redirect-uri": {
17
- title: "La dirección de retorno no está permitida",
18
- description: "La herramienta ha pedido que el acceso se envíe a una dirección distinta de la que tiene registrada. No se ha enviado nada a ninguna parte.",
19
- hint: "Es la comprobación que impide que un acceso legítimo acabe en manos de otro. Si la herramienta es tuya, revisa la dirección de retorno que tiene configurada; si no la reconoces, no vuelvas a intentarlo.",
20
- retryLabel: "Volver a la herramienta"
21
- },
22
- "invalid-request": {
23
- title: "La petición está incompleta",
24
- description: "Falta algo en lo que ha pedido la herramienta, o ha llegado alterado por el camino. No se ha concedido ningún acceso.",
25
- hint: "Vuelve a la herramienta y empieza la conexión de nuevo. Un enlace copiado a mano o reutilizado de otra vez suele acabar así.",
26
- retryLabel: "Volver a la herramienta"
27
- },
28
- "access-denied": {
29
- title: "No se ha dado acceso",
30
- description: "La conexión se ha cancelado. La herramienta no ha recibido ningún permiso sobre tus datos.",
31
- hint: "Puedes cerrar esta pantalla. Si ha sido sin querer, vuelve a la herramienta y pide la conexión otra vez.",
32
- retryLabel: "Volver a intentarlo"
33
- },
34
- "session-expired": {
35
- title: "La sesión ha caducado",
36
- description: "Ha pasado demasiado tiempo desde que se abrió esta pantalla, así que la decisión ya no vale.",
37
- hint: "Inicia sesión otra vez y repite la conexión desde la herramienta. Nada de lo anterior se ha concedido.",
38
- retryLabel: "Iniciar sesión"
39
- }
40
- };
41
- function c({ reason: c, title: l, description: u, hint: d, code: f, codeLabel: p = "Código", retryHref: m, onRetry: h, retryLabel: g, retryAction: _, aside: v, header: y, footer: b, preferences: x, preferencesLabel: S, id: C, shell: w }) {
42
- let T = s[c], E = g ?? T.retryLabel, D = _ ?? (m === void 0 ? h ? /* @__PURE__ */ a(e, {
43
- onClick: h,
44
- children: E
45
- }) : null : /* @__PURE__ */ a(e, {
46
- href: m,
47
- children: E
10
+ function c({ title: c, description: l, hint: u, code: d, codeLabel: f, retryHref: p, onRetry: m, retryLabel: h, retryAction: g, aside: _, header: v, footer: y, preferences: b, preferencesLabel: x, id: S, shell: C }) {
11
+ let w = e("connectorRejection"), T = g ?? (p === void 0 ? m ? /* @__PURE__ */ o(t, {
12
+ onClick: m,
13
+ children: h
14
+ }) : null : /* @__PURE__ */ o(t, {
15
+ href: p,
16
+ children: h
48
17
  }));
49
- return /* @__PURE__ */ a(i, {
50
- title: l ?? T.title,
51
- description: u ?? T.description,
52
- intro: f === void 0 ? void 0 : /* @__PURE__ */ o(r, {
18
+ return /* @__PURE__ */ o(a, {
19
+ title: c,
20
+ description: l,
21
+ intro: d === void 0 ? void 0 : /* @__PURE__ */ s(i, {
53
22
  size: "small",
54
23
  children: [
55
- p,
24
+ w("code", f),
56
25
  ": ",
57
- /* @__PURE__ */ a(n, { children: f })
26
+ /* @__PURE__ */ o(r, { children: d })
58
27
  ]
59
28
  }),
60
- aside: v,
61
- header: y,
62
- footer: b,
63
- preferences: x,
64
- preferencesLabel: S,
65
- id: C,
66
- shell: w,
67
- children: /* @__PURE__ */ o(t, {
29
+ aside: _,
30
+ header: v,
31
+ footer: y,
32
+ preferences: b,
33
+ preferencesLabel: x,
34
+ id: S,
35
+ shell: C,
36
+ children: /* @__PURE__ */ s(n, {
68
37
  align: "stretch",
69
- children: [/* @__PURE__ */ a(r, {
38
+ children: [/* @__PURE__ */ o(i, {
70
39
  size: "large",
71
- children: d ?? T.hint
72
- }), D]
40
+ children: u
41
+ }), T]
73
42
  })
74
43
  });
75
44
  }
@@ -1,36 +1,38 @@
1
+ 'use client';
1
2
  import './connector-request-summary.css';
2
- import { DescriptionDetails as e, DescriptionList as t, DescriptionTerm as n } from "./description-list.js";
3
- import { t as r } from "./_shared/untrustedtext.js";
4
- import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { n as e } from "./_shared/brandmessagescontext.js";
4
+ import { DescriptionDetails as t, DescriptionList as n, DescriptionTerm as r } from "./description-list.js";
5
+ import { t as i } from "./_shared/untrustedtext.js";
6
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
5
7
  //#region src/stories/templates/ConnectorAuth/ConnectorRequestSummary.tsx
6
- function s({ clientName: s, productName: c, accountEmail: l, scope: u, redirectHost: d, clientLabel: f = "Herramienta", productLabel: p = "Producto", accountLabel: m = "Cuenta", scopeLabel: h = "Permiso", redirectLabel: g = "Destino", scopeReadLabel: _ = "leer los datos de este producto", scopeWriteLabel: v = "leer y modificar los datos de este producto", expandLabel: y, collapseLabel: b, valueQuotes: x, className: S }) {
7
- let C = (e) => /* @__PURE__ */ a(r, {
8
+ function c({ clientName: c, productName: l, accountEmail: u, scope: d, redirectHost: f, clientLabel: p, productLabel: m, accountLabel: h, scopeLabel: g, redirectLabel: _, scopeReadLabel: v, scopeWriteLabel: y, expandLabel: b, collapseLabel: x, valueQuotes: S, className: C }) {
9
+ let w = e("connectorRequestSummary"), T = (e) => /* @__PURE__ */ o(i, {
8
10
  value: e,
9
11
  expandable: !0,
10
- expandLabel: y,
11
- collapseLabel: b,
12
- quotes: x
12
+ expandLabel: b,
13
+ collapseLabel: x,
14
+ quotes: S
13
15
  });
14
- return /* @__PURE__ */ o(t, {
15
- className: ["connector-request-summary", S].filter(Boolean).join(" "),
16
+ return /* @__PURE__ */ s(n, {
17
+ className: ["connector-request-summary", C].filter(Boolean).join(" "),
16
18
  children: [
17
- /* @__PURE__ */ a(n, { children: f }),
18
- /* @__PURE__ */ a(e, {
19
+ /* @__PURE__ */ o(r, { children: w("client", p) }),
20
+ /* @__PURE__ */ o(t, {
19
21
  className: "connector-request-summary__untrusted",
20
- children: C(s)
22
+ children: T(c)
21
23
  }),
22
- c !== void 0 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(n, { children: p }), /* @__PURE__ */ a(e, { children: c })] }),
23
- l !== void 0 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(n, { children: m }), /* @__PURE__ */ a(e, {
24
+ l !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(r, { children: w("product", m) }), /* @__PURE__ */ o(t, { children: l })] }),
25
+ u !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(r, { children: w("account", h) }), /* @__PURE__ */ o(t, {
24
26
  className: "connector-request-summary__untrusted",
25
- children: C(l)
27
+ children: T(u)
26
28
  })] }),
27
- u !== void 0 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(n, { children: h }), /* @__PURE__ */ a(e, { children: u === "read" ? _ : v })] }),
28
- d !== void 0 && /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(n, { children: g }), /* @__PURE__ */ a(e, {
29
+ d !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(r, { children: w("scope", g) }), /* @__PURE__ */ o(t, { children: d === "read" ? v : y })] }),
30
+ f !== void 0 && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(r, { children: w("redirect", _) }), /* @__PURE__ */ o(t, {
29
31
  className: "connector-request-summary__untrusted",
30
- children: C(d)
32
+ children: T(f)
31
33
  })] })
32
34
  ]
33
35
  });
34
36
  }
35
37
  //#endregion
36
- export { s as ConnectorRequestSummary };
38
+ export { c as ConnectorRequestSummary };
@@ -1,33 +1,29 @@
1
1
  'use client';
2
- import { Button as e } from "./button.js";
3
- import { Form as t } from "./form.js";
4
- import { ConnectorAuthShell as n } from "./connector-auth-shell.js";
5
- import { t as r } from "./_shared/untrustedtext.js";
6
- import { ConnectorRequestSummary as i } from "./connector-request-summary.js";
7
- import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
2
+ import { n as e } from "./_shared/brandmessagescontext.js";
3
+ import { Button as t } from "./button.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 { jsx as o, jsxs as s } from "react/jsx-runtime";
8
9
  //#region src/stories/templates/ConnectorAuth/ConnectorSignInPage.tsx
9
- function c({ clientName: c, productName: l, scope: u, redirectHost: d, signInHref: f, onSignIn: p, action: m, hiddenFields: h, title: g = "Inicia sesión para continuar", intro: _ = ({ client: e, product: t }) => /* @__PURE__ */ s(a, { children: [
10
- e,
11
- " quiere conectarse a ",
12
- t,
13
- ". Identifícate para decidir si le das acceso."
14
- ] }), fallbackProductName: v = "este producto", signInLabel: y = "Iniciar sesión", scopeReadLabel: b, scopeWriteLabel: x, expandLabel: S, collapseLabel: C, valueQuotes: w, summaryLabels: T, links: E, header: D, footer: O, preferences: k, preferencesLabel: A, id: j, shell: M }) {
15
- let N = m !== void 0, P = f === void 0 ? /* @__PURE__ */ o(e, {
16
- type: N ? "submit" : "button",
10
+ function c({ clientName: c, productName: l, scope: u, redirectHost: d, signInHref: f, onSignIn: p, action: m, hiddenFields: h, title: g, intro: _, fallbackProductName: v, signInLabel: y, scopeReadLabel: b, scopeWriteLabel: x, expandLabel: S, collapseLabel: C, valueQuotes: w, summaryLabels: T, links: E, header: D, footer: O, preferences: k, preferencesLabel: A, id: j, shell: M }) {
11
+ let N = e("connectorSignIn"), P = m !== void 0, F = f === void 0 ? /* @__PURE__ */ o(t, {
12
+ type: P ? "submit" : "button",
17
13
  onClick: p,
18
- children: y
19
- }) : /* @__PURE__ */ o(e, {
14
+ children: N("signIn", y)
15
+ }) : /* @__PURE__ */ o(t, {
20
16
  href: f,
21
- children: y
17
+ children: N("signIn", y)
22
18
  });
23
- return /* @__PURE__ */ o(n, {
24
- title: g,
19
+ return /* @__PURE__ */ o(r, {
20
+ title: g ?? N("title"),
25
21
  description: _({
26
- client: /* @__PURE__ */ o("strong", { children: /* @__PURE__ */ o(r, {
22
+ client: /* @__PURE__ */ o("strong", { children: /* @__PURE__ */ o(i, {
27
23
  value: c,
28
24
  quotes: w
29
25
  }) }),
30
- product: l ?? v
26
+ product: l ?? v ?? N("fallbackProduct")
31
27
  }),
32
28
  header: D,
33
29
  footer: O,
@@ -35,18 +31,18 @@ function c({ clientName: c, productName: l, scope: u, redirectHost: d, signInHre
35
31
  preferencesLabel: A,
36
32
  id: j,
37
33
  shell: M,
38
- children: /* @__PURE__ */ s(t, {
34
+ children: /* @__PURE__ */ s(n, {
39
35
  size: "lg",
40
36
  blockActions: !0,
41
- method: N ? "post" : void 0,
37
+ method: P ? "post" : void 0,
42
38
  action: m,
43
39
  links: E,
44
- actions: P,
40
+ actions: F,
45
41
  children: [h && Object.entries(h).map(([e, t]) => /* @__PURE__ */ o("input", {
46
42
  type: "hidden",
47
43
  name: e,
48
44
  value: t
49
- }, e)), /* @__PURE__ */ o(i, {
45
+ }, e)), /* @__PURE__ */ o(a, {
50
46
  clientName: c,
51
47
  productName: l,
52
48
  scope: u,