123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657 |
- /* mixins & extensions */
- @keyframes in {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
- }
- @keyframes in-down {
- 0% {
- opacity: 0;
- transform: translate3D(0, -5px, 0);
- }
- 100% {
- opacity: 1;
- transform: translate3D(0, 0, 0);
- }
- }
- @keyframes in-up {
- 0% {
- opacity: 0;
- transform: translate3D(0, 5px, 0);
- }
- 100% {
- opacity: 1;
- transform: translate3D(0, 0, 0);
- }
- }
- @keyframes in-scale {
- 0% {
- opacity: 0;
- transform: scale3D(0.95, 0.95, 1);
- }
- 100% {
- opacity: 1;
- transform: scale3D(1, 1, 1);
- }
- }
- :root {
- --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));
- --calcite-internal-duration-factor: var(--calcite-duration-factor, 1);
- --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));
- --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));
- --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));
- }
- .calcite-animate {
- opacity: 0;
- animation-fill-mode: both;
- animation-duration: var(--calcite-animation-timing);
- }
- .calcite-animate__in {
- animation-name: in;
- }
- .calcite-animate__in-down {
- animation-name: in-down;
- }
- .calcite-animate__in-up {
- animation-name: in-up;
- }
- .calcite-animate__in-scale {
- animation-name: in-scale;
- }
- /**
- * Currently only used in Checkbox.
- */
- :root {
- --calcite-popper-transition: var(--calcite-animation-timing);
- }
- :host([hidden]) {
- display: none;
- }
- :host {
- display: block;
- }
- :host([scale=s]) input, :host([scale=s]) .prefix, :host([scale=s]) .suffix {
- height: 1.5rem;
- padding: 0.5rem;
- font-size: var(--calcite-font-size--2);
- line-height: 1rem;
- }
- :host([scale=s]) textarea {
- height: 1.5rem;
- min-height: 1.5rem;
- }
- :host([scale=s]) .number-button-wrapper, :host([scale=s]) .action-wrapper calcite-button, :host([scale=s]) .action-wrapper calcite-button button {
- height: 1.5rem;
- }
- :host([scale=s]) input[type=file] {
- height: 1.5rem;
- }
- :host([scale=s]) .clear-button {
- min-height: 1.5rem;
- min-width: 1.5rem;
- }
- :host([scale=s]) textarea {
- height: auto;
- padding-top: 0.25rem;
- padding-bottom: 0.25rem;
- padding-left: 0.5rem;
- padding-right: 0.5rem;
- font-size: var(--calcite-font-size--2);
- line-height: 1rem;
- }
- :host([scale=m]) input, :host([scale=m]) .prefix, :host([scale=m]) .suffix {
- height: 2rem;
- padding: 0.75rem;
- font-size: var(--calcite-font-size--1);
- line-height: 1rem;
- }
- :host([scale=m]) textarea {
- min-height: 2rem;
- }
- :host([scale=m]) .number-button-wrapper, :host([scale=m]) .action-wrapper calcite-button, :host([scale=m]) .action-wrapper calcite-button button {
- height: 2rem;
- }
- :host([scale=m]) input[type=file] {
- height: 2rem;
- }
- :host([scale=m]) .clear-button {
- min-height: 2rem;
- min-width: 2rem;
- }
- :host([scale=m]) textarea {
- height: auto;
- padding-top: 0.5rem;
- padding-bottom: 0.5rem;
- padding-left: 0.75rem;
- padding-right: 0.75rem;
- font-size: var(--calcite-font-size--1);
- line-height: 1rem;
- }
- :host([scale=l]) input, :host([scale=l]) .prefix, :host([scale=l]) .suffix {
- height: 2.75rem;
- padding: 1rem;
- font-size: var(--calcite-font-size-0);
- line-height: 1.25rem;
- }
- :host([scale=l]) textarea {
- min-height: 2.75rem;
- }
- :host([scale=l]) .number-button-wrapper, :host([scale=l]) .action-wrapper calcite-button, :host([scale=l]) .action-wrapper calcite-button button {
- height: 2.75rem;
- }
- :host([scale=l]) input[type=file] {
- height: 2.75rem;
- }
- :host([scale=l]) .clear-button {
- min-height: 2.75rem;
- min-width: 2.75rem;
- }
- :host([scale=l]) textarea {
- height: auto;
- padding-top: 0.75rem;
- padding-bottom: 0.75rem;
- padding-left: 1rem;
- padding-right: 1rem;
- font-size: var(--calcite-font-size-0);
- line-height: 1.25rem;
- }
- :host([disabled]) {
- pointer-events: none;
- cursor: default;
- -webkit-user-select: none;
- user-select: none;
- opacity: var(--calcite-ui-opacity-disabled);
- }
- :host([disabled]) textarea {
- resize: none;
- }
- :host([disabled]) ::slotted([calcite-hydrated][disabled]),
- :host([disabled]) [calcite-hydrated][disabled] {
- /* prevent opacity stacking */
- opacity: 1;
- }
- :host textarea,
- :host input {
- transition: var(--calcite-animation-timing), height 0s;
- -webkit-appearance: none;
- position: relative;
- margin: 0px;
- box-sizing: border-box;
- display: flex;
- max-height: 100%;
- width: 100%;
- max-width: 100%;
- flex: 1 1 0%;
- border-radius: 0px;
- background-color: var(--calcite-ui-foreground-1);
- font-family: inherit;
- font-weight: var(--calcite-font-weight-normal);
- color: var(--calcite-ui-text-1);
- }
- :host input[type=search]::-webkit-search-decoration {
- -webkit-appearance: none;
- }
- :host input, :host textarea {
- border-width: 1px;
- border-style: solid;
- border-color: var(--calcite-ui-border-input);
- color: var(--calcite-ui-text-1);
- }
- :host input::placeholder, :host input:-ms-input-placeholder, :host input::-ms-input-placeholder, :host textarea::placeholder, :host textarea:-ms-input-placeholder, :host textarea::-ms-input-placeholder {
- font-weight: var(--calcite-font-weight-normal);
- color: var(--calcite-ui-text-3);
- }
- :host input:focus, :host textarea:focus {
- border-color: var(--calcite-ui-brand);
- color: var(--calcite-ui-text-1);
- }
- :host input[readonly], :host textarea[readonly] {
- background-color: var(--calcite-ui-background);
- font-weight: var(--calcite-font-weight-medium);
- }
- :host input[readonly]:focus, :host textarea[readonly]:focus {
- color: var(--calcite-ui-text-1);
- }
- :host calcite-icon {
- color: var(--calcite-ui-text-3);
- }
- :host textarea, :host input {
- outline-offset: 0;
- outline-color: transparent;
- transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
- }
- :host textarea:focus, :host input:focus {
- outline: 2px solid var(--calcite-ui-brand);
- outline-offset: -2px;
- }
- :host([status=invalid]) input, :host([status=invalid]) textarea {
- border-color: var(--calcite-ui-danger);
- }
- :host([status=invalid]) input:focus, :host([status=invalid]) textarea:focus {
- outline: 2px solid var(--calcite-ui-danger);
- outline-offset: -2px;
- }
- :host([scale=s]) .icon {
- inset-inline-start: 0.5rem;
- }
- :host([scale=m]) .icon {
- inset-inline-start: 0.75rem;
- }
- :host([scale=l]) .icon {
- inset-inline-start: 1rem;
- }
- :host([icon][scale=s]) input {
- padding-inline-start: 2rem;
- }
- :host([icon][scale=m]) input {
- padding-inline-start: 2.5rem;
- }
- :host([icon][scale=l]) input {
- padding-inline-start: 3rem;
- }
- .element-wrapper {
- position: relative;
- order: 3;
- display: inline-flex;
- flex: 1 1 0%;
- align-items: center;
- }
- .icon {
- pointer-events: none;
- position: absolute;
- z-index: 10;
- display: block;
- transition-property: all;
- transition-duration: var(--calcite-animation-timing);
- transition-timing-function: ease-in-out;
- transition-delay: 0s;
- }
- input[type=text]::-ms-clear, input[type=text]::-ms-reveal {
- display: none;
- height: 0px;
- width: 0px;
- }
- input[type=search]::-webkit-search-decoration, input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-results-button, input[type=search]::-webkit-search-results-decoration, input[type=date]::-webkit-clear-button, input[type=time]::-webkit-clear-button {
- display: none;
- }
- .clear-button {
- pointer-events: initial;
- order: 4;
- margin: 0px;
- box-sizing: border-box;
- display: flex;
- min-height: 100%;
- cursor: pointer;
- align-items: center;
- justify-content: center;
- align-self: stretch;
- border-width: 1px;
- border-style: solid;
- border-color: var(--calcite-ui-border-input);
- background-color: var(--calcite-ui-foreground-1);
- outline-offset: 0;
- outline-color: transparent;
- transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
- border-inline-start-width: 0px;
- }
- .clear-button:hover {
- background-color: var(--calcite-ui-foreground-2);
- transition-property: all;
- transition-duration: var(--calcite-animation-timing);
- transition-timing-function: ease-in-out;
- transition-delay: 0s;
- }
- .clear-button:hover calcite-icon {
- color: var(--calcite-ui-text-1);
- transition-property: all;
- transition-duration: var(--calcite-animation-timing);
- transition-timing-function: ease-in-out;
- transition-delay: 0s;
- }
- .clear-button:active {
- background-color: var(--calcite-ui-foreground-3);
- }
- .clear-button:active calcite-icon {
- color: var(--calcite-ui-text-1);
- }
- .clear-button:focus {
- outline: 2px solid var(--calcite-ui-brand);
- outline-offset: -2px;
- }
- .clear-button:disabled {
- opacity: var(--calcite-ui-opacity-disabled);
- }
- .loader {
- top: 1px;
- left: 1px;
- right: 1px;
- pointer-events: none;
- position: absolute;
- display: block;
- }
- .action-wrapper {
- order: 7;
- display: flex;
- }
- .prefix, .suffix {
- box-sizing: border-box;
- display: flex;
- height: auto;
- min-height: 100%;
- -webkit-user-select: none;
- user-select: none;
- align-content: center;
- align-items: center;
- overflow-wrap: break-word;
- border-width: 1px;
- border-style: solid;
- border-color: var(--calcite-ui-border-input);
- background-color: var(--calcite-ui-background);
- font-weight: var(--calcite-font-weight-medium);
- line-height: 1;
- color: var(--calcite-ui-text-2);
- }
- .prefix {
- order: 2;
- border-inline-end-width: 0px;
- }
- .suffix {
- order: 5;
- border-inline-start-width: 0px;
- }
- :host([alignment=start]) textarea, :host([alignment=start]) input {
- text-align: start;
- }
- :host([alignment=end]) textarea, :host([alignment=end]) input {
- text-align: end;
- }
- :host input[type=number] {
- -moz-appearance: textfield;
- }
- :host input[type=number]::-webkit-inner-spin-button, :host input[type=number]::-webkit-outer-spin-button {
- -webkit-appearance: none;
- -moz-appearance: textfield;
- margin: 0px;
- }
- .number-button-wrapper {
- pointer-events: none;
- order: 6;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- transition-property: all;
- transition-duration: var(--calcite-animation-timing);
- transition-timing-function: ease-in-out;
- transition-delay: 0s;
- }
- :host([number-button-type=vertical]) .wrapper {
- flex-direction: row;
- display: flex;
- }
- :host([number-button-type=vertical]) input, :host([number-button-type=vertical]) textarea {
- order: 2;
- }
- :host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon {
- transform: rotate(-90deg);
- }
- :host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon {
- transform: rotate(-90deg);
- }
- .number-button-item.number-button-item--horizontal[data-adjustment=down], .number-button-item.number-button-item--horizontal[data-adjustment=up] {
- order: 1;
- max-height: 100%;
- min-height: 100%;
- align-self: stretch;
- }
- .number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon, .number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon {
- transform: rotate(90deg);
- }
- .number-button-item.number-button-item--horizontal[data-adjustment=down] {
- border-width: 1px;
- border-style: solid;
- border-color: var(--calcite-ui-border-input);
- border-inline-end-width: 0px;
- }
- .number-button-item.number-button-item--horizontal[data-adjustment=down]:hover {
- background-color: var(--calcite-ui-foreground-2);
- }
- .number-button-item.number-button-item--horizontal[data-adjustment=down]:hover calcite-icon {
- color: var(--calcite-ui-text-1);
- }
- .number-button-item.number-button-item--horizontal[data-adjustment=up] {
- order: 5;
- }
- .number-button-item.number-button-item--horizontal[data-adjustment=up]:hover {
- background-color: var(--calcite-ui-foreground-2);
- }
- .number-button-item.number-button-item--horizontal[data-adjustment=up]:hover calcite-icon {
- color: var(--calcite-ui-text-1);
- }
- :host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover {
- background-color: var(--calcite-ui-foreground-2);
- }
- :host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover calcite-icon {
- color: var(--calcite-ui-text-1);
- }
- :host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover {
- background-color: var(--calcite-ui-foreground-2);
- }
- :host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover calcite-icon {
- color: var(--calcite-ui-text-1);
- }
- :host([number-button-type=vertical]) .number-button-item[data-adjustment=down] {
- border-top-width: 0px;
- }
- .number-button-item {
- max-height: 50%;
- min-height: 50%;
- pointer-events: initial;
- margin: 0px;
- box-sizing: border-box;
- display: flex;
- cursor: pointer;
- align-items: center;
- align-self: center;
- border-width: 1px;
- border-style: solid;
- border-color: var(--calcite-ui-border-input);
- background-color: var(--calcite-ui-foreground-1);
- padding-top: 0px;
- padding-bottom: 0px;
- padding-left: 0.5rem;
- padding-right: 0.5rem;
- transition-property: all;
- transition-duration: var(--calcite-animation-timing);
- transition-timing-function: ease-in-out;
- transition-delay: 0s;
- border-inline-start-width: 0px;
- }
- .number-button-item calcite-icon {
- pointer-events: none;
- transition-property: all;
- transition-duration: var(--calcite-animation-timing);
- transition-timing-function: ease-in-out;
- transition-delay: 0s;
- }
- .number-button-item:focus {
- background-color: var(--calcite-ui-foreground-2);
- }
- .number-button-item:focus calcite-icon {
- color: var(--calcite-ui-text-1);
- }
- .number-button-item:active {
- background-color: var(--calcite-ui-foreground-3);
- }
- .wrapper {
- position: relative;
- display: flex;
- flex-direction: row;
- align-items: center;
- }
- :host input::-webkit-calendar-picker-indicator {
- display: none;
- }
- :host input[type=date]::-webkit-input-placeholder {
- visibility: hidden !important;
- }
- :host textarea::-webkit-resizer {
- position: absolute;
- bottom: 0px;
- box-sizing: border-box;
- padding-top: 0px;
- padding-bottom: 0px;
- padding-left: 0.25rem;
- padding-right: 0.25rem;
- inset-inline-end: 0;
- }
- .resize-icon-wrapper {
- bottom: 2px;
- inset-inline-end: 2px;
- pointer-events: none;
- position: absolute;
- z-index: 10;
- height: 0.75rem;
- width: 0.75rem;
- background-color: var(--calcite-ui-foreground-1);
- color: var(--calcite-ui-text-3);
- }
- .resize-icon-wrapper calcite-icon {
- bottom: 0.25rem;
- inset-inline-end: 0.25rem;
- transform: rotate(-45deg);
- }
- .calcite--rtl .resize-icon-wrapper calcite-icon {
- transform: rotate(45deg);
- }
- :host([type=color]) input {
- padding: 0.25rem;
- }
- :host([type=file]) input {
- cursor: pointer;
- border-width: 1px;
- border-style: dashed;
- border-color: var(--calcite-ui-border-input);
- background-color: var(--calcite-ui-foreground-1);
- text-align: center;
- }
- :host([type=file][scale=s]) input {
- padding-top: 1px;
- padding-bottom: 1px;
- padding-left: 0.5rem;
- padding-right: 0.5rem;
- }
- :host([type=file][scale=m]) input {
- padding-top: 0.25rem;
- padding-bottom: 0.25rem;
- padding-left: 0.75rem;
- padding-right: 0.75rem;
- }
- :host([type=file][scale=l]) input {
- padding-top: 0.5rem;
- padding-bottom: 0.5rem;
- padding-left: 1rem;
- padding-right: 1rem;
- }
- :host(.no-bottom-border) input {
- border-bottom-width: 0px;
- }
- :host(.border-top-color-one) input {
- border-top-color: var(--calcite-ui-border-1);
- }
- :host .inline-child {
- background-color: transparent;
- transition-property: all;
- transition-duration: var(--calcite-animation-timing);
- transition-timing-function: ease-in-out;
- transition-delay: 0s;
- }
- :host .inline-child .editing-enabled {
- background-color: inherit;
- }
- :host .inline-child:not(.editing-enabled) {
- display: flex;
- cursor: pointer;
- border-color: transparent;
- padding-inline-start: 0;
- }
- ::slotted(input[slot=hidden-form-input]) {
- bottom: 0 !important;
- left: 0 !important;
- margin: 0 !important;
- opacity: 0 !important;
- outline: none !important;
- padding: 0 !important;
- position: absolute !important;
- right: 0 !important;
- top: 0 !important;
- transform: none !important;
- -webkit-appearance: none !important;
- z-index: -1 !important;
- }
|