@box/box-ai-content-answers 0.70.7 → 0.71.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 (37) hide show
  1. package/esm/lib/box-ai-content-answers.js +66 -65
  2. package/esm/lib/components/answer/answer-content.js +21 -20
  3. package/esm/lib/components/answer/answer.js +52 -52
  4. package/esm/lib/components/answer/inline-error.js +48 -48
  5. package/esm/lib/components/answer/loading-element.js +30 -30
  6. package/esm/lib/components/chat/chat.js +58 -58
  7. package/esm/lib/components/common/media-container.js +28 -28
  8. package/esm/lib/components/content/content.js +66 -65
  9. package/esm/lib/components/footer/footer.js +90 -88
  10. package/esm/lib/components/question/question.js +29 -29
  11. package/esm/lib/components/suggested-questions/suggested-questions.js +47 -47
  12. package/esm/lib/components/suggested-questions/suggestions.js +20 -20
  13. package/esm/lib/components/welcome-message/welcome-message.js +46 -46
  14. package/package.json +4 -4
  15. package/styles/answer-content.css +1 -1
  16. package/styles/box-ai-content-answers.css +1 -1
  17. package/styles/content.css +1 -1
  18. package/styles/footer.css +1 -1
  19. package/styles/media-container.css +1 -1
  20. package/styles/question.css +1 -1
  21. package/styles/suggested-questions.css +1 -1
  22. package/styles/suggestions.css +1 -1
  23. package/styles/welcome-message.css +1 -1
  24. package/types/lib/box-ai-content-answers.d.ts +2 -2
  25. package/types/lib/components/answer/answer-content.d.ts +3 -2
  26. package/types/lib/components/answer/answer.d.ts +2 -2
  27. package/types/lib/components/answer/inline-error.d.ts +3 -3
  28. package/types/lib/components/answer/loading-element.d.ts +3 -2
  29. package/types/lib/components/chat/chat.d.ts +1 -1
  30. package/types/lib/components/common/media-container.d.ts +4 -3
  31. package/types/lib/components/content/content.d.ts +1 -1
  32. package/types/lib/components/footer/footer.d.ts +3 -3
  33. package/types/lib/components/question/question.d.ts +3 -3
  34. package/types/lib/components/suggested-questions/suggested-questions.d.ts +3 -3
  35. package/types/lib/components/suggested-questions/suggestions.d.ts +3 -3
  36. package/types/lib/components/welcome-message/welcome-message.d.ts +1 -1
  37. package/types/lib/types.d.ts +7 -5
@@ -1,87 +1,88 @@
1
1
  import "../../styles/box-ai-content-answers.css";
2
- import F from "clsx";
3
- import * as s from "react";
4
- import { AgentEditor as N } from "./components/agents/agent-editor.js";
2
+ import w from "clsx";
3
+ import * as t from "react";
4
+ import { AgentEditor as y } from "./components/agents/agent-editor.js";
5
5
  import { Content as B } from "./components/content/content.js";
6
6
  import { Footer as R } from "./components/footer/footer.js";
7
7
  import { jsx as o, jsxs as z } from "react/jsx-runtime";
