react-lookup-select 1.0.4 → 1.1.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.
package/dist/styles.css CHANGED
@@ -1,863 +1,958 @@
1
- /* Basic styles for react-lookup-select */
2
-
3
- :root {
4
- /* === CORE COLORS === */
5
- --lookup-select-color-primary: #0066cc;
6
- --lookup-select-color-primary-hover: #0052a3;
7
- --lookup-select-color-primary-active: #004085;
8
- --lookup-select-color-bg: #ffffff;
9
- --lookup-select-color-bg-secondary: #f8f9fa;
10
- --lookup-select-color-bg-hover: #f3f4f6;
11
- --lookup-select-color-text: #333333;
12
- --lookup-select-color-text-secondary: #6b7280;
13
- --lookup-select-color-text-muted: #9ca3af;
14
- --lookup-select-color-border: #d1d5db;
15
- --lookup-select-color-border-focus: var(--lookup-select-color-primary);
16
- --lookup-select-color-border-hover: #9ca3af;
17
- --lookup-select-color-error: #dc2626;
18
- --lookup-select-color-success: #16a34a;
19
- --lookup-select-color-warning: #d97706;
20
-
21
- /* === LAYOUT === */
22
- --lookup-select-border-radius: 6px;
23
- --lookup-select-border-radius-sm: 4px;
24
- --lookup-select-border-radius-lg: 8px;
25
- --lookup-select-border-width: 1px;
26
- --lookup-select-spacing: 8px;
27
- --lookup-select-spacing-sm: 4px;
28
- --lookup-select-spacing-lg: 12px;
29
- --lookup-select-spacing-xl: 16px;
30
-
31
- /* === TYPOGRAPHY === */
32
- --lookup-select-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
33
- --lookup-select-font-size: 14px;
34
- --lookup-select-font-size-sm: 12px;
35
- --lookup-select-font-size-lg: 16px;
36
- --lookup-select-font-weight: 400;
37
- --lookup-select-font-weight-medium: 500;
38
- --lookup-select-font-weight-semibold: 600;
39
- --lookup-select-line-height: 1.4;
40
-
41
- /* === SHADOWS === */
42
- --lookup-select-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
43
- --lookup-select-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
44
- --lookup-select-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
45
- --lookup-select-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
46
-
47
- /* === TRANSITIONS === */
48
- --lookup-select-transition-duration: 150ms;
49
- --lookup-select-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
50
-
51
- /* === Z-INDEX === */
52
- --lookup-select-z-index-dropdown: 1000;
53
- --lookup-select-z-index-modal: 1050;
54
- --lookup-select-z-index-overlay: 1040;
55
-
56
- /* === COMPONENT SPECIFIC === */
57
- /* Trigger */
58
- --lookup-select-trigger-height: 36px;
59
- --lookup-select-trigger-padding-x: calc(var(--lookup-select-spacing) * 1.5);
60
- --lookup-select-trigger-padding-y: var(--lookup-select-spacing);
61
- --lookup-select-trigger-gap: var(--lookup-select-spacing-sm);
62
-
63
- /* Modal */
64
- --lookup-select-modal-width: 600px;
65
- --lookup-select-modal-max-height: 500px;
66
- --lookup-select-modal-padding: var(--lookup-select-spacing-xl);
67
-
68
- /* Grid */
69
- --lookup-select-grid-row-height: 40px;
70
- --lookup-select-grid-header-height: 44px;
71
- --lookup-select-grid-cell-padding-x: var(--lookup-select-spacing-lg);
72
- --lookup-select-grid-cell-padding-y: var(--lookup-select-spacing);
73
-
74
- /* Pagination */
75
- --lookup-select-pagination-button-size: 28px;
76
- --lookup-select-pagination-gap: var(--lookup-select-spacing-sm);
77
-
78
- /* Search */
79
- --lookup-select-search-height: 36px;
80
- --lookup-select-search-padding-x: var(--lookup-select-spacing-lg);
81
- }
82
-
83
- /* === ROOT === */
84
- .lookup-select {
85
- position: relative;
86
- display: inline-block;
87
- font-family: var(--lookup-select-font-family);
88
- font-size: var(--lookup-select-font-size);
89
- font-weight: var(--lookup-select-font-weight);
90
- line-height: var(--lookup-select-line-height);
91
- color: var(--lookup-select-color-text);
92
- }
93
-
94
- .lookup-select * {
95
- box-sizing: border-box;
96
- }
97
-
98
- .lookup-select:focus-within {
99
- outline: none;
100
- }
101
-
102
- /* === TRIGGER === */
103
- .lookup-select__trigger {
104
- display: flex;
105
- align-items: center;
106
- justify-content: space-between;
107
- min-height: var(--lookup-select-trigger-height);
108
- padding: var(--lookup-select-trigger-padding-y) var(--lookup-select-trigger-padding-x);
109
- background: var(--lookup-select-color-bg);
110
- border: var(--lookup-select-border-width) solid var(--lookup-select-color-border);
111
- border-radius: var(--lookup-select-border-radius);
112
- cursor: pointer;
113
- transition: all var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
114
- min-width: 200px;
115
- font-size: var(--lookup-select-font-size);
116
- font-weight: var(--lookup-select-font-weight);
117
- line-height: var(--lookup-select-line-height);
118
- color: var(--lookup-select-color-text);
119
- box-shadow: var(--lookup-select-shadow-sm);
120
- }
121
-
122
- .lookup-select__trigger:hover {
123
- border-color: var(--lookup-select-color-border-hover);
124
- background: var(--lookup-select-color-bg-hover);
125
- box-shadow: var(--lookup-select-shadow);
126
- }
127
-
128
- .lookup-select__trigger:focus {
129
- outline: none;
130
- border-color: var(--lookup-select-color-border-focus);
131
- box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2), var(--lookup-select-shadow);
132
- }
133
-
134
-
135
-
136
- .lookup-select__trigger-content {
137
- flex: 1;
138
- display: flex;
139
- align-items: center;
140
- gap: var(--lookup-select-trigger-gap);
141
- min-width: 0; /* Allow text truncation */
142
- }
143
-
144
- .lookup-select__trigger-actions {
145
- display: flex;
146
- align-items: center;
147
- gap: var(--lookup-select-spacing-sm);
148
- flex-shrink: 0;
149
- }
150
-
151
- .lookup-select__clear-button {
152
- display: flex;
153
- align-items: center;
154
- justify-content: center;
155
- width: 24px;
156
- height: 24px;
157
- background: none;
158
- border: none;
159
- border-radius: 50%;
160
- color: var(--lookup-select-color-text-secondary);
161
- cursor: pointer;
162
- transition: all var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
163
- opacity: 0.7;
164
- padding: 2px;
165
- }
166
-
167
- .lookup-select__clear-button:hover {
168
- background: rgba(0, 0, 0, 0.1);
169
- opacity: 1;
170
- color: var(--lookup-select-color-text);
171
- }
172
-
173
- .lookup-select__trigger-icon {
174
- display: flex;
175
- align-items: center;
176
- justify-content: center;
177
- width: 24px;
178
- height: 24px;
179
- flex-shrink: 0;
180
- color: var(--lookup-select-color-text-secondary);
181
- transition: transform var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
182
- }
183
-
184
-
185
-
186
- /* Trigger content styles */
187
- .lookup-select__placeholder {
188
- color: var(--lookup-select-color-text-muted);
189
- font-style: italic;
190
- }
191
-
192
- .lookup-select__selected-text {
193
- color: var(--lookup-select-color-text);
194
- font-weight: var(--lookup-select-font-weight-medium);
195
- overflow: hidden;
196
- text-overflow: ellipsis;
197
- white-space: nowrap;
198
- }
199
-
200
-
201
-
202
- /* === TAGS (Multi-select trigger) === */
203
- .lookup-select__tags {
204
- display: flex;
205
- flex-wrap: wrap;
206
- gap: var(--lookup-select-spacing-sm);
207
- align-items: center;
208
- }
209
-
210
- .lookup-select__tag {
211
- display: inline-flex;
212
- align-items: center;
213
- gap: var(--lookup-select-spacing-sm);
214
- background: var(--lookup-select-color-bg-secondary);
215
- color: var(--lookup-select-color-text);
216
- padding: 4px 8px;
217
- border-radius: var(--lookup-select-border-radius);
218
- font-size: var(--lookup-select-font-size-sm);
219
- font-weight: var(--lookup-select-font-weight-medium);
220
- border: 1px solid var(--lookup-select-color-border);
221
- max-width: 120px;
222
- }
223
-
224
- .lookup-select__tag--more {
225
- background: var(--lookup-select-color-primary);
226
- color: white;
227
- border-color: var(--lookup-select-color-primary);
228
- }
229
-
230
- .lookup-select__tag-remove {
231
- background: rgba(0, 0, 0, 0.1);
232
- border: none;
233
- color: currentColor;
234
- cursor: pointer;
235
- padding: 2px 4px;
236
- font-size: 12px;
237
- line-height: 1;
238
- border-radius: 50%;
239
- width: 16px;
240
- height: 16px;
241
- display: flex;
242
- align-items: center;
243
- justify-content: center;
244
- transition: all var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
245
- opacity: 0.7;
246
- }
247
-
248
- .lookup-select__tag-remove:hover {
249
- background: rgba(0, 0, 0, 0.2);
250
- opacity: 1;
251
- transform: scale(1.1);
252
- }
253
-
254
- /* === MODAL === */
255
- .lookup-select__modal-overlay {
256
- position: fixed;
257
- top: 0;
258
- left: 0;
259
- right: 0;
260
- bottom: 0;
261
- background: rgba(0, 0, 0, 0.5);
262
- display: flex;
263
- align-items: center;
264
- justify-content: center;
265
- z-index: var(--lookup-select-z-index-overlay);
266
- padding: 20px;
267
- }
268
-
269
- .lookup-select__modal {
270
- background: var(--lookup-select-color-bg);
271
- border-radius: var(--lookup-select-border-radius-lg);
272
- box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
273
- max-width: 720px;
274
- width: 95%;
275
- max-height: 85vh;
276
- display: flex;
277
- flex-direction: column;
278
- overflow: hidden;
279
- padding: 24px;
280
- margin: auto;
281
- }
282
-
283
- .lookup-select__modal-header {
284
- display: flex;
285
- align-items: center;
286
- justify-content: space-between;
287
- padding: 0 0 var(--lookup-select-spacing-lg) 0;
288
- border-bottom: 1px solid var(--lookup-select-color-border);
289
- flex-shrink: 0;
290
- margin-bottom: var(--lookup-select-spacing-lg);
291
- }
292
-
293
- .lookup-select__modal-title {
294
- margin: 0;
295
- font-size: 18px;
296
- font-weight: 600;
297
- }
298
-
299
- .lookup-select__modal-close {
300
- background: none;
301
- border: none;
302
- font-size: 24px;
303
- cursor: pointer;
304
- color: #6b7280;
305
- padding: 4px;
306
- border-radius: 4px;
307
- }
308
-
309
- .lookup-select__modal-close:hover {
310
- background: var(--lookup-select-color-hover);
311
- color: var(--lookup-select-color-text);
312
- }
313
-
314
- .lookup-select__modal-body {
315
- flex: 1;
316
- overflow: auto;
317
- display: flex;
318
- flex-direction: column;
319
- min-height: 0; /* Important for flex child to be scrollable */
320
- }
321
-
322
- /* === SEARCH === */
323
- .lookup-select__search {
324
- position: relative;
325
- padding: 0 0 var(--lookup-select-spacing-lg) 0;
326
- border-bottom: 1px solid var(--lookup-select-color-border);
327
- flex-shrink: 0;
328
- background: var(--lookup-select-color-bg);
329
- z-index: 10;
330
- }
331
-
332
- .lookup-select__search-input {
333
- width: 100%;
334
- padding: 12px 16px;
335
- border: 1px solid var(--lookup-select-color-border);
336
- border-radius: var(--lookup-select-border-radius);
337
- font-size: var(--lookup-select-font-size);
338
- font-family: inherit;
339
- background: var(--lookup-select-color-bg);
340
- outline: none;
341
- transition: border-color var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
342
- box-sizing: border-box;
343
- }
344
-
345
- .lookup-select__search-input:focus {
346
- outline: none;
347
- border-color: var(--lookup-select-color-primary);
348
- box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
349
- }
350
-
351
- .lookup-select__search-icon {
352
- position: absolute;
353
- right: calc(var(--lookup-select-spacing) * 3);
354
- top: 50%;
355
- transform: translateY(-50%);
356
- color: #6b7280;
357
- pointer-events: none;
358
- }
359
-
360
- /* === MODAL CONTENT === */
361
- .lookup-select__modal-content {
362
- flex: 1;
363
- overflow: auto;
364
- padding: calc(var(--lookup-select-spacing) * 2);
365
- }
366
-
367
-
368
-
369
- /* === MODAL FOOTER === */
370
- .lookup-select__modal-footer {
371
- display: flex;
372
- align-items: center;
373
- justify-content: space-between;
374
- padding: var(--lookup-select-spacing-lg) 0 0 0;
375
- border-top: 1px solid var(--lookup-select-color-border);
376
- background: var(--lookup-select-color-bg-secondary);
377
- flex-shrink: 0;
378
- margin-top: var(--lookup-select-spacing);
379
- }
380
-
381
- .lookup-select__selected-count {
382
- font-size: 13px;
383
- color: #6b7280;
384
- font-weight: 500;
385
- }
386
-
387
- .lookup-select__modal-actions {
388
- display: flex;
389
- gap: var(--lookup-select-spacing);
390
- }
391
-
392
- .lookup-select__button {
393
- padding: var(--lookup-select-spacing) calc(var(--lookup-select-spacing) * 2);
394
- border-radius: var(--lookup-select-border-radius);
395
- font-size: var(--lookup-select-font-size);
396
- font-weight: 500;
397
- cursor: pointer;
398
- border: 1px solid transparent;
399
- transition: all 0.2s ease;
400
- }
401
-
402
- .lookup-select__button--secondary {
403
- background: var(--lookup-select-color-bg);
404
- color: var(--lookup-select-color-text);
405
- border-color: var(--lookup-select-color-border);
406
- }
407
-
408
- .lookup-select__button--secondary:hover {
409
- background: var(--lookup-select-color-hover);
410
- }
411
-
412
- .lookup-select__button--primary {
413
- background: var(--lookup-select-color-primary);
414
- color: white;
415
- border-color: var(--lookup-select-color-primary);
416
- }
417
-
418
- .lookup-select__button--primary:hover:not(:disabled) {
419
- background: #0052a3;
420
- border-color: #0052a3;
421
- }
422
-
423
- .lookup-select__button--primary:disabled {
424
- opacity: 0.5;
425
- cursor: not-allowed;
426
- }
427
-
428
- /* === PAGINATION === */
429
- .lookup-select__pagination {
430
- display: flex;
431
- align-items: center;
432
- justify-content: space-between;
433
- gap: var(--lookup-select-spacing-lg);
434
- padding: var(--lookup-select-spacing-lg) 0;
435
- }
436
-
437
- .lookup-select__pagination-info {
438
- font-size: var(--lookup-select-font-size-sm);
439
- color: var(--lookup-select-color-text-secondary);
440
- font-weight: var(--lookup-select-font-weight);
441
- white-space: nowrap;
442
- }
443
-
444
- .lookup-select__pagination-controls {
445
- display: flex;
446
- align-items: center;
447
- gap: 2px;
448
- }
449
-
450
- .lookup-select__pagination-button {
451
- display: flex;
452
- align-items: center;
453
- justify-content: center;
454
- width: var(--lookup-select-pagination-button-size);
455
- height: var(--lookup-select-pagination-button-size);
456
- background: var(--lookup-select-color-bg);
457
- border: 1px solid var(--lookup-select-color-border);
458
- border-radius: var(--lookup-select-border-radius);
459
- font-size: var(--lookup-select-font-size-sm);
460
- font-weight: var(--lookup-select-font-weight-medium);
461
- color: var(--lookup-select-color-text);
462
- cursor: pointer;
463
- transition: all var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
464
- user-select: none;
465
- }
466
-
467
- .lookup-select__pagination-button:hover:not(:disabled) {
468
- background: var(--lookup-select-color-hover);
469
- border-color: var(--lookup-select-color-primary);
470
- color: var(--lookup-select-color-primary);
471
- }
472
-
473
- .lookup-select__pagination-button--active {
474
- background: var(--lookup-select-color-primary);
475
- border-color: var(--lookup-select-color-primary);
476
- color: white;
477
- }
478
-
479
- .lookup-select__pagination-button--active:hover {
480
- background: #0052a3;
481
- border-color: #0052a3;
482
- }
483
-
484
- .lookup-select__pagination-button:disabled {
485
- background: var(--lookup-select-color-bg-secondary);
486
- border-color: var(--lookup-select-color-border);
487
- color: var(--lookup-select-color-text-disabled);
488
- cursor: not-allowed;
489
- opacity: 0.6;
490
- }
491
-
492
- .lookup-select__pagination-dots {
493
- display: flex;
494
- align-items: center;
495
- justify-content: center;
496
- width: var(--lookup-select-pagination-button-size);
497
- height: var(--lookup-select-pagination-button-size);
498
- font-size: var(--lookup-select-font-size-sm);
499
- color: var(--lookup-select-color-text-secondary);
500
- user-select: none;
501
- }
502
-
503
- /* Responsive pagination - mobile */
504
- @media (max-width: 480px) {
505
- .lookup-select__pagination {
506
- flex-direction: column;
507
- gap: var(--lookup-select-spacing);
508
- align-items: stretch;
509
- }
510
-
511
- .lookup-select__pagination-info {
512
- text-align: center;
513
- order: 2;
514
- }
515
-
516
- .lookup-select__pagination-controls {
517
- justify-content: center;
518
- order: 1;
519
- }
520
- }
521
-
522
- /* === GRID === */
523
- .lookup-select__grid {
524
- flex: 1;
525
- overflow: auto;
526
- min-height: 0; /* Important for flex child to be scrollable */
527
- position: relative;
528
- }
529
-
530
- .lookup-select__table {
531
- width: 100%;
532
- border-collapse: collapse;
533
- font-size: var(--lookup-select-font-size);
534
- }
535
-
536
- .lookup-select__table-head {
537
- background: var(--lookup-select-color-bg-secondary);
538
- border-bottom: 2px solid var(--lookup-select-color-border);
539
- position: sticky;
540
- top: 0;
541
- z-index: 5;
542
- }
543
-
544
- .lookup-select__table-header {
545
- padding: var(--lookup-select-spacing-lg) var(--lookup-select-grid-cell-padding-x);
546
- text-align: left;
547
- font-weight: 600;
548
- color: var(--lookup-select-color-text);
549
- border-bottom: 1px solid var(--lookup-select-color-border);
550
- background: var(--lookup-select-color-bg-secondary);
551
- white-space: nowrap;
552
- }
553
-
554
- .lookup-select__table-header--checkbox {
555
- width: 40px;
556
- text-align: center;
557
- }
558
-
559
- .lookup-select__table-header-content {
560
- display: flex;
561
- align-items: center;
562
- gap: var(--lookup-select-spacing);
563
- }
564
-
565
- .lookup-select__sort-button {
566
- background: none;
567
- border: none;
568
- color: #6b7280;
569
- cursor: pointer;
570
- padding: 2px;
571
- border-radius: 2px;
572
- font-size: 12px;
573
- }
574
-
575
- .lookup-select__sort-button:hover {
576
- background: var(--lookup-select-color-hover);
577
- color: var(--lookup-select-color-text);
578
- }
579
-
580
- .lookup-select__table-row {
581
- border-bottom: 1px solid #f3f4f6;
582
- cursor: pointer;
583
- transition: background-color 0.2s ease;
584
- }
585
-
586
- .lookup-select__table-row:hover:not(.lookup-select__table-row--disabled) {
587
- background: var(--lookup-select-color-hover);
588
- }
589
-
590
- .lookup-select__table-row--selected {
591
- background: rgba(0, 102, 204, 0.1);
592
- }
593
-
594
- .lookup-select__table-row--selected:hover {
595
- background: rgba(0, 102, 204, 0.15);
596
- }
597
-
598
- .lookup-select__table-row--disabled {
599
- opacity: 0.5;
600
- cursor: not-allowed;
601
- }
602
-
603
- .lookup-select__table-row:focus {
604
- outline: none;
605
- box-shadow: inset 0 0 0 2px rgba(0, 102, 204, 0.3);
606
- }
607
-
608
- .lookup-select__table-cell {
609
- padding: calc(var(--lookup-select-spacing) * 1.5);
610
- border-bottom: 1px solid #f3f4f6;
611
- vertical-align: middle;
612
- }
613
-
614
- .lookup-select__table-cell--checkbox {
615
- width: 40px;
616
- text-align: center;
617
- }
618
-
619
- .lookup-select__checkbox {
620
- display: flex;
621
- align-items: center;
622
- justify-content: center;
623
- }
624
-
625
- .lookup-select__checkbox input[type="checkbox"] {
626
- width: 16px;
627
- height: 16px;
628
- cursor: pointer;
629
- }
630
-
631
- .lookup-select__checkbox input[type="checkbox"]:disabled {
632
- cursor: not-allowed;
633
- }
634
-
635
- /* === GRID STATES === */
636
- .lookup-select__grid-state {
637
- display: flex;
638
- align-items: center;
639
- justify-content: center;
640
- min-height: 200px;
641
- color: #6b7280;
642
- }
643
-
644
- .lookup-select__loading {
645
- display: flex;
646
- flex-direction: column;
647
- align-items: center;
648
- gap: var(--lookup-select-spacing);
649
- }
650
-
651
- .lookup-select__loading-spinner {
652
- width: 24px;
653
- height: 24px;
654
- color: var(--lookup-select-color-primary);
655
- animation: lookup-select-spin 1s linear infinite;
656
- }
657
-
658
- @keyframes lookup-select-spin {
659
- from {
660
- transform: rotate(0deg);
661
- }
662
- to {
663
- transform: rotate(360deg);
664
- }
665
- }
666
-
667
- .lookup-select__error {
668
- text-align: center;
669
- color: var(--lookup-select-color-error);
670
- }
671
-
672
- .lookup-select__empty {
673
- text-align: center;
674
- color: var(--lookup-select-color-text-secondary);
675
- padding: var(--lookup-select-spacing-xl);
676
- font-style: italic;
677
- }
678
-
679
- /* === THEME VARIANTS === */
680
-
681
- /* Dark Theme */
682
- .lookup-select--theme-dark {
683
- --lookup-select-color-primary: #3b82f6;
684
- --lookup-select-color-primary-hover: #2563eb;
685
- --lookup-select-color-primary-active: #1d4ed8;
686
- --lookup-select-color-bg: #1f2937;
687
- --lookup-select-color-bg-secondary: #374151;
688
- --lookup-select-color-bg-hover: #374151;
689
- --lookup-select-color-text: #f9fafb;
690
- --lookup-select-color-text-secondary: #d1d5db;
691
- --lookup-select-color-text-muted: #9ca3af;
692
- --lookup-select-color-border: #4b5563;
693
- --lookup-select-color-border-focus: var(--lookup-select-color-primary);
694
- --lookup-select-color-border-hover: #6b7280;
695
- --lookup-select-color-error: #ef4444;
696
- --lookup-select-color-success: #10b981;
697
- --lookup-select-color-warning: #f59e0b;
698
- }
699
-
700
- /* Minimal Theme */
701
- .lookup-select--theme-minimal {
702
- --lookup-select-color-primary: #000000;
703
- --lookup-select-color-primary-hover: #1f2937;
704
- --lookup-select-color-primary-active: #374151;
705
- --lookup-select-color-bg: #ffffff;
706
- --lookup-select-color-bg-secondary: #ffffff;
707
- --lookup-select-color-bg-hover: #f9fafb;
708
- --lookup-select-color-text: #000000;
709
- --lookup-select-color-text-secondary: #4b5563;
710
- --lookup-select-color-text-muted: #9ca3af;
711
- --lookup-select-color-border: #e5e7eb;
712
- --lookup-select-color-border-focus: #000000;
713
- --lookup-select-color-border-hover: #d1d5db;
714
- --lookup-select-border-radius: 0px;
715
- --lookup-select-border-radius-sm: 0px;
716
- --lookup-select-border-radius-lg: 0px;
717
- --lookup-select-shadow-sm: none;
718
- --lookup-select-shadow: none;
719
- --lookup-select-shadow-md: none;
720
- --lookup-select-shadow-lg: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
721
- }
722
-
723
- /* Compact Theme */
724
- .lookup-select--theme-compact {
725
- --lookup-select-spacing: 6px;
726
- --lookup-select-spacing-sm: 3px;
727
- --lookup-select-spacing-lg: 9px;
728
- --lookup-select-spacing-xl: 12px;
729
- --lookup-select-font-size: 13px;
730
- --lookup-select-font-size-sm: 11px;
731
- --lookup-select-font-size-lg: 14px;
732
- --lookup-select-trigger-height: 32px;
733
- --lookup-select-grid-row-height: 36px;
734
- --lookup-select-grid-header-height: 40px;
735
- --lookup-select-modal-padding: var(--lookup-select-spacing-lg);
736
- --lookup-select-border-radius: 4px;
737
- --lookup-select-border-radius-sm: 2px;
738
- --lookup-select-border-radius-lg: 6px;
739
- }
740
-
741
- /* Size Variants */
742
- .lookup-select--size-small {
743
- --lookup-select-font-size: 12px;
744
- --lookup-select-trigger-height: 28px;
745
- --lookup-select-spacing: 6px;
746
- --lookup-select-grid-row-height: 32px;
747
- }
748
-
749
- .lookup-select--size-large {
750
- --lookup-select-font-size: 16px;
751
- --lookup-select-trigger-height: 44px;
752
- --lookup-select-spacing: 12px;
753
- --lookup-select-grid-row-height: 48px;
754
- }
755
-
756
- /* === VIRTUAL GRID === */
757
- .lookup-select__virtual-grid {
758
- display: flex;
759
- flex-direction: column;
760
- height: 100%;
761
- }
762
-
763
- .lookup-select__virtual-container {
764
- flex: 1;
765
- overflow: auto;
766
- position: relative;
767
- scrollbar-width: thin;
768
- scrollbar-color: var(--lookup-select-color-border) transparent;
769
- }
770
-
771
- .lookup-select__virtual-container::-webkit-scrollbar {
772
- width: 8px;
773
- }
774
-
775
- .lookup-select__virtual-container::-webkit-scrollbar-track {
776
- background: transparent;
777
- }
778
-
779
- .lookup-select__virtual-container::-webkit-scrollbar-thumb {
780
- background: var(--lookup-select-color-border);
781
- border-radius: var(--lookup-select-border-radius);
782
- }
783
-
784
- .lookup-select__virtual-container::-webkit-scrollbar-thumb:hover {
785
- background: var(--lookup-select-color-border-hover);
786
- }
787
-
788
- .lookup-select__virtual-content {
789
- position: relative;
790
- }
791
-
792
- .lookup-select__virtual-row {
793
- position: absolute;
794
- left: 0;
795
- right: 0;
796
- cursor: pointer;
797
- transition: background-color var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
798
- }
799
-
800
- .lookup-select__virtual-row:hover {
801
- background: var(--lookup-select-color-bg-hover);
802
- }
803
-
804
-
805
-
806
- .lookup-select__virtual-row .lookup-select__table {
807
- width: 100%;
808
- height: 100%;
809
- border-collapse: collapse;
810
- }
811
-
812
- .lookup-select__virtual-row .lookup-select__cell {
813
- padding: var(--lookup-select-grid-cell-padding-y) var(--lookup-select-grid-cell-padding-x);
814
- border-bottom: 1px solid var(--lookup-select-color-border);
815
- vertical-align: middle;
816
- font-size: var(--lookup-select-font-size);
817
- line-height: var(--lookup-select-line-height);
818
- }
819
-
820
- .lookup-select__virtual-row .lookup-select__cell--checkbox {
821
- width: 40px;
822
- text-align: center;
823
- padding: var(--lookup-select-grid-cell-padding-y) var(--lookup-select-spacing);
824
- }
825
-
826
- /* === ACCESSIBILITY === */
827
- .sr-only {
828
- position: absolute;
829
- width: 1px;
830
- height: 1px;
831
- padding: 0;
832
- margin: -1px;
833
- overflow: hidden;
834
- clip: rect(0, 0, 0, 0);
835
- white-space: nowrap;
836
- border: 0;
837
- }
838
-
839
- /* High contrast mode support */
840
- @media (prefers-contrast: high) {
841
- .lookup-select {
842
- --lookup-select-color-primary: #0000FF;
843
- --lookup-select-color-bg: #FFFFFF;
844
- --lookup-select-color-text: #000000;
845
- --lookup-select-color-border: #000000;
846
- --lookup-select-shadow: none;
847
- }
848
- }
849
-
850
- /* Reduced motion support */
851
- @media (prefers-reduced-motion: reduce) {
852
- .lookup-select * {
853
- animation-duration: 0.01ms !important;
854
- animation-iteration-count: 1 !important;
855
- transition-duration: 0.01ms !important;
856
- }
857
- }
858
-
859
- /* Focus visible support */
860
- .lookup-select *:focus-visible {
861
- outline: 2px solid var(--lookup-select-color-primary);
862
- outline-offset: 2px;
1
+ /* Basic styles for react-lookup-select */
2
+
3
+ :root {
4
+ /* === CORE COLORS === */
5
+ --lookup-select-color-primary: #0066cc;
6
+ --lookup-select-color-primary-hover: #0052a3;
7
+ --lookup-select-color-primary-active: #004085;
8
+ --lookup-select-color-bg: #ffffff;
9
+ --lookup-select-color-bg-secondary: #f8f9fa;
10
+ --lookup-select-color-bg-hover: #f3f4f6;
11
+ --lookup-select-color-text: #333333;
12
+ --lookup-select-color-text-secondary: #6b7280;
13
+ --lookup-select-color-text-muted: #9ca3af;
14
+ --lookup-select-color-border: #d1d5db;
15
+ --lookup-select-color-border-focus: var(--lookup-select-color-primary);
16
+ --lookup-select-color-border-hover: #9ca3af;
17
+ --lookup-select-color-error: #dc2626;
18
+ --lookup-select-color-success: #16a34a;
19
+ --lookup-select-color-warning: #d97706;
20
+
21
+ /* === LAYOUT === */
22
+ --lookup-select-border-radius: 6px;
23
+ --lookup-select-border-radius-sm: 4px;
24
+ --lookup-select-border-radius-lg: 8px;
25
+ --lookup-select-border-width: 1px;
26
+ --lookup-select-spacing: 8px;
27
+ --lookup-select-spacing-sm: 4px;
28
+ --lookup-select-spacing-lg: 12px;
29
+ --lookup-select-spacing-xl: 16px;
30
+
31
+ /* === TYPOGRAPHY === */
32
+ --lookup-select-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
33
+ --lookup-select-font-size: 14px;
34
+ --lookup-select-font-size-sm: 12px;
35
+ --lookup-select-font-size-lg: 16px;
36
+ --lookup-select-font-weight: 400;
37
+ --lookup-select-font-weight-medium: 500;
38
+ --lookup-select-font-weight-semibold: 600;
39
+ --lookup-select-line-height: 1.4;
40
+
41
+ /* === SHADOWS === */
42
+ --lookup-select-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
43
+ --lookup-select-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
44
+ --lookup-select-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
45
+ --lookup-select-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
46
+
47
+ /* === TRANSITIONS === */
48
+ --lookup-select-transition-duration: 150ms;
49
+ --lookup-select-transition-timing: cubic-bezier(0.4, 0, 0.2, 1);
50
+
51
+ /* === Z-INDEX === */
52
+ --lookup-select-z-index-dropdown: 1000;
53
+ --lookup-select-z-index-modal: 1050;
54
+ --lookup-select-z-index-overlay: 1040;
55
+
56
+ /* === COMPONENT SPECIFIC === */
57
+ /* Trigger */
58
+ --lookup-select-trigger-height: 36px;
59
+ --lookup-select-trigger-padding-x: calc(var(--lookup-select-spacing) * 1.5);
60
+ --lookup-select-trigger-padding-y: var(--lookup-select-spacing);
61
+ --lookup-select-trigger-gap: var(--lookup-select-spacing-sm);
62
+
63
+ /* Modal */
64
+ --lookup-select-modal-width: 600px;
65
+ --lookup-select-modal-max-height: 500px;
66
+ --lookup-select-modal-padding: var(--lookup-select-spacing-xl);
67
+
68
+ /* Grid */
69
+ --lookup-select-grid-row-height: 40px;
70
+ --lookup-select-grid-header-height: 44px;
71
+ --lookup-select-grid-cell-padding-x: var(--lookup-select-spacing-lg);
72
+ --lookup-select-grid-cell-padding-y: var(--lookup-select-spacing);
73
+
74
+ /* Pagination */
75
+ --lookup-select-pagination-button-size: 28px;
76
+ --lookup-select-pagination-gap: var(--lookup-select-spacing-sm);
77
+
78
+ /* Search */
79
+ --lookup-select-search-height: 36px;
80
+ --lookup-select-search-padding-x: var(--lookup-select-spacing-lg);
81
+ }
82
+
83
+ /* === ROOT === */
84
+ .lookup-select {
85
+ position: relative;
86
+ display: inline-block;
87
+ font-family: var(--lookup-select-font-family);
88
+ font-size: var(--lookup-select-font-size);
89
+ font-weight: var(--lookup-select-font-weight);
90
+ line-height: var(--lookup-select-line-height);
91
+ color: var(--lookup-select-color-text);
92
+ }
93
+
94
+ .lookup-select * {
95
+ box-sizing: border-box;
96
+ }
97
+
98
+ .lookup-select:focus-within {
99
+ outline: none;
100
+ }
101
+
102
+ /* === TRIGGER === */
103
+ .lookup-select__trigger {
104
+ display: flex;
105
+ align-items: center;
106
+ justify-content: space-between;
107
+ min-height: var(--lookup-select-trigger-height);
108
+ padding: var(--lookup-select-trigger-padding-y) var(--lookup-select-trigger-padding-x);
109
+ background: var(--lookup-select-color-bg);
110
+ border: var(--lookup-select-border-width) solid var(--lookup-select-color-border);
111
+ border-radius: var(--lookup-select-border-radius);
112
+ cursor: pointer;
113
+ transition: all var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
114
+ min-width: 200px;
115
+ font-size: var(--lookup-select-font-size);
116
+ font-weight: var(--lookup-select-font-weight);
117
+ line-height: var(--lookup-select-line-height);
118
+ color: var(--lookup-select-color-text);
119
+ box-shadow: var(--lookup-select-shadow-sm);
120
+ }
121
+
122
+ .lookup-select__trigger:hover {
123
+ border-color: var(--lookup-select-color-border-hover);
124
+ background: var(--lookup-select-color-bg-hover);
125
+ box-shadow: var(--lookup-select-shadow);
126
+ }
127
+
128
+ .lookup-select__trigger:focus {
129
+ outline: none;
130
+ border-color: var(--lookup-select-color-border-focus);
131
+ box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2), var(--lookup-select-shadow);
132
+ }
133
+
134
+
135
+
136
+ .lookup-select__trigger-content {
137
+ flex: 1;
138
+ display: flex;
139
+ align-items: center;
140
+ gap: var(--lookup-select-trigger-gap);
141
+ min-width: 0; /* Allow text truncation */
142
+ }
143
+
144
+ .lookup-select__trigger-actions {
145
+ display: flex;
146
+ align-items: center;
147
+ gap: var(--lookup-select-spacing-sm);
148
+ flex-shrink: 0;
149
+ }
150
+
151
+ .lookup-select__clear-button {
152
+ display: flex;
153
+ align-items: center;
154
+ justify-content: center;
155
+ width: 24px;
156
+ height: 24px;
157
+ background: none;
158
+ border: none;
159
+ border-radius: 50%;
160
+ color: var(--lookup-select-color-text-secondary);
161
+ cursor: pointer;
162
+ transition: all var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
163
+ opacity: 0.7;
164
+ padding: 2px;
165
+ }
166
+
167
+ .lookup-select__clear-button:hover {
168
+ background: rgba(0, 0, 0, 0.1);
169
+ opacity: 1;
170
+ color: var(--lookup-select-color-text);
171
+ }
172
+
173
+ .lookup-select__trigger-icon {
174
+ display: flex;
175
+ align-items: center;
176
+ justify-content: center;
177
+ width: 24px;
178
+ height: 24px;
179
+ flex-shrink: 0;
180
+ color: var(--lookup-select-color-text-secondary);
181
+ transition: transform var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
182
+ }
183
+
184
+
185
+
186
+ /* Trigger content styles */
187
+ .lookup-select__placeholder {
188
+ color: var(--lookup-select-color-text-muted);
189
+ font-style: italic;
190
+ }
191
+
192
+ .lookup-select__selected-text {
193
+ color: var(--lookup-select-color-text);
194
+ font-weight: var(--lookup-select-font-weight-medium);
195
+ overflow: hidden;
196
+ text-overflow: ellipsis;
197
+ white-space: nowrap;
198
+ }
199
+
200
+
201
+
202
+ /* === TAGS (Multi-select trigger) === */
203
+ .lookup-select__tags {
204
+ display: flex;
205
+ flex-wrap: wrap;
206
+ gap: var(--lookup-select-spacing-sm);
207
+ align-items: center;
208
+ }
209
+
210
+ .lookup-select__tag {
211
+ display: inline-flex;
212
+ align-items: center;
213
+ gap: var(--lookup-select-spacing-sm);
214
+ background: var(--lookup-select-color-bg-secondary);
215
+ color: var(--lookup-select-color-text);
216
+ padding: 4px 8px;
217
+ border-radius: var(--lookup-select-border-radius);
218
+ font-size: var(--lookup-select-font-size-sm);
219
+ font-weight: var(--lookup-select-font-weight-medium);
220
+ border: 1px solid var(--lookup-select-color-border);
221
+ max-width: 120px;
222
+ }
223
+
224
+ .lookup-select__tag--more {
225
+ background: var(--lookup-select-color-primary);
226
+ color: white;
227
+ border-color: var(--lookup-select-color-primary);
228
+ }
229
+
230
+ .lookup-select__tag-remove {
231
+ background: rgba(0, 0, 0, 0.1);
232
+ border: none;
233
+ color: currentColor;
234
+ cursor: pointer;
235
+ padding: 2px 4px;
236
+ font-size: 12px;
237
+ line-height: 1;
238
+ border-radius: 50%;
239
+ width: 16px;
240
+ height: 16px;
241
+ display: flex;
242
+ align-items: center;
243
+ justify-content: center;
244
+ transition: all var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
245
+ opacity: 0.7;
246
+ }
247
+
248
+ .lookup-select__tag-remove:hover {
249
+ background: rgba(0, 0, 0, 0.2);
250
+ opacity: 1;
251
+ transform: scale(1.1);
252
+ }
253
+
254
+ /* === MODAL === */
255
+ .lookup-select__modal-overlay {
256
+ position: fixed;
257
+ top: 0;
258
+ left: 0;
259
+ right: 0;
260
+ bottom: 0;
261
+ background: rgba(0, 0, 0, 0.5);
262
+ display: flex;
263
+ align-items: center;
264
+ justify-content: center;
265
+ z-index: var(--lookup-select-z-index-overlay);
266
+ padding: 20px;
267
+ }
268
+
269
+ .lookup-select__modal {
270
+ background: var(--lookup-select-color-bg);
271
+ border-radius: var(--lookup-select-border-radius-lg);
272
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
273
+ max-width: 720px;
274
+ width: 95%;
275
+ max-height: 85vh;
276
+ display: flex;
277
+ flex-direction: column;
278
+ overflow: hidden;
279
+ padding: 24px;
280
+ margin: auto;
281
+ }
282
+
283
+ .lookup-select__modal-header {
284
+ display: flex;
285
+ align-items: center;
286
+ justify-content: space-between;
287
+ padding: 0 0 var(--lookup-select-spacing-lg) 0;
288
+ border-bottom: 1px solid var(--lookup-select-color-border);
289
+ flex-shrink: 0;
290
+ margin-bottom: var(--lookup-select-spacing-lg);
291
+ }
292
+
293
+ .lookup-select__modal-title {
294
+ margin: 0;
295
+ font-size: 18px;
296
+ font-weight: 600;
297
+ }
298
+
299
+ .lookup-select__modal-close {
300
+ background: none;
301
+ border: none;
302
+ font-size: 24px;
303
+ cursor: pointer;
304
+ color: #6b7280;
305
+ padding: 4px;
306
+ border-radius: 4px;
307
+ }
308
+
309
+ .lookup-select__modal-close:hover {
310
+ background: var(--lookup-select-color-hover);
311
+ color: var(--lookup-select-color-text);
312
+ }
313
+
314
+ .lookup-select__modal-body {
315
+ flex: 1;
316
+ overflow: auto;
317
+ display: flex;
318
+ flex-direction: column;
319
+ min-height: 0; /* Important for flex child to be scrollable */
320
+ }
321
+
322
+ /* === SEARCH === */
323
+ .lookup-select__search {
324
+ position: relative;
325
+ padding: 0 0 var(--lookup-select-spacing-lg) 0;
326
+ border-bottom: 1px solid var(--lookup-select-color-border);
327
+ flex-shrink: 0;
328
+ background: var(--lookup-select-color-bg);
329
+ z-index: 10;
330
+ }
331
+
332
+ .lookup-select__search-input {
333
+ width: 100%;
334
+ padding: 12px 16px;
335
+ border: 1px solid var(--lookup-select-color-border);
336
+ border-radius: var(--lookup-select-border-radius);
337
+ font-size: var(--lookup-select-font-size);
338
+ font-family: inherit;
339
+ background: var(--lookup-select-color-bg);
340
+ outline: none;
341
+ transition: border-color var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
342
+ box-sizing: border-box;
343
+ }
344
+
345
+ .lookup-select__search-input:focus {
346
+ outline: none;
347
+ border-color: var(--lookup-select-color-primary);
348
+ box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
349
+ }
350
+
351
+ .lookup-select__search-icon {
352
+ position: absolute;
353
+ right: calc(var(--lookup-select-spacing) * 3);
354
+ top: 50%;
355
+ transform: translateY(-50%);
356
+ color: #6b7280;
357
+ pointer-events: none;
358
+ }
359
+
360
+ /* === MODAL CONTENT === */
361
+ .lookup-select__modal-content {
362
+ flex: 1;
363
+ overflow: auto;
364
+ padding: calc(var(--lookup-select-spacing) * 2);
365
+ }
366
+
367
+
368
+
369
+ /* === MODAL FOOTER === */
370
+ .lookup-select__modal-footer {
371
+ display: flex;
372
+ align-items: center;
373
+ justify-content: space-between;
374
+ padding: var(--lookup-select-spacing-lg) 0 0 0;
375
+ border-top: 1px solid var(--lookup-select-color-border);
376
+ background: var(--lookup-select-color-bg-secondary);
377
+ flex-shrink: 0;
378
+ margin-top: var(--lookup-select-spacing);
379
+ }
380
+
381
+ .lookup-select__selected-count {
382
+ font-size: 13px;
383
+ color: #6b7280;
384
+ font-weight: 500;
385
+ }
386
+
387
+ .lookup-select__modal-actions {
388
+ display: flex;
389
+ gap: var(--lookup-select-spacing);
390
+ }
391
+
392
+ .lookup-select__button {
393
+ padding: var(--lookup-select-spacing) calc(var(--lookup-select-spacing) * 2);
394
+ border-radius: var(--lookup-select-border-radius);
395
+ font-size: var(--lookup-select-font-size);
396
+ font-weight: 500;
397
+ cursor: pointer;
398
+ border: 1px solid transparent;
399
+ transition: all 0.2s ease;
400
+ }
401
+
402
+ .lookup-select__button--secondary {
403
+ background: var(--lookup-select-color-bg);
404
+ color: var(--lookup-select-color-text);
405
+ border-color: var(--lookup-select-color-border);
406
+ }
407
+
408
+ .lookup-select__button--secondary:hover {
409
+ background: var(--lookup-select-color-hover);
410
+ }
411
+
412
+ .lookup-select__button--primary {
413
+ background: var(--lookup-select-color-primary);
414
+ color: white;
415
+ border-color: var(--lookup-select-color-primary);
416
+ }
417
+
418
+ .lookup-select__button--primary:hover:not(:disabled) {
419
+ background: #0052a3;
420
+ border-color: #0052a3;
421
+ }
422
+
423
+ .lookup-select__button--primary:disabled {
424
+ opacity: 0.5;
425
+ cursor: not-allowed;
426
+ }
427
+
428
+ /* === PAGINATION === */
429
+ .lookup-select__pagination {
430
+ display: flex;
431
+ align-items: center;
432
+ justify-content: space-between;
433
+ gap: var(--lookup-select-spacing-lg);
434
+ padding: var(--lookup-select-spacing-lg) 0;
435
+ }
436
+
437
+ .lookup-select__pagination-info {
438
+ font-size: var(--lookup-select-font-size-sm);
439
+ color: var(--lookup-select-color-text-secondary);
440
+ font-weight: var(--lookup-select-font-weight);
441
+ white-space: nowrap;
442
+ }
443
+
444
+ .lookup-select__pagination-controls {
445
+ display: flex;
446
+ align-items: center;
447
+ gap: 2px;
448
+ }
449
+
450
+ .lookup-select__pagination-button {
451
+ display: flex;
452
+ align-items: center;
453
+ justify-content: center;
454
+ width: var(--lookup-select-pagination-button-size);
455
+ height: var(--lookup-select-pagination-button-size);
456
+ background: var(--lookup-select-color-bg);
457
+ border: 1px solid var(--lookup-select-color-border);
458
+ border-radius: var(--lookup-select-border-radius);
459
+ font-size: var(--lookup-select-font-size-sm);
460
+ font-weight: var(--lookup-select-font-weight-medium);
461
+ color: var(--lookup-select-color-text);
462
+ cursor: pointer;
463
+ transition: all var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
464
+ user-select: none;
465
+ }
466
+
467
+ .lookup-select__pagination-button:hover:not(:disabled) {
468
+ background: var(--lookup-select-color-hover);
469
+ border-color: var(--lookup-select-color-primary);
470
+ color: var(--lookup-select-color-primary);
471
+ }
472
+
473
+ .lookup-select__pagination-button--active {
474
+ background: var(--lookup-select-color-primary);
475
+ border-color: var(--lookup-select-color-primary);
476
+ color: white;
477
+ }
478
+
479
+ .lookup-select__pagination-button--active:hover {
480
+ background: #0052a3;
481
+ border-color: #0052a3;
482
+ }
483
+
484
+ .lookup-select__pagination-button:disabled {
485
+ background: var(--lookup-select-color-bg-secondary);
486
+ border-color: var(--lookup-select-color-border);
487
+ color: var(--lookup-select-color-text-disabled);
488
+ cursor: not-allowed;
489
+ opacity: 0.6;
490
+ }
491
+
492
+ .lookup-select__pagination-dots {
493
+ display: flex;
494
+ align-items: center;
495
+ justify-content: center;
496
+ width: var(--lookup-select-pagination-button-size);
497
+ height: var(--lookup-select-pagination-button-size);
498
+ font-size: var(--lookup-select-font-size-sm);
499
+ color: var(--lookup-select-color-text-secondary);
500
+ user-select: none;
501
+ }
502
+
503
+ /* Responsive pagination - mobile */
504
+ @media (max-width: 480px) {
505
+ .lookup-select__pagination {
506
+ flex-direction: column;
507
+ gap: var(--lookup-select-spacing);
508
+ align-items: stretch;
509
+ }
510
+
511
+ .lookup-select__pagination-info {
512
+ text-align: center;
513
+ order: 2;
514
+ }
515
+
516
+ .lookup-select__pagination-controls {
517
+ justify-content: center;
518
+ order: 1;
519
+ }
520
+ }
521
+
522
+ /* === GRID === */
523
+ .lookup-select__grid {
524
+ flex: 1;
525
+ overflow: auto;
526
+ min-height: 0; /* Important for flex child to be scrollable */
527
+ position: relative;
528
+ }
529
+
530
+ .lookup-select__table {
531
+ width: 100%;
532
+ border-collapse: collapse;
533
+ font-size: var(--lookup-select-font-size);
534
+ }
535
+
536
+ .lookup-select__table-head {
537
+ background: var(--lookup-select-color-bg-secondary);
538
+ border-bottom: 2px solid var(--lookup-select-color-border);
539
+ position: sticky;
540
+ top: 0;
541
+ z-index: 5;
542
+ }
543
+
544
+ .lookup-select__table-header {
545
+ padding: var(--lookup-select-spacing-lg) var(--lookup-select-grid-cell-padding-x);
546
+ text-align: left;
547
+ font-weight: 600;
548
+ color: var(--lookup-select-color-text);
549
+ border-bottom: 1px solid var(--lookup-select-color-border);
550
+ background: var(--lookup-select-color-bg-secondary);
551
+ white-space: nowrap;
552
+ }
553
+
554
+ .lookup-select__table-header--checkbox {
555
+ width: 40px;
556
+ text-align: center;
557
+ }
558
+
559
+ .lookup-select__table-header-content {
560
+ display: flex;
561
+ align-items: center;
562
+ gap: var(--lookup-select-spacing);
563
+ }
564
+
565
+ .lookup-select__sort-button {
566
+ background: none;
567
+ border: none;
568
+ color: #6b7280;
569
+ cursor: pointer;
570
+ padding: 2px;
571
+ border-radius: 2px;
572
+ font-size: 12px;
573
+ }
574
+
575
+ .lookup-select__sort-button:hover {
576
+ background: var(--lookup-select-color-hover);
577
+ color: var(--lookup-select-color-text);
578
+ }
579
+
580
+ .lookup-select__table-row {
581
+ border-bottom: 1px solid #f3f4f6;
582
+ cursor: pointer;
583
+ transition: background-color 0.2s ease;
584
+ }
585
+
586
+ .lookup-select__table-row:hover:not(.lookup-select__table-row--disabled) {
587
+ background: var(--lookup-select-color-hover);
588
+ }
589
+
590
+ .lookup-select__table-row--selected {
591
+ background: rgba(0, 102, 204, 0.1);
592
+ }
593
+
594
+ .lookup-select__table-row--selected:hover {
595
+ background: rgba(0, 102, 204, 0.15);
596
+ }
597
+
598
+ .lookup-select__table-row--disabled {
599
+ opacity: 0.5;
600
+ cursor: not-allowed;
601
+ }
602
+
603
+ .lookup-select__table-row:focus {
604
+ outline: none;
605
+ box-shadow: inset 0 0 0 2px rgba(0, 102, 204, 0.3);
606
+ }
607
+
608
+ .lookup-select__table-cell {
609
+ padding: calc(var(--lookup-select-spacing) * 1.5);
610
+ border-bottom: 1px solid #f3f4f6;
611
+ vertical-align: middle;
612
+ }
613
+
614
+ .lookup-select__table-cell--checkbox {
615
+ width: 40px;
616
+ text-align: center;
617
+ }
618
+
619
+ .lookup-select__checkbox {
620
+ display: flex;
621
+ align-items: center;
622
+ justify-content: center;
623
+ }
624
+
625
+ .lookup-select__checkbox input[type="checkbox"] {
626
+ width: 16px;
627
+ height: 16px;
628
+ cursor: pointer;
629
+ }
630
+
631
+ .lookup-select__checkbox input[type="checkbox"]:disabled {
632
+ cursor: not-allowed;
633
+ }
634
+
635
+ /* === GRID STATES === */
636
+ .lookup-select__grid-state {
637
+ display: flex;
638
+ align-items: center;
639
+ justify-content: center;
640
+ min-height: 200px;
641
+ color: #6b7280;
642
+ }
643
+
644
+ .lookup-select__loading {
645
+ display: flex;
646
+ flex-direction: column;
647
+ align-items: center;
648
+ gap: var(--lookup-select-spacing);
649
+ }
650
+
651
+ .lookup-select__loading-spinner {
652
+ width: 24px;
653
+ height: 24px;
654
+ color: var(--lookup-select-color-primary);
655
+ animation: lookup-select-spin 1s linear infinite;
656
+ }
657
+
658
+ @keyframes lookup-select-spin {
659
+ from {
660
+ transform: rotate(0deg);
661
+ }
662
+ to {
663
+ transform: rotate(360deg);
664
+ }
665
+ }
666
+
667
+ .lookup-select__error {
668
+ text-align: center;
669
+ color: var(--lookup-select-color-error);
670
+ }
671
+
672
+ .lookup-select__empty {
673
+ text-align: center;
674
+ color: var(--lookup-select-color-text-secondary);
675
+ padding: var(--lookup-select-spacing-xl);
676
+ font-style: italic;
677
+ }
678
+
679
+ /* === THEME VARIANTS === */
680
+
681
+ /* Dark Theme */
682
+ .lookup-select--theme-dark {
683
+ --lookup-select-color-primary: #3b82f6;
684
+ --lookup-select-color-primary-hover: #2563eb;
685
+ --lookup-select-color-primary-active: #1d4ed8;
686
+ --lookup-select-color-bg: #1f2937;
687
+ --lookup-select-color-bg-secondary: #374151;
688
+ --lookup-select-color-bg-hover: #374151;
689
+ --lookup-select-color-text: #f9fafb;
690
+ --lookup-select-color-text-secondary: #d1d5db;
691
+ --lookup-select-color-text-muted: #9ca3af;
692
+ --lookup-select-color-border: #4b5563;
693
+ --lookup-select-color-border-focus: var(--lookup-select-color-primary);
694
+ --lookup-select-color-border-hover: #6b7280;
695
+ --lookup-select-color-error: #ef4444;
696
+ --lookup-select-color-success: #10b981;
697
+ --lookup-select-color-warning: #f59e0b;
698
+ }
699
+
700
+ /* Minimal Theme */
701
+ .lookup-select--theme-minimal {
702
+ --lookup-select-color-primary: #000000;
703
+ --lookup-select-color-primary-hover: #1f2937;
704
+ --lookup-select-color-primary-active: #374151;
705
+ --lookup-select-color-bg: #ffffff;
706
+ --lookup-select-color-bg-secondary: #ffffff;
707
+ --lookup-select-color-bg-hover: #f9fafb;
708
+ --lookup-select-color-text: #000000;
709
+ --lookup-select-color-text-secondary: #4b5563;
710
+ --lookup-select-color-text-muted: #9ca3af;
711
+ --lookup-select-color-border: #e5e7eb;
712
+ --lookup-select-color-border-focus: #000000;
713
+ --lookup-select-color-border-hover: #d1d5db;
714
+ --lookup-select-border-radius: 0px;
715
+ --lookup-select-border-radius-sm: 0px;
716
+ --lookup-select-border-radius-lg: 0px;
717
+ --lookup-select-shadow-sm: none;
718
+ --lookup-select-shadow: none;
719
+ --lookup-select-shadow-md: none;
720
+ --lookup-select-shadow-lg: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
721
+ }
722
+
723
+ /* Compact Theme */
724
+ .lookup-select--theme-compact {
725
+ --lookup-select-spacing: 6px;
726
+ --lookup-select-spacing-sm: 3px;
727
+ --lookup-select-spacing-lg: 9px;
728
+ --lookup-select-spacing-xl: 12px;
729
+ --lookup-select-font-size: 13px;
730
+ --lookup-select-font-size-sm: 11px;
731
+ --lookup-select-font-size-lg: 14px;
732
+ --lookup-select-trigger-height: 32px;
733
+ --lookup-select-grid-row-height: 36px;
734
+ --lookup-select-grid-header-height: 40px;
735
+ --lookup-select-modal-padding: var(--lookup-select-spacing-lg);
736
+ --lookup-select-border-radius: 4px;
737
+ --lookup-select-border-radius-sm: 2px;
738
+ --lookup-select-border-radius-lg: 6px;
739
+ }
740
+
741
+ /* Size Variants */
742
+ .lookup-select--size-small {
743
+ --lookup-select-font-size: 12px;
744
+ --lookup-select-trigger-height: 28px;
745
+ --lookup-select-spacing: 6px;
746
+ --lookup-select-grid-row-height: 32px;
747
+ }
748
+
749
+ .lookup-select--size-large {
750
+ --lookup-select-font-size: 16px;
751
+ --lookup-select-trigger-height: 44px;
752
+ --lookup-select-spacing: 12px;
753
+ --lookup-select-grid-row-height: 48px;
754
+ }
755
+
756
+ /* === VIRTUAL GRID === */
757
+ .lookup-select__virtual-grid {
758
+ display: flex;
759
+ flex-direction: column;
760
+ height: 100%;
761
+ }
762
+
763
+ .lookup-select__virtual-container {
764
+ flex: 1;
765
+ overflow: auto;
766
+ position: relative;
767
+ scrollbar-width: thin;
768
+ scrollbar-color: var(--lookup-select-color-border) transparent;
769
+ }
770
+
771
+ .lookup-select__virtual-container::-webkit-scrollbar {
772
+ width: 8px;
773
+ }
774
+
775
+ .lookup-select__virtual-container::-webkit-scrollbar-track {
776
+ background: transparent;
777
+ }
778
+
779
+ .lookup-select__virtual-container::-webkit-scrollbar-thumb {
780
+ background: var(--lookup-select-color-border);
781
+ border-radius: var(--lookup-select-border-radius);
782
+ }
783
+
784
+ .lookup-select__virtual-container::-webkit-scrollbar-thumb:hover {
785
+ background: var(--lookup-select-color-border-hover);
786
+ }
787
+
788
+ .lookup-select__virtual-content {
789
+ position: relative;
790
+ }
791
+
792
+ .lookup-select__virtual-row {
793
+ position: absolute;
794
+ left: 0;
795
+ right: 0;
796
+ cursor: pointer;
797
+ transition: background-color var(--lookup-select-transition-duration) var(--lookup-select-transition-timing);
798
+ }
799
+
800
+ .lookup-select__virtual-row:hover {
801
+ background: var(--lookup-select-color-bg-hover);
802
+ }
803
+
804
+
805
+
806
+ .lookup-select__virtual-row .lookup-select__table {
807
+ width: 100%;
808
+ height: 100%;
809
+ border-collapse: collapse;
810
+ }
811
+
812
+ .lookup-select__virtual-row .lookup-select__cell {
813
+ padding: var(--lookup-select-grid-cell-padding-y) var(--lookup-select-grid-cell-padding-x);
814
+ border-bottom: 1px solid var(--lookup-select-color-border);
815
+ vertical-align: middle;
816
+ font-size: var(--lookup-select-font-size);
817
+ line-height: var(--lookup-select-line-height);
818
+ }
819
+
820
+ .lookup-select__virtual-row .lookup-select__cell--checkbox {
821
+ width: 40px;
822
+ text-align: center;
823
+ padding: var(--lookup-select-grid-cell-padding-y) var(--lookup-select-spacing);
824
+ }
825
+
826
+ /* === ACCESSIBILITY === */
827
+ .sr-only {
828
+ position: absolute;
829
+ width: 1px;
830
+ height: 1px;
831
+ padding: 0;
832
+ margin: -1px;
833
+ overflow: hidden;
834
+ clip: rect(0, 0, 0, 0);
835
+ white-space: nowrap;
836
+ border: 0;
837
+ }
838
+
839
+ /* High contrast mode support */
840
+ @media (prefers-contrast: high) {
841
+ .lookup-select {
842
+ --lookup-select-color-primary: #0000FF;
843
+ --lookup-select-color-bg: #FFFFFF;
844
+ --lookup-select-color-text: #000000;
845
+ --lookup-select-color-border: #000000;
846
+ --lookup-select-shadow: none;
847
+ }
848
+ }
849
+
850
+ /* Reduced motion support */
851
+ @media (prefers-reduced-motion: reduce) {
852
+ .lookup-select * {
853
+ animation-duration: 0.01ms !important;
854
+ animation-iteration-count: 1 !important;
855
+ transition-duration: 0.01ms !important;
856
+ }
857
+ }
858
+
859
+ /* Focus visible support */
860
+ .lookup-select *:focus-visible {
861
+ outline: 2px solid var(--lookup-select-color-primary);
862
+ outline-offset: 2px;
863
+ }
864
+
865
+ /* === SKELETON LOADING === */
866
+ .lookup-select__grid-row--skeleton {
867
+ pointer-events: none;
868
+ }
869
+
870
+ .lookup-select__skeleton-line {
871
+ height: 14px;
872
+ width: 70%;
873
+ background: linear-gradient(
874
+ 90deg,
875
+ var(--lookup-select-color-bg-secondary) 25%,
876
+ var(--lookup-select-color-bg-hover) 50%,
877
+ var(--lookup-select-color-bg-secondary) 75%
878
+ );
879
+ background-size: 200% 100%;
880
+ animation: lookup-select-skeleton-shimmer 1.5s ease-in-out infinite;
881
+ border-radius: 4px;
882
+ }
883
+
884
+ .lookup-select__grid-row--skeleton:nth-child(odd) .lookup-select__skeleton-line {
885
+ width: 85%;
886
+ }
887
+
888
+ .lookup-select__grid-row--skeleton:nth-child(3n) .lookup-select__skeleton-line {
889
+ width: 60%;
890
+ }
891
+
892
+ @keyframes lookup-select-skeleton-shimmer {
893
+ 0% { background-position: 200% 0; }
894
+ 100% { background-position: -200% 0; }
895
+ }
896
+
897
+ /* === ERROR RETRY === */
898
+ .lookup-select__error {
899
+ display: flex;
900
+ flex-direction: column;
901
+ align-items: center;
902
+ gap: var(--lookup-select-spacing);
903
+ }
904
+
905
+ /* === STICKY GRID HEADER === */
906
+ .lookup-select__table thead {
907
+ position: sticky;
908
+ top: 0;
909
+ z-index: 1;
910
+ background-color: var(--lookup-select-color-bg-secondary);
911
+ }
912
+
913
+ .lookup-select__table thead th {
914
+ border-bottom: 2px solid var(--lookup-select-color-border);
915
+ }
916
+
917
+ /* === MOBILE RESPONSIVE MODAL === */
918
+ @media (max-width: 767px) {
919
+ .lookup-select__modal-overlay {
920
+ align-items: flex-end;
921
+ }
922
+
923
+ .lookup-select__modal {
924
+ width: 100% !important;
925
+ max-width: 100% !important;
926
+ max-height: 90vh;
927
+ border-radius: var(--lookup-select-border-radius)
928
+ var(--lookup-select-border-radius) 0 0;
929
+ margin: 0;
930
+ }
931
+
932
+ .lookup-select__modal-content {
933
+ max-height: 55vh;
934
+ overflow-y: auto;
935
+ }
936
+
937
+ /* Touch-friendly targets (WCAG 2.5.8: min 44px) */
938
+ .lookup-select__grid-row {
939
+ min-height: 48px;
940
+ }
941
+
942
+ .lookup-select__pagination-button {
943
+ min-width: 44px;
944
+ min-height: 44px;
945
+ }
946
+
947
+ .lookup-select__checkbox {
948
+ width: 20px;
949
+ height: 20px;
950
+ }
951
+ }
952
+
953
+ @media (min-width: 768px) and (max-width: 1024px) {
954
+ .lookup-select__modal {
955
+ width: 90% !important;
956
+ max-width: 90% !important;
957
+ }
863
958
  }