@sellmate/design-system-react 1.0.64 → 1.0.66
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.
|
@@ -9,7 +9,11 @@ import { createComponent } from '@stencil/react-output-target/ssr';
|
|
|
9
9
|
export const serializeShadowRoot = { default: "declarative-shadow-dom" };
|
|
10
10
|
export const SdActionModal = /*@__PURE__*/ createComponent({
|
|
11
11
|
tagName: 'sd-action-modal',
|
|
12
|
-
properties: {
|
|
12
|
+
properties: {
|
|
13
|
+
modalTitle: 'modal-title',
|
|
14
|
+
width: 'width',
|
|
15
|
+
height: 'height'
|
|
16
|
+
},
|
|
13
17
|
hydrateModule: import('@sellmate/design-system/hydrate'),
|
|
14
18
|
clientModule: clientComponents.SdActionModal,
|
|
15
19
|
serializeShadowRoot,
|
package/dist/sdModal.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { type ConfirmModalOptions, type LoadingModalOptions, type ModalDialogRef
|
|
|
7
7
|
* 이 경우 `componentProps` 는 무시됩니다.
|
|
8
8
|
* - `component` 에 React 컴포넌트(`ComponentType`) 를 넘기면 `componentProps` 로
|
|
9
9
|
* props 를 지정해 `createRoot + flushSync` 로 렌더한 뒤 core 로 위임합니다.
|
|
10
|
-
* - `
|
|
10
|
+
* - `persistent` 는 core 옵션을 그대로 전달합니다.
|
|
11
11
|
*/
|
|
12
12
|
export interface SdModalCreateOption extends Omit<CoreSdModalCreateOption, 'component'> {
|
|
13
13
|
component: HTMLElement | ComponentType<any>;
|
|
@@ -17,7 +17,7 @@ export interface SdModalCreateOption extends Omit<CoreSdModalCreateOption, 'comp
|
|
|
17
17
|
* React-aware `sdModal`.
|
|
18
18
|
*
|
|
19
19
|
* - `sdModal.confirm(options)` — core 와 동일
|
|
20
|
-
* - `sdModal.create({ component, componentProps?,
|
|
20
|
+
* - `sdModal.create({ component, componentProps?, persistent? })` —
|
|
21
21
|
* `component` 가 HTMLElement 면 core 로 위임, React 컴포넌트면
|
|
22
22
|
* `createRoot + flushSync` 로 렌더한 뒤 위임합니다. 모달이 닫히면
|
|
23
23
|
* 자동으로 언마운트됩니다.
|
package/dist/sdModal.js
CHANGED
|
@@ -19,7 +19,7 @@ function mountReactComponent(component, componentProps) {
|
|
|
19
19
|
* React-aware `sdModal`.
|
|
20
20
|
*
|
|
21
21
|
* - `sdModal.confirm(options)` — core 와 동일
|
|
22
|
-
* - `sdModal.create({ component, componentProps?,
|
|
22
|
+
* - `sdModal.create({ component, componentProps?, persistent? })` —
|
|
23
23
|
* `component` 가 HTMLElement 면 core 로 위임, React 컴포넌트면
|
|
24
24
|
* `createRoot + flushSync` 로 렌더한 뒤 위임합니다. 모달이 닫히면
|
|
25
25
|
* 자동으로 언마운트됩니다.
|
|
@@ -40,10 +40,10 @@ export const sdModal = {
|
|
|
40
40
|
coreSdModal.configure(options);
|
|
41
41
|
},
|
|
42
42
|
create(input) {
|
|
43
|
-
const { component, componentProps = {},
|
|
43
|
+
const { component, componentProps = {}, persistent } = input;
|
|
44
44
|
// HTMLElement 오버로드: core 로 바로 위임
|
|
45
45
|
if (isHTMLElement(component)) {
|
|
46
|
-
return coreSdModal.create({ component,
|
|
46
|
+
return coreSdModal.create({ component, persistent });
|
|
47
47
|
}
|
|
48
48
|
// React 컴포넌트 오버로드 — modalRef 를 먼저 만들어 props 에 주입한 뒤 mount
|
|
49
49
|
const modalRef = _createSdModalRef();
|
|
@@ -51,7 +51,7 @@ export const sdModal = {
|
|
|
51
51
|
...componentProps,
|
|
52
52
|
modalRef,
|
|
53
53
|
});
|
|
54
|
-
_attachSdModalWithRef(modalRef, { component: el,
|
|
54
|
+
_attachSdModalWithRef(modalRef, { component: el, persistent });
|
|
55
55
|
modalRef.onDismissed(() => {
|
|
56
56
|
root.unmount();
|
|
57
57
|
host.remove();
|
|
@@ -85,7 +85,11 @@ export type SdActionModalEvents = {
|
|
|
85
85
|
|
|
86
86
|
export const SdActionModal: StencilReactComponent<SdActionModalElement, SdActionModalEvents> = /*@__PURE__*/ createComponent<SdActionModalElement, SdActionModalEvents>({
|
|
87
87
|
tagName: 'sd-action-modal',
|
|
88
|
-
properties: {
|
|
88
|
+
properties: {
|
|
89
|
+
modalTitle: 'modal-title',
|
|
90
|
+
width: 'width',
|
|
91
|
+
height: 'height'
|
|
92
|
+
},
|
|
89
93
|
hydrateModule: import('@sellmate/design-system/hydrate') as Promise<HydrateModule>,
|
|
90
94
|
clientModule: clientComponents.SdActionModal as ReactWebComponent<SdActionModalElement, SdActionModalEvents>,
|
|
91
95
|
serializeShadowRoot,
|
package/lib/sdModal.ts
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
* 이 경우 `componentProps` 는 무시됩니다.
|
|
22
22
|
* - `component` 에 React 컴포넌트(`ComponentType`) 를 넘기면 `componentProps` 로
|
|
23
23
|
* props 를 지정해 `createRoot + flushSync` 로 렌더한 뒤 core 로 위임합니다.
|
|
24
|
-
* - `
|
|
24
|
+
* - `persistent` 는 core 옵션을 그대로 전달합니다.
|
|
25
25
|
*/
|
|
26
26
|
export interface SdModalCreateOption
|
|
27
27
|
extends Omit<CoreSdModalCreateOption, 'component'> {
|
|
@@ -52,7 +52,7 @@ function mountReactComponent(
|
|
|
52
52
|
* React-aware `sdModal`.
|
|
53
53
|
*
|
|
54
54
|
* - `sdModal.confirm(options)` — core 와 동일
|
|
55
|
-
* - `sdModal.create({ component, componentProps?,
|
|
55
|
+
* - `sdModal.create({ component, componentProps?, persistent? })` —
|
|
56
56
|
* `component` 가 HTMLElement 면 core 로 위임, React 컴포넌트면
|
|
57
57
|
* `createRoot + flushSync` 로 렌더한 뒤 위임합니다. 모달이 닫히면
|
|
58
58
|
* 자동으로 언마운트됩니다.
|
|
@@ -76,11 +76,11 @@ export const sdModal = {
|
|
|
76
76
|
},
|
|
77
77
|
|
|
78
78
|
create(input: SdModalCreateOption): ModalDialogRef {
|
|
79
|
-
const { component, componentProps = {},
|
|
79
|
+
const { component, componentProps = {}, persistent } = input;
|
|
80
80
|
|
|
81
81
|
// HTMLElement 오버로드: core 로 바로 위임
|
|
82
82
|
if (isHTMLElement(component)) {
|
|
83
|
-
return coreSdModal.create({ component,
|
|
83
|
+
return coreSdModal.create({ component, persistent });
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
// React 컴포넌트 오버로드 — modalRef 를 먼저 만들어 props 에 주입한 뒤 mount
|
|
@@ -89,7 +89,7 @@ export const sdModal = {
|
|
|
89
89
|
...componentProps,
|
|
90
90
|
modalRef,
|
|
91
91
|
});
|
|
92
|
-
_attachSdModalWithRef(modalRef, { component: el,
|
|
92
|
+
_attachSdModalWithRef(modalRef, { component: el, persistent });
|
|
93
93
|
modalRef.onDismissed(() => {
|
|
94
94
|
root.unmount();
|
|
95
95
|
host.remove();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sellmate/design-system-react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.66",
|
|
4
4
|
"description": "Design System - React Component Wrappers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dev": "tsc --watch"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@sellmate/design-system": "^1.0.
|
|
57
|
+
"@sellmate/design-system": "^1.0.66",
|
|
58
58
|
"@stencil/react-output-target": "^1.2.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|