diff --git a/assets/styles/base.less b/assets/styles/base.less index 828a901b09..1629d3e164 100644 --- a/assets/styles/base.less +++ b/assets/styles/base.less @@ -262,7 +262,6 @@ button { &.is-primary { &:extend(.background-flair-gradient); &:extend(.glow-flair); - &:extend(.font-primary); &[disabled] { &:extend(.background-flair-gradient); @@ -715,34 +714,10 @@ button { } } -//Inputs -.input { - &:extend(.input-bg); - &:extend(.font-primary); - box-shadow: none !important; - &:active, - &:focus { - background: @semitransparent-lightest-gradient !important; - } -} - ::placeholder { color: @text-muted !important; } -.is-primary.input, -.is-dark.input { - &:extend(.input-bg); - &:extend(.font-primary); - border-color: transparent; - - &:active, - &:focus { - border: none; - outline: none; - } -} - //Search Input .search-query-highlight { &:extend(.background-flair); diff --git a/components/interactables/Input/Input.html b/components/interactables/Input/Input.html index e136c7b600..0aa59a4438 100644 --- a/components/interactables/Input/Input.html +++ b/components/interactables/Input/Input.html @@ -1,36 +1,49 @@ -
- -
- +
+ +
+
+ + +
+ + {{ text.length }}/{{ maxLength }} + +
diff --git a/components/interactables/Input/Input.less b/components/interactables/Input/Input.less index 1be10150cf..a85c6d8d6f 100644 --- a/components/interactables/Input/Input.less +++ b/components/interactables/Input/Input.less @@ -1,51 +1,74 @@ -.input-label { - text-align: left; -} -.is-full-width { - &:extend(.full-width); -} -.search-box { - &.right-icon { - input { - padding-right: 34px; +.input-group { + display: flex; + flex-direction: column; + width: 100%; + + .input-outer { + display: flex; + align-items: stretch; + flex-grow: 1; + + .input-inner { + position: relative; + display: flex; + flex-grow: 1; + + .input { + flex-grow: 1; + padding: 0.5rem; + box-shadow: none; + background: @input-gradient; + background-size: calc(100% + 2px) calc(100% + 2px); + background-position: center; + &:extend(.round-corners); + + &.show-clear-button { + padding-right: 2rem; + } + + &:focus { + background-image: @semitransparent-lightest-gradient; + } + } + + .clear-button { + position: absolute; + inset: 0 0 0 auto; + font-size: @tiny-icon-size; + display: flex; + align-items: center; + justify-content: center; + padding: 0.5rem; + color: @text-muted; + } + + &:not(:last-child) .input { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: 0; + } } - } - .search-clear { - &:extend(.font-primary); - &:focus { - background: @background; + + .button { + border-top-left-radius: 0; + border-bottom-left-radius: 0; } - position: absolute; - font-size: @tiny-icon-size; - top: 0; - right: 0; - width: 34px; - height: @full; - background: transparent; - border-color: transparent; - cursor: pointer; - &:extend(.first-layer); } - position: relative; - .input { + .char-limit { + float: right; + margin-right: 0.5rem; font-size: @mini-text-size; - font-family: @secondary-font; - &.is-normal { - height: 2.3rem; - } - &:disabled { - &::placeholder { - /* without !important it does not work */ - color: grey !important; - } - } - &.invalid { - border: 1px solid @red; - } + &:extend(.font-muted); + margin-left: auto; + } - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; + .error { + margin-top: 0.5rem; + } + + // TODO: remove after removing bulma + .is-primary:not(.is-danger) { + border-color: transparent; } } diff --git a/components/interactables/Input/Input.vue b/components/interactables/Input/Input.vue index 1d92f429ec..98e50cd78b 100644 --- a/components/interactables/Input/Input.vue +++ b/components/interactables/Input/Input.vue @@ -1,10 +1,10 @@ + + diff --git a/components/interactables/Input/README.md b/components/interactables/Input/README.md index da365c50de..60f36847c3 100644 --- a/components/interactables/Input/README.md +++ b/components/interactables/Input/README.md @@ -6,11 +6,15 @@ Generic input component. ```vue ``` @@ -18,10 +22,18 @@ Generic input component. **text** Input display text -**delete-icon** Show delete text icon - **size** Input display size, honors bulma.io sizes **input-kind** Abstracts generic input type attribute +**disabled** Disables the input button + +**action** Action that should happen when the attached button is pressed + +**icon** Provide in component slot + +**buttonText** Optional attached button text + **label-text** Optional label appended to input + +**copy-content** If provided, the button will also copy the content to clipboard diff --git a/components/interactables/Input/types.d.ts b/components/interactables/Input/types.d.ts index 754f398cb3..417fc31a3c 100644 --- a/components/interactables/Input/types.d.ts +++ b/components/interactables/Input/types.d.ts @@ -1,9 +1,9 @@ -export type InputTypes = 'text' | 'number' | 'password' -export type InputStyle = +export type InputType = 'text' | 'number' | 'password' +export type InputColor = | 'primary' | 'link' | 'info' | 'success' | 'warning' | 'danger' -export type InputSize = 'small' | 'normal' | 'medium' | 'large' + | null diff --git a/components/interactables/InputGroup/InputGroup.html b/components/interactables/InputGroup/InputGroup.html deleted file mode 100644 index 21307dc13f..0000000000 --- a/components/interactables/InputGroup/InputGroup.html +++ /dev/null @@ -1,29 +0,0 @@ -
- {{label}} -
- - -
- {{ textLength }} -
diff --git a/components/interactables/InputGroup/InputGroup.less b/components/interactables/InputGroup/InputGroup.less deleted file mode 100644 index c204d08806..0000000000 --- a/components/interactables/InputGroup/InputGroup.less +++ /dev/null @@ -1,21 +0,0 @@ -.control:nth-child(1) { - &:extend(.full-width); -} -.input-wrapper { - display: flex; - &:extend(.bordered); - &:extend(.round-corners); -} - -.input.is-normal, -.button.is-normal { - height: 2.3rem; - font-size: @text-size; -} -.char-limit { - float: right; - margin-right: @light-spacing; - font-size: @mini-text-size; - &:extend(.font-muted); - margin-left: auto; -} diff --git a/components/interactables/InputGroup/InputGroup.vue b/components/interactables/InputGroup/InputGroup.vue deleted file mode 100644 index e26a8c9ebd..0000000000 --- a/components/interactables/InputGroup/InputGroup.vue +++ /dev/null @@ -1,94 +0,0 @@ - - - diff --git a/components/interactables/InputGroup/README.md b/components/interactables/InputGroup/README.md deleted file mode 100644 index 039118f36a..0000000000 --- a/components/interactables/InputGroup/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Description - -Generic input group component. - -# Usage - -```vue - -``` - -# Props - -**text** Input display text - -**size** Input display size, honors bulma.io sizes - -**input-kind** Abstracts generic input type attribute - -**disabled** Disables the input button - -**action** Action that should happen when the attached button is pressed - -**icon** Provide in component slot - -**buttonText** Optional attached button text - -**label-text** Optional label appended to input - -**copy-content** If provided, the button will also copy the content to clipboard diff --git a/components/interactables/InputGroup/types.d.ts b/components/interactables/InputGroup/types.d.ts deleted file mode 100644 index 754f398cb3..0000000000 --- a/components/interactables/InputGroup/types.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export type InputTypes = 'text' | 'number' | 'password' -export type InputStyle = - | 'primary' - | 'link' - | 'info' - | 'success' - | 'warning' - | 'danger' -export type InputSize = 'small' | 'normal' | 'medium' | 'large' diff --git a/components/interactables/QuickProfile/QuickProfile.html b/components/interactables/QuickProfile/QuickProfile.html index 98c12b49ad..9fe990301f 100644 --- a/components/interactables/QuickProfile/QuickProfile.html +++ b/components/interactables/QuickProfile/QuickProfile.html @@ -23,16 +23,15 @@ {{ user.status }}