@mindlogic-ai/logician-ui 4.0.0-alpha.32 → 4.0.0-alpha.34
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/Modal/Modal.js +1 -1
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/Modal.mjs +1 -1
- package/dist/components/Modal/Modal.mjs.map +1 -1
- package/dist/components/Modal/Modal.types.d.ts +10 -2
- package/dist/components/Modal/Modal.types.d.ts.map +1 -1
- package/dist/components/Modal/ModalContext.js +1 -1
- package/dist/components/Modal/ModalContext.js.map +1 -1
- package/dist/components/Modal/ModalContext.mjs +1 -1
- package/dist/components/Modal/ModalContext.mjs.map +1 -1
- package/dist/styles.d.ts +21 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +9 -0
- package/dist/styles.js.map +1 -0
- package/dist/styles.mjs +3 -0
- package/dist/styles.mjs.map +1 -0
- package/package.json +6 -1
- package/src/components/Modal/Modal.stories.tsx +7 -6
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Modal/Modal.types.ts +10 -2
- package/src/components/Modal/ModalContext.ts +1 -1
- package/src/styles.ts +20 -0
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var react = require('@chakra-ui/react');
|
|
7
7
|
var ModalContext = require('./ModalContext.js');
|
|
8
8
|
|
|
9
|
-
const Modal = ({ children, open, onOpenChange, portalProps, fullScreenOnMobile =
|
|
9
|
+
const Modal = ({ children, open, onOpenChange, portalProps, fullScreenOnMobile = false, ...rest }) => {
|
|
10
10
|
const ctx = React.useMemo(() => ({ fullScreenOnMobile }), [fullScreenOnMobile]);
|
|
11
11
|
return (jsxRuntime.jsx(react.Dialog.Root, { open: open, onOpenChange: onOpenChange, placement: "center", closeOnInteractOutside: true, ...rest, children: jsxRuntime.jsxs(react.Portal, { ...portalProps, children: [jsxRuntime.jsx(react.Dialog.Backdrop, { _open: { animationDuration: 'motion.base' }, _closed: { animationDuration: 'fast' } }), jsxRuntime.jsx(ModalContext.ModalContext.Provider, { value: ctx, children: children })] }) }));
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":[null],"names":["useMemo","_jsx","Dialog","_jsxs","Portal","ModalContext"],"mappings":";;;;;;;;MAMa,KAAK,GAAG,CAAC,EACpB,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"Modal.js","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":[null],"names":["useMemo","_jsx","Dialog","_jsxs","Portal","ModalContext"],"mappings":";;;;;;;;MAMa,KAAK,GAAG,CAAC,EACpB,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,kBAAkB,GAAG,KAAK,EAC1B,GAAG,IAAI,EACI,KAAI;AACf,IAAA,MAAM,GAAG,GAAGA,aAAO,CAAC,OAAO,EAAE,kBAAkB,EAAE,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAEzE,IAAA,QACEC,cAAA,CAACC,YAAM,CAAC,IAAI,EAAA,EACV,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAC,QAAQ,EAClB,sBAAsB,EAAA,IAAA,EAAA,GAClB,IAAI,EAAA,QAAA,EAERC,eAAA,CAACC,YAAM,EAAA,EAAA,GAAK,WAAW,EAAA,QAAA,EAAA,CAIrBH,cAAA,CAACC,YAAM,CAAC,QAAQ,EAAA,EACd,KAAK,EAAE,EAAE,iBAAiB,EAAE,aAAa,EAAE,EAC3C,OAAO,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,EAAA,CACtC,EACFD,cAAA,CAACI,yBAAY,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,GAAG,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAyB,CAAA,EAAA,CAC9D,EAAA,CACG;AAElB;;;;"}
|
|
@@ -4,7 +4,7 @@ import { useMemo } from 'react';
|
|
|
4
4
|
import { Dialog, Portal } from '@chakra-ui/react';
|
|
5
5
|
import { ModalContext } from './ModalContext.mjs';
|
|
6
6
|
|
|
7
|
-
const Modal = ({ children, open, onOpenChange, portalProps, fullScreenOnMobile =
|
|
7
|
+
const Modal = ({ children, open, onOpenChange, portalProps, fullScreenOnMobile = false, ...rest }) => {
|
|
8
8
|
const ctx = useMemo(() => ({ fullScreenOnMobile }), [fullScreenOnMobile]);
|
|
9
9
|
return (jsx(Dialog.Root, { open: open, onOpenChange: onOpenChange, placement: "center", closeOnInteractOutside: true, ...rest, children: jsxs(Portal, { ...portalProps, children: [jsx(Dialog.Backdrop, { _open: { animationDuration: 'motion.base' }, _closed: { animationDuration: 'fast' } }), jsx(ModalContext.Provider, { value: ctx, children: children })] }) }));
|
|
10
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.mjs","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;MAMa,KAAK,GAAG,CAAC,EACpB,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"Modal.mjs","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;MAMa,KAAK,GAAG,CAAC,EACpB,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,WAAW,EACX,kBAAkB,GAAG,KAAK,EAC1B,GAAG,IAAI,EACI,KAAI;AACf,IAAA,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,EAAE,kBAAkB,EAAE,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAEzE,IAAA,QACEA,GAAA,CAAC,MAAM,CAAC,IAAI,EAAA,EACV,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAC,QAAQ,EAClB,sBAAsB,EAAA,IAAA,EAAA,GAClB,IAAI,EAAA,QAAA,EAERC,IAAA,CAAC,MAAM,EAAA,EAAA,GAAK,WAAW,EAAA,QAAA,EAAA,CAIrBD,GAAA,CAAC,MAAM,CAAC,QAAQ,EAAA,EACd,KAAK,EAAE,EAAE,iBAAiB,EAAE,aAAa,EAAE,EAC3C,OAAO,EAAE,EAAE,iBAAiB,EAAE,MAAM,EAAE,EAAA,CACtC,EACFA,GAAA,CAAC,YAAY,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,GAAG,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAyB,CAAA,EAAA,CAC9D,EAAA,CACG;AAElB;;;;"}
|
|
@@ -2,8 +2,16 @@ import { Dialog, PortalProps } from '@chakra-ui/react';
|
|
|
2
2
|
export type ModalProps = Dialog.RootProps & {
|
|
3
3
|
portalProps?: PortalProps;
|
|
4
4
|
/**
|
|
5
|
-
* When true, the modal becomes fullscreen on mobile viewports
|
|
6
|
-
*
|
|
5
|
+
* When true, the modal becomes fullscreen on mobile viewports
|
|
6
|
+
* (100vw x 100dvh, no border-radius). When false it keeps the dialog
|
|
7
|
+
* shape and applies a horizontal margin instead.
|
|
8
|
+
*
|
|
9
|
+
* Defaults to false: a full-screen takeover suits long or immersive
|
|
10
|
+
* content (a file picker, a course switcher), not the confirm dialogs
|
|
11
|
+
* and short forms that make up most modals. Opt in where the takeover
|
|
12
|
+
* is the point.
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
7
15
|
*/
|
|
8
16
|
fullScreenOnMobile?: boolean;
|
|
9
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.types.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,GAAG;IAG1C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B
|
|
1
|
+
{"version":3,"file":"Modal.types.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,GAAG;IAG1C,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalContext.js","sources":["../../../src/components/Modal/ModalContext.ts"],"sourcesContent":[null],"names":["createContext","useContext"],"mappings":";;;;;AAQO,MAAM,YAAY,GAAGA,mBAAa,CAAoB;AAC3D,IAAA,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"ModalContext.js","sources":["../../../src/components/Modal/ModalContext.ts"],"sourcesContent":[null],"names":["createContext","useContext"],"mappings":";;;;;AAQO,MAAM,YAAY,GAAGA,mBAAa,CAAoB;AAC3D,IAAA,kBAAkB,EAAE,KAAK;AAC1B,CAAA;AAEM,MAAM,eAAe,GAAG,MAAMC,gBAAU,CAAC,YAAY;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalContext.mjs","sources":["../../../src/components/Modal/ModalContext.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAQO,MAAM,YAAY,GAAG,aAAa,CAAoB;AAC3D,IAAA,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"ModalContext.mjs","sources":["../../../src/components/Modal/ModalContext.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAQO,MAAM,YAAY,GAAG,aAAa,CAAoB;AAC3D,IAAA,kBAAkB,EAAE,KAAK;AAC1B,CAAA;AAEM,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,YAAY;;;;"}
|
package/dist/styles.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure style objects, importable without the component barrel.
|
|
3
|
+
*
|
|
4
|
+
* The root entry (`@mindlogic-ai/logician-ui`) pulls in every component, and
|
|
5
|
+
* with them side-effect CSS imports such as `katex/dist/katex.min.css`. A
|
|
6
|
+
* bundler handles that; a plain Node loader does not, so a consumer's unit test
|
|
7
|
+
* that imports a style constant from the root fails to load the module at all
|
|
8
|
+
* (`Unknown file extension ".css"`). Importing a style object should not cost
|
|
9
|
+
* the whole design system.
|
|
10
|
+
*
|
|
11
|
+
* Everything re-exported here must stay free of runtime imports — types only —
|
|
12
|
+
* so this entry brings in nothing but the objects themselves.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { noZoomOnFocus } from '@mindlogic-ai/logician-ui/styles';
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* These names are also on the root entry, so existing imports keep working.
|
|
19
|
+
*/
|
|
20
|
+
export { noZoomOnFocus } from './theme/formControls';
|
|
21
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/styles.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/dist/styles.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mindlogic-ai/logician-ui",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.34",
|
|
4
4
|
"description": "A comprehensive React design system built on Chakra UI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
"types": "./dist/icons.d.ts",
|
|
16
16
|
"import": "./dist/icons.mjs",
|
|
17
17
|
"require": "./dist/icons.js"
|
|
18
|
+
},
|
|
19
|
+
"./styles": {
|
|
20
|
+
"types": "./dist/styles.d.ts",
|
|
21
|
+
"import": "./dist/styles.mjs",
|
|
22
|
+
"require": "./dist/styles.js"
|
|
18
23
|
}
|
|
19
24
|
},
|
|
20
25
|
"files": [
|
|
@@ -482,13 +482,14 @@ export const PreventOutsideClick: Story = {
|
|
|
482
482
|
/**
|
|
483
483
|
* 모바일 풀스크린 모달 (기본값)
|
|
484
484
|
*
|
|
485
|
-
* fullScreenOnMobile
|
|
485
|
+
* fullScreenOnMobile을 true로 주면 모바일 뷰포트에서
|
|
486
486
|
* 모달이 전체 화면으로 표시됩니다 (100vw × 100dvh, border-radius 0).
|
|
487
|
+
* 기본값은 false이니 전체 화면이 필요한 곳에서만 켜세요.
|
|
487
488
|
* 브라우저를 좁혀서 확인해보세요.
|
|
488
489
|
*/
|
|
489
490
|
export const FullScreenOnMobile: Story = {
|
|
490
491
|
args: {
|
|
491
|
-
headerTitle: 'Full Screen on Mobile (
|
|
492
|
+
headerTitle: 'Full Screen on Mobile (opt-in)',
|
|
492
493
|
},
|
|
493
494
|
render: (args) => {
|
|
494
495
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -507,7 +508,7 @@ export const FullScreenOnMobile: Story = {
|
|
|
507
508
|
<ModalCloseButton />
|
|
508
509
|
<ModalBody>
|
|
509
510
|
모바일에서 이 모달은 전체 화면으로 표시됩니다. 브라우저 창을 좁혀서
|
|
510
|
-
확인해보세요. fullScreenOnMobile은 기본값이
|
|
511
|
+
확인해보세요. fullScreenOnMobile은 기본값이 false라 직접 켜야 합니다.
|
|
511
512
|
</ModalBody>
|
|
512
513
|
<ModalFooter>
|
|
513
514
|
<Button variant="ghost" onClick={() => setIsOpen(false)}>
|
|
@@ -527,13 +528,13 @@ export const FullScreenOnMobile: Story = {
|
|
|
527
528
|
/**
|
|
528
529
|
* 모바일에서 인라인 모달
|
|
529
530
|
*
|
|
530
|
-
* fullScreenOnMobile={false}이면 모바일에서도 풀스크린이 아닌
|
|
531
|
+
* fullScreenOnMobile={false}(기본값)이면 모바일에서도 풀스크린이 아닌
|
|
531
532
|
* 일반 모달로 표시되며, 좌우 마진(mx: 4)이 적용됩니다.
|
|
532
|
-
* Confirm 모달 등
|
|
533
|
+
* Confirm 모달 등 대부분의 모달이 여기에 해당합니다.
|
|
533
534
|
*/
|
|
534
535
|
export const NoFullScreenOnMobile: Story = {
|
|
535
536
|
args: {
|
|
536
|
-
headerTitle: 'Inline on Mobile',
|
|
537
|
+
headerTitle: 'Inline on Mobile (default)',
|
|
537
538
|
},
|
|
538
539
|
render: (args) => {
|
|
539
540
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -5,8 +5,16 @@ export type ModalProps = Dialog.RootProps & {
|
|
|
5
5
|
// Added for backwards compatibility.
|
|
6
6
|
portalProps?: PortalProps;
|
|
7
7
|
/**
|
|
8
|
-
* When true, the modal becomes fullscreen on mobile viewports
|
|
9
|
-
*
|
|
8
|
+
* When true, the modal becomes fullscreen on mobile viewports
|
|
9
|
+
* (100vw x 100dvh, no border-radius). When false it keeps the dialog
|
|
10
|
+
* shape and applies a horizontal margin instead.
|
|
11
|
+
*
|
|
12
|
+
* Defaults to false: a full-screen takeover suits long or immersive
|
|
13
|
+
* content (a file picker, a course switcher), not the confirm dialogs
|
|
14
|
+
* and short forms that make up most modals. Opt in where the takeover
|
|
15
|
+
* is the point.
|
|
16
|
+
*
|
|
17
|
+
* @default false
|
|
10
18
|
*/
|
|
11
19
|
fullScreenOnMobile?: boolean;
|
|
12
20
|
};
|
package/src/styles.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure style objects, importable without the component barrel.
|
|
3
|
+
*
|
|
4
|
+
* The root entry (`@mindlogic-ai/logician-ui`) pulls in every component, and
|
|
5
|
+
* with them side-effect CSS imports such as `katex/dist/katex.min.css`. A
|
|
6
|
+
* bundler handles that; a plain Node loader does not, so a consumer's unit test
|
|
7
|
+
* that imports a style constant from the root fails to load the module at all
|
|
8
|
+
* (`Unknown file extension ".css"`). Importing a style object should not cost
|
|
9
|
+
* the whole design system.
|
|
10
|
+
*
|
|
11
|
+
* Everything re-exported here must stay free of runtime imports — types only —
|
|
12
|
+
* so this entry brings in nothing but the objects themselves.
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { noZoomOnFocus } from '@mindlogic-ai/logician-ui/styles';
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* These names are also on the root entry, so existing imports keep working.
|
|
19
|
+
*/
|
|
20
|
+
export { noZoomOnFocus } from './theme/formControls';
|