Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrated NeoInput to tailwindcss #8355

Merged
merged 8 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 7 additions & 18 deletions libs/ui/src/components/NeoInput/NeoField.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../scss/variable.scss';
@import '../../scss/theme.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/expressions.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/variables.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/animations.scss';
Expand All @@ -12,39 +10,30 @@ $field-label-font-weight: 700;

.o-field {
&--error .o-input {
@include ktheme() {
border-color: theme('k-red') !important;
}
@apply border-k-red;

&::placeholder {
@include ktheme() {
color: theme('k-red') !important;
}
@apply text-k-red;
}
}

.o-field__label {
margin-bottom: 0.75rem;
@include ktheme() {
color: theme('text-color');
}
@apply mb-3 text-text-color;
}

&.o-field--focused {
input,
textarea {
outline: none;
@apply outline-none;
}
}

.o-field__message-danger {
@include ktheme() {
color: theme('k-red');
}
@apply text-k-red;
}

.o-field--addons > :not(:first-child):not(:last-child) button,
.o-field--addons > button:not(:first-child):not(:last-child) {
border-right: 0;
border-left: 0;
@apply border-l-0 border-r-0;
}
}
22 changes: 6 additions & 16 deletions libs/ui/src/components/NeoInput/NeoInput.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../scss/variable.scss';
@import '../../scss/theme.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/expressions.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/variables.scss';
@import '@oruga-ui/oruga-next/src/scss/utilities/animations.scss';
Expand All @@ -14,25 +12,17 @@ $input-textarea-padding: 0.75rem 1rem;

.neo-input {
.o-input {
outline: none;
box-shadow: none;
@include ktheme() {
border: 1px solid theme('k-grey-fix');
background-color: theme('background-color');
color: theme('text-color');
@apply outline-none shadow-none border-default border-k-grey-fix bg-background-color text-text-color;

&:focus {
border: 1px solid theme('text-color');
}
&:focus {
@apply border-default border-text-color;
}

&--danger {
@include ktheme() {
border: 1px solid theme('k-red');
@apply border-default border-k-red;

&:focus {
border: 1px solid theme('k-red');
}
&:focus {
@apply border-default border-k-red;
}
}
}
Expand Down
34 changes: 10 additions & 24 deletions libs/ui/src/components/NeoInputitems/NeoInputitems.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,24 @@ $autocomplete-menu-border-radius: 0;
@import '@oruga-ui/oruga-next/src/scss/components/inputitems.scss';

.o-inputit__container {
padding-top: 0;
@include ktheme() {
background-color: theme('background-color');
}
@apply pt-0 bg-background-color;

.o-input.neo-input {
outline: none;
box-shadow: none;
@include ktheme() {
border: 1px solid theme('k-grey-fix');
background-color: theme('background-color');
color: theme('text-color');

&:focus {
border: 1px solid theme('text-color');
}
@apply outline-none shadow-none border-default border-k-grey-fix bg-background-color text-text-color;

&:focus {
@apply border-text-color;
}
}

.o-acp__menu {
width: 100% !important;
@include ktheme() {
box-shadow: theme('primary-shadow');
border: 1px solid theme('border-color');
background: theme('background-color');
}
@apply w-full shadow-primary border-default border-border-color bg-background-color;

.o-acp__item {
color: inherit;
@apply text-inherit;

&:hover {
@include ktheme() {
color: theme('k-hovergrey');
}
@apply text-k-hover-grey;
}
}
}
Expand Down