@dynamic-framework/ui-react 1.35.0 → 1.36.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.
Files changed (36) hide show
  1. package/dist/css/dynamic-ui-non-root.css +377 -86
  2. package/dist/css/dynamic-ui-non-root.min.css +2 -2
  3. package/dist/css/dynamic-ui-root.css +4 -1
  4. package/dist/css/dynamic-ui-root.min.css +2 -2
  5. package/dist/css/dynamic-ui.css +380 -86
  6. package/dist/css/dynamic-ui.min.css +2 -2
  7. package/dist/index.esm.js +125 -19
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +126 -18
  10. package/dist/index.js.map +1 -1
  11. package/dist/types/components/DBoxFile/useDBoxFile.d.ts +1 -1
  12. package/dist/types/components/DDatePicker/DDatePicker.d.ts +4 -3
  13. package/dist/types/components/DDatePicker/components/DDatePickerHeaderSelector.d.ts +3 -1
  14. package/dist/types/components/DDatePicker/components/DDatePickerTime.d.ts +5 -7
  15. package/dist/types/components/DInputPhone/DInputPhone.d.ts +26 -0
  16. package/dist/types/components/DInputPhone/index.d.ts +2 -0
  17. package/dist/types/components/DSelect/DSelect.d.ts +2 -1
  18. package/dist/types/components/index.d.ts +1 -0
  19. package/dist/types/utils/index.d.ts +1 -0
  20. package/dist/types/utils/validatePhoneNumber.d.ts +1 -0
  21. package/jest/setup.js +15 -2
  22. package/package.json +9 -3
  23. package/src/style/abstracts/_utilities.scss +11 -1
  24. package/src/style/abstracts/variables/_+import.scss +2 -1
  25. package/src/style/abstracts/variables/_datepicker.scss +5 -8
  26. package/src/style/abstracts/variables/_input-phone.scss +62 -0
  27. package/src/style/abstracts/variables/_navs.scss +3 -1
  28. package/src/style/abstracts/variables/_typography.scss +2 -0
  29. package/src/style/base/_form-switch.scss +1 -1
  30. package/src/style/base/_nav.scss +9 -13
  31. package/src/style/components/_+import.scss +1 -0
  32. package/src/style/components/_d-datepicker.scss +84 -153
  33. package/src/style/components/_d-input-phone.scss +286 -0
  34. package/src/style/components/_d-select.scss +22 -2
  35. package/src/style/components/_d-timepicker.scss +43 -29
  36. package/src/style/root/_root.scss +4 -0
