@edifice.io/react 2.2.12 → 2.2.13-develop-b2school.20250723160127
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/components/Input/Input.d.ts +4 -0
- package/dist/components/Input/Input.js +2 -1
- package/dist/components/Modal/ModalHeader.d.ts +4 -0
- package/dist/components/Modal/ModalHeader.js +8 -3
- package/dist/hooks/useDirectory/useDirectory.d.ts +1 -1
- package/dist/hooks/useDirectory/useDirectory.js +2 -1
- package/dist/modules/modals/OnboardingModal/OnboardingModal.js +1 -1
- package/package.json +6 -6
|
@@ -9,6 +9,7 @@ const Input = /* @__PURE__ */ forwardRef(({
|
|
|
9
9
|
type = "text",
|
|
10
10
|
className,
|
|
11
11
|
showCounter,
|
|
12
|
+
autoComplete = "off",
|
|
12
13
|
...restProps
|
|
13
14
|
}, ref) => {
|
|
14
15
|
var _a;
|
|
@@ -31,7 +32,7 @@ const Input = /* @__PURE__ */ forwardRef(({
|
|
|
31
32
|
/* @__PURE__ */ jsx("input", { ref, id, className: classes, type, placeholder, required: isRequired, readOnly: isReadOnly, ...restProps, onChange: (e) => {
|
|
32
33
|
var _a2;
|
|
33
34
|
setCurrentLength(e.target.value.length), (_a2 = restProps.onChange) == null || _a2.call(restProps, e);
|
|
34
|
-
} }),
|
|
35
|
+
}, autoComplete }),
|
|
35
36
|
showCounter && !status && /* @__PURE__ */ jsxs("span", { className: clsx("caption text-end float-end mt-n32 py-2 px-12 ", {
|
|
36
37
|
"text-danger": currentLength === restProps.maxLength,
|
|
37
38
|
"text-gray-700": currentLength !== restProps.maxLength
|
|
@@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
|
|
|
4
4
|
import SvgIconClose from "../../modules/icons/components/IconClose.js";
|
|
5
5
|
import IconButton from "../Button/IconButton.js";
|
|
6
6
|
import { useModalContext } from "./ModalContext.js";
|
|
7
|
+
import clsx from "clsx";
|
|
7
8
|
const ModalHeader = (props) => {
|
|
8
9
|
const {
|
|
9
10
|
onModalClose,
|
|
@@ -14,11 +15,15 @@ const ModalHeader = (props) => {
|
|
|
14
15
|
} = useModalContext(), closeButtonRef = useRef(null), {
|
|
15
16
|
t
|
|
16
17
|
} = useTranslation();
|
|
17
|
-
|
|
18
|
+
useEffect(() => {
|
|
18
19
|
var _a;
|
|
19
20
|
focusId || (_a = closeButtonRef.current) == null || _a.focus();
|
|
20
|
-
}, [focusId])
|
|
21
|
-
|
|
21
|
+
}, [focusId]);
|
|
22
|
+
const headerClassName = clsx("modal-header", {
|
|
23
|
+
"align-self-center": props.centered
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsxs("div", { className: headerClassName, children: [
|
|
26
|
+
/* @__PURE__ */ jsx("h2", { id: ariaLabelId, className: "modal-title", tabIndex: -1, children }),
|
|
22
27
|
/* @__PURE__ */ jsx(IconButton, { ref: closeButtonRef, "aria-label": t("close"), color: "tertiary", icon: /* @__PURE__ */ jsx(SvgIconClose, {}), type: "button", variant: "ghost", title: t("close"), onClick: onModalClose, className: "btn-close" })
|
|
23
28
|
] });
|
|
24
29
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ID } from '@edifice.io/client';
|
|
2
2
|
declare const useDirectory: () => {
|
|
3
|
-
getAvatarURL: (userId: ID, type: "user" | "group") => string;
|
|
3
|
+
getAvatarURL: (userId: ID, type: "user" | "group") => string | undefined;
|
|
4
4
|
getUserbookURL: (userId: ID, type: "user" | "group") => string;
|
|
5
5
|
};
|
|
6
6
|
export default useDirectory;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { odeServices } from "@edifice.io/client";
|
|
2
2
|
const useDirectory = () => {
|
|
3
3
|
function getAvatarURL(userId, type) {
|
|
4
|
-
|
|
4
|
+
if (userId !== "")
|
|
5
|
+
return odeServices.directory().getAvatarUrl(userId, type);
|
|
5
6
|
}
|
|
6
7
|
function getUserbookURL(userId, type) {
|
|
7
8
|
return odeServices.directory().getDirectoryUrl(userId, type);
|
|
@@ -35,7 +35,7 @@ const OnboardingModal = ({
|
|
|
35
35
|
nextText
|
|
36
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;
|
|
37
37
|
return isOnboarding ? /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", size: "md", isOpen, focusId: "nextButtonId", onModalClose: () => setIsOpen(!1), children: [
|
|
38
|
-
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: () => setIsOpen(!1), children: t(currentTitle || "explorer.modal.onboarding.trash.title") }),
|
|
38
|
+
/* @__PURE__ */ jsx(Modal.Header, { onModalClose: () => setIsOpen(!1), centered: !0, children: t(currentTitle || "explorer.modal.onboarding.trash.title") }),
|
|
39
39
|
/* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Swiper, { modules: [Pagination], onSwiper: (swiper) => {
|
|
40
40
|
setSwiperInstance(swiper);
|
|
41
41
|
}, onSlideChange: (swiper) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.13-develop-b2school.20250723160127",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -130,9 +130,9 @@
|
|
|
130
130
|
"react-slugify": "^3.0.3",
|
|
131
131
|
"swiper": "^10.1.0",
|
|
132
132
|
"ua-parser-js": "^1.0.36",
|
|
133
|
-
"@edifice.io/bootstrap": "2.2.
|
|
134
|
-
"@edifice.io/tiptap-extensions": "2.2.
|
|
135
|
-
"@edifice.io/utilities": "2.2.
|
|
133
|
+
"@edifice.io/bootstrap": "2.2.13-develop-b2school.20250723160127",
|
|
134
|
+
"@edifice.io/tiptap-extensions": "2.2.13-develop-b2school.20250723160127",
|
|
135
|
+
"@edifice.io/utilities": "2.2.13-develop-b2school.20250723160127"
|
|
136
136
|
},
|
|
137
137
|
"devDependencies": {
|
|
138
138
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -163,8 +163,8 @@
|
|
|
163
163
|
"vite": "^5.4.11",
|
|
164
164
|
"vite-plugin-dts": "^4.1.0",
|
|
165
165
|
"vite-tsconfig-paths": "^5.0.1",
|
|
166
|
-
"@edifice.io/client": "2.2.
|
|
167
|
-
"@edifice.io/config": "2.2.
|
|
166
|
+
"@edifice.io/client": "2.2.13-develop-b2school.20250723160127",
|
|
167
|
+
"@edifice.io/config": "2.2.13-develop-b2school.20250723160127"
|
|
168
168
|
},
|
|
169
169
|
"peerDependencies": {
|
|
170
170
|
"@react-spring/web": "^9.7.5",
|