@uniai-fe/ui-legacy 0.1.21 → 0.1.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniai-fe/ui-legacy",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Legacy UI Toolkit for UNIAI FE Projects",
5
5
  "type": "module",
6
6
  "private": false,
@@ -1,15 +1,16 @@
1
1
  import ModalBody from "./Body";
2
2
  import ModalFooter from "./Footer";
3
- import ModalFormProvider from "../form/Provider";
4
3
  import ModalHeader from "./Header";
5
4
  import type { ModalComponentPropsType } from "../../../../types";
5
+ import Form from "../../../../form";
6
+ import ModalFormProvider from "../form/Provider";
6
7
 
7
8
  export default function ModalLayoutContainer({
8
9
  stackKey,
9
- modalProps: { data, isModalForm, isHeader, isNoTitle },
10
+ modalProps: { data, isModalForm, formOptions, isHeader, isNoTitle },
10
11
  isDraggable,
11
12
  }: ModalComponentPropsType) {
12
- return (
13
+ const Layout = (
13
14
  <>
14
15
  {isHeader && (
15
16
  <ModalHeader
@@ -34,4 +35,10 @@ export default function ModalLayoutContainer({
34
35
  )}
35
36
  </>
36
37
  );
38
+
39
+ return typeof formOptions !== "undefined" ? (
40
+ <Form.Provider {...formOptions}>{Layout}</Form.Provider>
41
+ ) : (
42
+ Layout
43
+ );
37
44
  }
@@ -24,6 +24,7 @@ export default function ModalBasicContainer({
24
24
  isHeader = true,
25
25
  data,
26
26
  isModalForm,
27
+ formOptions,
27
28
  isNoTitle,
28
29
  },
29
30
  } = stackData;
@@ -39,7 +40,7 @@ export default function ModalBasicContainer({
39
40
  >
40
41
  <ModalLayoutContainer
41
42
  stackKey={stackKey}
42
- modalProps={{ data, isModalForm, isHeader, isNoTitle }}
43
+ modalProps={{ data, isModalForm, formOptions, isHeader, isNoTitle }}
43
44
  />
44
45
  </StyledModalBasic.container>
45
46
  );
@@ -26,12 +26,12 @@ export default function TooltipHelp({
26
26
  className: string;
27
27
  horizontal: "left" | "right";
28
28
  vertical: "bottom" | "top";
29
- buttonOptions: {
29
+ buttonOptions: Partial<{
30
30
  size: number;
31
31
  priorityType: ButtonPriorityType;
32
32
  fillType: ButtonFillType;
33
33
  clickEvent: () => void;
34
- };
34
+ }>;
35
35
  }>) {
36
36
  return (
37
37
  <StyledTooltipHelp.container
@@ -59,7 +59,17 @@ export type ModalPropsType = Partial<{
59
59
  */
60
60
  isFooter: boolean;
61
61
  initDragPos: ModalPositionDataType;
62
+ /**
63
+ * @deprecated formOptions를 대신 활용할 것. formOptions 여부로 form context 활성화
64
+ */
62
65
  isModalForm: boolean;
66
+ /**
67
+ * FormProvider 옵션
68
+ */
69
+ formOptions: Partial<{
70
+ options: UseFormProps<FormDataType>;
71
+ callback: (params: UseFormReturn<FormDataType>) => void | undefined;
72
+ }>;
63
73
  role: string;
64
74
  show: ModalShowType; // init: 최초 렌더링 시 / on: 활성화 / off: 비활성화
65
75
  showDelay: number;