react-core-ts 1.1.21 → 1.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.
@@ -174,3 +174,13 @@ export interface CheckboxProps {
174
174
  handleChange?: (e: any) => void;
175
175
  value?: string | number;
176
176
  }
177
+ export interface RadioProps {
178
+ id: string;
179
+ name: string;
180
+ label?: string;
181
+ value?: string | number;
182
+ checked?: boolean;
183
+ disabled?: boolean;
184
+ customLabel?: boolean;
185
+ handleChange?: (e: any) => void;
186
+ }
package/src/index.tsx CHANGED
@@ -10,6 +10,8 @@ export type { AutoSuggestionInputProps } from "./commontypes";
10
10
  export { default as ExpandableAutoComplete } from "./ExpandableAutoComplete";
11
11
  export { default as ModernAutoComplete } from "./ReactAutoComplete";
12
12
  export { default as ModernCheckBox } from "./ReactCheckbox";
13
+ export { default as ModernOtpInput } from "./ReactOTPInput";
14
+ export { default as ModernRadio } from "./ReactRadioButton";
13
15
  export { default as ModernTextArea } from "./ReactTextArea";
14
16
  export { default as ModernTextField } from "./ReactTextField";
15
17
  export { deepEqual } from "./utilities/deepEqual";
@@ -0,0 +1,441 @@
1
+ .tooltip-container {
2
+ position: relative;
3
+ transition:
4
+ background-color 0.3s,
5
+ width 0.3s,
6
+ height 0.3s,
7
+ color 0.3s;
8
+ }
9
+
10
+ .bottom {
11
+ .tooltip {
12
+ position: absolute;
13
+ bottom: -40;
14
+ right: 3px;
15
+ transform: translateX(0%);
16
+ padding: 0.3em 0.6em;
17
+ opacity: 0;
18
+ width: max-content;
19
+ max-width: 100%;
20
+ z-index: 999;
21
+ font-size: 12px;
22
+ color: #fff !important;
23
+ pointer-events: none;
24
+ transition: all 0.3s;
25
+ border: 1px solid #e55353;
26
+ background-color: #e55353;
27
+ border-radius: 6px;
28
+ color: rgb(34, 34, 34);
29
+
30
+ &.info {
31
+ color: #ffffff !important;
32
+ border: 1px solid #ffffff;
33
+ background-color: #000000;
34
+ right: 1px;
35
+ top: 5px;
36
+ }
37
+
38
+ &.card {
39
+ color: #ffffff !important;
40
+ border: 1px solid #ffffff;
41
+ background-color: #000000;
42
+ right: -8px;
43
+ top: 5px;
44
+ }
45
+ }
46
+
47
+ .tooltip::before {
48
+ position: absolute;
49
+ content: '';
50
+ height: 0.6em;
51
+ width: 0.6em;
52
+ right: 20px;
53
+ z-index: 999;
54
+ top: -4px;
55
+ border: 1px solid #e55353;
56
+ border-right: none;
57
+ border-bottom: none;
58
+ transform: translate(50%) rotate(45deg);
59
+ background-color: #e55353;
60
+ }
61
+
62
+ .info.tooltip::before {
63
+ border: 1px solid #000000;
64
+ background-color: #000000;
65
+ right: 14px;
66
+ position: absolute;
67
+ content: '';
68
+ height: 0.6em;
69
+ width: 0.6em;
70
+ z-index: 999;
71
+ top: -4px;
72
+ border-right: none;
73
+ border-bottom: none;
74
+ transform: translate(50%) rotate(45deg);
75
+ }
76
+
77
+ .card.tooltip::before {
78
+ border: 1px solid #000000;
79
+ background-color: #000000;
80
+ right: 14px;
81
+ position: absolute;
82
+ content: '';
83
+ height: 0.6em;
84
+ width: 0.6em;
85
+ z-index: 999;
86
+ top: -3px;
87
+ border-right: none;
88
+ border-bottom: none;
89
+ transform: translate(50%) rotate(45deg);
90
+ }
91
+
92
+ .tooltip-container:hover .tooltip {
93
+ top: 46px;
94
+ opacity: 1;
95
+ visibility: visible;
96
+ z-index: 999;
97
+ pointer-events: auto;
98
+
99
+ &.info {
100
+ top: 30px;
101
+ max-width: 500px;
102
+ position: absolute;
103
+ }
104
+
105
+ &.card {
106
+ top: 20px;
107
+ max-width: 300px;
108
+ position: absolute;
109
+ }
110
+ }
111
+ }
112
+ .top-tool {
113
+ .tooltip {
114
+ position: absolute;
115
+ bottom: 45px !important;
116
+ left: 0;
117
+ top: auto !important;
118
+ transform: translateX(0%);
119
+ padding: 0.3em 0.6em;
120
+ opacity: 0;
121
+ width: max-content;
122
+ white-space: normal;
123
+ z-index: 999;
124
+ font-size: 12px;
125
+ max-width: 100%;
126
+ color: #ff681d !important;
127
+ pointer-events: none;
128
+ transition: all 0.3s;
129
+ border: 1px solid #ff681d;
130
+ background-color: #fff;
131
+ border-radius: 6px;
132
+ color: rgb(34, 34, 34);
133
+ }
134
+
135
+ .tooltip::before {
136
+ position: absolute;
137
+ content: '';
138
+ height: 0.6em;
139
+ width: 0.6em;
140
+ z-index: 999;
141
+ bottom: -4px;
142
+ border: 1px solid #ff681d;
143
+ border-left: none;
144
+ border-top: none;
145
+ transform: translate(50%) rotate(45deg);
146
+ background-color: #fff;
147
+ }
148
+
149
+ .tooltip-container:hover .tooltip {
150
+ bottom: 45px !important;
151
+ opacity: 1;
152
+ top: auto !important;
153
+ visibility: visible;
154
+ z-index: 999;
155
+ pointer-events: auto;
156
+ }
157
+ }
158
+ .bottom-tool {
159
+ .tooltip {
160
+ position: absolute;
161
+ bottom: -40;
162
+ transform: translateX(0%);
163
+ padding: 0.3em 0.6em;
164
+ opacity: 0;
165
+ width: max-content;
166
+ max-width: 100%;
167
+ z-index: 999;
168
+ font-size: 12px;
169
+ color: #ff681d !important;
170
+ white-space: wrap;
171
+ pointer-events: none;
172
+ transition:
173
+ background-color 0.3s,
174
+ width 0.3s,
175
+ height 0.3s,
176
+ color 0.3s;
177
+ border: 1px solid #ff681d;
178
+ background-color: #fff;
179
+ border-radius: 6px;
180
+ color: rgb(34, 34, 34);
181
+ }
182
+
183
+ .tooltip::before {
184
+ position: absolute;
185
+ content: '';
186
+ height: 0.6em;
187
+ width: 0.6em;
188
+ z-index: 999;
189
+ top: -4px;
190
+ border: 1px solid #ff681d;
191
+ border-right: none;
192
+ border-bottom: none;
193
+ transform: translate(50%) rotate(45deg);
194
+ background-color: #fff;
195
+ }
196
+
197
+ .tooltip-container:hover .tooltip {
198
+ top: 46px;
199
+ opacity: 1;
200
+ visibility: visible;
201
+ z-index: 999;
202
+ pointer-events: auto;
203
+ }
204
+ }
205
+
206
+ .right {
207
+ .tooltip {
208
+ position: absolute;
209
+ top: 2.5px;
210
+ left: calc(100% + 9px);
211
+ transform: translateX(0%);
212
+ padding: 8px;
213
+ opacity: 0;
214
+ min-width: 200px;
215
+ max-width: 200px;
216
+ min-height: calc(100% - 16px);
217
+ height: auto;
218
+ z-index: 999;
219
+ font-size: 12px;
220
+ color: #fff !important;
221
+ pointer-events: none;
222
+ transition:
223
+ background-color 0.3s,
224
+ width 0.3s,
225
+ height 0.3s,
226
+ color 0.3s;
227
+ border: 1px solid #e55353;
228
+ background-color: #e55353;
229
+ border-radius: 6px;
230
+ color: rgb(34, 34, 34);
231
+ }
232
+
233
+ .tooltip-card {
234
+ padding: 3px 10px 4px;
235
+ top: -4px;
236
+ min-width: 175px;
237
+ background-color: #3d414a;
238
+ border: 1px solid #3d414a;
239
+
240
+ }
241
+
242
+ .tooltip::before {
243
+ position: absolute;
244
+ content: '';
245
+ height: 0.6em;
246
+ width: 0.6em;
247
+ left: -8px;
248
+ top: 14px;
249
+ z-index: 999;
250
+ transform: translateY(10px);
251
+ border: 1px solid #e55353;
252
+ border-top: none;
253
+ border-right: none;
254
+ transform: translate(50%) rotate(45deg);
255
+ background-color: #e55353;
256
+ }
257
+
258
+ .tooltip-card::before {
259
+ top: 8px;
260
+ background-color: #3d414a;
261
+ border: 1px solid #3d414a;
262
+ }
263
+
264
+ .tooltip-container:hover {
265
+ .tooltip {
266
+ top: 2.5px;
267
+ opacity: 1;
268
+ visibility: visible;
269
+ z-index: 999;
270
+ pointer-events: auto;
271
+ }
272
+
273
+ .tooltip-card {
274
+ top: -4px;
275
+ }
276
+ }
277
+ }
278
+
279
+ .left {
280
+ .tooltip {
281
+ position: absolute;
282
+ top: 2.5px;
283
+ right: calc(100% + 9px);
284
+ transform: translateX(0%);
285
+ padding: 8px;
286
+ opacity: 0;
287
+ min-width: 200px;
288
+ max-width: 200px;
289
+ min-height: calc(100% - 16px);
290
+ z-index: 999;
291
+ font-size: 12px;
292
+ color: #fff !important;
293
+ pointer-events: none;
294
+ transition:
295
+ background-color 0.3s,
296
+ width 0.3s,
297
+ height 0.3s,
298
+ color 0.3s;
299
+ border: 1px solid #e55353;
300
+ background-color: #e55353;
301
+ border-radius: 6px;
302
+ color: rgb(34, 34, 34);
303
+ }
304
+
305
+ .tooltip::before {
306
+ position: absolute;
307
+ content: '';
308
+ height: 0.6em;
309
+ width: 0.6em;
310
+ right: 0px;
311
+ top: 14px;
312
+ z-index: 999;
313
+ transform: translateY(10px);
314
+ border: 1px solid #e55353;
315
+ border-bottom: none;
316
+ border-left: none;
317
+ transform: translate(50%) rotate(45deg);
318
+ background-color: #e55353;
319
+ }
320
+
321
+ .tooltip-container:hover .tooltip {
322
+ top: 2.5px;
323
+ opacity: 1;
324
+ visibility: visible;
325
+ z-index: 999;
326
+ pointer-events: auto;
327
+ }
328
+ }
329
+
330
+ .top {
331
+ .tooltip {
332
+ position: absolute;
333
+ top: -40;
334
+ left: 0;
335
+ transform: translateX(0%);
336
+ padding: 0.3em 0.6em;
337
+ opacity: 0;
338
+ width: 100%;
339
+ z-index: 999;
340
+ font-size: 12px;
341
+ color: #fff !important;
342
+ pointer-events: none;
343
+ transition:
344
+ background-color 0.3s,
345
+ width 0.3s,
346
+ height 0.3s,
347
+ color 0.3s;
348
+ border: 1px solid #e55353;
349
+ background-color: #e55353;
350
+ border-radius: 6px;
351
+ color: rgb(34, 34, 34);
352
+ }
353
+
354
+ .tooltip::before {
355
+ position: absolute;
356
+ content: '';
357
+ height: 0.6em;
358
+ width: 0.6em;
359
+ right: 20px;
360
+ z-index: 999;
361
+ bottom: -4px;
362
+ border: 1px solid #e55353;
363
+ border-left: none;
364
+ border-top: none;
365
+ transform: translate(50%) rotate(45deg);
366
+ background-color: #e55353;
367
+ }
368
+
369
+ .tooltip-container:hover .tooltip {
370
+ top: -40px;
371
+ opacity: 1;
372
+ visibility: visible;
373
+ z-index: 999;
374
+ pointer-events: auto;
375
+ }
376
+ }
377
+
378
+ .custom-tooltip-container {
379
+ position: relative;
380
+ display: inline-block;
381
+ }
382
+
383
+ .custom-text {
384
+ font-size: 18px;
385
+ cursor: pointer;
386
+ }
387
+
388
+ .custom-tooltip {
389
+ position: absolute;
390
+ top: 100%;
391
+ left: 20%;
392
+ opacity: 0;
393
+ visibility: hidden;
394
+ font-size: 12px;
395
+ background: #deefff;
396
+ border-color: #bee0ff;
397
+ padding: 5px;
398
+ align-items: center;
399
+ transition:
400
+ opacity 0.3s,
401
+ visibility 0.3s,
402
+ top 0.3s,
403
+ background 0.3s;
404
+ z-index: 1;
405
+ }
406
+
407
+ .custom-tooltip::before {
408
+ content: '';
409
+ position: absolute;
410
+ bottom: 100%;
411
+ left: 20%;
412
+ /* Center the arrow */
413
+ border-width: 9px;
414
+ /* Slightly larger to act as border */
415
+ border-style: solid;
416
+ border-color: transparent transparent #bee0ff transparent;
417
+ /* Border color */
418
+ transform: translateX(-20%);
419
+ z-index: -1;
420
+ /* Ensure it's behind the ::after pseudo-element */
421
+ }
422
+
423
+ .custom-tooltip::after {
424
+ content: '';
425
+ position: absolute;
426
+ bottom: 100%;
427
+ left: 20%;
428
+ border-width: 8px;
429
+ border-style: solid;
430
+ border-color: transparent transparent #deefff transparent;
431
+ transform: translateX(-20%);
432
+ z-index: 1;
433
+ }
434
+
435
+ .custom-tooltip-container:hover .custom-tooltip {
436
+ top: 100%;
437
+ opacity: 1;
438
+ visibility: visible;
439
+ background: #deefff;
440
+ transform: translate(-20%, 10px);
441
+ }
@@ -4,4 +4,5 @@
4
4
 
5
5
  @import './components/autocomplete.css';
6
6
  @import './components/treedropdown.css';
7
- @import './components/selectedautocomplete.css';
7
+ @import './components/selectedautocomplete.css';
8
+ @import './components/tooltip.css';