UNPKG

@senx/discovery-widgets

Version:

Discovery Widgets Elements

359 lines (348 loc) 11.1 kB
/*! * Copyright 2022-2025 SenX S.A.S. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /*! * Copyright 2022-2024 SenX S.A.S. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ .autoComplete_wrapper { display: inline-block; position: relative; } .autoComplete_wrapper > input { width: 370px; height: 40px; padding-left: 10px; font-size: 1rem; color: rgb(116, 116, 116); border-radius: 4px; border: 1px solid rgba(33, 33, 33, 0.2); outline: none; } .autoComplete_wrapper > input::placeholder { color: rgba(123, 123, 123, 0.5); transition: all 0.3s ease; } .autoComplete_wrapper > ul { position: absolute; max-height: 226px; overflow-y: scroll; top: 100%; left: 0; right: 0; padding: 0; margin: 0.5rem 0 0 0; border-radius: 4px; background-color: #fff; border: 1px solid rgba(33, 33, 33, 0.1); z-index: 1000; outline: none; } .autoComplete_wrapper > ul > li { padding: 10px 20px; list-style: none; text-align: left; font-size: 16px; color: #212121; transition: all 0.1s ease-in-out; border-radius: 3px; background-color: rgba(255, 255, 255, 1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: all 0.2s ease; } .autoComplete_wrapper > ul > li::selection { color: rgba(#ffffff, 0); background-color: rgba(#ffffff, 0); } .autoComplete_wrapper > ul > li:hover { cursor: pointer; background-color: rgba(123, 123, 123, 0.1); } .autoComplete_wrapper > ul > li mark { background-color: transparent; color: rgba(255, 122, 122, 1); font-weight: bold; } .autoComplete_wrapper > ul > li mark::selection { color: rgba(#ffffff, 0); background-color: rgba(#ffffff, 0); } .autoComplete_wrapper > ul > li[aria-selected="true"] { background-color: rgba(123, 123, 123, 0.1); } @media only screen and (max-width: 600px) { .autoComplete_wrapper > input { width: 18rem; } } :host { display: block; position: relative; height: 100%; width: 100%; } :host > div { height: 100%; width: 100%; } :host .hidden { display: none; } :host .chips-input-wrapper, :host input[type=text].discovery-input, :host input[type=password].discovery-input, :host input[type=date].discovery-input, :host input[type=time].discovery-input, :host input[type=number].discovery-input, :host textarea.discovery-input, :host input[type=file].discovery-input, :host select.discovery-input { margin: 0.25rem 0.125rem; display: inline-block; position: relative; font-size: var(--warp-view-input-font-size, 1rem); border-radius: var(--warp-view-input-border-radius, 0.25rem); border: 1px solid var(--warp-view-input-border-color, #c0c0c0); color: var(--warp-view-input-label-color, #404040); background-color: var(--warp-view-input-bg-color, #ffffff); vertical-align: middle; width: 100%; height: 34px; padding: 1px 5px; } :host .chips-input-wrapper[disabled], :host input[type=text].discovery-input[disabled], :host input[type=password].discovery-input[disabled], :host input[type=date].discovery-input[disabled], :host input[type=time].discovery-input[disabled], :host input[type=number].discovery-input[disabled], :host textarea.discovery-input[disabled], :host input[type=file].discovery-input[disabled], :host select.discovery-input[disabled] { background-color: var(--warp-view-input-disabled-bg-color, #c0c0c0); color: var(--warp-view-input-disabled-label-color, #404040); border: 1px solid var(--warp-view-input-disabled-border-color, #c0c0c0); } :host .chips-input-wrapper:focus, :host input[type=text].discovery-input:focus, :host input[type=password].discovery-input:focus, :host input[type=date].discovery-input:focus, :host input[type=time].discovery-input:focus, :host input[type=number].discovery-input:focus, :host textarea.discovery-input:focus, :host input[type=file].discovery-input:focus, :host select.discovery-input:focus { outline: 0; box-shadow: 0 0 0 0.25rem var(--warp-view-input-focus-outline-color, rgba(13, 110, 253, 0.25)); } :host input[type=file].discovery-input { height: 38px; padding: 0; } :host input.validation:invalid { outline: 1px solid #dc3545 !important; padding-right: calc(1.5em + 0.75rem); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } :host input.validation:invalid:focus { border-color: #dc3545; box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25); } :host input.validation:valid { outline: 1px solid #198754 !important; padding-right: calc(1.5em + 0.75rem); background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right calc(0.375em + 0.1875rem) center; background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem); } :host input.validation:valid:focus { border-color: #198754; box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25); } :host textarea.discovery-input { width: calc(100% - 0.75rem); height: 100%; } :host .chips-input-wrapper { min-height: 34px; height: fit-content; } :host .chips-input-wrapper.disabled { background-color: var(--warp-view-input-disabled-bg-color, #c0c0c0); color: var(--warp-view-input-disabled-label-color, #404040); border: 1px solid var(--warp-view-input-disabled-border-color, #c0c0c0); } :host select.discovery-input { height: 38px; } :host select.discovery-input[multiple] { height: 100%; } :host select.discovery-input option { line-height: 2.5em; } :host .flatpickr-wrapper { width: 100%; margin-right: 20px; align-items: center; justify-content: center; margin-bottom: 10px; } :host .flatpickr-wrapper .numInputWrapper span.arrowUp, :host .flatpickr-wrapper .numInputWrapper span.arrowDown { height: 50%; } :host .discovery-input-wrapper { display: flex; flex-direction: row; align-items: stretch; height: 100%; } :host .discovery-input-wrapper.type-date, :host .discovery-input-wrapper.type-date-range, :host .discovery-input-wrapper.type-autocomplete { height: auto; } :host .discovery-input-wrapper.type-textarea { flex-direction: column; } :host .autoComplete_wrapper { width: 100%; margin-right: 20px; margin-bottom: 10px; } :host .slider-wrapper { height: 100%; width: calc(100% - 50px); padding-left: 10px; padding-right: 10px; } :host .multi-cb-wrapper { display: flex; flex-direction: column; height: 100%; position: absolute; width: 100%; } :host .multi-cb-wrapper .multi-cb-layout { flex: 1 1 auto; min-height: 0; padding-right: 17px; position: relative; display: flex; flex-direction: column; } :host .multi-cb-wrapper .multi-cb-list-wrapper { overflow-y: auto; height: 100%; margin-right: -15px; } :host .multi-cb-wrapper .multi-cb-buttons-wrapper { padding-top: 5px; } :host .multi-cb-wrapper .multi-cb-buttons-wrapper { display: flex; flex-direction: row; justify-content: space-between; } :host button.discovery-btn, :host input[type=file]::file-selector-button { margin: 0.25rem 0.125rem; display: inline-block; font-weight: 400; line-height: 1.5em; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; font-size: var(--warp-view-button-font-size, 1rem); border: 1px solid var(--warp-view-button-border-color, #004eff); padding: var(--warp-view-button-padding, 0.375rem 0.75rem); color: var(--warp-view-button-label-color, #ffffff); background-color: var(--warp-view-button-bg-color, #004eff); min-width: var(--warp-view-button-width, auto); border-radius: var(--warp-view-button-border-radius, 0.25rem); } :host button.discovery-btn.secondary, :host input[type=file]::file-selector-button.secondary { border: 1px solid var(--warp-view-button-secondary-border-color, #a0a0a0); background-color: var(--warp-view-button-secondary-bg-color, #a0a0a0); color: var(--warp-view-button-secondary-label-color, #ffffff); } :host button:disabled, :host input[type=file][disabled]::file-selector-button { background-color: var(--warp-view-button-disabled-bg-color, #c0c0c0); color: var(--warp-view-button-disabled-label-color, #404040); border: 1px solid var(--warp-view-button-disabled-border-color, #c0c0c0); } :host input[type=file]::file-selector-button { margin: 0 10px 0 0; } :host .discovery-input-btn-wrapper.slider { margin-top: 24px; } :host .discovery-input-btn-wrapper.textarea { text-align: end; } :host .range { display: flex; justify-content: start; align-items: center; flex-direction: row; margin: 0.25rem 0.125rem; font-size: var(--warp-view-input-font-size, 1rem); border-radius: var(--warp-view-input-border-radius, 0.25rem); border: 1px solid var(--warp-view-input-border-color, #c0c0c0); color: var(--warp-view-input-label-color, #404040); background-color: var(--warp-view-input-bg-color, #ffffff); height: 34px; width: 100%; padding: 1px 5px; } :host .range .flatpickr-wrapper { margin: 0; } :host .range span { padding-left: 0.25rem; padding-right: 0.25rem; font-size: var(--warp-view-input-font-size, 1rem); height: auto; } :host .range .discovery-input, :host .range .discovery-input:focus { border: none !important; margin: 0 !important; padding: 0 !important; max-height: 25px; cursor: pointer; } :host .range.disabled { background-color: var(--warp-view-input-disabled-bg-color, #c0c0c0); color: var(--warp-view-input-disabled-label-color, #404040); border: 1px solid var(--warp-view-input-disabled-border-color, #c0c0c0); } :host textarea { resize: none; }