UNPKG

tu-view-plus

Version:
313 lines (293 loc) 9.13 kB
.tu-input { position: relative; display: inline-flex; width: 100%; box-sizing: border-box; vertical-align: middle; font-size: var(--tu-font-size-medium, 14px); height: 32px; line-height: 32px; border: 1px solid transparent; box-shadow: inset 2px 2px 5px var(--tu-color-shadow-dark, #babbc0), inset -2px -2px 5px var(--tu-color-shadow-light, #ffffff); border-radius: var(--tu-border-radius, 2px); transition: all var(--tu-transition-duration-2, 0.2s) ease; } .tu-input:hover:not(.is-disabled) { box-shadow: none; border-color: var(--tu-color-shadow-light, #ffffff); } .tu-input__wrapper { position: relative; display: inline-flex; flex-grow: 1; align-items: center; justify-content: center; padding: 12px; } .tu-input__inner { width: 100%; height: 100%; padding: 0; outline: none; border: none; background: none; box-sizing: border-box; flex-grow: 1; font-size: inherit; color: var(--tu-color-text, #71757f); -webkit-appearance: none; height: 32px; line-height: 32px; } .tu-input__inner:focus { outline: none; } .tu-input__inner::-moz-placeholder { color: var(--tu-color-text-placeholder, #9b9fa8); } .tu-input__inner::placeholder { color: var(--tu-color-text-placeholder, #9b9fa8); } .tu-input__inner::-moz-placeholder { color: var(--tu-color-text-placeholder, #9b9fa8); } .tu-input__inner::-ms-input-placeholder { color: var(--tu-color-text-placeholder, #9b9fa8); } .tu-input__inner[type=password]::-ms-reveal { display: none; } .tu-input__wrapper.is-focus { box-shadow: none; border-color: var(--tu-color-shadow-light, #ffffff); } .tu-input__icon { font-size: var(--tu-font-size-medium, 14px); } .tu-input__icon--clear::before, .tu-input__icon--password::before { width: 18px; height: 18px; } .tu-input__prefix { display: inline-flex; white-space: nowrap; flex-shrink: 0; flex-wrap: nowrap; height: 100%; text-align: center; color: var(--tu-color-text-placeholder, #9b9fa8); transition: all var(--tu-transition-duration-2, 0.2s); pointer-events: none; } .tu-input__prefix-inner { pointer-events: all; display: inline-flex; align-items: center; justify-content: center; } .tu-input__prefix-inner > :last-child { margin-right: 8px; } .tu-input__prefix-inner > :first-child .tu-input__icon { margin-left: 0; } .tu-input__icon { font-size: var(--tu-font-size-medium, 14px); } .tu-input__icon--clear::before, .tu-input__icon--password::before { width: 18px; height: 18px; } .tu-input__suffix { display: inline-flex; white-space: nowrap; flex-shrink: 0; flex-wrap: nowrap; height: 100%; text-align: center; color: var(--tu-color-text-placeholder, #9b9fa8); transition: all var(--tu-transition-duration-2, 0.2s); pointer-events: none; } .tu-input__suffix-inner { pointer-events: all; display: inline-flex; align-items: center; justify-content: center; } .tu-input__suffix-inner > * { margin-left: 8px; } .tu-input__icon--clear, .tu-input__icon--password { cursor: pointer; transition: color var(--tu-transition-duration-3, 0.3s); } .tu-input__icon--clear:hover, .tu-input__icon--password:hover { color: var(--tu-color-text, #71757f); } .tu-input__count { height: 100%; display: inline-flex; align-items: center; } .tu-input__count-inner { line-height: 1; display: inline-flex; align-items: center; padding-left: 2px; color: var(--tu-color-text-placeholder, #9b9fa8); font-size: var(--tu-font-size-mini, 10px); } .tu-input--mini { font-size: var(--tu-font-size-mini, 10px); height: 24px; line-height: 24px; } .tu-input--mini .tu-input__wrapper { padding: 6px; } .tu-input--mini .tu-input__wrapper .tu-input__inner { height: 24px; line-height: 24px; } .tu-input--mini .tu-input__wrapper .tu-input__prefix .tu-input__icon, .tu-input--mini .tu-input__wrapper .tu-input__suffix .tu-input__icon { font-size: var(--tu-font-size-mini, 10px); } .tu-input--mini .tu-input__wrapper .tu-input__prefix .tu-input__icon::before, .tu-input--mini .tu-input__wrapper .tu-input__suffix .tu-input__icon--clear::before, .tu-input--mini .tu-input__wrapper .tu-input__prefix .tu-input__icon::before, .tu-input--mini .tu-input__wrapper .tu-input__suffix .tu-input__icon--password::before { width: 14px; height: 14px; } .tu-input--small { font-size: var(--tu-font-size-small, 12px); height: 28px; line-height: 28px; } .tu-input--small .tu-input__wrapper { padding: 8px; } .tu-input--small .tu-input__wrapper .tu-input__inner { height: 28px; line-height: 28px; } .tu-input--small .tu-input__wrapper .tu-input__prefix .tu-input__icon, .tu-input--small .tu-input__wrapper .tu-input__suffix .tu-input__icon { font-size: var(--tu-font-size-small, 12px); } .tu-input--small .tu-input__wrapper .tu-input__prefix .tu-input__icon::before, .tu-input--small .tu-input__wrapper .tu-input__suffix .tu-input__icon--clear::before, .tu-input--small .tu-input__wrapper .tu-input__prefix .tu-input__icon::before, .tu-input--small .tu-input__wrapper .tu-input__suffix .tu-input__icon--password::before { width: 16px; height: 16px; } .tu-input--medium { font-size: var(--tu-font-size-medium, 14px); height: 32px; line-height: 32px; } .tu-input--medium .tu-input__wrapper { padding: 12px; } .tu-input--medium .tu-input__wrapper .tu-input__inner { height: 32px; line-height: 32px; } .tu-input--medium .tu-input__wrapper .tu-input__prefix .tu-input__icon, .tu-input--medium .tu-input__wrapper .tu-input__suffix .tu-input__icon { font-size: var(--tu-font-size-medium, 14px); } .tu-input--medium .tu-input__wrapper .tu-input__prefix .tu-input__icon::before, .tu-input--medium .tu-input__wrapper .tu-input__suffix .tu-input__icon--clear::before, .tu-input--medium .tu-input__wrapper .tu-input__prefix .tu-input__icon::before, .tu-input--medium .tu-input__wrapper .tu-input__suffix .tu-input__icon--password::before { width: 18px; height: 18px; } .tu-input--large { font-size: var(--tu-font-size-large, 14px); height: 36px; line-height: 36px; } .tu-input--large .tu-input__wrapper { padding: 16px; } .tu-input--large .tu-input__wrapper .tu-input__inner { height: 36px; line-height: 36px; } .tu-input--large .tu-input__wrapper .tu-input__prefix .tu-input__icon, .tu-input--large .tu-input__wrapper .tu-input__suffix .tu-input__icon { font-size: var(--tu-font-size-large, 14px); } .tu-input--large .tu-input__wrapper .tu-input__prefix .tu-input__icon::before, .tu-input--large .tu-input__wrapper .tu-input__suffix .tu-input__icon--clear::before, .tu-input--large .tu-input__wrapper .tu-input__prefix .tu-input__icon::before, .tu-input--large .tu-input__wrapper .tu-input__suffix .tu-input__icon--password::before { width: 18px; height: 18px; } .tu-input.is-disabled { cursor: not-allowed; box-shadow: none; opacity: 0.7; background-color: var(--tu-color-base-bg, rgba(128, 128, 128, 0.22)); } .tu-input.is-disabled .tu-input__wrapper .tu-input__inner { cursor: not-allowed; } .tu-input-group { display: inline-flex; align-items: stretch; width: 100%; box-shadow: inset 2px 2px 5px var(--tu-color-shadow-dark, #babbc0), inset -2px -2px 5px var(--tu-color-shadow-light, #ffffff); } .tu-input-group .tu-input__wrapper { box-shadow: none; } .tu-input-group__prepend, .tu-input-group__append { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--tu-border-radius, 2px); padding: 0 12px; white-space: nowrap; color: var(--tu-color-text, #71757f); box-sizing: border-box; font-size: var(--tu-font-size-small, 12px); cursor: pointer; transition: color var(--tu-transition-duration-2, 0.2s); box-shadow: 3px 3px 6px var(--tu-color-shadow-dark, #babbc0), -2px -2px 5px var(--tu-color-shadow-light, #ffffff); margin: 6px 6px; } .tu-input-group__prepend::after, .tu-input-group__append::after { content: ""; box-sizing: content-box; position: absolute; width: calc(100% - 2px); height: calc(100% - 2px); top: 0; left: 0; border: 1px solid transparent; border-radius: var(--tu-border-radius, 2px); transition: border var(--tu-transition-duration-2, 0.2s); } .tu-input-group__prepend:hover, .tu-input-group__append:hover { box-shadow: none; } .tu-input-group__prepend:hover::after, .tu-input-group__append:hover::after { border-color: var(--tu-color-shadow-light, #ffffff); } .tu-input-group__prepend:active, .tu-input-group__append:active { color: var(--tu-color-primary, #5e7ce0); transition: none; box-shadow: inset 2px 2px 5px var(--tu-color-shadow-dark, #babbc0), inset -2px -2px 5px var(--tu-color-shadow-light, #ffffff); } .tu-input-group__prepend { border-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; } .tu-input-group__append { border-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; } .tu-input-group--prepend .tu-input__wrapper { border-top-left-radius: 0; border-bottom-left-radius: 0; } .tu-input-group--append .tu-input__wrapper { border-top-left-radius: 0; border-bottom-left-radius: 0; }