@oxyhq/services 0.0.48 → 0.0.49
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/README.md +2 -0
- package/package.json +4 -10
- package/dist/AuthProvider.d.ts +0 -12
- package/dist/AuthProvider.d.ts.map +0 -1
- package/dist/AuthProvider.js +0 -41
- package/dist/assets/css/styles.css +0 -17
- package/dist/assets/dot-icon.d.ts +0 -3
- package/dist/assets/dot-icon.d.ts.map +0 -1
- package/dist/assets/dot-icon.js +0 -6
- package/dist/assets/verified-icon.d.ts +0 -3
- package/dist/assets/verified-icon.d.ts.map +0 -1
- package/dist/assets/verified-icon.js +0 -10
- package/dist/components/assets/oxy-logo.d.ts +0 -3
- package/dist/components/assets/oxy-logo.d.ts.map +0 -1
- package/dist/components/assets/oxy-logo.js +0 -30
- package/dist/components/auth/AccountSwitcher.d.ts +0 -7
- package/dist/components/auth/AccountSwitcher.d.ts.map +0 -1
- package/dist/components/auth/AccountSwitcher.js +0 -28
- package/dist/components/auth/AccountSwitcherModal.d.ts +0 -5
- package/dist/components/auth/AccountSwitcherModal.d.ts.map +0 -1
- package/dist/components/auth/AccountSwitcherModal.js +0 -53
- package/dist/components/auth/OAvatar.d.ts +0 -8
- package/dist/components/auth/OAvatar.d.ts.map +0 -1
- package/dist/components/auth/OAvatar.js +0 -18
- package/dist/components/auth/SessionOwnerButton.d.ts +0 -3
- package/dist/components/auth/SessionOwnerButton.d.ts.map +0 -1
- package/dist/components/auth/SessionOwnerButton.js +0 -30
- package/dist/components/auth/SignInButton.d.ts +0 -8
- package/dist/components/auth/SignInButton.d.ts.map +0 -1
- package/dist/components/auth/SignInButton.js +0 -15
- package/dist/components/auth/index.d.ts +0 -3
- package/dist/components/auth/index.d.ts.map +0 -1
- package/dist/components/auth/index.js +0 -2
- package/dist/components/auth/sign-in-button.module.css +0 -33
- package/dist/components/auth/sign-in-button.module.css.map +0 -1
- package/dist/components/auth/styles/oavatar.module.css +0 -34
- package/dist/components/auth/styles/oavatar.module.css.map +0 -1
- package/dist/components/auth/styles/session-owner-modal.module.css +0 -35
- package/dist/components/auth/styles/session-owner-modal.module.css.map +0 -1
- package/dist/components/auth/styles/sign-in-button.module.css +0 -30
- package/dist/components/auth/styles/sign-in-button.module.css.map +0 -1
- package/dist/components/elements/button/components/button.d.ts +0 -7
- package/dist/components/elements/button/components/button.d.ts.map +0 -1
- package/dist/components/elements/button/components/button.js +0 -6
- package/dist/components/elements/button/components/styles/button.module.css +0 -25
- package/dist/components/elements/button/components/styles/button.module.css.map +0 -1
- package/dist/components/elements/button/index.d.ts +0 -2
- package/dist/components/elements/button/index.d.ts.map +0 -1
- package/dist/components/elements/button/index.js +0 -1
- package/dist/components/elements/ellipsis-wrapper/components/ellipsis-wrapper.d.ts +0 -5
- package/dist/components/elements/ellipsis-wrapper/components/ellipsis-wrapper.d.ts.map +0 -1
- package/dist/components/elements/ellipsis-wrapper/components/ellipsis-wrapper.js +0 -4
- package/dist/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.css +0 -11
- package/dist/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.css.map +0 -1
- package/dist/components/elements/ellipsis-wrapper/index.d.ts +0 -2
- package/dist/components/elements/ellipsis-wrapper/index.d.ts.map +0 -1
- package/dist/components/elements/ellipsis-wrapper/index.js +0 -1
- package/dist/components/elements/modal/components/confirmation-modal.d.ts +0 -12
- package/dist/components/elements/modal/components/confirmation-modal.d.ts.map +0 -1
- package/dist/components/elements/modal/components/confirmation-modal.js +0 -21
- package/dist/components/elements/modal/components/modal.d.ts +0 -13
- package/dist/components/elements/modal/components/modal.d.ts.map +0 -1
- package/dist/components/elements/modal/components/modal.js +0 -111
- package/dist/components/elements/modal/components/styles/confirmation-modal.module.css +0 -105
- package/dist/components/elements/modal/components/styles/confirmation-modal.module.css.map +0 -1
- package/dist/components/elements/modal/components/styles/modal.module.css +0 -10
- package/dist/components/elements/modal/components/styles/modal.module.css.map +0 -1
- package/dist/components/elements/modal/hooks/use-track-position.d.ts +0 -5
- package/dist/components/elements/modal/hooks/use-track-position.d.ts.map +0 -1
- package/dist/components/elements/modal/hooks/use-track-position.js +0 -35
- package/dist/components/elements/modal/index.d.ts +0 -4
- package/dist/components/elements/modal/index.d.ts.map +0 -1
- package/dist/components/elements/modal/index.js +0 -3
- package/dist/config/index.d.ts +0 -21
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -7
- package/dist/features/profile/components/avatar.d.ts +0 -10
- package/dist/features/profile/components/avatar.d.ts.map +0 -1
- package/dist/features/profile/components/avatar.js +0 -7
- package/dist/features/profile/components/styles/avatar.module.css +0 -15
- package/dist/features/profile/components/styles/avatar.module.css.map +0 -1
- package/dist/features/profile/components/styles/user-name.module.css +0 -18
- package/dist/features/profile/components/styles/user-name.module.css.map +0 -1
- package/dist/features/profile/components/styles/user-username.module.css +0 -6
- package/dist/features/profile/components/styles/user-username.module.css.map +0 -1
- package/dist/features/profile/components/user-name.d.ts +0 -7
- package/dist/features/profile/components/user-name.d.ts.map +0 -1
- package/dist/features/profile/components/user-name.js +0 -8
- package/dist/features/profile/components/user-username.d.ts +0 -5
- package/dist/features/profile/components/user-username.d.ts.map +0 -1
- package/dist/features/profile/components/user-username.js +0 -7
- package/dist/features/profile/index.d.ts +0 -4
- package/dist/features/profile/index.d.ts.map +0 -1
- package/dist/features/profile/index.js +0 -3
- package/dist/hooks/AuthService.d.ts +0 -14
- package/dist/hooks/AuthService.d.ts.map +0 -1
- package/dist/hooks/AuthService.js +0 -43
- package/dist/hooks/get-user.d.ts +0 -2
- package/dist/hooks/get-user.d.ts.map +0 -1
- package/dist/hooks/get-user.js +0 -28
- package/dist/hooks/getUserById.d.ts +0 -11
- package/dist/hooks/getUserById.d.ts.map +0 -1
- package/dist/hooks/getUserById.js +0 -20
- package/dist/hooks/use-user.d.ts +0 -14
- package/dist/hooks/use-user.d.ts.map +0 -1
- package/dist/hooks/use-user.js +0 -8
- package/dist/hooks/useOxySession.d.ts +0 -26
- package/dist/hooks/useOxySession.d.ts.map +0 -1
- package/dist/hooks/useOxySession.js +0 -45
- package/dist/hooks/usePeableSession.d.ts +0 -26
- package/dist/hooks/usePeableSession.d.ts.map +0 -1
- package/dist/hooks/usePeableSession.js +0 -45
- package/dist/index.css +0 -5
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -6
- package/dist/interfaces/index.d.ts +0 -10
- package/dist/interfaces/index.d.ts.map +0 -1
- package/dist/interfaces/index.js +0 -1
- package/dist/utils/cn.d.ts +0 -3
- package/dist/utils/cn.d.ts.map +0 -1
- package/dist/utils/cn.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/elements/button/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAI1C,UAAU,OAAQ,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM,mFAoBlB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
2
|
-
import { cn } from "../../../../utils/cn";
|
|
3
|
-
export const Button = forwardRef(({ children, className, ...props }, ref) => {
|
|
4
|
-
return (React.createElement("button", { ref: ref, ...props, className: cn("grid cursor-pointer place-items-center rounded-full", "transition-colors duration-200 ease-in-out", "fill-secondary-100 p-[0.5em]", "focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary-100", "fill-secondary-100 [&>svg]:w-h2", "disabled-button", className) }, children));
|
|
5
|
-
});
|
|
6
|
-
Button.displayName = "Button";
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
cursor: pointer;
|
|
3
|
-
display: grid;
|
|
4
|
-
place-items: center;
|
|
5
|
-
padding: 0.5em;
|
|
6
|
-
border-radius: 100vmax;
|
|
7
|
-
transition: background-color 0.15s ease-in-out;
|
|
8
|
-
}
|
|
9
|
-
.container svg {
|
|
10
|
-
width: var(--fs-h2);
|
|
11
|
-
height: var(--fs-h2);
|
|
12
|
-
fill: var(--clr-secondary);
|
|
13
|
-
}
|
|
14
|
-
.container:hover {
|
|
15
|
-
background-color: var(--clr-nav-hover);
|
|
16
|
-
}
|
|
17
|
-
.container:active {
|
|
18
|
-
background-color: var(--clr-nav-active);
|
|
19
|
-
}
|
|
20
|
-
.container:focus-visible {
|
|
21
|
-
outline: 2px solid var(--clr-secondary);
|
|
22
|
-
background-color: var(--clr-nav-hover);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/*# sourceMappingURL=button.module.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/button/components/styles/button.module.scss"],"names":[],"mappings":"AAAA;EACI;EACA;EACA;EACA;EACA;EACA;;AAEA;EACI;EACA;EACA;;AAGJ;EACI;;AAGJ;EACI;;AAGJ;EACI;EACA","file":"button.module.css"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Button } from "./components/button";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ellipsis-wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/elements/ellipsis-wrapper/components/ellipsis-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,eAAe,kBAEzB;IACD,QAAQ,EAAE,MAAM,SAAS,CAAC;CAC3B,sBAUA,CAAC"}
|
package/dist/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;AAEA;EACE;EACA;EACA","file":"ellipses-wrapper.module.css"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/ellipsis-wrapper/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./components/ellipsis-wrapper";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare const ConfirmationModal: ({ heading, paragraph, confirmButtonText, confirmButtonClick, confirmButtonStyle, cancelButtonText, cancelButtonClick, logo, }: {
|
|
3
|
-
heading: string;
|
|
4
|
-
paragraph: string;
|
|
5
|
-
confirmButtonText: string;
|
|
6
|
-
confirmButtonClick: () => void;
|
|
7
|
-
confirmButtonStyle: "delete" | "unfollow" | "logout";
|
|
8
|
-
cancelButtonText: string;
|
|
9
|
-
cancelButtonClick: () => void;
|
|
10
|
-
logo?: React.ReactNode;
|
|
11
|
-
}) => React.JSX.Element;
|
|
12
|
-
//# sourceMappingURL=confirmation-modal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirmation-modal.d.ts","sourceRoot":"","sources":["../../../../../src/components/elements/modal/components/confirmation-modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,eAAO,MAAM,iBAAiB,kIAS3B;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,EAAE,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;IACrD,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,SAAS,CAAC;CACxB,sBAuCA,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from "react";
|
|
2
|
-
import { motion } from "framer-motion";
|
|
3
|
-
import styles from "./styles/confirmation-modal.module.css";
|
|
4
|
-
export const ConfirmationModal = ({ heading, paragraph, confirmButtonText, confirmButtonClick, confirmButtonStyle = "delete", cancelButtonText, cancelButtonClick, logo, }) => {
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
document.body.style.overflow = "hidden";
|
|
7
|
-
document.body.style.paddingRight = "11px";
|
|
8
|
-
return () => {
|
|
9
|
-
document.body.style.overflow = "unset";
|
|
10
|
-
document.body.style.paddingRight = "0";
|
|
11
|
-
};
|
|
12
|
-
}, []);
|
|
13
|
-
return (React.createElement(motion.div, { initial: { opacity: 0, y: 50 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 50 }, transition: { duration: 0.2 }, className: styles.container },
|
|
14
|
-
logo && React.createElement("div", { className: styles.logo }, logo),
|
|
15
|
-
React.createElement("h1", null, heading),
|
|
16
|
-
React.createElement("p", null, paragraph),
|
|
17
|
-
React.createElement("div", { className: styles.buttons },
|
|
18
|
-
React.createElement("button", { onClick: confirmButtonClick, className: `${styles.confirm} ${styles[confirmButtonStyle]}
|
|
19
|
-
}` }, confirmButtonText),
|
|
20
|
-
React.createElement("button", { onClick: cancelButtonClick, className: styles.cancel }, cancelButtonText))));
|
|
21
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare const Modal: ({ children, onClose, closeOnBackdropClick, background, minViewportWidth, maxViewportWidth, disableScroll, focusOnElement, focusAfterClose, }: {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
onClose: () => void;
|
|
5
|
-
closeOnBackdropClick?: boolean;
|
|
6
|
-
background?: string;
|
|
7
|
-
minViewportWidth?: number | null;
|
|
8
|
-
maxViewportWidth?: number | null;
|
|
9
|
-
disableScroll?: boolean;
|
|
10
|
-
focusOnElement?: string | null;
|
|
11
|
-
focusAfterClose?: string | null;
|
|
12
|
-
}) => React.ReactPortal;
|
|
13
|
-
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../../src/components/elements/modal/components/modal.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAKpE,eAAO,MAAM,KAAK,iJAUf;IACD,QAAQ,EAAE,MAAM,SAAS,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC,sBAuJA,CAAC"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2
|
-
/* eslint-disable jsx-a11y/click-events-have-key-events */
|
|
3
|
-
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
4
|
-
"use client";
|
|
5
|
-
import { motion } from "framer-motion";
|
|
6
|
-
import React, { useCallback, useLayoutEffect, useRef } from "react";
|
|
7
|
-
import { createPortal } from "react-dom";
|
|
8
|
-
import styles from "./styles/modal.module.css";
|
|
9
|
-
export const Modal = ({ children, onClose, closeOnBackdropClick = true, background, minViewportWidth = null, maxViewportWidth = null, disableScroll = false, focusOnElement = null, focusAfterClose = null, }) => {
|
|
10
|
-
const modalRef = useRef(null);
|
|
11
|
-
const previouslyFocusedElementRef = useRef(null);
|
|
12
|
-
const handleKeyDown = useCallback((e) => {
|
|
13
|
-
if (e.key === "Escape") {
|
|
14
|
-
onClose();
|
|
15
|
-
}
|
|
16
|
-
if (e.key === "Tab") {
|
|
17
|
-
const modal = modalRef.current;
|
|
18
|
-
if (!modal)
|
|
19
|
-
return;
|
|
20
|
-
const focusableElements = Array.from(modal.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'));
|
|
21
|
-
const firstFocusableElement = focusableElements[0];
|
|
22
|
-
const lastFocusableElement = focusableElements[focusableElements.length - 1];
|
|
23
|
-
if (e.shiftKey) {
|
|
24
|
-
if (document.activeElement === firstFocusableElement) {
|
|
25
|
-
lastFocusableElement.focus();
|
|
26
|
-
e.preventDefault();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
if (document.activeElement === lastFocusableElement) {
|
|
31
|
-
firstFocusableElement.focus();
|
|
32
|
-
e.preventDefault();
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}, [onClose]);
|
|
37
|
-
const handleScroll = useCallback((e) => {
|
|
38
|
-
if (disableScroll) {
|
|
39
|
-
e.preventDefault();
|
|
40
|
-
}
|
|
41
|
-
}, [disableScroll]);
|
|
42
|
-
const handleDisplay = useCallback(() => {
|
|
43
|
-
const modal = modalRef.current;
|
|
44
|
-
if (!modal)
|
|
45
|
-
return;
|
|
46
|
-
const viewportWidth = window.innerWidth;
|
|
47
|
-
if ((minViewportWidth && viewportWidth < minViewportWidth) ||
|
|
48
|
-
(maxViewportWidth && viewportWidth > maxViewportWidth)) {
|
|
49
|
-
onClose();
|
|
50
|
-
}
|
|
51
|
-
}, [onClose, minViewportWidth, maxViewportWidth]);
|
|
52
|
-
useLayoutEffect(() => {
|
|
53
|
-
const modal = modalRef.current;
|
|
54
|
-
if (!modal)
|
|
55
|
-
return;
|
|
56
|
-
const focusableElements = Array.from(modal.querySelectorAll('a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'));
|
|
57
|
-
const firstFocusableElement = focusableElements?.[0];
|
|
58
|
-
previouslyFocusedElementRef.current = document.activeElement;
|
|
59
|
-
modal?.addEventListener("keydown", handleKeyDown);
|
|
60
|
-
if (focusOnElement) {
|
|
61
|
-
const elementToFocus = modal.querySelector(focusOnElement);
|
|
62
|
-
elementToFocus?.focus();
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
firstFocusableElement?.focus();
|
|
66
|
-
}
|
|
67
|
-
if (disableScroll) {
|
|
68
|
-
document.body.style.overflow = "hidden";
|
|
69
|
-
document.body.style.paddingRight = "11px";
|
|
70
|
-
window.addEventListener("scroll", handleScroll);
|
|
71
|
-
}
|
|
72
|
-
if (minViewportWidth || maxViewportWidth) {
|
|
73
|
-
handleDisplay();
|
|
74
|
-
}
|
|
75
|
-
return () => {
|
|
76
|
-
modal?.removeEventListener("keydown", handleKeyDown);
|
|
77
|
-
if (focusAfterClose) {
|
|
78
|
-
const elementToFocus = document.querySelector(focusAfterClose);
|
|
79
|
-
elementToFocus?.focus();
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
previouslyFocusedElementRef.current?.focus();
|
|
83
|
-
}
|
|
84
|
-
if (disableScroll) {
|
|
85
|
-
document.body.style.overflow = "";
|
|
86
|
-
document.body.style.paddingRight = "";
|
|
87
|
-
window.removeEventListener("scroll", handleScroll);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
}, [
|
|
91
|
-
onClose,
|
|
92
|
-
disableScroll,
|
|
93
|
-
handleKeyDown,
|
|
94
|
-
handleScroll,
|
|
95
|
-
handleDisplay,
|
|
96
|
-
minViewportWidth,
|
|
97
|
-
maxViewportWidth,
|
|
98
|
-
focusOnElement,
|
|
99
|
-
focusAfterClose,
|
|
100
|
-
]);
|
|
101
|
-
const backdropStyle = {
|
|
102
|
-
backgroundColor: background === "none" ? "transparent" : "var(--clr-modal-background)",
|
|
103
|
-
};
|
|
104
|
-
return createPortal(React.createElement(motion.div, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: (e) => {
|
|
105
|
-
e.stopPropagation();
|
|
106
|
-
if (e.currentTarget === e.target && closeOnBackdropClick)
|
|
107
|
-
onClose();
|
|
108
|
-
}, onKeyDown: (e) => {
|
|
109
|
-
e.stopPropagation();
|
|
110
|
-
}, ref: modalRef, className: `${styles.container}`, style: backdropStyle, id: "dialog", role: "dialog", "aria-modal": "true" }, children), document.body);
|
|
111
|
-
};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
position: fixed;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
bottom: 0;
|
|
6
|
-
right: 0;
|
|
7
|
-
width: fit-content;
|
|
8
|
-
max-width: 320px;
|
|
9
|
-
height: fit-content;
|
|
10
|
-
margin: auto;
|
|
11
|
-
background-color: var(--clr-background);
|
|
12
|
-
padding: 2em;
|
|
13
|
-
border-radius: 1rem;
|
|
14
|
-
}
|
|
15
|
-
.container .logo {
|
|
16
|
-
display: grid;
|
|
17
|
-
place-items: center;
|
|
18
|
-
margin-bottom: 1em;
|
|
19
|
-
}
|
|
20
|
-
.container .logo svg {
|
|
21
|
-
width: var(--fs-kilo);
|
|
22
|
-
height: var(--fs-kilo);
|
|
23
|
-
fill: var(--clr-primary);
|
|
24
|
-
}
|
|
25
|
-
.container h1 {
|
|
26
|
-
font-size: var(--fs-h2);
|
|
27
|
-
font-weight: var(--fw-700);
|
|
28
|
-
margin-bottom: 0.5em;
|
|
29
|
-
}
|
|
30
|
-
.container p {
|
|
31
|
-
font-size: var(--fs-milli);
|
|
32
|
-
color: var(--clr-tertiary);
|
|
33
|
-
margin-bottom: 2rem;
|
|
34
|
-
line-height: 1.4;
|
|
35
|
-
}
|
|
36
|
-
.container .buttons {
|
|
37
|
-
display: grid;
|
|
38
|
-
gap: 0.8rem;
|
|
39
|
-
}
|
|
40
|
-
.container .buttons button {
|
|
41
|
-
display: grid;
|
|
42
|
-
place-items: center;
|
|
43
|
-
padding: 0.9em;
|
|
44
|
-
border-radius: 100vmax;
|
|
45
|
-
font-size: var(--fs-milli);
|
|
46
|
-
font-weight: var(--fw-700);
|
|
47
|
-
cursor: pointer;
|
|
48
|
-
transition: background-color 0.2s ease;
|
|
49
|
-
}
|
|
50
|
-
.container .buttons .delete {
|
|
51
|
-
background-color: var(--clr-red);
|
|
52
|
-
}
|
|
53
|
-
.container .buttons .delete:hover {
|
|
54
|
-
background-color: var(--clr-red-hover);
|
|
55
|
-
}
|
|
56
|
-
.container .buttons .delete:active {
|
|
57
|
-
background-color: var(--clr-red-active);
|
|
58
|
-
}
|
|
59
|
-
.container .buttons .delete:focus-visible {
|
|
60
|
-
outline: 2px solid var(--clr-secondary);
|
|
61
|
-
background-color: var(--clr-red-hover);
|
|
62
|
-
}
|
|
63
|
-
.container .buttons .unfollow {
|
|
64
|
-
background-color: var(--clr-secondary);
|
|
65
|
-
color: var(--clr-background);
|
|
66
|
-
}
|
|
67
|
-
.container .buttons .unfollow:hover {
|
|
68
|
-
background-color: var(--clr-secondary-hover);
|
|
69
|
-
}
|
|
70
|
-
.container .buttons .unfollow:active {
|
|
71
|
-
background-color: var(--clr-secondary-active);
|
|
72
|
-
}
|
|
73
|
-
.container .buttons .unfollow:focus-visible {
|
|
74
|
-
outline: 2px solid var(--clr-secondary);
|
|
75
|
-
}
|
|
76
|
-
.container .buttons .signout {
|
|
77
|
-
background-color: var(--clr-secondary);
|
|
78
|
-
color: var(--clr-background);
|
|
79
|
-
}
|
|
80
|
-
.container .buttons .signout:hover {
|
|
81
|
-
background-color: var(--clr-signout-logout-hover);
|
|
82
|
-
}
|
|
83
|
-
.container .buttons .signout:active {
|
|
84
|
-
background-color: var(--clr-signout-logout-active);
|
|
85
|
-
}
|
|
86
|
-
.container .buttons .signout:focus-visible {
|
|
87
|
-
outline: 2px solid var(--clr-secondary);
|
|
88
|
-
background-color: var(--clr-signout-logout-hover);
|
|
89
|
-
}
|
|
90
|
-
.container .buttons .cancel {
|
|
91
|
-
color: var(--clr-secondary);
|
|
92
|
-
border: 1px solid var(--clr-tertiary);
|
|
93
|
-
}
|
|
94
|
-
.container .buttons .cancel:hover {
|
|
95
|
-
background-color: var(--clr-trends-hover);
|
|
96
|
-
}
|
|
97
|
-
.container .buttons .cancel:active {
|
|
98
|
-
background-color: var(--clr-trends-active);
|
|
99
|
-
}
|
|
100
|
-
.container .buttons .cancel:focus-visible {
|
|
101
|
-
outline: 2px solid var(--clr-secondary);
|
|
102
|
-
background-color: var(--clr-trends-hover);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/*# sourceMappingURL=confirmation-modal.module.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/modal/components/styles/confirmation-modal.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA","file":"confirmation-modal.module.css"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/modal/components/styles/modal.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA","file":"modal.module.css"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-track-position.d.ts","sourceRoot":"","sources":["../../../../../src/components/elements/modal/hooks/use-track-position.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,gCAG1B;IACD,SAAS,EAAE,MAAM,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,mBAuCA,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useState, useLayoutEffect } from "react";
|
|
3
|
-
export const useTrackPosition = ({ buttonRef, trackScroll = false, }) => {
|
|
4
|
-
const [buttonBoundaries, setButtonBoundaries] = useState(buttonRef?.current?.getBoundingClientRect() ?? null);
|
|
5
|
-
useLayoutEffect(() => {
|
|
6
|
-
const handleResize = () => {
|
|
7
|
-
if (buttonRef?.current) {
|
|
8
|
-
setButtonBoundaries(buttonRef.current.getBoundingClientRect());
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
window.addEventListener("resize", handleResize);
|
|
12
|
-
if (trackScroll) {
|
|
13
|
-
window.addEventListener("scroll", handleResize);
|
|
14
|
-
}
|
|
15
|
-
return () => {
|
|
16
|
-
window.removeEventListener("resize", handleResize);
|
|
17
|
-
if (trackScroll) {
|
|
18
|
-
window.removeEventListener("scroll", handleResize);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}, [
|
|
22
|
-
buttonRef,
|
|
23
|
-
buttonRef.current?.getBoundingClientRect,
|
|
24
|
-
trackScroll,
|
|
25
|
-
setButtonBoundaries,
|
|
26
|
-
]);
|
|
27
|
-
useLayoutEffect(() => {
|
|
28
|
-
setButtonBoundaries(buttonRef.current?.getBoundingClientRect() ?? null);
|
|
29
|
-
}, [
|
|
30
|
-
buttonRef,
|
|
31
|
-
buttonRef.current?.getBoundingClientRect,
|
|
32
|
-
setButtonBoundaries,
|
|
33
|
-
]);
|
|
34
|
-
return buttonBoundaries;
|
|
35
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/elements/modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC"}
|
package/dist/config/index.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
declare const envSchema: z.ZodObject<{
|
|
3
|
-
NODE_ENV: z.ZodEnum<["development", "production"]>;
|
|
4
|
-
OXY_AUTH_URL: z.ZodString;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
NODE_ENV: "development" | "production";
|
|
7
|
-
OXY_AUTH_URL: string;
|
|
8
|
-
}, {
|
|
9
|
-
NODE_ENV: "development" | "production";
|
|
10
|
-
OXY_AUTH_URL: string;
|
|
11
|
-
}>;
|
|
12
|
-
declare global {
|
|
13
|
-
namespace NodeJS {
|
|
14
|
-
interface ProcessEnv extends z.infer<typeof envSchema> {
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
export declare const NODE_ENV: "development" | "production";
|
|
19
|
-
export declare const OXY_AUTH_URL: string;
|
|
20
|
-
export {};
|
|
21
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,SAAS;;;;;;;;;EAGb,CAAC;AAEH,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,MAAM,CAAC;QACf,UAAU,UAAW,SAAQ,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC;SAAG;KAC1D;CACF;AAED,eAAO,MAAM,QAAQ,8BAAuB,CAAC;AAC7C,eAAO,MAAM,YAAY,QACoD,CAAC"}
|
package/dist/config/index.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
const envSchema = z.object({
|
|
3
|
-
NODE_ENV: z.enum(["development", "production"]),
|
|
4
|
-
OXY_AUTH_URL: z.string().url(),
|
|
5
|
-
});
|
|
6
|
-
export const NODE_ENV = process.env.NODE_ENV;
|
|
7
|
-
export const OXY_AUTH_URL = NODE_ENV === "production" ? "https://auth.oxy.so" : "http://localhost:3001";
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface IAvatar extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
3
|
-
userImage: string | null | undefined;
|
|
4
|
-
className?: string;
|
|
5
|
-
width?: number;
|
|
6
|
-
height?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const Avatar: ({ userImage, className, ...props }: IAvatar) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../src/features/profile/components/avatar.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,OAAQ,SAAQ,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC;IACjE,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,MAAM,uCAAwC,OAAO,sBAiBjE,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import Image from "next/image";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { cn } from "../../../utils/cn";
|
|
4
|
-
export const Avatar = ({ userImage, className, ...props }) => {
|
|
5
|
-
return (React.createElement("div", { className: cn("relative aspect-square w-[calc(var(--tw-fs-kilo)+9px)] overflow-hidden rounded-full", className) },
|
|
6
|
-
React.createElement(Image, { ...props, src: userImage || `/user_placeholder.png`, alt: "profile picture", fill: true, className: "block size-full object-cover" })));
|
|
7
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: var(--avatar-width);
|
|
4
|
-
border-radius: 50%;
|
|
5
|
-
overflow: hidden;
|
|
6
|
-
aspect-ratio: 1/1;
|
|
7
|
-
}
|
|
8
|
-
.container img {
|
|
9
|
-
display: block;
|
|
10
|
-
width: 100%;
|
|
11
|
-
height: 100%;
|
|
12
|
-
object-fit: cover;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/*# sourceMappingURL=avatar.module.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/features/profile/components/styles/avatar.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA","file":"avatar.module.css"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
font-size: var(--fs-milli);
|
|
3
|
-
font-weight: var(--fw-500);
|
|
4
|
-
color: var(--clr-secondary);
|
|
5
|
-
display: grid;
|
|
6
|
-
grid-auto-flow: column;
|
|
7
|
-
}
|
|
8
|
-
.container span {
|
|
9
|
-
white-space: nowrap;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
text-overflow: ellipsis;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.hover:hover {
|
|
15
|
-
text-decoration: underline;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/*# sourceMappingURL=user-name.module.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/features/profile/components/styles/user-name.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAKF;EACE","file":"user-name.module.css"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../../../src/features/profile/components/styles/user-username.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA","file":"user-username.module.css"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-name.d.ts","sourceRoot":"","sources":["../../../../src/features/profile/components/user-name.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,eAAO,MAAM,QAAQ,iCAIlB;IACD,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B,sBAOA,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { VerifiedIcon } from "../../../assets/verified-icon";
|
|
3
|
-
import styles from "./styles/user-name.module.css";
|
|
4
|
-
export const UserName = ({ name, isVerified = false, hover = false, }) => {
|
|
5
|
-
return (React.createElement("div", { className: `${styles.container} ${hover ? styles.hover : ""}` },
|
|
6
|
-
name && React.createElement("span", null, name),
|
|
7
|
-
isVerified && React.createElement(VerifiedIcon, null)));
|
|
8
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-username.d.ts","sourceRoot":"","sources":["../../../../src/features/profile/components/user-username.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,YAAY,kBAEtB;IACD,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,sBAEA,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/profile/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC"}
|