UNPKG

chayns-components

Version:

A set of beautiful React components for developing chayns® applications.

221 lines 6.05 kB
.cc__new-slider { width: 100%; display: flex; user-select: none; -webkit-user-select: none; } .cc__new-slider--dots { padding-top: 16px; } .cc__new-slider--vertical { width: 30px; height: 300px; display: inline-block; } .cc__new-slider--vertical .cc__new-slider__label { flex-direction: row; } .cc__new-slider--vertical .cc__new-slider__bar { margin: 11px 0; width: 30px; height: 100%; flex-direction: row; } .chayns-general-component-design--1 .cc__new-slider--vertical .cc__new-slider__bar, .chayns-general-component-design--2 .cc__new-slider--vertical .cc__new-slider__bar { margin: 0; } .cc__new-slider--vertical .cc__new-slider__bar__track { left: 50%; transform: translate(-50%, -50%); height: 100% !important; width: 10px; } .chayns-general-component-design--1 .cc__new-slider--vertical .cc__new-slider__bar__track { width: 8px; } .chayns-general-component-design--2 .cc__new-slider--vertical .cc__new-slider__bar__track { width: 6px; } .cc__new-slider--vertical .cc__new-slider__bar__track__inner { bottom: 0; width: 100%; } .cc__new-slider--vertical .cc__new-slider__bar__thumb { left: 50%; transform: translate(-50%, -50%); } .cc__new-slider--disabled { pointer-events: none; opacity: 0.5; } .cc__new-slider__label { display: flex; flex-direction: column; justify-content: center; font-size: 85%; } .cc__new-slider__bar { flex: 1; position: relative; height: 30px; display: flex; flex-direction: column; justify-content: center; margin: 0 11px; } .chayns-general-component-design--1 .cc__new-slider__bar, .chayns-general-component-design--2 .cc__new-slider__bar { margin: 0; } .cc__new-slider__bar__step__dot { position: absolute; width: 16px; height: 16px; border-radius: 50%; background-color: var(--chayns-color--402); transform: translate(-50%, 0); } .cc__new-slider__bar__step__dot.cc__new-slider__bar__step__dot--active { background-color: var(--chayns-color--408); } .cc__new-slider__bar__step__dot-label { position: absolute; font-size: 12px; transform: translate(-50%, -14px); top: 0; white-space: nowrap; } .cc__new-slider__bar--down .cc__new-slider__bar__mobile-arrow { opacity: 1; } .cc__new-slider__bar--down .cc__new-slider__bar__track { height: 30px; } .cc__new-slider__bar--down .cc__new-slider__bar__thumb__dot { border-radius: 3px; font-size: 100%; height: 30px; padding: 0 15px; box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25); line-height: 30px; transform: translateY(-38px); } .chayns-general-component-design--1 .cc__new-slider__bar--down .cc__new-slider__bar__thumb__dot { transform: translateY(-34px); border: none; } .cc__new-slider__bar__mobile-arrow { background: #fff; content: ""; position: absolute; margin: 0 auto; height: 10px; width: 10px; opacity: 0; transform: translate(-5px, -13px) rotate(45deg); pointer-events: none; transition: opacity 0.2s cubic-bezier(0.4, 0, 0.3, 1.35); top: 0; } .cc__new-slider__bar__track { top: 50%; position: absolute; overflow: hidden; border-radius: 100px; width: 100%; transform: translateY(-50%); cursor: pointer; transition: height 0.2s cubic-bezier(0.45, 0, 0.3, 1.35); height: 10px; } .chayns-general-component-design--1 .cc__new-slider__bar__track { height: 8px; } .chayns-general-component-design--2 .cc__new-slider__bar__track { height: 6px; } .cc__new-slider__bar__track__inner { height: 100%; position: absolute; } .cc__new-slider__bar__thumb { position: absolute; top: 50%; min-width: 30px; min-height: 30px; padding: 5px; transform: translate(-50%, -50%); cursor: pointer; } .cc__new-slider__bar__thumb-wrapper { width: 100%; position: relative; } .chayns-general-component-design--1 .cc__new-slider__bar__thumb:hover .cc__new-slider__bar__thumb__dot[data-value]:before { transform: scale(1) rotate(-45deg); opacity: 1; bottom: 150%; } .chayns-general-component-design--1 .cc__new-slider__bar__thumb:hover .cc__new-slider__bar__thumb__dot[data-value]:after { transform: scale(1); opacity: 1; bottom: 170%; } .cc__new-slider__bar__thumb__dot { content: " "; background-color: #fff; border-radius: 100px; height: 20px; min-width: 20px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35); pointer-events: none; padding: 0 8px; font-size: 85%; display: flex; align-items: center; justify-content: center; vertical-align: middle; line-height: 20px; transition-property: transform, border-radius, font-size, padding, box-shadow, line-height, height; transition-duration: 0.2s; transition-timing-function: cubic-bezier(0.4, 0, 0.3, 1.35); color: #222; white-space: nowrap; position: relative; } .chayns-general-component-design--1 .cc__new-slider__bar__thumb__dot { height: 24px; min-width: 24px; border: 2px solid var(--chayns-color--408); } .chayns-general-component-design--1 .cc__new-slider__bar__thumb__dot[data-value]:before { content: ""; width: 32px; height: 32px; transform: scale(0) rotate(-45deg); opacity: 0; border-radius: 50% 50% 50% 0; background-color: var(--chayns-color--408); position: absolute; bottom: 0; transition: transform 0.2s ease, opacity 0.3s, bottom 0.2s ease-out; } .chayns-general-component-design--1 .cc__new-slider__bar__thumb__dot[data-value]:after { content: attr(data-value); transform: scale(0); opacity: 0; color: #ffffff; position: absolute; bottom: 0; transition: transform 0.2s ease, opacity 0.3s, bottom 0.2s ease-out; } .chayns-general-component-design--2 .cc__new-slider__bar__thumb__dot[data-value], .chayns-general-component-design--2 .cc__new-slider--vertical .cc__new-slider__bar__thumb__dot { background-color: var(--chayns-color--408); } .chayns-general-component-design--2 .cc__new-slider__bar__thumb__dot[data-value]:after, .chayns-general-component-design--2 .cc__new-slider--vertical .cc__new-slider__bar__thumb__dot:after { content: ""; border-radius: 100%; background-color: white; position: absolute; height: 6px; width: 6px; }