@edifice.io/react 2.2.7-develop-b2school.20250521111614 → 2.2.7-develop-b2school.20250523102221

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.
@@ -54,7 +54,7 @@ const Header = ({
54
54
  parsedContent,
55
55
  parsedHeadline,
56
56
  error
57
- } = useHelp(hasOldHelpEnableWorkflow), classes = clsx("header", {
57
+ } = useHelp(hasOldHelpEnableWorkflow), classes = clsx("header d-print-none", {
58
58
  "no-2d": is1d,
59
59
  "no-1d": !is1d
60
60
  }), {
@@ -11,29 +11,33 @@ interface ModalItemsProps {
11
11
  * Text below image
12
12
  */
13
13
  text: string;
14
+ /**
15
+ * Title of the item
16
+ */
17
+ title?: string;
14
18
  }
15
19
  interface ModalOptionsProps {
16
20
  /**
17
21
  * Modal title
18
22
  */
19
- title: string;
23
+ title?: string;
20
24
  /**
21
25
  * Prev button text
22
26
  */
23
- prevText: string;
27
+ prevText?: string;
24
28
  /**
25
29
  * Next button text
26
30
  */
27
- nextText: string;
31
+ nextText?: string;
28
32
  /**
29
33
  * Close button text
30
34
  */
31
- closeText: string;
35
+ closeText?: string;
32
36
  }
33
37
  interface OnboardingProps {
34
38
  id: string;
35
39
  items: ModalItemsProps[];
36
- modalOptions: ModalOptionsProps;
40
+ modalOptions?: ModalOptionsProps;
37
41
  }
38
42
  declare const OnboardingModal: {
39
43
  ({ id, items, modalOptions }: OnboardingProps): import('react').ReactPortal | null;
@@ -11,8 +11,9 @@ import Button from "../../../components/Button/Button.js";
11
11
  const OnboardingModal = ({
12
12
  id,
13
13
  items,
14
- modalOptions
14
+ modalOptions = {}
15
15
  }) => {
16
+ var _a;
16
17
  const [swiperInstance, setSwiperInstance] = useState(), [swiperProgress, setSwiperprogress] = useState(0), {
17
18
  isOpen,
18
19
  isOnboarding,
@@ -32,9 +33,9 @@ const OnboardingModal = ({
32
33
  prevText,
33
34
  closeText,
34
35
  nextText
35
- } = modalOptions;
36
+ } = modalOptions, currentTitle = (swiperInstance == null ? void 0 : swiperInstance.activeIndex) != null && ((_a = items[swiperInstance == null ? void 0 : swiperInstance.activeIndex]) != null && _a.title) ? items[swiperInstance.activeIndex].title : title;
36
37
  return isOnboarding ? /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", size: "md", isOpen, focusId: "nextButtonId", onModalClose: () => setIsOpen(!1), children: [
37
- /* @__PURE__ */ jsx(Modal.Header, { onModalClose: () => setIsOpen(!1), children: t(title || "explorer.modal.onboarding.trash.title") }),
38
+ /* @__PURE__ */ jsx(Modal.Header, { onModalClose: () => setIsOpen(!1), children: t(currentTitle || "explorer.modal.onboarding.trash.title") }),
38
39
  /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Swiper, { modules: [Pagination], onSwiper: (swiper) => {
39
40
  setSwiperInstance(swiper);
40
41
  }, onSlideChange: (swiper) => {
@@ -43,7 +44,7 @@ const OnboardingModal = ({
43
44
  clickable: !0
44
45
  }, children: items.map((item, index) => /* @__PURE__ */ jsxs(SwiperSlide, { children: [
45
46
  /* @__PURE__ */ jsx(Image, { width: "270", height: "140", className: "mx-auto my-12", loading: "lazy", src: item.src, alt: t(item.alt) }),
46
- /* @__PURE__ */ jsx("p", { children: t(item.text) })
47
+ /* @__PURE__ */ jsx("p", { className: "text-center", children: t(item.text) })
47
48
  ] }, index)) }) }),
48
49
  /* @__PURE__ */ jsxs(Modal.Footer, { children: [
49
50
  /* @__PURE__ */ jsx(Button, { type: "button", color: "tertiary", variant: "ghost", onClick: () => setIsOpen(!1), children: t("explorer.modal.onboarding.trash.later") }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.2.7-develop-b2school.20250521111614",
3
+ "version": "2.2.7-develop-b2school.20250523102221",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -118,9 +118,9 @@
118
118
  "react-slugify": "^3.0.3",
119
119
  "swiper": "^10.1.0",
120
120
  "ua-parser-js": "^1.0.36",
121
- "@edifice.io/bootstrap": "2.2.7-develop-b2school.20250521111614",
122
- "@edifice.io/tiptap-extensions": "2.2.7-develop-b2school.20250521111614",
123
- "@edifice.io/utilities": "2.2.7-develop-b2school.20250521111614"
121
+ "@edifice.io/bootstrap": "2.2.7-develop-b2school.20250523102221",
122
+ "@edifice.io/tiptap-extensions": "2.2.7-develop-b2school.20250523102221",
123
+ "@edifice.io/utilities": "2.2.7-develop-b2school.20250523102221"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -151,8 +151,8 @@
151
151
  "vite": "^5.4.11",
152
152
  "vite-plugin-dts": "^4.1.0",
153
153
  "vite-tsconfig-paths": "^5.0.1",
154
- "@edifice.io/client": "2.2.7-develop-b2school.20250521111614",
155
- "@edifice.io/config": "2.2.7-develop-b2school.20250521111614"
154
+ "@edifice.io/client": "2.2.7-develop-b2school.20250523102221",
155
+ "@edifice.io/config": "2.2.7-develop-b2school.20250523102221"
156
156
  },
157
157
  "peerDependencies": {
158
158
  "@react-spring/web": "^9.7.5",