cats-data-grid 1.0.0 → 2.0.0

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,246 +1,373 @@
1
1
  @use "../sass-utils" as *;
2
2
 
3
- .row_div {
4
- min-height: rem(54px);
5
- @include flex(flex-start, center);
6
-
7
- .col_div {
8
- width: 50%;
9
- @include flex(flex-start, center);
10
- }
3
+ //========== CUSTOM SCROLL BAR ======================
4
+ #container_scroll::-webkit-scrollbar {
5
+ @include box(rem(14px), rem(14px));
6
+ }
7
+ #container_scroll::-webkit-scrollbar-track {
8
+ background-color: var(--neutral-200);
9
+ @include border($width: rem(3px), $radius: rem(100px), $color: transparent);
10
+ background-clip: padding-box;
11
+ }
12
+ #container_scroll::-webkit-scrollbar-thumb {
13
+ background-color: var(--neutral-500);
14
+ @include border($width: rem(3px), $radius: rem(100px), $color: transparent);
15
+ background-clip: padding-box;
16
+ }
17
+ #container_scroll::-webkit-scrollbar-corner {
18
+ background: transparent;
19
+ }
20
+ #container_scroll::-webkit-scrollbar-button {
21
+ @include box(rem(14px), rem(14px));
22
+ background-color: var(--neutral-100);
23
+ border-radius: rem(2px);
24
+ cursor: pointer;
25
+ display: none;
26
+ background-repeat: no-repeat;
27
+ background-position: center;
28
+ background-size: rem(10px);
29
+ }
30
+ #container_scroll::-webkit-scrollbar-button:hover {
31
+ background-color: var(--neutral-300);
32
+ }
33
+ #container_scroll::-webkit-scrollbar-button:single-button:vertical:decrement {
34
+ background-image: url("/images/chevron-up.svg");
35
+ display: block;
36
+ // border-top-right-radius: 8px;
37
+ }
38
+ #container_scroll::-webkit-scrollbar-button:single-button:vertical:increment {
39
+ background-image: url("/images/chevron-down.svg");
40
+ display: block;
41
+ }
42
+ #container_scroll::-webkit-scrollbar-button:single-button:horizontal:decrement {
43
+ background-image: url("/images/chevron-left.svg");
44
+ display: block;
45
+ // border-bottom-left-radius: 8px;
46
+ }
47
+ #container_scroll::-webkit-scrollbar-button:single-button:horizontal:increment {
48
+ background-image: url("/images/chevron-right.svg");
49
+ display: block;
50
+ }
11
51
 
