|
| 1 | +/* Global Rules -- Avoid Declaring These Globally */ |
| 2 | +.react-datepicker * { |
| 3 | + /* |
| 4 | + This degrades the performance and accessibility of the date picker. |
| 5 | + TODO: Remove this line and explicitly target specific elements for hover, focus, etc. |
| 6 | + */ |
| 7 | + @apply yl-outline-none !important; |
| 8 | +} |
| 9 | + |
| 10 | +/* Main Datepicker Container */ |
| 11 | +.react-datepicker { |
| 12 | + @apply yl-select-none yl-border-2 yl-border-primary-text-color/20 yl-bg-primary-background-color yl-font-sans yl-shadow-lg !important; |
| 13 | +} |
| 14 | + |
| 15 | +.react-datepicker, |
| 16 | +.react-datepicker__day { |
| 17 | + @apply yl-text-primary-text-color !important; |
| 18 | +} |
| 19 | + |
| 20 | +/* Header Section */ |
| 21 | +.react-datepicker__header { |
| 22 | + @apply yl-border-0 yl-bg-primary-background-color !important; |
| 23 | +} |
| 24 | + |
| 25 | +.react-datepicker__current-month, |
| 26 | +.react-datepicker__day-name, |
| 27 | +.react-datepicker-time__header { |
| 28 | + @apply yl-text-primary-text-color !important; |
| 29 | +} |
| 30 | + |
| 31 | +/* Month Container */ |
| 32 | +.react-datepicker__month-container { |
| 33 | + @apply yl-bg-primary-background-color !important; |
| 34 | +} |
| 35 | + |
| 36 | +/* Day Cell Styles */ |
| 37 | +.react-datepicker__day:not([aria-disabled="true"]):hover { |
| 38 | + @apply yl-bg-primary yl-text-white !important; |
| 39 | +} |
| 40 | + |
| 41 | +.react-datepicker__day--selected { |
| 42 | + @apply yl-bg-primary yl-text-white !important; |
| 43 | +} |
| 44 | + |
| 45 | +.react-datepicker__day--keyboard-selected { |
| 46 | + @apply yl-bg-primary/70 yl-text-white !important; |
| 47 | +} |
| 48 | + |
| 49 | +.react-datepicker__day--keyboard-selected:focus-visible { |
| 50 | + @apply yl-text-white yl-outline-primary-text-color !important; |
| 51 | +} |
| 52 | + |
| 53 | +/* Time Picker Section */ |
| 54 | +.react-datepicker__time-container { |
| 55 | + @apply yl-border-l-primary-text-color/20 yl-px-0 !important; |
| 56 | +} |
| 57 | + |
| 58 | +.react-datepicker__time-container .react-datepicker__time { |
| 59 | + @apply yl-bg-primary-background-color !important; |
| 60 | +} |
| 61 | + |
| 62 | +.react-datepicker__time-box { |
| 63 | + @apply yl-pl-1 !important; |
| 64 | +} |
| 65 | + |
| 66 | +.react-datepicker__time-list-item--selected { |
| 67 | + @apply yl-bg-primary yl-font-normal yl-text-white !important; |
| 68 | +} |
| 69 | + |
| 70 | +li.react-datepicker__time-list-item { |
| 71 | + @apply hover:yl-bg-primary hover:yl-text-white !important; |
| 72 | +} |
| 73 | + |
| 74 | +/* Scrollbar Styles */ |
| 75 | +.react-datepicker__time-list::-webkit-scrollbar { |
| 76 | + width: 5px; |
| 77 | +} |
| 78 | + |
| 79 | +.react-datepicker__time-list::-webkit-scrollbar-track { |
| 80 | + background: "##"; |
| 81 | +} |
| 82 | + |
| 83 | +.react-datepicker__time-list::-webkit-scrollbar-thumb { |
| 84 | + background: rgb(var(--text-color)); |
| 85 | +} |
| 86 | + |
| 87 | +.react-datepicker__time-list::-webkit-scrollbar-thumb:hover { |
| 88 | + background: rgb(var(--text-color)); |
| 89 | +} |
| 90 | + |
| 91 | +/* Input Styles */ |
| 92 | +.react-datepicker__input-container input { |
| 93 | + @apply yl-w-full yl-appearance-none yl-rounded-md yl-border-2 yl-border-primary-text-color yl-bg-transparent yl-p-2 yl-text-primary-text-color hover:yl-cursor-pointer hover:yl-border-primary focus:yl-border-primary focus:yl-outline-none focus:yl-ring-transparent !important; |
| 94 | +} |
0 commit comments