Skip to content

Commit

Permalink
23.12.51: fixed text-fields colors [WTEL-3902]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Nov 29, 2023
1 parent 9fe3f46 commit c7128d9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@webitel/ui-sdk",
"version": "23.12.50-2",
"version": "23.12.51",
"private": false,
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src/components/wt-search-bar/wt-search-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function handleKeyup(event) {
width: 100%;
padding: 0;
transition: var(--transition);
color: var(--wt-text-field-placeholder-color);
color: var(--wt-text-field-text-color);
border: none;
outline: none;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/wt-select/_multiselect.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

.multiselect__custom-tag,
.multiselect__single-label {
color: var(--wt-text-field-placeholder-color);
color: var(--wt-text-field-text-color);
}

.multiselect__placeholder {
Expand Down
8 changes: 7 additions & 1 deletion src/css/styleguide/colors/reusable/_text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
--wt-helper-text-color: var(--text-main-color);
--wt-helper-text-disabled-color: var(--text-disabled-color);

// text
--wt-text-field-text-color: var(--black);

// placeholder
--wt-text-field-error-text-color: var(--error-color);
--wt-text-field-placeholder-color: var(--text-main-color);
--wt-text-field-placeholder-color: var(--grey-lighten-1);
--wt-text-field-placeholder-error-color: var(--error-color);
--wt-text-field-placeholder-disabled-color: var(--text-disabled-color);

Expand All @@ -32,5 +35,8 @@
}

:root.theme--dark {
// text
--wt-text-field-text-color: var(--white);

--wt-text-field-input-border-color: var(--grey-lighten-1);
}
13 changes: 7 additions & 6 deletions src/mixins/validationMixin/useValidation.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export function useValidation({ v: inputV, customValidators: inputCustomValidato
}
// end

console.info(v, inputV, isRef(v), isReactive(inputV));

const isValidation = computed(() => !!v && !!v.value && !!Object.keys(v.value).length);
const invalid = computed(() => isValidation.value && v.value.$error);

Expand All @@ -40,11 +38,14 @@ export function useValidation({ v: inputV, customValidators: inputCustomValidato
else if (v.value.websocketValidator?.$invalid) validationText = `${t('validation.websocketValidator')}`;
else if (v.value.integer?.$invalid) validationText = `${t('validation.integer')}`;
}
// eslint-disable-next-line no-restricted-syntax
for (const { name, text } of customValidators.value) {
if (v.value[name]?.$invalid) validationText = text;

if (customValidators && customValidators.value) {
// eslint-disable-next-line no-restricted-syntax
for (const { name, text } of customValidators.value) {
if (v.value[name]?.$invalid) validationText = text;
}
return validationText;
}
return validationText;
});

return {
Expand Down

0 comments on commit c7128d9

Please sign in to comment.