UNPKG

@moamfar/react-time-date-picker

Version:

A React component library providing elegant and intuitive iOS-style pickers for Gregorian dates times and Jalaali (Persian) dates and Hijri dates offering a consistent user experience in your React applications.

82 lines (78 loc) 1.92 kB
.picker_embla { max-width: 48rem; margin: auto; position: relative; --slide-height: 12rem; --slide-spacing: 0.2rem; --slide-size: 2.5rem; } .picker_embla__viewport_picker { overflow: hidden; } .picker_embla__container_picker { display: flex; touch-action: pan-x pinch-zoom; margin-top: calc(var(--slide-spacing) * -1); height: calc(var(--slide-spacing) + var(--slide-height)); flex-direction: column; } .picker_embla-parent_picker { position: relative; } .top-gradient { top: -0.5px; position: absolute; left: 0; right: 0; height: calc(50% - 32px / 2); z-index: 1; pointer-events: none; touch-action: none; border-bottom-width: 1.5px; border-style: solid; border-image: linear-gradient(to right, #fff, #a9a9a9, #fff) 1; background: linear-gradient(to top, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 1) 100%); } .bottom-gradient { position: absolute; left: 0; right: 0; height: calc(50% - 32px / 2); z-index: 1; pointer-events: none; touch-action: none; bottom: -0.5px; border-top-width: 1.5px; border-style: solid; border-image: linear-gradient(to right, #fff, #a9a9a9, #fff) 1; background: linear-gradient(to bottom, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 1) 100%); } .picker_embla__slide_picker { transform: translate3d(0, 0, 0); flex: 0 0 var(--slide-size); width: 100%; align-items: center; justify-content: center; display: flex; min-height: 0; user-select: none; padding-top: var(--slide-spacing); } .loader_picker { width: 26px; padding: 6px; aspect-ratio: 1; border-radius: 50%; background: #242323; --_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box; -webkit-mask: var(--_m); mask: var(--_m); -webkit-mask-composite: source-out; mask-composite: subtract; animation: l3 1s infinite linear; } @keyframes l3 { to { transform: rotate(1turn); } }