@@ -1,4 +1,4 @@
1
- /* stylelint-disable */
1
+ // stylelint-disable
2
2
  .react-datepicker-wrapper {
3
3
  display: inline-block;
4
4
  padding: 0;
@@ -11,16 +11,18 @@
11
11
  // General
12
12
  --#{$prefix}datepicker-bg: #{$datepicker-bg};
13
13
  --#{$prefix}datepicker-border-color: #{$datepicker-border-color};
14
- --#{$prefix}datepicker-border: 1px solid #{$datepicker-border-color};
14
+ --#{$prefix}datepicker-border: 0px solid #{$datepicker-border-color};
15
15
  --#{$prefix}datepicker-border-radius: #{$datepicker-border-radius};
16
+ --#{$prefix}datepicker-box-shadow: var(--#{$prefix}box-shadow);
16
17
 
17
18
  // Header
18
19
  --#{$prefix}datepicker-header-bg: #{$datepicker-header-bg};
19
- --#{$prefix}datepicker-header-border-bottom: 1px solid #{$datepicker-border-color};
20
+ --#{$prefix}datepicker-header-border-bottom: 0px solid #{$datepicker-border-color};
20
21
  --#{$prefix}datepicker-header-padding: #{$datepicker-header-padding};
21
22
  --#{$prefix}datepicker-header-font-weight: #{$datepicker-header-font-weight};
22
23
  --#{$prefix}datepicker-day-names-color: #{$datepicker-day-names-color};
23
24
  --#{$prefix}datepicker-day-names-font-size: #{$datepicker-day-names-font-size};
25
+ --#{$prefix}datepicker-day-names-font-weight: var(--#{$prefix}fw-bold);
24
26
 
25
27
  // Body
26
28
  --#{$prefix}datepicker-body-margin: #{$datepicker-body-margin};
@@ -42,6 +44,7 @@
42
44
  --#{$prefix}datepicker-day-bg: #{$datepicker-day-bg};
43
45
  --#{$prefix}datepicker-day-hover-bg: #{$datepicker-day-hover-bg};
44
46
  --#{$prefix}datepicker-day-width: #{$datepicker-day-width};
47
+ --#{$prefix}datepicker-day-color: #{$datepicker-day-color};
45
48
 
46
49
  // Day selected
47
50
  --#{$prefix}datepicker-day-selected-color: #{$datepicker-day-selected-color};
@@ -70,16 +73,18 @@
70
73
  --#{$prefix}datepicker-in-range-disabled-color: #{$datepicker-in-range-disabled-color};
71
74
  --#{$prefix}datepicker-in-range-disabled-bg: #{$datepicker-in-range-disabled-bg};
72
75
 
73
- // Portal
74
- --#{$prefix}datepicker-portal-bg: #{$datepicker-portal-bg};
76
+ // Time
77
+ --#{$prefix}datepicker-time-list-item-width: 85px;
78
+ --#{$prefix}datepicker-time-list-item-padding: var(--#{$prefix}ref-spacer-2) var(--#{$prefix}ref-spacer-1);
79
+
75
80
 
76
81
  background-color: var(--#{$prefix}datepicker-bg);
77
82
  border: var(--#{$prefix}datepicker-border);
78
83
  border-radius: var(--#{$prefix}datepicker-border-radius);
84
+ box-shadow: var(--#{$prefix}datepicker-box-shadow);
79
85
  display: inline-block;
80
86
  position: relative;
81
87
  line-height: initial;
82
- overflow: hidden;
83
88
  }
84
89
 
85
90
  .react-datepicker--time-only {
@@ -99,13 +104,13 @@
99
104
  line-height: 0;
100
105
 
101
106
  .react-datepicker__triangle {
102
- --#{$prefix}datepicker-border-color: var(--#{$prefix}gray-400);
107
+ --#{$prefix}datepicker-border-color: var(--#{$prefix}gray-100);
103
108
  stroke: var(--#{$prefix}datepicker-border-color);
104
109
  }
105
110
 
106
111
  &[data-placement^="bottom"] {
107
112
  .react-datepicker__triangle {
108
- --#{$prefix}datepicker-header-bg: var(--#{$prefix}gray-100);
113
+ --#{$prefix}datepicker-header-bg: var(--#{$prefix}secondary-soft);
109
114
  fill: var(--#{$prefix}datepicker-header-bg);
110
115
  color: var(--#{$prefix}datepicker-header-bg);
111
116
  }
@@ -124,6 +129,7 @@
124
129
  text-align: center;
125
130
  background-color: var(--#{$prefix}datepicker-header-bg);
126
131
  border-bottom: var(--#{$prefix}datepicker-header-border-bottom);
132
+ border-top-left-radius: var(--#{$prefix}datepicker-border-radius);
127
133
  padding: var(--#{$prefix}datepicker-header-padding);
128
134
  position: relative;
129
135
 
@@ -137,6 +143,10 @@
137
143
  }
138
144
  }
139
145
 
146
+ &:not(&--has-time-select) {
147
+ border-top-right-radius: var(--#{$prefix}datepicker-border-radius);
148
+ }
149
+
140
150
  &-selector {
141
151
  display: flex;
142
152
  align-items: center;
@@ -144,10 +154,10 @@
144
154
 
145
155
  .d-select {
146
156
  --#{$prefix}select-option-selected-bg: var(--#{$prefix}datepicker-bg);
147
- --#{$prefix}select-option-selected-color: var(--#{$prefix}datepicker-text-color);
148
157
 
149
158
  .d-select__control {
150
159
  padding: var(--#{$prefix}ref-spacer-1) var(--#{$prefix}ref-spacer-2);
160
+ flex-wrap: nowrap;
151
161
  }
152
162
 
153
163
  .d-select__menu-list {
@@ -218,6 +228,7 @@
218
228
  text-overflow: ellipsis;
219
229
  white-space: nowrap;
220
230
  overflow: hidden;
231
+ color: var(--#{$prefix}datepicker-day-names-color);
221
232
  }
222
233
 
223
234
  .react-datepicker__month-container {
@@ -266,111 +277,59 @@
266
277
  width: 6ch;
267
278
  }
268
279
  }
280
+ // START TODO: Revisar con Mati diseño del time
281
+ .react-datepicker__time-container {
282
+ float: right;
283
+ border-left: 1px solid var(--#{$prefix}gray-100);
284
+ width: var(--#{$prefix}datepicker-time-list-item-width);
285
+
286
+ .react-datepicker__time {
287
+ position: relative;
288
+ background: var(--#{$prefix}datepicker-bg);
289
+ border-bottom-right-radius: var(--#{$prefix}datepicker-border-radius);
269
290
 
270
- // .react-datepicker__input-time-container {
271
- // clear: both;
272
- // width: 100%;
273
- // float: left;
274
- // margin: var(--#{$prefix}ref-spacer-2);
275
- // text-align: left;
276
-
277
- // .react-datepicker-time__caption {
278
- // display: inline-block;
279
- // }
280
-
281
- // .react-datepicker-time__input-container {
282
- // display: inline-block;
283
-
284
- // .react-datepicker-time__input {
285
- // display: inline-block;
286
- // margin-left: var(--#{$prefix}ref-spacer-2);
287
-
288
- // input {
289
- // width: auto;
290
- // }
291
-
292
- // input[type="time"]::-webkit-inner-spin-button,
293
- // input[type="time"]::-webkit-outer-spin-button {
294
- // -webkit-appearance: none;
295
- // margin: 0;
296
- // }
297
-
298
- // input[type="time"] {
299
- // -moz-appearance: textfield;
300
- // }
301
- // }
302
- // }
303
- // }
291
+ .react-datepicker__time-box {
292
+ width: var(--#{$prefix}datepicker-time-list-item-width);
293
+ overflow-x: hidden;
294
+ margin: 0 auto;
295
+ text-align: center;
296
+ border-bottom-right-radius: var(--#{$prefix}datepicker-border-radius);
297
+
298
+ ul.react-datepicker__time-list {
299
+ list-style: none;
300
+ margin: 0;
301
+ height: calc(195px + (32px / 2));
302
+ overflow-y: scroll;
303
+ padding-right: 0;
304
+ padding-left: 0;
305
+ width: 100%;
306
+ box-sizing: border-box;
307
+
308
+ li.react-datepicker__time-list-item {
309
+ padding: var(--#{$prefix}datepicker-time-list-item-padding);
310
+ white-space: nowrap;
311
+ display: block;
304
312
 
305
- // .react-datepicker__time-container {
306
- // float: right;
307
- // border-left: $datepicker__border;
308
- // width: 85px;
309
-
310
- // &--with-today-button {
311
- // display: inline;
312
- // border: 1px solid #aeaeae;
313
- // border-radius: 0.3rem;
314
- // position: absolute;
315
- // right: -87px;
316
- // top: 0;
317
- // }
318
-
319
- // .react-datepicker__time {
320
- // position: relative;
321
- // background: white;
322
- // border-bottom-right-radius: 0.3rem;
323
-
324
- // .react-datepicker__time-box {
325
- // width: 85px;
326
- // overflow-x: hidden;
327
- // margin: 0 auto;
328
- // text-align: center;
329
- // border-bottom-right-radius: 0.3rem;
330
-
331
- // ul.react-datepicker__time-list {
332
- // list-style: none;
333
- // margin: 0;
334
- // height: calc(195px + (#{$datepicker__item-size} / 2));
335
- // overflow-y: scroll;
336
- // padding-right: 0;
337
- // padding-left: 0;
338
- // width: 100%;
339
- // box-sizing: content-box;
340
-
341
- // li.react-datepicker__time-list-item {
342
- // height: 30px;
343
- // padding: 5px 10px;
344
- // white-space: nowrap;
345
-
346
- // &:hover {
347
- // cursor: pointer;
348
- // background-color: $datepicker__background-color;
349
- // }
350
-
351
- // &--selected {
352
- // background-color: $datepicker__selected-color;
353
- // color: white;
354
- // font-weight: bold;
355
-
356
- // &:hover {
357
- // background-color: $datepicker__selected-color;
358
- // }
359
- // }
360
-
361
- // &--disabled {
362
- // color: $datepicker__muted-color;
363
-
364
- // &:hover {
365
- // cursor: default;
366
- // background-color: transparent;
367
- // }
368
- // }
369
- // }
370
- // }
371
- // }
372
- // }
373
- // }
313
+ &:hover {
314
+ cursor: pointer;
315
+ background-color: var(--#{$prefix}datepicker-day-hover-bg);
316
+ }
317
+
318
+ &--selected, &--selected:hover {
319
+ background-color: var(--#{$prefix}datepicker-day-selected-bg);
320
+ color: var(--#{$prefix}datepicker-day-selected-color);
321
+ }
322
+
323
+ &--disabled, &--disabled:hover {
324
+ cursor: default;
325
+ color: var(--#{$prefix}datepicker-day-disabled-color);
326
+ background-color: unset;
327
+ }
328
+ }
329
+ }
330
+ }
331
+ }
332
+ }
374
333
  // END TODO: Revisar con Mati diseño del time
375
334
 
376
335
  .react-datepicker__week-number {
@@ -399,12 +358,6 @@
399
358
  }
400
359
  }
401
360
 
402
- .react-datepicker__day-names {
403
- white-space: nowrap;
404
- display: inline-flex;
405
- gap: var(--#{$prefix}datepicker-body-gap);
406
- }
407
-
408
361
  .react-datepicker__week {
409
362
  white-space: nowrap;
410
363
  display: inline-flex;
@@ -416,13 +369,24 @@
416
369
  .react-datepicker__day-name,
417
370
  .react-datepicker__day,
418
371
  .react-datepicker__time-name {
419
- color: var(--#{$prefix}datepicker-day-names-color);
420
372
  display: inline-block;
421
373
  text-align: center;
422
374
  width: var(--#{$prefix}datepicker-day-width);
423
375
  line-height: var(--#{$prefix}datepicker-day-width);
424
376
  font-size: var(--#{$prefix}datepicker-day-names-font-size);
377
+ }
378
+
379
+ .react-datepicker__day-names {
380
+ white-space: nowrap;
381
+ display: inline-flex;
382
+ gap: var(--#{$prefix}datepicker-body-gap);
383
+ color: var(--#{$prefix}datepicker-day-names-color);
384
+ font-weight: var(--#{$prefix}datepicker-day-names-font-weight);
385
+ }
425
386
 
387
+ .react-datepicker__day,
388
+ .react-datepicker__time-name {
389
+ color: var(--#{$prefix}datepicker-day-color);
426
390
  }
427
391
 
428
392
  .react-datepicker__day--outside-month {
@@ -580,39 +544,6 @@ react-datepicker__navigation
580
544
  // clear: left;
581
545
  // }
582
546
 
583
- .react-datepicker__portal {
584
- --#{$prefix}datepicker-portal-bg: rgba(var(--#{$prefix}black-rgb), 0.3);
585
-
586
- position: fixed;
587
- width: 100vw;
588
- height: 100vh;
589
- background-color: var(--#{$prefix}datepicker-portal-bg);
590
- left: 0;
591
- top: 0;
592
- justify-content: center;
593
- align-items: center;
594
- display: flex;
595
- z-index: 1060;
596
-
597
- .react-datepicker__day-name,
598
- .react-datepicker__day,
599
- .react-datepicker__time-name {
600
- width: 3rem;
601
- line-height: 3rem;
602
- }
603
-
604
- @media (max-width: 400px),
605
- (max-height: 550px) {
606
-
607
- .react-datepicker__day-name,
608
- .react-datepicker__day,
609
- .react-datepicker__time-name {
610
- width: 2rem;
611
- line-height: 2rem;
612
- }
613
- }
614
- }
615
-
616
547
  .react-datepicker__children-container {
617
548
  width: 13.8rem;
618
549
  margin: 0.4rem;
@@ -633,4 +564,4 @@ react-datepicker__navigation
633
564
  white-space: nowrap;
634
565
  }
635
566
 
636
- /* stylelint-enable */
567
+ // stylelint-enable
@@ -0,0 +1,286 @@
1
+ // stylelint-disable selector-class-pattern
2
+ // stylelint-disable scss/selector-no-union-class-name
3
+
4
+ .d-input-phone {
5
+ // General sizes
6
+ --#{$prefix}input-phone-height: #{$input-phone-height};
7
+ --#{$prefix}input-phone-font-size: #{$input-phone-font-size};
8
+ --#{$prefix}input-phone-border-radius: #{$input-phone-border-radius};
9
+
10
+ // Base and state colors
11
+ --#{$prefix}input-phone-border-color: #{$input-phone-border-color};
12
+ --#{$prefix}input-phone-background-color: #{$input-phone-background-color};
13
+ --#{$prefix}input-phone-text-color: #{$input-phone-text-color};
14
+ --#{$prefix}input-phone-disabled-background-color: #{$input-phone-disabled-background-color};
15
+ --#{$prefix}input-phone-disabled-text-color: #{$input-phone-disabled-text-color};
16
+
17
+ // Country selector
18
+ --#{$prefix}input-phone-country-selector-border-color: #{$input-phone-country-selector-border-color};
19
+ --#{$prefix}input-phone-country-selector-background-color: #{$input-phone-country-selector-background-color};
20
+ --#{$prefix}input-phone-country-selector-background-color-hover: #{$input-phone-country-selector-background-color-hover};
21
+ --#{$prefix}input-phone-disabled-country-selector-background-color: #{$input-phone-disabled-country-selector-background-color};
22
+
23
+ // Country selector arrow
24
+ --#{$prefix}input-phone-country-selector-arrow-size: #{$input-phone-country-selector-arrow-size};
25
+ --#{$prefix}input-phone-country-selector-arrow-color: #{$input-phone-country-selector-arrow-color};
26
+ --#{$prefix}input-phone-disabled-country-selector-arrow-color: #{$input-phone-disabled-country-selector-arrow-color};
27
+
28
+ // Flag
29
+ --#{$prefix}input-phone-flag-width: #{$input-phone-flag-width};
30
+ --#{$prefix}input-phone-flag-height: #{$input-phone-flag-height};
31
+
32
+ // Dropdown (country list)
33
+ --#{$prefix}input-phone-dropdown-top: #{$input-phone-dropdown-top};
34
+ --#{$prefix}input-phone-dropdown-left: #{$input-phone-dropdown-left};
35
+ --#{$prefix}input-phone-dropdown-border-radius: #{$input-phone-dropdown-border-radius};
36
+ --#{$prefix}input-phone-dropdown-border: #{$input-phone-dropdown-border};
37
+ --#{$prefix}input-phone-dropdown-shadow: #{$input-phone-dropdown-shadow};
38
+
39
+ // Dropdown items
40
+ --#{$prefix}input-phone-dropdown-item-height: #{$input-phone-dropdown-item-height};
41
+ --#{$prefix}input-phone-dropdown-item-padding: #{$input-phone-dropdown-item-padding};
42
+ --#{$prefix}input-phone-dropdown-item-font-size: #{$input-phone-dropdown-item-font-size};
43
+ --#{$prefix}input-phone-dropdown-item-font-weight: #{$input-phone-dropdown-item-font-weight};
44
+ --#{$prefix}input-phone-dropdown-item-background-color: #{$input-phone-dropdown-item-background-color};
45
+ --#{$prefix}input-phone-dropdown-item-text-color: #{$input-phone-dropdown-item-text-color};
46
+ --#{$prefix}input-phone-dropdown-item-dial-code-color: #{$input-phone-dropdown-item-dial-code-color};
47
+
48
+ // Selected / hover items
49
+ --#{$prefix}input-phone-hover-dropdown-item-background-color: #{$input-phone-hover-dropdown-item-background-color};
50
+ --#{$prefix}input-phone-selected-dropdown-item-background-color: #{$input-phone-selected-dropdown-item-background-color};
51
+ --#{$prefix}input-phone-selected-dropdown-item-color: #{$input-phone-selected-dropdown-item-color};
52
+ --#{$prefix}input-phone-selected-dropdown-item-font-weight: #{$input-phone-selected-dropdown-item-font-weight};
53
+ --#{$prefix}input-phone-selected-dropdown-item-dial-code-color: #{$input-phone-selected-dropdown-item-dial-code-color};
54
+
55
+ // Preferred list
56
+ --#{$prefix}input-phone-dropdown-preferred-list-item-background-color: #{$input-phone-dropdown-preferred-list-item-background-color};
57
+
58
+ // Preferred list separator
59
+ --#{$prefix}input-phone-dropdown-preferred-list-divider-margin: #{$input-phone-dropdown-preferred-list-divider-margin};
60
+ --#{$prefix}input-phone-dropdown-preferred-list-divider-color: #{$input-phone-dropdown-preferred-list-divider-color};
61
+
62
+ // Country code preview
63
+ --#{$prefix}input-phone-dial-code-preview-border-color: #{$input-phone-dial-code-preview-border-color};
64
+ --#{$prefix}input-phone-dial-code-preview-background-color: #{$input-phone-dial-code-preview-background-color};
65
+ --#{$prefix}input-phone-dial-code-preview-text-color: #{$input-phone-dial-code-preview-text-color};
66
+ --#{$prefix}input-phone-dial-code-preview-font-size: #{$input-phone-dial-code-preview-font-size};
67
+ --#{$prefix}input-phone-dial-code-preview-disabled-background-color: #{$input-phone-dial-code-preview-disabled-background-color};
68
+ --#{$prefix}input-phone-dial-code-preview-disabled-text-color: #{$input-phone-dial-code-preview-disabled-text-color};
69
+
70
+ :has(:disabled, .disabled) {
71
+ --#{$prefix}input-phone-background-color: var(--#{$prefix}input-phone-disabled-background-color);
72
+ }
73
+
74
+ .react-international-phone-country-selector {
75
+ position: relative;
76
+
77
+ &.input-group-text {
78
+ padding-block: 0;
79
+ }
80
+ }
81
+
82
+ .react-international-phone-country-selector-button {
83
+ box-sizing: border-box;
84
+ display: flex;
85
+ align-items: center;
86
+ justify-content: center;
87
+ height: var(--#{$prefix}input-phone-height);
88
+ padding: 0;
89
+ margin: 0;
90
+ text-transform: none;
91
+ appearance: button;
92
+ cursor: pointer;
93
+ user-select: none;
94
+ background-color: var(--#{$prefix}input-phone-country-selector-background-color, var(--#{$prefix}input-phone-background-color));
95
+ border: 0;
96
+
97
+ &:hover {
98
+ background-color: var(--#{$prefix}input-phone-country-selector-background-color-hover);
99
+ }
100
+
101
+ &--hide-dropdown {
102
+ cursor: auto;
103
+
104
+ &:hover {
105
+ background-color: transparent;
106
+ }
107
+ }
108
+
109
+ &__button-content {
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ }
114
+
115
+ &__flag-emoji {
116
+ margin: 0 4px;
117
+
118
+ &--disabled {
119
+ opacity: .75;
120
+ }
121
+ }
122
+
123
+ &__dropdown-arrow {
124
+ margin-right: 4px;
125
+ border-top: var(--#{$prefix}input-phone-country-selector-arrow-size) solid var(--#{$prefix}input-phone-country-selector-arrow-color);
126
+ border-right: var(--#{$prefix}input-phone-country-selector-arrow-size) solid transparent;
127
+ border-left: var(--#{$prefix}input-phone-country-selector-arrow-size) solid transparent;
128
+ transition: all .1s ease-out;
129
+
130
+ &--active {
131
+ transform: rotateX(180deg);
132
+ }
133
+
134
+ &--disabled {
135
+ border-top-color: var(--#{$prefix}input-phone-disabled-country-selector-arrow-color);
136
+ }
137
+ }
138
+
139
+ &--disabled {
140
+ cursor: auto;
141
+ background-color: var(--#{$prefix}input-phone-disabled-country-selector-background-color, var(--#{$prefix}input-phone-disabled-background-color));
142
+
143
+ &:hover {
144
+ background-color: var(--#{$prefix}input-phone-disabled-country-selector-background-color, var(--#{$prefix}input-phone-disabled-background-color));
145
+ }
146
+ }
147
+ }
148
+
149
+ .react-international-phone-flag-emoji {
150
+ box-sizing: border-box;
151
+ width: var(--#{$prefix}input-phone-flag-width);
152
+ height: var(--#{$prefix}input-phone-flag-height);
153
+ }
154
+
155
+ .react-international-phone-country-selector-dropdown {
156
+ position: absolute;
157
+ top: var(--#{$prefix}input-phone-dropdown-top);
158
+ left: var(--#{$prefix}input-phone-dropdown-left);
159
+ z-index: 1;
160
+ display: flex;
161
+ flex-direction: column;
162
+ width: 300px;
163
+ max-height: 200px;
164
+ padding: 0;
165
+ margin: 0;
166
+ overflow-y: scroll;
167
+ color: var(--#{$prefix}input-phone-dropdown-item-text-color, var(--#{$prefix}input-phone-text-color));
168
+ list-style: none;
169
+ background-color: var(--#{$prefix}input-phone-dropdown-item-background-color, var(--#{$prefix}input-phone-background-color));
170
+ border: var(--#{$prefix}input-phone-dropdown-border);
171
+ border-radius: var(--#{$prefix}input-phone-dropdown-border-radius);
172
+ outline: 0;
173
+ box-shadow: var(--#{$prefix}input-phone-dropdown-shadow);
174
+ }
175
+
176
+ .react-international-phone-country-selector-dropdown__list-item--preferred {
177
+ background-color: var(--#{$prefix}input-phone-dropdown-preferred-list-item-background-color);
178
+ }
179
+
180
+ .react-international-phone-country-selector-dropdown__preferred-list-divider {
181
+ height: 1px;
182
+ margin: var(--#{$prefix}input-phone-dropdown-preferred-list-divider-margin);
183
+ background: var(--#{$prefix}input-phone-dropdown-preferred-list-divider-color, var(--#{$prefix}input-phone-border-color));
184
+ border: 0;
185
+ }
186
+
187
+ .react-international-phone-country-selector-dropdown__list-item {
188
+ box-sizing: border-box;
189
+ display: flex;
190
+ align-items: center;
191
+ min-height: var(--#{$prefix}input-phone-dropdown-item-height);
192
+ padding: var(--#{$prefix}input-phone-dropdown-item-padding);
193
+ cursor: pointer;
194
+
195
+ &:hover {
196
+ background-color: var(--#{$prefix}input-phone-hover-dropdown-item-background-color);
197
+ }
198
+
199
+ &-flag-emoji {
200
+ margin-right: 8px;
201
+ }
202
+
203
+ &-country-name {
204
+ margin-right: 8px;
205
+ overflow: hidden;
206
+ font-size: var(--#{$prefix}input-phone-dropdown-item-font-size);
207
+ text-overflow: ellipsis;
208
+ white-space: nowrap;
209
+ }
210
+
211
+ &-dial-code {
212
+ font-size: var(--#{$prefix}input-phone-dropdown-item-font-size);
213
+ font-weight: var(--#{$prefix}input-phone-dropdown-item-font-weight);
214
+ color: var(--#{$prefix}input-phone-dropdown-item-dial-code-color);
215
+ }
216
+
217
+ &--selected,
218
+ &--focused {
219
+ font-weight: var(--#{$prefix}input-phone-selected-dropdown-item-font-weight);
220
+ color: var(--#{$prefix}input-phone-selected-dropdown-item-color, var(--#{$prefix}input-phone-text-color));
221
+ background-color: var(--#{$prefix}input-phone-selected-dropdown-item-background-color);
222
+
223
+ .react-international-phone-country-selector-dropdown__list-item-dial-code {
224
+ --#{$prefix}input-phone-dropdown-item-font-weight: var(--#{$prefix}input-phone-selected-dropdown-item-font-weight);
225
+ --#{$prefix}input-phone-dropdown-item-dial-code-color: var(--#{$prefix}input-phone-selected-dropdown-item-dial-code-color);
226
+ }
227
+ }
228
+
229
+ &--focused {
230
+ background-color: var(--#{$prefix}input-phone-selected-dropdown-item-background-color);
231
+ }
232
+ }
233
+
234
+ .react-international-phone-dial-code-preview {
235
+ display: flex;
236
+ align-items: center;
237
+ justify-content: center;
238
+ padding: 0 8px;
239
+ margin-right: -1px;
240
+ font-size: var(--#{$prefix}input-phone-dial-code-preview-font-size, var(--#{$prefix}input-phone-font-size));
241
+ color: var(--#{$prefix}input-phone-dial-code-preview-text-color, var(--#{$prefix}input-phone-text-color));
242
+ background-color: var(--#{$prefix}input-phone-dial-code-preview-background-color, var(--#{$prefix}input-phone-background-color));
243
+ border: 1px solid var(--#{$prefix}input-phone-dial-code-preview-border-color, var(--#{$prefix}input-phone-border-color));
244
+
245
+ &--disabled {
246
+ color: var(--#{$prefix}input-phone-dial-code-preview-disabled-text-color, var(--#{$prefix}input-phone-disabled-text-color));
247
+ background-color: var(--#{$prefix}input-phone-dial-code-preview-disabled-background-color, var(--#{$prefix}input-phone-disabled-background-color));
248
+ }
249
+ }
250
+
251
+ .react-international-phone-input-container {
252
+ display: flex;
253
+
254
+ .react-international-phone-country-selector-button {
255
+ margin-right: -1px;
256
+ border-radius: var(--#{$prefix}input-phone-border-radius);
257
+ border-top-right-radius: 0;
258
+ border-bottom-right-radius: 0;
259
+ }
260
+
261
+ .react-international-phone-input {
262
+ box-sizing: border-box;
263
+ height: var(--#{$prefix}input-phone-height);
264
+ padding: 0 8px;
265
+ margin: 0;
266
+ overflow: visible;
267
+ font-family: inherit;
268
+ font-size: var(--#{$prefix}input-phone-font-size);
269
+ color: var(--#{$prefix}input-phone-text-color);
270
+ background-color: var(--#{$prefix}input-phone-background-color);
271
+ border: 1px solid var(--#{$prefix}input-phone-border-color);
272
+ border-radius: var(--#{$prefix}input-phone-border-radius);
273
+ border-top-left-radius: 0;
274
+ border-bottom-left-radius: 0;
275
+
276
+ &:focus {
277
+ outline: 0;
278
+ }
279
+
280
+ .react-international-phone-input--disabled {
281
+ color: var(--#{$prefix}input-phone-disabled-text-color);
282
+ background-color: var(--#{$prefix}input-phone-disabled-background-color);
283
+ }
284
+ }
285
+ }
286
+ }
@@ -8,7 +8,8 @@
8
8
  --#{$prefix}select-menu-z-index: #{$zindex-dropdown};
9
9
  --#{$prefix}select-option-focus-bg: var(--#{$prefix}gray-100);
10
10
  --#{$prefix}select-option-selected-color: var(--#{$prefix}secondary);
11
- --#{$prefix}select-option-selected-bg: var(--#{$prefix}gray-100);
11
+ --#{$prefix}select-option-selected-bg: unset;
12
+ --#{$prefix}select-option-selected-font-weight: var(--#{$prefix}fw-bold);
12
13
  --#{$prefix}select-option-is-checkbox-font-size: var(--#{$prefix}body-font-size);
13
14
  --#{$prefix}select-option-is-checkbox-font-weight: var(--#{$prefix}fw-normal);
14
15
  --#{$prefix}select-option-is-checkbox-color: var(--#{$prefix}gray-900);
@@ -42,6 +43,20 @@
42
43
  gap: var(--#{$prefix}select-gap);
43
44
  }
44
45
 
46
+ &.d-select-floating {
47
+ label {
48
+ position: absolute;
49
+ top: 8px;
50
+ left: 16px;
51
+ z-index: 10;
52
+ font-size: calc(var(--#{$prefix}body-font-size) * .85);
53
+ color: rgba(var(--#{$prefix}body-color-rgb), .65);
54
+ }
55
+ .d-select__value-container {
56
+ padding-top: 1rem;
57
+ }
58
+ }
59
+
45
60
  // input with elements
46
61
  .input-group {
47
62
  border: var(--#{$prefix}input-border-width) solid var(--#{$prefix}input-border-color);
@@ -86,7 +101,7 @@
86
101
  width: 100%;
87
102
  padding: $input-padding-y $input-padding-x;
88
103
  font-family: $input-font-family;
89
- @include rfs($input-font-size, $input-font-size);
104
+ @include rfs($input-font-size);
90
105
  font-weight: $input-font-weight;
91
106
  line-height: $input-line-height;
92
107
  color: $input-color;
@@ -138,8 +153,13 @@
138
153
  }
139
154
 
140
155
  .d-select__option--is-selected {
156
+ font-weight: var(--#{$prefix}select-option-selected-font-weight);
141
157
  color: var(--#{$prefix}select-option-selected-color);
142
158
  background: var(--#{$prefix}select-option-selected-bg);
159
+
160
+ &:hover {
161
+ --#{$prefix}select-option-selected-bg: var(--#{$prefix}gray-100);
162
+ }
143
163
  }
144
164
 
145
165
  // select option with checkbox