@nexus-cross/design-system 2.0.2 → 2.0.4
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/claude-rules/nexus/CLAUDE.md +109 -0
- package/cursor-rules/CLAUDE.md +5 -0
- package/cursor-rules/nexus-project-setup.mdc +106 -6
- package/cursor-rules/nexus-ui-api.mdc +60 -3
- package/dist/chunks/{chunk-JICW6KWH.js → chunk-7G7U4DP2.js} +1 -1
- package/dist/chunks/{chunk-3VFBPFZF.mjs → chunk-7WWQ5DS3.mjs} +10 -5
- package/dist/chunks/{chunk-HHXDOKXY.js → chunk-F24AY3HI.js} +2 -2
- package/dist/chunks/{chunk-6H7V2I3X.mjs → chunk-FY2N42XN.mjs} +6 -1
- package/dist/chunks/{chunk-3NSJMG3G.mjs → chunk-JFZLKFFM.mjs} +1 -1
- package/dist/chunks/{chunk-XEHFB62A.js → chunk-NRO7I4EI.js} +2 -6
- package/dist/chunks/{chunk-LNC3TV6N.mjs → chunk-P4JV4WRB.mjs} +1 -1
- package/dist/chunks/{chunk-U53UA76K.js → chunk-R744EATX.js} +26 -21
- package/dist/chunks/{chunk-HUPAHDJ7.js → chunk-TAHDSSA6.js} +6 -0
- package/dist/chunks/{chunk-YEWKPWK3.mjs → chunk-U6OEUBIF.mjs} +2 -6
- package/dist/chunks/{chunk-VCN7DMCQ.js → chunk-USPFWZ7H.js} +1 -1
- package/dist/chunks/{chunk-U56AGSLE.mjs → chunk-WBCXHGRL.mjs} +2 -2
- package/dist/hooks/useCheckDevice.d.ts.map +1 -1
- package/dist/hooks/useCheckDevice.js +2 -2
- package/dist/hooks/useCheckDevice.mjs +1 -1
- package/dist/hooks/useDraggableBottomSheet.js +2 -2
- package/dist/hooks/useDraggableBottomSheet.mjs +1 -1
- package/dist/hooks/useModal.js +2 -2
- package/dist/hooks/useModal.mjs +1 -1
- package/dist/image-upload.js +3 -3
- package/dist/image-upload.mjs +1 -1
- package/dist/index.js +19 -19
- package/dist/index.mjs +5 -5
- package/dist/modal/components/ModalContainer.d.ts.map +1 -1
- package/dist/modal/components/ModalTemplate.d.ts +1 -0
- package/dist/modal/components/ModalTemplate.d.ts.map +1 -1
- package/dist/modal/constants.d.ts +14 -0
- package/dist/modal/constants.d.ts.map +1 -1
- package/dist/modal/index.js +14 -14
- package/dist/modal/index.mjs +4 -4
- package/dist/schemas/_all.json +9 -4
- package/dist/schemas/modal.d.ts +3 -0
- package/dist/schemas/modal.d.ts.map +1 -1
- package/dist/schemas/modalTemplate.json +9 -4
- package/dist/schemas.js +17 -4
- package/dist/schemas.mjs +17 -4
- package/dist/styles/.generated/built.d.ts +1 -1
- package/dist/styles/.generated/built.d.ts.map +1 -1
- package/dist/styles/layer.js +2 -2
- package/dist/styles/layer.mjs +1 -1
- package/dist/styles.css +15 -3
- package/dist/styles.js +2 -2
- package/dist/styles.layered.css +15 -3
- package/dist/styles.mjs +1 -1
- package/dist/tokens/company.css +1 -1
- package/dist/tokens/css.css +1 -1
- package/dist/tokens-domains/gamehub-vars.css +122 -0
- package/dist/tokens-domains/gamehub.css +121 -0
- package/dist/tokens-domains/prediction-vars.css +1 -1
- package/dist/tokens-domains/prediction.css +1 -1
- package/package.json +4 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useDraggableBottomSheet } from './chunk-
|
|
1
|
+
import { useDraggableBottomSheet } from './chunk-WBCXHGRL.mjs';
|
|
2
2
|
import { useDraggableWindow } from './chunk-4J3GCZ7W.mjs';
|
|
3
3
|
import { scrollRelease, scrollFreeze } from './chunk-54IA2P2Z.mjs';
|
|
4
|
-
import { useCheckDevice_default } from './chunk-
|
|
4
|
+
import { useCheckDevice_default } from './chunk-U6OEUBIF.mjs';
|
|
5
5
|
import { useClickOutside_default } from './chunk-OTGS6BDQ.mjs';
|
|
6
|
-
import { Modal_default } from './chunk-
|
|
6
|
+
import { Modal_default, defaultBreakPoints } from './chunk-FY2N42XN.mjs';
|
|
7
7
|
import { cn } from './chunk-MCKOWMLS.mjs';
|
|
8
8
|
import React, { forwardRef, useState, useMemo, useCallback, useEffect, useImperativeHandle, useRef, Suspense } from 'react';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -184,7 +184,11 @@ var ModalPortal = ({ children, selector }) => {
|
|
|
184
184
|
return mounted && element && children ? createPortal(children, element) : null;
|
|
185
185
|
};
|
|
186
186
|
var ModalPortal_default = ModalPortal;
|
|
187
|
-
var ModalContainer = ({
|
|
187
|
+
var ModalContainer = ({
|
|
188
|
+
className = "",
|
|
189
|
+
breakPoints = defaultBreakPoints,
|
|
190
|
+
...defaultOption
|
|
191
|
+
}) => {
|
|
188
192
|
const [modals, setModals] = useState(Modal_default.modalList);
|
|
189
193
|
const setModalClose = useCallback((params) => {
|
|
190
194
|
if (!params) return;
|
|
@@ -408,6 +412,7 @@ var ModalTemplate = forwardRef(
|
|
|
408
412
|
desc,
|
|
409
413
|
hideHeader = false,
|
|
410
414
|
hideFooter = true,
|
|
415
|
+
hideCloseBtn = false,
|
|
411
416
|
dimClose,
|
|
412
417
|
footer,
|
|
413
418
|
close,
|
|
@@ -562,7 +567,7 @@ var ModalTemplate = forwardRef(
|
|
|
562
567
|
ref: modalHeaderRef,
|
|
563
568
|
onMouseDown: isDraggable && enableDrag ? windowDrag.handleMouseDown : void 0,
|
|
564
569
|
children: [
|
|
565
|
-
/* @__PURE__ */ jsx(
|
|
570
|
+
!hideCloseBtn && /* @__PURE__ */ jsx(
|
|
566
571
|
"button",
|
|
567
572
|
{
|
|
568
573
|
type: "button",
|
|
@@ -25,9 +25,9 @@ function useDraggableBottomSheet({
|
|
|
25
25
|
if (!enabled) return;
|
|
26
26
|
const touch = e.touches[0];
|
|
27
27
|
const target = e.currentTarget;
|
|
28
|
-
const modalInner = target.querySelector(".modal-inner");
|
|
28
|
+
const modalInner = target.querySelector(".nexus-modal-inner");
|
|
29
29
|
if (!modalInner) return;
|
|
30
|
-
const scrollableElement = e.target.closest(".modal-body");
|
|
30
|
+
const scrollableElement = e.target.closest(".nexus-modal-body");
|
|
31
31
|
if (scrollableElement && scrollableElement.scrollTop > 0) return;
|
|
32
32
|
dragStateRef.current = {
|
|
33
33
|
isDragging: true,
|
|
@@ -8,6 +8,11 @@ var defaultModalOption = {
|
|
|
8
8
|
animation: { name: "pop-fade", duration: 300 },
|
|
9
9
|
dimCloseEnable: true
|
|
10
10
|
};
|
|
11
|
+
var defaultBreakPoints = {
|
|
12
|
+
isDesktop: "(min-width: 1280px)",
|
|
13
|
+
isTablet: "screen and (min-width: 768px) and (max-width: 1279px)",
|
|
14
|
+
isMobile: "(max-width: 767px)"
|
|
15
|
+
};
|
|
11
16
|
|
|
12
17
|
// src/modal/Modal.ts
|
|
13
18
|
var Modal = class {
|
|
@@ -267,4 +272,4 @@ function useModal() {
|
|
|
267
272
|
};
|
|
268
273
|
}
|
|
269
274
|
|
|
270
|
-
export { Modal_default, useModal };
|
|
275
|
+
export { Modal_default, defaultBreakPoints, useModal };
|