datepicker.css
557 lines
| 1 | :host { |
| 2 | --color-bg-default: #fff; |
| 3 | --color-bg-secondary: #f9f9f9; |
| 4 | --color-fg-default: #333; |
| 5 | --color-fg-primary: #6b82ff; |
| 6 | --color-fg-secondary: #748194; |
| 7 | --color-fg-selected: #fff; |
| 8 | --color-fg-muted: #9e9e9e; |
| 9 | --color-fg-accent: #e63757; |
| 10 | --color-btn-primary-bg: #fff; |
| 11 | --color-btn-primary-fg: #6b82ff; |
| 12 | --color-btn-primary-border: #6b82ff; |
| 13 | --color-btn-primary-hover-bg: #6b82ff; |
| 14 | --color-btn-primary-hover-fg: #fff; |
| 15 | --color-btn-primary-hover-border: #6b82ff; |
| 16 | --color-btn-secondary-bg: #fff; |
| 17 | --color-btn-secondary-fg: #748194; |
| 18 | --color-btn-secondary-border: #748194; |
| 19 | --color-btn-secondary-hover-bg: #748194; |
| 20 | --color-btn-secondary-hover-fg: #fff; |
| 21 | --color-btn-secondary-hover-border: #748194; |
| 22 | --color-border-default: #ddd; |
| 23 | --color-border-locked: #f9f9f9; |
| 24 | --day-width: 42px; |
| 25 | --day-height: 37px; |
| 26 | --border-radius: 2px; |
| 27 | --primary-color: #6b82ff; |
| 28 | --secondary-color: #748194; |
| 29 | --white-color: #fff; |
| 30 | --black-color: #333; |
| 31 | --lightgray-color: #f9f9f9; |
| 32 | --gray-color: #9e9e9e; |
| 33 | --red-color: #e63757; |
| 34 | } |
| 35 | |
| 36 | * { |
| 37 | box-sizing: border-box; |
| 38 | } |
| 39 | |
| 40 | .container { |
| 41 | color: var(--color-fg-default); |
| 42 | cursor: default; |
| 43 | height: 0; |
| 44 | pointer-events: all; |
| 45 | -webkit-transform-origin: 0 0; |
| 46 | transform-origin: 0 0; |
| 47 | border-radius: 4px; |
| 48 | font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif; |
| 49 | font-size: .8em; |
| 50 | transition: -webkit-transform .3s ease-out, transform .3s ease-out; |
| 51 | display: inline-block; |
| 52 | position: absolute; |
| 53 | overflow: hidden; |
| 54 | -webkit-transform: scale(0); |
| 55 | transform: scale(0); |
| 56 | } |
| 57 | |
| 58 | .container.calc { |
| 59 | height: auto; |
| 60 | visibility: hidden; |
| 61 | transition: none; |
| 62 | -webkit-transform: none; |
| 63 | transform: none; |
| 64 | } |
| 65 | |
| 66 | .container.show { |
| 67 | height: auto; |
| 68 | -webkit-transform: scale(1); |
| 69 | transform: scale(1); |
| 70 | box-shadow: 0 0 25px rgba(0, 0, 0, .3); |
| 71 | } |
| 72 | |
| 73 | .container.inline { |
| 74 | height: auto; |
| 75 | position: relative; |
| 76 | top: 0; |
| 77 | left: 0; |
| 78 | -webkit-transform: scaleY(1); |
| 79 | transform: scaleY(1); |
| 80 | box-shadow: 0 7px 14px rgba(65, 69, 88, .1), 0 3px 6px rgba(0, 0, 0, .07); |
| 81 | } |
| 82 | |
| 83 | .container > main { |
| 84 | background-color: var(--color-bg-default); |
| 85 | } |
| 86 | |
| 87 | .container > footer, .container > header { |
| 88 | background-color: var(--color-bg-secondary); |
| 89 | padding: 10px; |
| 90 | } |
| 91 | |
| 92 | .container > footer .footer-buttons { |
| 93 | -moz-column-gap: 5px; |
| 94 | justify-content: flex-end; |
| 95 | column-gap: 5px; |
| 96 | display: flex; |
| 97 | } |
| 98 | |
| 99 | .container > footer .footer-buttons > button { |
| 100 | border-radius: var(--border-radius); |
| 101 | cursor: pointer; |
| 102 | background-color: rgba(0, 0, 0, 0); |
| 103 | border: 1px solid rgba(0, 0, 0, 0); |
| 104 | padding: 5px 10px; |
| 105 | } |
| 106 | |
| 107 | .container > footer .footer-buttons > button.apply-button { |
| 108 | background-color: var(--color-btn-primary-bg); |
| 109 | border-color: var(--color-btn-primary-border); |
| 110 | color: var(--color-btn-primary-fg); |
| 111 | } |
| 112 | |
| 113 | .container > footer .footer-buttons > button.apply-button:hover { |
| 114 | background-color: var(--color-btn-primary-hover-bg); |
| 115 | border-color: var(--color-btn-primary-hover-border); |
| 116 | color: var(--color-btn-primary-hover-fg); |
| 117 | } |
| 118 | |
| 119 | .container > footer .footer-buttons > button.cancel-button { |
| 120 | background-color: var(--color-btn-secondary-bg); |
| 121 | border-color: var(--color-btn-secondary-border); |
| 122 | color: var(--color-btn-secondary-fg); |
| 123 | } |
| 124 | |
| 125 | .container > footer .footer-buttons > button.cancel-button:hover { |
| 126 | background-color: var(--color-btn-secondary-hover-bg); |
| 127 | border-color: var(--color-btn-secondary-hover-border); |
| 128 | color: var(--color-btn-secondary-hover-fg); |
| 129 | } |
| 130 | |
| 131 | .grid-1 { |
| 132 | grid-template-columns: repeat(1, 1fr); |
| 133 | } |
| 134 | |
| 135 | .grid-2 { |
| 136 | grid-template-columns: repeat(2, 1fr); |
| 137 | } |
| 138 | |
| 139 | .grid-3 { |
| 140 | grid-template-columns: repeat(3, 1fr); |
| 141 | } |
| 142 | |
| 143 | .grid-4 { |
| 144 | grid-template-columns: repeat(4, 1fr); |
| 145 | } |
| 146 | |
| 147 | .grid-5 { |
| 148 | grid-template-columns: repeat(5, 1fr); |
| 149 | } |
| 150 | |
| 151 | .grid-6 { |
| 152 | grid-template-columns: repeat(6, 1fr); |
| 153 | } |
| 154 | |
| 155 | .grid-7 { |
| 156 | grid-template-columns: repeat(7, 1fr); |
| 157 | } |
| 158 | |
| 159 | .grid-8 { |
| 160 | grid-template-columns: repeat(8, 1fr); |
| 161 | } |
| 162 | |
| 163 | .grid-9 { |
| 164 | grid-template-columns: repeat(9, 1fr); |
| 165 | } |
| 166 | |
| 167 | .grid-10 { |
| 168 | grid-template-columns: repeat(10, 1fr); |
| 169 | } |
| 170 | |
| 171 | .grid-11 { |
| 172 | grid-template-columns: repeat(11, 1fr); |
| 173 | } |
| 174 | |
| 175 | .grid-12 { |
| 176 | grid-template-columns: repeat(12, 1fr); |
| 177 | } |
| 178 | |
| 179 | .calendars { |
| 180 | display: grid; |
| 181 | } |
| 182 | |
| 183 | .calendars:not(.grid-1) .calendar > .header .month-name { |
| 184 | text-align: center; |
| 185 | order: 2; |
| 186 | } |
| 187 | |
| 188 | .calendars:not(.grid-1) .calendar > .header .previous-button { |
| 189 | visibility: hidden; |
| 190 | order: 1; |
| 191 | } |
| 192 | |
| 193 | .calendars:not(.grid-1) .calendar > .header .next-button { |
| 194 | visibility: hidden; |
| 195 | order: 3; |
| 196 | } |
| 197 | |
| 198 | .calendars:not(.grid-1) .calendar:first-child > .header .previous-button, .calendars:not(.grid-1) .calendar:last-child > .header .next-button { |
| 199 | visibility: visible; |
| 200 | } |
| 201 | |
| 202 | .calendar { |
| 203 | padding: 10px; |
| 204 | } |
| 205 | |
| 206 | .calendar > .header { |
| 207 | -moz-column-gap: 5px; |
| 208 | justify-content: space-between; |
| 209 | align-items: center; |
| 210 | column-gap: 5px; |
| 211 | padding: 10px; |
| 212 | display: flex; |
| 213 | } |
| 214 | |
| 215 | .calendar > .header .month-name { |
| 216 | flex: 1; |
| 217 | font-size: 15px; |
| 218 | font-weight: 500; |
| 219 | } |
| 220 | |
| 221 | .calendar > .header .month-name > span { |
| 222 | font-weight: 700; |
| 223 | } |
| 224 | |
| 225 | .calendar > .header button { |
| 226 | color: var(--color-btn-secondary-fg); |
| 227 | cursor: pointer; |
| 228 | background-color: rgba(0, 0, 0, 0); |
| 229 | border: 1px solid rgba(0, 0, 0, 0); |
| 230 | border-radius: 2px; |
| 231 | justify-content: center; |
| 232 | align-items: center; |
| 233 | padding: 4px 7px; |
| 234 | display: flex; |
| 235 | } |
| 236 | |
| 237 | .calendar > .header button:hover { |
| 238 | background-color: var(--color-bg-secondary); |
| 239 | } |
| 240 | |
| 241 | .calendar > .header button:hover > img, .calendar > .header button:hover > svg { |
| 242 | fill: var(--color-fg-primary); |
| 243 | color: var(--color-fg-primary); |
| 244 | } |
| 245 | |
| 246 | .calendar > .header button > img, .calendar > .header button > svg { |
| 247 | fill: var(--color-btn-secondary-fg); |
| 248 | color: var(--color-btn-secondary-fg); |
| 249 | pointer-events: none; |
| 250 | -webkit-transform: scale(.7); |
| 251 | transform: scale(.7); |
| 252 | } |
| 253 | |
| 254 | .calendar > .daynames-row, .calendar > .days-grid { |
| 255 | grid-template-columns: repeat(7, 1fr); |
| 256 | row-gap: 2px; |
| 257 | display: grid; |
| 258 | } |
| 259 | |
| 260 | .calendar > .daynames-row > .day, .calendar > .daynames-row > .dayname, .calendar > .days-grid > .day, .calendar > .days-grid > .dayname { |
| 261 | cursor: default; |
| 262 | flex-direction: column; |
| 263 | justify-content: center; |
| 264 | align-items: center; |
| 265 | font-size: 13px; |
| 266 | display: flex; |
| 267 | } |
| 268 | |
| 269 | .calendar > .daynames-row > .dayname { |
| 270 | color: var(--color-fg-muted); |
| 271 | padding: 5px 0; |
| 272 | font-size: 12px; |
| 273 | } |
| 274 | |
| 275 | .calendar > .days-grid > .day { |
| 276 | height: var(--day-height); |
| 277 | max-height: var(--day-height); |
| 278 | max-width: var(--day-width); |
| 279 | min-height: var(--day-height); |
| 280 | min-width: var(--day-width); |
| 281 | width: var(--day-width); |
| 282 | border: 1px solid rgba(0, 0, 0, 0); |
| 283 | border-radius: 2px; |
| 284 | padding: 10px 0; |
| 285 | } |
| 286 | |
| 287 | .calendar > .days-grid > .day:hover { |
| 288 | border: 1px solid var(--color-fg-primary); |
| 289 | color: var(--color-fg-primary); |
| 290 | } |
| 291 | |
| 292 | .calendar > .days-grid > .day.today { |
| 293 | color: var(--color-fg-accent); |
| 294 | } |
| 295 | |
| 296 | .calendar > .days-grid > .day.selected { |
| 297 | background-color: var(--color-fg-primary); |
| 298 | color: var(--color-fg-selected); |
| 299 | } |
| 300 | |
| 301 | @media (max-width: 480px) { |
| 302 | .container:not(.inline) { |
| 303 | -webkit-transform-origin: bottom !important; |
| 304 | transform-origin: bottom !important; |
| 305 | -webkit-transform: scaleY(0) !important; |
| 306 | transform: scaleY(0) !important; |
| 307 | } |
| 308 | |
| 309 | .container:not(.inline).show { |
| 310 | position: fixed !important; |
| 311 | top: auto !important; |
| 312 | bottom: 0 !important; |
| 313 | left: 0 !important; |
| 314 | right: 0 !important; |
| 315 | -webkit-transform: scaleY(1) !important; |
| 316 | transform: scaleY(1) !important; |
| 317 | } |
| 318 | |
| 319 | .container { |
| 320 | width: 100%; |
| 321 | } |
| 322 | |
| 323 | .calendars { |
| 324 | grid-template-columns: repeat(1, 1fr); |
| 325 | } |
| 326 | |
| 327 | .calendars .calendar { |
| 328 | box-sizing: border-box; |
| 329 | width: 100%; |
| 330 | } |
| 331 | |
| 332 | .calendars .calendar:nth-child(n+2) { |
| 333 | display: none; |
| 334 | } |
| 335 | |
| 336 | .calendars .calendar > .days-grid > .day { |
| 337 | height: auto; |
| 338 | max-height: unset; |
| 339 | max-width: unset; |
| 340 | min-height: unset; |
| 341 | min-width: unset; |
| 342 | width: auto; |
| 343 | } |
| 344 | |
| 345 | .calendars .calendar > .header:not(.no-next-month) .next-button { |
| 346 | visibility: visible; |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | :host { |
| 351 | --color-bg-inrange: #d5dbff; |
| 352 | --color-bg-tooltip: #fff; |
| 353 | --color-fg-tooltip: #333; |
| 354 | } |
| 355 | |
| 356 | .range-plugin-tooltip { |
| 357 | background-color: var(--color-bg-tooltip); |
| 358 | border-radius: var(--border-radius); |
| 359 | color: var(--color-fg-tooltip); |
| 360 | pointer-events: none; |
| 361 | visibility: hidden; |
| 362 | white-space: nowrap; |
| 363 | z-index: 1; |
| 364 | margin-top: -4px; |
| 365 | padding: 4px 8px; |
| 366 | font-size: 12px; |
| 367 | position: absolute; |
| 368 | box-shadow: 0 1px 3px rgba(0, 0, 0, .25); |
| 369 | } |
| 370 | |
| 371 | .range-plugin-tooltip:before { |
| 372 | content: ""; |
| 373 | border-top: 5px solid rgba(0, 0, 0, .12); |
| 374 | border-left: 5px solid rgba(0, 0, 0, 0); |
| 375 | border-right: 5px solid rgba(0, 0, 0, 0); |
| 376 | position: absolute; |
| 377 | bottom: -5px; |
| 378 | left: calc(50% - 5px); |
| 379 | } |
| 380 | |
| 381 | .range-plugin-tooltip:after { |
| 382 | border-left: 4px solid rgba(0, 0, 0, 0); |
| 383 | border-right: 4px solid rgba(0, 0, 0, 0); |
| 384 | border-top: 4px solid var(--color-bg-tooltip); |
| 385 | content: ""; |
| 386 | position: absolute; |
| 387 | bottom: -4px; |
| 388 | left: calc(50% - 4px); |
| 389 | } |
| 390 | |
| 391 | .container.range-plugin .calendar > .days-grid > .day { |
| 392 | position: relative; |
| 393 | } |
| 394 | |
| 395 | .container.range-plugin .calendar > .days-grid > .day.in-range:last-of-type { |
| 396 | border-bottom-right-radius: var(--border-radius); |
| 397 | border-top-right-radius: var(--border-radius); |
| 398 | } |
| 399 | |
| 400 | .container.range-plugin .calendar > .days-grid > .day.in-range { |
| 401 | background-color: var(--color-bg-inrange); |
| 402 | border-radius: 0; |
| 403 | } |
| 404 | |
| 405 | .container.range-plugin .calendar > .days-grid > .day.end, .container.range-plugin .calendar > .days-grid > .day.start { |
| 406 | background-color: var(--color-fg-primary); |
| 407 | color: var(--color-fg-selected); |
| 408 | } |
| 409 | |
| 410 | .container.range-plugin .calendar > .days-grid > .day.start { |
| 411 | border-top-right-radius: 0; |
| 412 | border-bottom-right-radius: 0; |
| 413 | } |
| 414 | |
| 415 | .container.range-plugin .calendar > .days-grid > .day.start:after { |
| 416 | border: 8px solid rgba(0, 0, 0, 0); |
| 417 | border-left: 8px solid var(--color-fg-primary); |
| 418 | content: ""; |
| 419 | pointer-events: none; |
| 420 | z-index: 1; |
| 421 | position: absolute; |
| 422 | right: -14px; |
| 423 | } |
| 424 | |
| 425 | .container.range-plugin .calendar > .days-grid > .day.start.flipped { |
| 426 | border-bottom-left-radius: 0; |
| 427 | border-bottom-right-radius: var(--border-radius); |
| 428 | border-top-left-radius: 0; |
| 429 | border-top-right-radius: var(--border-radius); |
| 430 | } |
| 431 | |
| 432 | .container.range-plugin .calendar > .days-grid > .day.start.flipped:after { |
| 433 | border-left-color: rgba(0, 0, 0, 0); |
| 434 | border-right-color: var(--color-fg-primary); |
| 435 | left: -14px; |
| 436 | right: auto; |
| 437 | } |
| 438 | |
| 439 | .container.range-plugin .calendar > .days-grid > .day.end { |
| 440 | border-top-left-radius: 0; |
| 441 | border-bottom-left-radius: 0; |
| 442 | } |
| 443 | |
| 444 | .container.range-plugin .calendar > .days-grid > .day.end:after { |
| 445 | border: 8px solid rgba(0, 0, 0, 0); |
| 446 | border-right: 8px solid var(--color-fg-primary); |
| 447 | content: ""; |
| 448 | pointer-events: none; |
| 449 | z-index: 1; |
| 450 | position: absolute; |
| 451 | left: -14px; |
| 452 | } |
| 453 | |
| 454 | .container.range-plugin .calendar > .days-grid > .day.end.flipped { |
| 455 | border-bottom-left-radius: var(--border-radius); |
| 456 | border-bottom-right-radius: 0; |
| 457 | border-top-left-radius: var(--border-radius); |
| 458 | border-top-right-radius: 0; |
| 459 | } |
| 460 | |
| 461 | .container.range-plugin .calendar > .days-grid > .day.end.flipped:after { |
| 462 | border-left-color: var(--color-fg-primary); |
| 463 | border-right-color: rgba(0, 0, 0, 0); |
| 464 | left: auto; |
| 465 | right: -14px; |
| 466 | } |
| 467 | |
| 468 | .container.range-plugin .calendar > .days-grid > .day.start.end { |
| 469 | border-radius: var(--border-radius); |
| 470 | } |
| 471 | |
| 472 | .container.range-plugin .calendar > .days-grid > .day.start.end:after { |
| 473 | content: none; |
| 474 | } |
| 475 | |
| 476 | .container.range-plugin .calendar > .days-grid > div:not(.day) + .day.in-range { |
| 477 | border-bottom-left-radius: var(--border-radius); |
| 478 | border-top-left-radius: var(--border-radius); |
| 479 | } |
| 480 | |
| 481 | .container.range-plugin .calendar > .days-grid > div:nth-child(7n).in-range { |
| 482 | border-bottom-right-radius: var(--border-radius); |
| 483 | border-top-right-radius: var(--border-radius); |
| 484 | } |
| 485 | |
| 486 | .container.range-plugin .calendar > .days-grid > div:nth-child(7n+1).in-range { |
| 487 | border-bottom-left-radius: var(--border-radius); |
| 488 | border-top-left-radius: var(--border-radius); |
| 489 | } |
| 490 | |
| 491 | :host { |
| 492 | --color-fg-primary: #5123a0; |
| 493 | --color-fg-accent: #f69d0a; |
| 494 | --color-bg-inrange: #f9f6fe; |
| 495 | --color-btn-primary-border: #5123a0; |
| 496 | --color-btn-primary-bg: #5123a0; |
| 497 | --color-btn-primary-fg: #fff; |
| 498 | --color-btn-primary-hover-bg: #6c46ae; |
| 499 | --color-btn-primary-hover-border: #6c46ae; |
| 500 | --color-btn-secondary-border: #c7bdd9; |
| 501 | --color-btn-secondary-fg: #777; |
| 502 | --color-btn-secondary-hover-border: #5123a0; |
| 503 | --color-btn-secondary-hover-bg: #c7bdd9; |
| 504 | --color-btn-secondary-hover-fg: #5123a0; |
| 505 | --color-btn-secondary-hover-bg: #fff; |
| 506 | } |
| 507 | |
| 508 | .container.inline { |
| 509 | box-shadow: none; |
| 510 | } |
| 511 | |
| 512 | .day { |
| 513 | cursor: pointer !important; |
| 514 | } |
| 515 | |
| 516 | .preset-plugin-container { |
| 517 | padding: 12px; |
| 518 | } |
| 519 | |
| 520 | .preset-button { |
| 521 | color: #5123a0; |
| 522 | cursor: pointer; |
| 523 | background: #fff; |
| 524 | border: 1px solid rgba(0, 0, 0, 0); |
| 525 | border-radius: 5px; |
| 526 | margin: 0 6px 6px 0; |
| 527 | padding: 4px 8px; |
| 528 | font-size: 14px; |
| 529 | } |
| 530 | |
| 531 | .preset-button:hover { |
| 532 | color: #5123a0; |
| 533 | border-color: #5123a0; |
| 534 | } |
| 535 | |
| 536 | .footer-buttons { |
| 537 | justify-content: flex-start !important; |
| 538 | } |
| 539 | |
| 540 | .apply-button { |
| 541 | order: 1; |
| 542 | } |
| 543 | |
| 544 | .cancel-button { |
| 545 | order: 2; |
| 546 | } |
| 547 | |
| 548 | .calendar:first-child { |
| 549 | padding-left: 0; |
| 550 | } |
| 551 | |
| 552 | .calendar:last-child { |
| 553 | padding-right: 0; |
| 554 | } |
| 555 | |
| 556 | /*# sourceMappingURL=datepicker.css.map */ |
| 557 |