@inntechcorp/it-design 2.0.90 → 2.0.93
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/global.css +47 -45
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.esm.js +1 -1
- package/dist/modal/container/ModalContainer.d.ts +1 -1
- package/dist/modal/context/ModalContext.d.ts +14 -0
- package/dist/{output-DCvuWNga.css → output-BwpNST6S.css} +41 -41
- package/dist/types/ModalProps.d.ts +10 -1
- package/package.json +1 -1
|
@@ -8,5 +8,5 @@ type ContainerExtraProps = {
|
|
|
8
8
|
modals: Required<ModalProps>[];
|
|
9
9
|
};
|
|
10
10
|
type ModalType = ModalContainerProps & ContainerExtraProps;
|
|
11
|
-
declare const ModalContainer: ({ onShowModal, onRemoveModal, onModalEvent, modals }: ModalType) => ReactPortal | null;
|
|
11
|
+
declare const ModalContainer: ({ onShowModal, onHideModal, onRemoveModal, onModalEvent, modals }: ModalType) => ReactPortal | null;
|
|
12
12
|
export default ModalContainer;
|
|
@@ -9,6 +9,13 @@ export type ModalContextType = {
|
|
|
9
9
|
* @returns
|
|
10
10
|
*/
|
|
11
11
|
showModal: (data: ModalProps) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Dismisses the currently open modal with the ID of the modal to be hidden.
|
|
14
|
+
*
|
|
15
|
+
* @param id ID of the modal to be hide.
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
18
|
+
hideModal: (id: string) => void;
|
|
12
19
|
/**
|
|
13
20
|
* Dismisses the currently open modal with the ID of the modal to be closed.
|
|
14
21
|
*
|
|
@@ -44,6 +51,13 @@ export type ModalContainerProps = {
|
|
|
44
51
|
* @returns
|
|
45
52
|
*/
|
|
46
53
|
onShowModal: (data: ModalProps) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Called when it's requested to hide an open modal.
|
|
56
|
+
*
|
|
57
|
+
* @param id ID of the modal to be hide.
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
onHideModal: (id: string) => void;
|
|
47
61
|
/**
|
|
48
62
|
* Called when it's requested to dismiss an open modal.
|
|
49
63
|
*
|
|
@@ -61,33 +61,30 @@
|
|
|
61
61
|
-webkit-box-shadow: 0 0 0 30px #151d3d inset !important;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
width:
|
|
69
|
-
|
|
70
|
-
fill: rgba(255, 255, 255, 0.6);
|
|
64
|
+
.option {
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
cursor: pointer;
|
|
68
|
+
min-width: max-content;
|
|
69
|
+
padding: 10px 30px 10px 15px;
|
|
71
70
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
.option:not(:last-child) {
|
|
72
|
+
margin-bottom: 1px;
|
|
73
|
+
}
|
|
74
|
+
.option:hover {
|
|
75
|
+
background-color: rgba(29, 38, 73, 0.5019607843);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
-
fill: #ffffff;
|
|
78
|
+
.selected .single, .selected .option span {
|
|
79
|
+
color: #ffffff;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
.
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
82
|
+
.single, .option span {
|
|
83
|
+
color: rgba(255, 255, 255, 0.6666666667);
|
|
84
|
+
font-weight: 400;
|
|
85
|
+
font-size: 12px;
|
|
86
|
+
line-height: 12px;
|
|
87
|
+
white-space: nowrap;
|
|
91
88
|
}
|
|
92
89
|
|
|
93
90
|
.menu {
|
|
@@ -156,30 +153,33 @@
|
|
|
156
153
|
transition: height 150ms ease-out;
|
|
157
154
|
}
|
|
158
155
|
|
|
159
|
-
.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
.option:not(:last-child) {
|
|
167
|
-
margin-bottom: 1px;
|
|
156
|
+
.arrow {
|
|
157
|
+
transition: all 0.25s ease-out;
|
|
158
|
+
margin-left: auto;
|
|
159
|
+
transform: rotate(0deg);
|
|
160
|
+
width: 20px;
|
|
161
|
+
height: 20px;
|
|
162
|
+
fill: rgba(255, 255, 255, 0.6);
|
|
168
163
|
}
|
|
169
|
-
|
|
170
|
-
|
|
164
|
+
|
|
165
|
+
.arrowNormal {
|
|
166
|
+
margin-left: auto;
|
|
167
|
+
transform: rotate(-90deg);
|
|
171
168
|
}
|
|
172
169
|
|
|
173
|
-
.
|
|
174
|
-
|
|
170
|
+
.arrowOpen {
|
|
171
|
+
transform: rotate(-180deg);
|
|
172
|
+
fill: #ffffff;
|
|
175
173
|
}
|
|
176
174
|
|
|
177
|
-
.
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
175
|
+
.icon {
|
|
176
|
+
margin-right: 8px;
|
|
177
|
+
height: 22px;
|
|
178
|
+
width: 22px;
|
|
179
|
+
color: rgba(255, 255, 255, 0.6);
|
|
180
|
+
font-size: 22px;
|
|
181
|
+
display: flex;
|
|
182
|
+
align-items: center;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
.container {
|
|
@@ -27,6 +27,10 @@ export type ModalProps = {
|
|
|
27
27
|
* Prevents modal from closing when ESC key is pressed.
|
|
28
28
|
*/
|
|
29
29
|
preventESC?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Remove other open modals.
|
|
32
|
+
*/
|
|
33
|
+
removeOthers?: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Show/hide OK button.
|
|
32
36
|
*/
|
|
@@ -137,12 +141,17 @@ export type ModalContentProps = {
|
|
|
137
141
|
* @param data Values for the new modal to be opened.
|
|
138
142
|
* @returns
|
|
139
143
|
*/
|
|
140
|
-
showAnotherModal?: (data
|
|
144
|
+
showAnotherModal?: (data: ModalProps) => void;
|
|
141
145
|
/**
|
|
142
146
|
* Closes itself from within the modal content.
|
|
143
147
|
* @returns
|
|
144
148
|
*/
|
|
145
149
|
hideCurrentModal?: () => void;
|
|
150
|
+
/**
|
|
151
|
+
* Destroy itself from within the modal content.
|
|
152
|
+
* @returns
|
|
153
|
+
*/
|
|
154
|
+
removeCurrentModal?: () => void;
|
|
146
155
|
/**
|
|
147
156
|
* Changes the buttons disabling state.
|
|
148
157
|
* @param value `true` for regular, `false` for disabled.
|