12
- .label {
13
- width: rem(200px);
14
- min-width: rem(200px);
15
- padding: 0 rem(24px);
16
- color: var(--textSecondary70);
17
- @include fontStyle(var(--fs-16), 140%, 500);
52
+ // .row_div {
53
+ // min-height: rem(54px);
54
+ // @include flex(flex-start, center);
55
+
56
+ // .col_div {
57
+ // width: 50%;
58
+ // @include flex(flex-start, center);
59
+ // }
60
+
61
+ // .label {
62
+ // width: rem(200px);
63
+ // min-width: rem(200px);
64
+ // padding: 0 rem(24px);
65
+ // color: var(--neutral-500);
66
+ // @include fontStyle(var(--fs-16), 140%, 500);
67
+
68
+ // @include flex("", center, rem(3px));
69
+
70
+ // sup {
71
+ // top: rem(-2px);
72
+ // }
73
+ // }
74
+ // .field {
75
+ // padding: rem(8px) rem(24px);
76
+ // flex-grow: 1;
77
+ // @include flex(flex-start, start, "", column);
78
+ // color: var(--neutral-600);
79
+ // @include fontStyle(var(--fs-16), 140%);
80
+
81
+ // li {
82
+ // list-style: disc;
83
+ // line-height: rem(32px);
84
+ // margin-left: rem(18px);
85
+ // }
86
+ // }
87
+ // }
18
88
 
19
- @include flex("", center, rem(3px));
89
+ sup {
90
+ color: var(--error-red);
91
+ }
20
92
 
21
- sup {
22
- top: rem(-2px);
93
+ // ---------------- CUSTOM RADIO INPUT START HERE--------
94
+ .radio_option {
95
+ display: flex;
96
+ @include box(rem(16px), rem(16px));
97
+ [type="radio"]:not(:checked)[disabled] + label {
98
+ color: var(--neutral-300);
99
+ cursor: default;
100
+ &::before {
101
+ background-color: var(--neutral-100);
23
102
  }
24
103
  }
25
- .field {
26
- padding: rem(8px) rem(24px);
27
- flex-grow: 1;
28
- @include flex(flex-start, start, "", column);
29
- color: var(--textPrimary);
30
- @include fontStyle(var(--fs-16), 140%);
31
-
32
- li {
33
- list-style: disc;
34
- line-height: rem(32px);
35
- margin-left: rem(18px);
104
+ [type="radio"]:is(:checked)[disabled] + label {
105
+ color: var(--neutral-300);
106
+ cursor: default;
107
+ &::before {
108
+ border-color: var(--neutral-100);
36
109
  }
37
- }
38
- }
39
-
40
- textarea,
41
- input,
42
- .ordered_textarea {
43
- color: var(--textPrimary);
44
- }
45
-
46
- .errorField {
47
- flex-direction: column;
48
- align-items: start;
49
-
50
- .error {
51
- max-width: rem(448px);
52
- @include flex(flex-start, start);
53
- i-feather[name="info"] {
54
- padding-right: rem(4px);
55
- display: flex;
56
- stroke: var(--error-red);
57
- @include box(rem(14px), rem(14px));
110
+ &::after {
111
+ background-color: var(--neutral-100);
58
112
  }
59
113
  }
60
-
61
- textarea,
62
- input,
63
- .ordered_textarea {
64
- color: var(--textPrimary);
65
- border: rem(1px) solid var(--error-red);
114
+ %check-style {
115
+ content: "";
116
+ position: absolute;
117
+ @include positioning(0, 0);
118
+ @include box(rem(16px), rem(16px));
119
+ background: var(--white);
66
120
  }
67
- .error {
68
- padding-top: rem(8px);
69
- color: var(--error-red);
70
- @include fontStyle(var(--fs-12), 140%, 400);
121
+ [type="radio"]:checked,
122
+ [type="radio"]:not(:checked) {
123
+ position: absolute;
124
+ left: -9999px;
71
125
  }
72
- }
73
-
74
- sup {
75
- color: var(--error-red);
76
- }
77
-
78
- input::placeholder,
79
- textarea::placeholder {
80
- color: var(--textSecondary70);
81
- @include fontStyle(var(--fs-16), 140%);
82
- }
83
-
84
- textarea {
85
- border: rem(1px) solid var(--border);
86
- border-radius: rem(16px);
87
- padding: rem(16px);
88
- width: 100%;
89
- min-height: rem(108px);
90
- resize: none;
91
- }
92
- input {
93
- border: rem(1px) solid var(--border);
94
- border-radius: rem(16px);
95
- padding: rem(16px);
96
- width: 100%;
97
- height: rem(54px);
98
-
99
- &.disable {
100
- background-color: var(--blue-50);
101
- pointer-events: none;
126
+ [type="radio"]:checked + label,
127
+ [type="radio"]:not(:checked) + label {
128
+ position: relative;
129
+ padding-left: rem(24px);
130
+ cursor: pointer;
131
+ display: inline-block;
132
+ color: var(--neutral-600);
133
+ line-height: rem(16px);
134
+ }
135
+ [type="radio"]:checked + label:before {
136
+ @extend %check-style;
137
+ @include border($width: rem(1.5px), $color: var(--blue-600), $radius: 100%);
138
+ }
139
+ [type="radio"]:not(:checked) + label:before {
140
+ @extend %check-style;
141
+ @include border($width: rem(1.5px), $radius: 100%);
142
+ }
143
+ [type="radio"]:checked + label:after,
144
+ [type="radio"]:not(:checked) + label:after {
145
+ content: "";
146
+ @include box(rem(6px), rem(6px));
147
+ background: var(--blue-600);
148
+ position: absolute;
149
+ @include positioning(rem(5px), rem(5px));
150
+ border-radius: 100%;
151
+ transition: all 0.2s ease;
152
+ }
153
+ [type="radio"]:not(:checked) + label:after {
154
+ opacity: 0;
155
+ transform: scale(0);
156
+ }
157
+ [type="radio"]:checked + label:after {
158
+ opacity: 1;
159
+ transform: scale(1);
102
160
  }
103
161
  }
104
162
 
105
- .ordered_textarea {
106
- // max-width: rem(448px);
107
- border: rem(1px) solid var(--border);
108
- border-radius: rem(16px);
109
- padding: rem(16px);
110
- width: 100%;
111
- list-style: disc;
112
- min-height: rem(108px);
113
-
114
- ul {
115
- padding-left: rem(32px);
116
- outline: none;
117
- &.editable-div {
118
- min-height: rem(72px);
119
- max-height: rem(112px);
120
- overflow: auto;
163
+ // ---------------- CUSTOM CHECKBOX INPUT START HERE--------
164
+ .checkbox_container {
165
+ @include flex(flex-start, center, rem(8px));
166
+ @include fontStyle(var(--fs-14), rem(20px), 400);
167
+ color: var(--neutral-600);
168
+ // --- Disabled (check & uncheck) ---
169
+ input[type="checkbox"],
170
+ input[type="checkbox"]:checked {
171
+ &[disabled] {
172
+ cursor: default;
173
+ background-color: var(--neutral-100);
174
+ border-color: var(--neutral-100);
175
+ & + span {
176
+ color: var(--neutral-300);
177
+ }
121
178
  }
122
-
123
- li {
124
- margin-left: rem(21px);
125
- list-style: disc;
126
- color: var(--textPrimary);
127
- @include fontStyle(var(--fs-16), rem(28px));
179
+ }
180
+ input[type="checkbox"] {
181
+ appearance: none;
182
+ -webkit-appearance: none;
183
+ @include box(rem(16px), rem(16px));
184
+ min-width: rem(16px);
185
+ @include border();
186
+ cursor: pointer;
187
+ background-color: var(--white);
188
+ position: relative;
189
+ transition: all 0.2s ease;
190
+
191
+ // --- Default (unchecked) ---
192
+ &::after {
193
+ content: "";
194
+ display: none;
195
+ position: absolute;
196
+ @include positioning(rem(-1px), rem(-1px));
197
+ @include box(rem(16px), rem(16px));
198
+ background-size: auto;
199
+ background-repeat: no-repeat;
200
+ background-position: center;
201
+ }
202
+ // --- Checked State ---
203
+ &:checked {
204
+ border-color: var(--blue-600);
205
+ background-color: var(--blue-600);
206
+ &::after {
207
+ display: block;
208
+ background-image: url("/images/check-white.svg");
209
+ }
210
+ }
211
+ // --- Indeterminate (minus) state ---
212
+ &:indeterminate {
213
+ border-color: var(--blue-600);
214
+ background-color: var(--white);
215
+ &::after {
216
+ display: block;
217
+ top: 0;
218
+ background-image: url("/images/minus-blue.svg");
219
+ }
128
220
  }
129
221
  }
130
222
  }
131
223
 
132
- // ---------------- CUSTOM RADIO INPUT START HERE
133
- .custom_radio {
134
- display: inline-flex;
135
- align-items: center;
136
- min-width: rem(223px);
137
-
138
- .name {
224
+ // ---------------- CUSTOM SINGLE SELECT DROPDOWN START HERE--------
225
+ .text_filter_section {
226
+ position: relative;
227
+ width: 100%;
228
+ .single_select_dropdown {
229
+ @include flex(space-between, center);
230
+ @include box(100%, rem(40px));
231
+ @include border();
232
+ padding: rem(10px) rem(12px);
233
+ @include fontStyle(var(--fs-14), rem(20px));
234
+ background-color: var(--white);
139
235
  color: var(--neutral-600);
140
- @include fontStyle(var(--fs-16), 140%, 400);
141
- }
142
-
143
- &.disabled {
144
- pointer-events: none;
236
+ cursor: pointer;
145
237
 
146
- .radio_mark {
147
- background-color: var(--neutral-100);
148
- border: rem(1px) solid var(--neutral-200);
238
+ .left_details {
239
+ @include flex("", center);
240
+ @include box(calc(100% - rem(20px)), "");
149
241
  }
150
-
151
- .name {
152
- color: var(--textPrimary);
153
- @include fontStyle(var(--fs-16), 140%);
242
+ .arrow_icon {
243
+ img {
244
+ max-width: rem(20px);
245
+ }
154
246
  }
155
247
  }
156
248
 
157
- .name {
158
- padding-right: rem(23px);
159
- }
160
- }
249
+ .dropdown_list {
250
+ @include border();
251
+ width: 100%;
252
+ position: absolute;
253
+ z-index: 2;
254
+ background: var(--white);
255
+ box-shadow: rem(0px) rem(12px) rem(16px) rem(-4px) var(--box-shadow);
256
+ top: rem(40px);
161
257
 
162
- .custom_radio input[type="radio"] {
163
- display: none;
258
+ ul {
259
+ max-height: rem(284px);
260
+ overflow: auto;
261
+ list-style-type: none;
262
+ padding: rem(4px) 0;
263
+
264
+ &:has(.no_data) li:hover {
265
+ background-color: unset;
266
+ cursor: default;
267
+ }
268
+ li {
269
+ height: rem(40px);
270
+ @include flex(space-between, center);
271
+ @include fontStyle(var(--fs-14), rem(20px));
272
+ padding: rem(10px) rem(12px);
273
+ cursor: pointer;
274
+ color: var(--neutral-600);
275
+ &:hover {
276
+ background-color: var(--neutral-50);
277
+ }
278
+ &.disabled_option {
279
+ opacity: 0.3;
280
+ pointer-events: none;
281
+ }
282
+ }
283
+ }
284
+ }
164
285
  }
165
286
 
166
- .radio_mark {
167
- @include box(rem(20px), rem(20px));
168
- border: rem(1.5px) solid var(--border);
169
- border-radius: 50%;
170
- margin-right: rem(8px);
287
+ // --------------Searchbox with icon-------------
288
+ .search_input {
171
289
  position: relative;
290
+ @include box(100%, rem(40px));
291
+ @include border();
292
+ padding: rem(10px) rem(12px);
172
293
  background-color: var(--white);
173
- }
174
-
175
- .custom_radio input[type="radio"]:checked + .radio_mark {
176
- background-color: var(--white);
177
- }
294
+ @include flex(flex-start, center, rem(4px));
178
295
 
179
- .radio_mark::after {
180
- content: "";
181
- @include box(rem(12px), rem(12px));
182
- background: var(--blue-700);
183
- border-radius: 50%;
184
- position: absolute;
185
- @include positioning(50%, 50%);
186
- transform: translate(-50%, -50%);
187
- opacity: 0;
188
- transition: opacity 0.2s;
189
- }
190
-
191
- .custom_radio input[type="radio"]:checked + .radio_mark::after {
192
- opacity: 1;
193
- }
194
-
195
- .dob_age_field {
196
- border: rem(1px) solid var(--border);
197
- border-radius: rem(16px);
198
- padding: 0 rem(16px);
199
- width: 100%;
200
- height: rem(54px);
201
- background-color: var(--blue-50);
202
- @include flex(flex-start, center);
203
-
204
- .dob,
205
- .age {
206
- @include fontStyle(var(--fs-16), 140%);
207
- color: var(--textSecondary);
208
- }
209
- .age {
210
- padding-left: rem(10px);
296
+ img {
297
+ @include box(rem(20px), rem(20px));
298
+ opacity: 0.5;
211
299
  }
212
- .dob {
213
- @include flex(space-between, center);
214
- width: 50%;
215
- height: 100%;
216
- padding-right: rem(10px);
217
- border-right: rem(1px) solid var(--border);
218
-
219
- img {
220
- @include box(rem(20px), rem(20px));
300
+ input {
301
+ @include box(100%, 100%);
302
+ border: 0;
303
+ @include fontStyle(var(--fs-14), rem(20px), 400);
304
+ color: var(--neutral-600);
305
+ &::placeholder {
306
+ color: var(--neutral-500);
221
307
  }
222
308
  }
223
309
  }
224
310
 
225
- .date {
226
- position: relative;
227
- width: 100%;
311
+ // --------------Toggle Switch css-------------
312
+ .switch_wrapper {
313
+ display: flex;
314
+ .switch {
315
+ position: relative;
316
+ display: inline-block;
317
+ @include box(rem(28px), rem(16px)); /* default size */
318
+ input {
319
+ display: none;
320
+ }
321
+ .slider {
322
+ position: absolute;
323
+ cursor: pointer;
324
+ background-color: var(--neutral-100);
325
+ border-radius: rem(16px);
326
+ inset: 0;
327
+ transition: 0.3s;
328
+ &:before {
329
+ content: "";
330
+ position: absolute;
331
+ @include box(rem(12px), rem(12px));
332
+ left: rem(2px);
333
+ bottom: rem(2px);
334
+ background-color: var(--white);
335
+ border-radius: 50%;
336
+ transition: 0.3s;
337
+ box-shadow: 0 rem(0.8px) rem(2.4px) 0 var(--box-shadow);
338
+ }
339
+ }
228
340
 
229
- img {
230
- position: absolute;
231
- right: rem(16px);
232
- top: rem(15px);
341
+ input:checked + .slider {
342
+ background-color: var(--blue-600);
343
+ &:before {
344
+ transform: translateX(rem(12px));
345
+ }
346
+ }
233
347
  }
234
348
  }
235
-
236
- input[type="checkbox"] {
237
- margin-right: rem(8px);
238
- @include box(rem(16px), rem(16px));
239
- border-radius: rem(4px);
240
- }
241
-
242
- ol {
243
- li {
244
- list-style: auto !important;
349
+ .tableArea.big {
350
+ .table_wrapper {
351
+ table {
352
+ tbody {
353
+ tr {
354
+ :host .switch_wrapper {
355
+ .switch {
356
+ @include box(rem(38px), rem(20px)); /* big size */
357
+ .slider {
358
+ &:before {
359
+ @include box(rem(16px), rem(16px));
360
+ }
361
+ }
362
+ input:checked + .slider {
363
+ &:before {
364
+ transform: translateX(rem(18px));
365
+ }
366
+ }
367
+ }
368
+ }
369
+ }
370
+ }
371
+ }
245
372
  }
246
373
  }
@@ -1,3 +1,6 @@
1
+ @use "variable" as *;
2
+ @use "function" as *;
3
+
1
4
  $tablet: 1024px;
2
5
  $mediumDesktop: 1280px;
3
6
  $largeDesktop: 1360px;
@@ -54,3 +57,31 @@ $ultraWideDesktop: 1919px;
54
57
  top: $top;
55
58
  left: $left;
56
59
  }
60
+
61
+ // ------------- Border PROPERTY with width,color and radius ---------------------
62
+ @mixin border(
63
+ $width: rem(1px),
64
+ $style: solid,
65
+ $color: var(--neutral-200),
66
+ $radius: rem(4px)
67
+ ) {
68
+ border: $width $style $color;
69
+ border-radius: $radius;
70
+ }
71
+
72
+ // ------------- On table top header Swap image on hover ---------------------
73
+ @mixin hoverSwap($base, $hover) {
74
+ #{$hover} {
75
+ display: none;
76
+ }
77
+
78
+ &:hover {
79
+ #{$base} {
80
+ display: none;
81
+ }
82
+
83
+ #{$hover} {
84
+ display: flex;
85
+ }
86
+ }
87
+ }