8
- const G = "_container_9vygi_1", H = "_contentAnswers_9vygi_8", A = {
8
+ const G = "_container_9b4cv_1", H = "_contentAnswers_9b4cv_8", J = "_sidebar_9b4cv_19", u = {
9
9
  container: G,
10
- contentAnswers: H
10
+ contentAnswers: H,
11
+ sidebar: J
11
12
  }, Y = ({
12
13
  className: S,
13
- contentType: l,
14
- error: t,
15
- hasCustomSuggestedQuestions: M,
16
- hasRequestInProgress: r,
17
- isAgentSelectorEnabled: Q,
18
- isAIStudioAgentSelectorEnabled: _,
14
+ contentType: a,
15
+ error: e,
16
+ hasCustomSuggestedQuestions: A,
17
+ hasRequestInProgress: l,
18
+ isAgentSelectorEnabled: M,
19
+ isAIStudioAgentSelectorEnabled: Q,
19
20
  isDebugModeEnabled: h,
20
- isSidebarOpen: c = !1,
21
21
  isStopResponseEnabled: x,
22
22
  isStreamingEnabled: n,
23
- userInfo: a,
24
- questions: u,
25
- recordAction: i,
26
- retryQuestion: v,
27
- showLoadingIndicator: m,
28
- stopQuestion: D,
29
- submitQuestion: b,
30
- suggestedQuestions: y,
31
- useAnimation: E,
32
- onAgentEditorToggle: j,
33
- ...k
23
+ userInfo: m,
24
+ questions: r,
25
+ recordAction: c,
26
+ retryQuestion: D,
27
+ showLoadingIndicator: d,
28
+ stopQuestion: v,
29
+ submitQuestion: E,
30
+ suggestedQuestions: j,
31
+ useAnimation: k,
32
+ onAgentEditorToggle: C,
33
+ variant: i = "modal",
34
+ ...F
34
35
  }) => {
35
- const [g, f] = s.useState(null), [w, d] = s.useState(t != null), [e, p] = s.useState(!1), C = !w && !m;
36
- return s.useEffect(() => {
37
- d(t != null);
38
- }, [t]), /* @__PURE__ */ o("div", {
39
- className: F(S, A.container),
36
+ const [b, g] = t.useState(null), [f, _] = t.useState(e != null), [s, p] = t.useState(!1), N = !f && !d;
37
+ return t.useEffect(() => {
38
+ _(e != null);
39
+ }, [e]), /* @__PURE__ */ o("div", {
40
+ className: w(S, u.container),
40
41
  children: /* @__PURE__ */ z("div", {
41
- className: A.contentAnswers,
42
- children: [!e && /* @__PURE__ */ o(B, {
43
- ...k,
44
- askSuggestedQuestion: g,
45
- contentType: l,
46
- error: t,
47
- hasCustomSuggestedQuestions: M,
48
- hasRequestInProgress: r,
49
- isErrorMessageShown: w,
50
- isSidebarOpen: c,
42
+ className: w(u.contentAnswers, i === "sidebar" && u.sidebar),
43
+ children: [!s && /* @__PURE__ */ o(B, {
44
+ ...F,
45
+ askSuggestedQuestion: b,
46
+ contentType: a,
47
+ error: e,
48
+ hasCustomSuggestedQuestions: A,
49
+ hasRequestInProgress: l,
50
+ isErrorMessageShown: f,
51
51
  isStreamingEnabled: n,
52
- questions: u,
53
- recordAction: i,
54
- setAskSuggestedQuestion: f,
55
- setIsErrorMessageShown: d,
56
- showLoadingIndicator: m,
57
- suggestedQuestions: y,
58
- useAnimation: n && E,
59
- userInfo: a
60
- }), e && /* @__PURE__ */ o(N, {
61
- onAgentEditorToggle: j,
62
- recordAction: i,
52
+ questions: r,
53
+ recordAction: c,
54
+ setAskSuggestedQuestion: g,
55
+ setIsErrorMessageShown: _,
56
+ showLoadingIndicator: d,
57
+ suggestedQuestions: j,
58
+ useAnimation: n && k,
59
+ userInfo: m,
60
+ variant: i
61
+ }), s && /* @__PURE__ */ o(y, {
62
+ onAgentEditorToggle: C,
63
+ recordAction: c,
63
64
  setIsDebugModeShown: p
64
- }), C && /* @__PURE__ */ o(R, {
65
- askSuggestedQuestion: g,
66
- contentType: l,
65
+ }), N && /* @__PURE__ */ o(R, {
66
+ askSuggestedQuestion: b,
67
+ contentType: a,
67
68
  enableDebugMode: h,
68
- hasRequestInProgress: r,
69
- isAgentSelectorEnabled: Q,
70
- isAIStudioAgentSelectorEnabled: _,
71
- isDebugModeShown: e,
72
- isSidebarOpen: c,
69
+ hasRequestInProgress: l,
70
+ isAgentSelectorEnabled: M,
71
+ isAIStudioAgentSelectorEnabled: Q,
72
+ isDebugModeShown: s,
73
73
  isStopResponseEnabled: x,
74
74
  isStreamingEnabled: n,
75
- lastQuestion: u[u.length - 1],
76
- onRetryQuestion: v,
77
- onStopQuestion: D,
78
- recordAction: i,
79
- sendQuestion: b,
80
- setAskSuggestedQuestion: f,
75
+ lastQuestion: r[r.length - 1],
76
+ onRetryQuestion: D,
77
+ onStopQuestion: v,
78
+ recordAction: c,
79
+ sendQuestion: E,
80
+ setAskSuggestedQuestion: g,
81
81
  toggleDebugMode: () => {
82
- p(!e);
82
+ p(!s);
83
83
  },
84
- user: a
84
+ user: m,
85
+ variant: i
85
86
  })]
86
87
  })
87
88
  });
@@ -1,34 +1,35 @@
1
1
  import "../../../../styles/answer-content.css";
2
- import i from "clsx";
3
- import m from "../common/markdown.js";
4
- import { jsxs as w, Fragment as _, jsx as d } from "react/jsx-runtime";
5
- const c = "_answerContent_kzv6t_1", p = "_isSidebarOpen_kzv6t_14", l = "_answerMarkdown_kzv6t_18", e = {
2
+ import d from "clsx";
3
+ import l from "../common/markdown.js";
4
+ import { jsxs as w, Fragment as _, jsx as i } from "react/jsx-runtime";
5
+ const c = "_answerContent_o58lm_1", C = "_sidebar_o58lm_14", x = "_answerMarkdown_o58lm_18", e = {
6
6
  answerContent: c,
7
- isSidebarOpen: p,
8
- answerMarkdown: l
9
- }, v = ({
7
+ sidebar: C,
8
+ answerMarkdown: x
9
+ }, u = ({
10
10
  answer: n,
11
- isSidebarOpen: r = !1,
12
- isMarkdownEnabled: t,
13
- className: s,
14
- ...o
11
+ isMarkdownEnabled: r,
12
+ className: t,
13
+ variant: m = "modal",
14
+ ...s
15
15
  }) => {
16
+ const o = m === "sidebar";
16
17
  let a = n;
17
- return t && n && (a = m.render(n)), /* @__PURE__ */ w(_, {
18
- children: [!t && /* @__PURE__ */ d("div", {
19
- className: i(e.answerContent, r && e.isSidebarOpen, "Answer-text", s),
20
- ...o,
18
+ return r && n && (a = l.render(n)), /* @__PURE__ */ w(_, {
19
+ children: [!r && /* @__PURE__ */ i("div", {
20
+ className: d(e.answerContent, o && e.sidebar, "Answer-text", t),
21
+ ...s,
21
22
  children: n
22
- }), t && /* @__PURE__ */ d("div", {
23
- className: i(e.answerContent, e.answerMarkdown, r && e.isSidebarOpen, "Answer-text", s),
23
+ }), r && /* @__PURE__ */ i("div", {
24
+ className: d(e.answerContent, e.answerMarkdown, o && e.sidebar, "Answer-text", t),
24
25
  dangerouslySetInnerHTML: {
25
26
  __html: a
26
27
  },
27
- ...o
28
+ ...s
28
29
  })]
29
30
  });
30
31
  };
31
32
  export {
32
- v as AnswerContent,
33
- v as default
33
+ u as AnswerContent,
34
+ u as default
34
35
  };
@@ -1,8 +1,8 @@
1
1
  import "../../../../styles/answer.css";
2
- import { useBreakpoint as O, Breakpoint as M, Text as D } from "@box/blueprint-web";
3
- import { BoxAi as F, AlertTriangle as H } from "@box/blueprint-web-assets/icons/Line";
4
- import { Size5 as L, Size6 as x, Gray65 as U, Size4 as p } from "@box/blueprint-web-assets/tokens/tokens";
5
- import b from "clsx";
2
+ import { useBreakpoint as v, Breakpoint as z, Text as M } from "@box/blueprint-web";
3
+ import { BoxAi as D, AlertTriangle as F } from "@box/blueprint-web-assets/icons/Line";
4
+ import { Size5 as H, Size6 as L, Gray65 as x, Size4 as u } from "@box/blueprint-web-assets/tokens/tokens";
5
+ import U from "clsx";
6
6
  import * as m from "react";
7
7
  import { useIntl as y } from "react-intl";
8
8
  import { A as o } from "../../../../chunks/types.js";
@@ -13,7 +13,7 @@ import { InlineError as G } from "./inline-error.js";
13
13
  import { LoadingElement as j } from "./loading-element.js";
14
14
  import _ from "./messages.js";
15
15
  import { References as W } from "./references.js";
16
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
16
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
17
17
  const q = "_answer_5bwzk_1", J = "_alertIcon_5bwzk_4", K = "_error_5bwzk_7", Q = "_footer_5bwzk_11", V = "_shouldHaveMarginTop_5bwzk_17", X = "_shouldUseAnimation_5bwzk_20", Y = "_shouldAnimateHeight_5bwzk_24", Z = "_iconAvatar_5bwzk_28", r = {
18
18
  answer: q,
19
19
  alertIcon: J,
@@ -23,94 +23,94 @@ const q = "_answer_5bwzk_1", J = "_alertIcon_5bwzk_4", K = "_error_5bwzk_7", Q =
23
23
  shouldUseAnimation: X,
24
24
  shouldAnimateHeight: Y,
25
25
  iconAvatar: Z
26
- }, $ = /* @__PURE__ */ new Set([o.RATE_LIMITING, o.NO_CONTENT, o.PRECONDITION_FAILED, o.GENERAL, o.AGENT_NOT_FOUND]), pt = /* @__PURE__ */ m.memo(({
26
+ }, $ = /* @__PURE__ */ new Set([o.RATE_LIMITING, o.NO_CONTENT, o.PRECONDITION_FAILED, o.GENERAL, o.AGENT_NOT_FOUND]), ue = /* @__PURE__ */ m.memo(({
27
27
  answer: s,
28
- citations: N,
29
- error: t,
30
- contentType: S,
28
+ citations: S,
29
+ error: e,
30
+ contentType: N,
31
31
  isCitationsEnabled: A = !1,
32
- isCompleted: i = !1,
32
+ isCompleted: a = !1,
33
33
  isLoading: w = !1,
34
34
  isMarkdownEnabled: I = !1,
35
- isSidebarOpen: n = !1,
36
35
  onCitationClick: T,
37
36
  onAnswerCopy: R,
38
37
  recordAction: l,
39
- useAnimation: g = !0
38
+ useAnimation: g = !0,
39
+ variant: n = "modal"
40
40
  }) => {
41
- const E = $.has(t), h = w && !s && !t, [v, P] = m.useState(i), {
41
+ const E = $.has(e), p = w && !s && !e, [O, P] = m.useState(a), {
42
42
  formatMessage: c
43
- } = y(), f = O() === M.Small ? L : x;
43
+ } = y(), h = v() === z.Small ? H : L;
44
44
  m.useEffect(() => {
45
- setTimeout(() => P(i), 0);
46
- }, [i]);
47
- const u = () => /* @__PURE__ */ e(H, {
45
+ setTimeout(() => P(a), 0);
46
+ }, [a]);
47
+ const f = () => /* @__PURE__ */ t(F, {
48
48
  className: r.alertIcon,
49
- color: U,
49
+ color: x,
50
50
  "data-testid": "content-answers-error-alert-icon",
51
- height: p,
51
+ height: u,
52
52
  role: "presentation",
53
- width: p
54
- }), k = () => /* @__PURE__ */ a(D, {
53
+ width: u
54
+ }), b = () => /* @__PURE__ */ i(M, {
55
55
  as: "p",
56
56
  className: r.error,
57
57
  color: "textOnLightSecondary",
58
58
  "data-testid": "content-answers-error",
59
59
  variant: "caption",
60
- children: [t === o.RESPONSE_INTERRUPTED && c(_.responseInterruptedError), t === o.RESPONSE_FAILED && c(_.responseFailedError), t === o.RESPONSE_STOPPED && c(_.responseStoppedError), t !== o.RESPONSE_STOPPED && u()]
61
- }), z = () => t !== o.RESPONSE_STOPPED ? /* @__PURE__ */ e(C, {
60
+ children: [e === o.RESPONSE_INTERRUPTED && c(_.responseInterruptedError), e === o.RESPONSE_FAILED && c(_.responseFailedError), e === o.RESPONSE_STOPPED && c(_.responseStoppedError), e !== o.RESPONSE_STOPPED && f()]
61
+ }), k = () => e !== o.RESPONSE_STOPPED ? /* @__PURE__ */ t(C, {
62
62
  answer: s,
63
63
  onAnswerCopy: R,
64
64
  recordAction: l
65
- }) : s ? null : u();
66
- return /* @__PURE__ */ a("div", {
65
+ }) : s ? null : f();
66
+ return /* @__PURE__ */ i("div", {
67
67
  "aria-live": "polite",
68
68
  className: r.answer,
69
69
  "data-testid": "content-answers-answer",
70
- children: [!E && !h && /* @__PURE__ */ a(d, {
71
- isSidebarOpen: n,
72
- children: [/* @__PURE__ */ e(d.Figure, {
73
- isSidebarOpen: n,
74
- children: /* @__PURE__ */ e("div", {
70
+ children: [!E && !p && /* @__PURE__ */ i(d, {
71
+ variant: n,
72
+ children: [/* @__PURE__ */ t(d.Figure, {
73
+ variant: n,
74
+ children: /* @__PURE__ */ t("div", {
75
75
  className: r.iconAvatar,
76
- children: /* @__PURE__ */ e(F, {
77
- height: f,
76
+ children: /* @__PURE__ */ t(D, {
77
+ height: h,
78
78
  role: "presentation",
79
- width: f
79
+ width: h
80
80
  })
81
81
  })
82
- }), /* @__PURE__ */ a(d.Content, {
83
- isSidebarOpen: n,
82
+ }), /* @__PURE__ */ i(d.Content, {
83
+ isUsedInsideSidebar: n === "sidebar",
84
84
  variant: "answer",
85
- children: [/* @__PURE__ */ e(B, {
85
+ children: [/* @__PURE__ */ t(B, {
86
86
  answer: s,
87
87
  isMarkdownEnabled: I,
88
- isSidebarOpen: n
89
- }), i && /* @__PURE__ */ a("div", {
90
- className: b(r.footer, {
88
+ variant: n
89
+ }), a && /* @__PURE__ */ i("div", {
90
+ className: U(r.footer, {
91
91
  [r.shouldHaveMarginTop]: s,
92
- [r.shouldAnimateHeight]: v,
92
+ [r.shouldAnimateHeight]: O,
93
93
  [r.shouldUseAnimation]: g
94
94
  }),
95
95
  "data-testid": "content-answers-answer-footer",
96
- children: [t && k(), A && !t && /* @__PURE__ */ e(W, {
97
- citations: N,
96
+ children: [e && b(), A && !e && /* @__PURE__ */ t(W, {
97
+ citations: S,
98
98
  onCitationClick: T,
99
99
  recordAction: l
100
- }), z()]
100
+ }), k()]
101
101
  })]
102
102
  })]
103
- }), E && /* @__PURE__ */ e(G, {
104
- contentType: S,
105
- error: t,
106
- isSidebarOpen: n,
107
- recordAction: l
108
- }), h && /* @__PURE__ */ e(j, {
109
- isSidebarOpen: n
103
+ }), E && /* @__PURE__ */ t(G, {
104
+ contentType: N,
105
+ error: e,
106
+ recordAction: l,
107
+ variant: n
108
+ }), p && /* @__PURE__ */ t(j, {
109
+ variant: n
110
110
  })]
111
111
  });
112
112
  });
113
113
  export {
114
- pt as Answer,
115
- pt as default
114
+ ue as Answer,
115
+ ue as default
116
116
  };
@@ -1,87 +1,87 @@
1
1
  import "../../../../styles/inline-error.css";
2
- import { useBreakpoint as p, Breakpoint as N, Text as h } from "@box/blueprint-web";
3
- import { BoxAi as u, AlertTriangle as x } from "@box/blueprint-web-assets/icons/Line";
4
- import { Size5 as l, Size6 as T } from "@box/blueprint-web-assets/tokens/tokens";
2
+ import { useBreakpoint as N, Breakpoint as h, Text as u } from "@box/blueprint-web";
3
+ import { BoxAi as x, AlertTriangle as S } from "@box/blueprint-web-assets/icons/Line";
4
+ import { Size5 as s, Size6 as T } from "@box/blueprint-web-assets/tokens/tokens";
5
5
  import * as f from "react";
6
6
  import { useIntl as g } from "react-intl";
7
- import { A as i } from "../../../../chunks/types.js";
8
- import { LOGGER_BASE_CONFIG as v } from "../common/constants.js";
9
- import { MediaContainer as c } from "../common/media-container.js";
10
- import t from "./messages.js";
11
- import { jsx as r, jsxs as E } from "react/jsx-runtime";
12
- const A = "_inlineError_ft07o_1", I = "_text_ft07o_4", R = "_icon_ft07o_14", C = "_iconAvatar_ft07o_18", n = {
13
- inlineError: A,
7
+ import { A as t } from "../../../../chunks/types.js";
8
+ import { LOGGER_BASE_CONFIG as A } from "../common/constants.js";
9
+ import { MediaContainer as l } from "../common/media-container.js";
10
+ import i from "./messages.js";
11
+ import { jsx as r, jsxs as _ } from "react/jsx-runtime";
12
+ const v = "_inlineError_ft07o_1", I = "_text_ft07o_4", O = "_icon_ft07o_14", R = "_iconAvatar_ft07o_18", n = {
13
+ inlineError: v,
14
14
  text: I,
15
- icon: R,
16
- iconAvatar: C
17
- }, j = ({
15
+ icon: O,
16
+ iconAvatar: R
17
+ }, U = ({
18
18
  error: o,
19
- contentType: m,
20
- isSidebarOpen: a = !1,
21
- recordAction: s
19
+ contentType: c,
20
+ variant: d = "modal",
21
+ recordAction: a
22
22
  }) => {
23
- const {
23
+ const m = d === "sidebar", {
24
24
  formatMessage: e
25
25
  } = g();
26
26
  f.useEffect(() => {
27
- s && s({
28
- ...v,
27
+ a && a({
28
+ ...A,
29
29
  target: "inlineError"
30
30
  });
31
- }, [s]);
32
- const _ = f.useCallback(() => {
31
+ }, [a]);
32
+ const p = f.useCallback(() => {
33
33
  switch (o) {
34
- case i.RATE_LIMITING:
35
- return e(t.inlineRateLimitingErrorText);
36
- case i.NO_CONTENT:
37
- return e(t.inlineNoContentErrorText);
38
- case i.PRECONDITION_FAILED:
39
- return e(t.inlinePreconditionFailedErrorText, {
40
- type: m
34
+ case t.RATE_LIMITING:
35
+ return e(i.inlineRateLimitingErrorText);
36
+ case t.NO_CONTENT:
37
+ return e(i.inlineNoContentErrorText);
38
+ case t.PRECONDITION_FAILED:
39
+ return e(i.inlinePreconditionFailedErrorText, {
40
+ type: c
41
41
  });
42
- case i.AGENT_NOT_FOUND:
43
- return e(t.inlineAgentNotFoundErrorText);
42
+ case t.AGENT_NOT_FOUND:
43
+ return e(i.inlineAgentNotFoundErrorText);
44
44
  default:
45
- return e(t.inlineErrorText);
45
+ return e(i.inlineErrorText);
46
46
  }
47
- }, [m, o, e]), d = p() === N.Small ? l : T;
47
+ }, [c, o, e]), E = N() === h.Small ? s : T;
48
48
  return /* @__PURE__ */ r("div", {
49
49
  className: n.inlineError,
50
50
  "data-testid": "content-answers-inline-error",
51
- children: /* @__PURE__ */ E(c, {
52
- isSidebarOpen: a,
53
- children: [/* @__PURE__ */ r(c.Figure, {
54
- isSidebarOpen: a,
51
+ children: /* @__PURE__ */ _(l, {
52
+ variant: d,
53
+ children: [/* @__PURE__ */ r(l.Figure, {
54
+ isUsedInsideSidebar: m,
55
55
  variant: "center-aligned",
56
56
  children: /* @__PURE__ */ r("div", {
57
57
  className: n.iconAvatar,
58
- children: /* @__PURE__ */ r(u, {
59
- height: d,
58
+ children: /* @__PURE__ */ r(x, {
59
+ height: E,
60
60
  role: "presentation",
61
- width: d
61
+ width: E
62
62
  })
63
63
  })
64
- }), /* @__PURE__ */ E(c.Content, {
65
- isSidebarOpen: a,
64
+ }), /* @__PURE__ */ _(l.Content, {
65
+ isUsedInsideSidebar: m,
66
66
  shouldAddCard: !1,
67
67
  variant: "error",
68
68
  children: [/* @__PURE__ */ r("div", {
69
69
  className: n.icon,
70
- children: /* @__PURE__ */ r(x, {
71
- height: l,
70
+ children: /* @__PURE__ */ r(S, {
71
+ height: s,
72
72
  role: "presentation",
73
- width: l
73
+ width: s
74
74
  })
75
- }), /* @__PURE__ */ r(h, {
75
+ }), /* @__PURE__ */ r(u, {
76
76
  as: "p",
77
77
  className: n.text,
78
- children: o && _()
78
+ children: o && p()
79
79
  })]
80
80
  })]
81
81
  })
82
82
  });
83
83
  };
84
84
  export {
85
- j as InlineError,
86
- j as default
85
+ U as InlineError,
86
+ U as default
87
87
  };
@@ -1,41 +1,41 @@
1
1
  import "../../../../styles/loading-element.css";
2
- import { useBreakpoint as e, Breakpoint as l, LoadingIndicator as s } from "@box/blueprint-web";
3
- import { BoxAi as c } from "@box/blueprint-web-assets/icons/Line";
4
- import { Size5 as d, Size6 as m } from "@box/blueprint-web-assets/tokens/tokens";
5
- import { useIntl as g } from "react-intl";
6
- import { MediaContainer as a } from "../common/media-container.js";
7
- import p from "./messages.js";
8
- import { jsx as o, jsxs as f } from "react/jsx-runtime";
9
- const v = "_loadingElement_1pjir_1", _ = "_loadingIndicator_1pjir_1", h = "_iconAvatar_1pjir_5", i = {
10
- loadingElement: v,
2
+ import { useBreakpoint as t, Breakpoint as s, LoadingIndicator as d } from "@box/blueprint-web";
3
+ import { BoxAi as l } from "@box/blueprint-web-assets/icons/Line";
4
+ import { Size5 as c, Size6 as m } from "@box/blueprint-web-assets/tokens/tokens";
5
+ import { useIntl as p } from "react-intl";
6
+ import { MediaContainer as n } from "../common/media-container.js";
7
+ import g from "./messages.js";
8
+ import { jsx as i, jsxs as S } from "react/jsx-runtime";
9
+ const f = "_loadingElement_1pjir_1", _ = "_loadingIndicator_1pjir_1", h = "_iconAvatar_1pjir_5", o = {
10
+ loadingElement: f,
11
11
  loadingIndicator: _,
12
12
  iconAvatar: h
13
- }, B = ({
14
- isSidebarOpen: n = !1
13
+ }, z = ({
14
+ variant: e = "modal"
15
15
  }) => {
16
16
  const {
17
17
  formatMessage: r
18
- } = g(), t = e() === l.Small ? d : m;
19
- return /* @__PURE__ */ o("div", {
20
- className: i.loadingElement,
21
- children: /* @__PURE__ */ f(a, {
22
- isSidebarOpen: n,
23
- children: [/* @__PURE__ */ o(a.Figure, {
24
- isSidebarOpen: n,
25
- children: /* @__PURE__ */ o("div", {
26
- className: i.iconAvatar,
27
- children: /* @__PURE__ */ o(c, {
28
- height: t,
18
+ } = p(), a = t() === s.Small ? c : m;
19
+ return /* @__PURE__ */ i("div", {
20
+ className: o.loadingElement,
21
+ children: /* @__PURE__ */ S(n, {
22
+ variant: e,
23
+ children: [/* @__PURE__ */ i(n.Figure, {
24
+ isUsedInsideSidebar: e === "sidebar",
25
+ children: /* @__PURE__ */ i("div", {
26
+ className: o.iconAvatar,
27
+ children: /* @__PURE__ */ i(l, {
28
+ height: a,
29
29
  role: "presentation",
30
- width: t
30
+ width: a
31
31
  })
32
32
  })
33
- }), /* @__PURE__ */ o(a.Content, {
34
- isSidebarOpen: n,
33
+ }), /* @__PURE__ */ i(n.Content, {
34
+ isUsedInsideSidebar: e === "sidebar",
35
35
  variant: "answer",
36
- children: /* @__PURE__ */ o(s, {
37
- "aria-label": r(p.loadingAnswer),
38
- className: i.loadingIndicator,
36
+ children: /* @__PURE__ */ i(d, {
37
+ "aria-label": r(g.loadingAnswer),
38
+ className: o.loadingIndicator,
39
39
  "data-testid": "content-answers-loading-indicator"
40
40
  })
41
41
  })]
@@ -43,6 +43,6 @@ const v = "_loadingElement_1pjir_1", _ = "_loadingIndicator_1pjir_1", h = "_icon
43
43
  });
44
44
  };
45
45
  export {
46
- B as LoadingElement,
47
- B as default
46
+ z as LoadingElement,
47
+ z as default
48
48
  };