@roqua/quby-frontend 0.12.0 → 0.12.2
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.
package/dist/quby-frontend.es.js
CHANGED
|
@@ -13643,7 +13643,7 @@ const ProgressBar = ({
|
|
|
13643
13643
|
};
|
|
13644
13644
|
const HtmlItem = ({ item }) => {
|
|
13645
13645
|
const html = useTranslationCurliesFor(`${item.key}`);
|
|
13646
|
-
if (!html)
|
|
13646
|
+
if (!html) return null;
|
|
13647
13647
|
return /* @__PURE__ */ jsx("div", { className: "item", children: /* @__PURE__ */ jsx("div", { className: "prose text", dangerouslySetInnerHTML: { __html: html } }) });
|
|
13648
13648
|
};
|
|
13649
13649
|
const MainLabel = ({ question }) => {
|
|
@@ -17873,6 +17873,11 @@ const TranslationCurlies = ({ i18nKey, Component }) => {
|
|
|
17873
17873
|
if (!interpolatedString) return null;
|
|
17874
17874
|
return /* @__PURE__ */ jsx(Component, { children: interpolatedString });
|
|
17875
17875
|
};
|
|
17876
|
+
const TranslationCurliesHtml = ({ i18nKey, Component }) => {
|
|
17877
|
+
const interpolatedString = useTranslationCurliesFor(i18nKey);
|
|
17878
|
+
if (!interpolatedString) return null;
|
|
17879
|
+
return /* @__PURE__ */ jsx(Component, { dangerouslySetInnerHTML: { __html: interpolatedString } });
|
|
17880
|
+
};
|
|
17876
17881
|
const InfoItem = ({ item }) => {
|
|
17877
17882
|
const [open, setOpen] = React__default.useState(item.startOpen);
|
|
17878
17883
|
const [opening, setOpening] = React__default.useState(false);
|
|
@@ -17910,12 +17915,12 @@ const InfoItem = ({ item }) => {
|
|
|
17910
17915
|
onKeyDown: iconClick,
|
|
17911
17916
|
"aria-haspopup": "dialog",
|
|
17912
17917
|
"aria-expanded": open || item.startOpen && inView,
|
|
17913
|
-
"aria-controls":
|
|
17918
|
+
"aria-controls": `%{item.key}`,
|
|
17914
17919
|
tabIndex: item.startOpen ? -1 : 0,
|
|
17915
17920
|
children: item.subtype == "question-bar" ? null : /* @__PURE__ */ jsx(InfoSvg, {})
|
|
17916
17921
|
}
|
|
17917
17922
|
),
|
|
17918
|
-
open && /* @__PURE__ */ jsx("div", { id: item.key, className: classNames("info-html prose", { "open": open, "opening": opening }), children: /* @__PURE__ */ jsx(
|
|
17923
|
+
open && /* @__PURE__ */ jsx("div", { id: item.key, className: classNames("info-html prose", { "open": open, "opening": opening }), children: /* @__PURE__ */ jsx(TranslationCurliesHtml, { i18nKey: `${item.key}.html`, Component: "div" }) }),
|
|
17919
17924
|
item.items.map((subItem, idx) => /* @__PURE__ */ jsx(PanelItem, { item: subItem }, idx))
|
|
17920
17925
|
] });
|
|
17921
17926
|
};
|