@inntechcorp/it-design 2.0.103 → 2.0.104

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.
@@ -1,4 +1,4 @@
1
- import { ReactPortal } from "react";
1
+ import { Context, ReactPortal } from "react";
2
2
  import { ModalProps } from "types/ModalProps";
3
3
  import { ModalContainerProps } from "../context/ModalContext";
4
4
  type ContainerExtraProps = {
@@ -6,7 +6,8 @@ type ContainerExtraProps = {
6
6
  * All modals shown or to be shown.
7
7
  */
8
8
  modals: Required<ModalProps>[];
9
+ customContext: Context<any>[] | [];
9
10
  };
10
11
  type ModalType = ModalContainerProps & ContainerExtraProps;
11
- declare const ModalContainer: ({ onShowModal, onHideModal, onRemoveModal, onModalEvent, modals }: ModalType) => ReactPortal | null;
12
+ declare const ModalContainer: ({ onShowModal, onHideModal, onRemoveModal, onModalEvent, modals, customContext }: ModalType) => ReactPortal | null;
12
13
  export default ModalContainer;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { Context } from "react";
2
2
  import { ModalState } from "enums/enum";
3
3
  import { ModalProps } from "types/ModalProps";
4
4
  export type ModalContextType = {
@@ -28,6 +28,11 @@ export type ModalContextType = {
28
28
  * @returns
29
29
  */
30
30
  removeAllModals: () => void;
31
+ /**
32
+ *
33
+ * @returns
34
+ */
35
+ setCustomContext: (...context: Context<any>[]) => void;
31
36
  /**
32
37
  * Triggered whenever any event related to modals occurs.
33
38
  */
@@ -74,5 +79,5 @@ export type ModalContainerProps = {
74
79
  */
75
80
  onModalEvent: (event: ModalState, id: string) => void;
76
81
  };
77
- declare const ModalContext: import("react").Context<ModalContextType>;
82
+ declare const ModalContext: Context<ModalContextType>;
78
83
  export default ModalContext;
@@ -127,32 +127,6 @@
127
127
  transition: height 150ms ease-out;
128
128
  }
129
129
 
130
- .option {
131
- display: flex;
132
- align-items: center;
133
- cursor: pointer;
134
- min-width: max-content;
135
- padding: 10px 30px 10px 15px;
136
- }
137
- .option:not(:last-child) {
138
- margin-bottom: 1px;
139
- }
140
- .option:hover {
141
- background-color: rgba(29, 38, 73, 0.5019607843);
142
- }
143
-
144
- .selected .single, .selected .option span {
145
- color: #ffffff;
146
- }
147
-
148
- .single, .option span {
149
- color: rgba(255, 255, 255, 0.6666666667);
150
- font-weight: 400;
151
- font-size: 12px;
152
- line-height: 12px;
153
- white-space: nowrap;
154
- }
155
-
156
130
  .arrow {
157
131
  transition: all 0.25s ease-out;
158
132
  margin-left: auto;
@@ -182,6 +156,32 @@
182
156
  align-items: center;
183
157
  }
184
158
 
159
+ .option {
160
+ display: flex;
161
+ align-items: center;
162
+ cursor: pointer;
163
+ min-width: max-content;
164
+ padding: 10px 30px 10px 15px;
165
+ }
166
+ .option:not(:last-child) {
167
+ margin-bottom: 1px;
168
+ }
169
+ .option:hover {
170
+ background-color: rgba(29, 38, 73, 0.5019607843);
171
+ }
172
+
173
+ .selected .single, .selected .option span {
174
+ color: #ffffff;
175
+ }
176
+
177
+ .single, .option span {
178
+ color: rgba(255, 255, 255, 0.6666666667);
179
+ font-weight: 400;
180
+ font-size: 12px;
181
+ line-height: 12px;
182
+ white-space: nowrap;
183
+ }
184
+
185
185
  .container {
186
186
  display: flex;
187
187
  align-items: center;
@@ -1,2 +1,2 @@
1
1
  import { ITDSizeSlug } from "../index";
2
- export default function GetSizeBySizeSlug(size: ITDSizeSlug): "large" | "small" | "x-small" | "medium" | "default" | "x-large" | "df";
2
+ export default function GetSizeBySizeSlug(size: ITDSizeSlug): "small" | "medium" | "large" | "x-small" | "default" | "x-large" | "df";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inntechcorp/it-design",
3
- "version": "2.0.103",
3
+ "version": "2.0.104",
4
4
  "description": "All in one Design library for web applications.",
5
5
  "author": "Inn.Tech",
6
6
  "license": "ISC",