Skip to content

Commit

Permalink
fix(ui5-multi-input/ui5-multi-combobox): enhance tokenizer visualizat…
Browse files Browse the repository at this point in the history
…ion (#6597)
  • Loading branch information
niyap authored Feb 27, 2023
1 parent 57e2de7 commit fd7aa30
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/main/src/MultiComboBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -1311,7 +1311,7 @@ class MultiComboBox extends UI5Element {
item._getRealDomRef = () => this.allItemsPopover.querySelector(`*[data-ui5-stable=${item.stableDomRef}]`);
});

this.tokenizerAvailable = this.items && this.items.length > 0;
this.tokenizerAvailable = this._tokenizer && this._getSelectedItems().length > 0;
this.style.setProperty("--_ui5-input-icons-count", this.iconsCount);

if (!input || !value) {
Expand Down
7 changes: 6 additions & 1 deletion packages/main/src/themes/MultiComboBox.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
color: var(--sapLinkColor);
}

.ui5-multi-combobox-tokenizer::part(n-more-text) {
padding-inline-end: var(--_ui5_input_inner_space_to_n_more_text);
}

[inner-input][inner-input-with-icon] {
padding: var(--_ui5_input_inner_padding_with_icon);
}
Expand All @@ -43,5 +47,6 @@
}

:host(:not([tokenizer-available])) .ui5-multi-combobox-tokenizer {
display: none;
--_ui5_input_tokenizer_min_width: 0px;
width: var(--_ui5_input_tokenizer_min_width);
}
5 changes: 3 additions & 2 deletions packages/main/src/themes/MultiInput.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}

.ui5-multi-input-tokenizer::part(n-more-text) {
padding-inline-end: 0.3125rem;
padding-inline-end: var(--_ui5_input_inner_space_to_n_more_text);
}

[inner-input][inner-input-with-icon] {
Expand All @@ -33,5 +33,6 @@
}

:host(:not([tokenizer-available])) .ui5-multi-input-tokenizer {
display: none;
--_ui5_input_tokenizer_min_width: 0px;
width: var(--_ui5_input_tokenizer_min_width);
}
2 changes: 2 additions & 0 deletions packages/main/src/themes/base/sizes-parameters.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
--_ui5_input_inner_padding: 0 0.625rem;
--_ui5_input_inner_padding_with_icon: 0 0.25rem 0 0.625rem;
--_ui5_input_inner_space_to_tokenizer: 0.125rem;
--_ui5_input_inner_space_to_n_more_text: 0.1875rem;
--_ui5_input_value_state_icon_padding: var(--_ui5-input-icon-padding);
--_ui5_list_no_data_height: 3rem;
--_ui5_list_item_cb_margin_right: 0;
Expand Down Expand Up @@ -238,6 +239,7 @@
--_ui5_input_inner_padding: 0 0.5rem;
--_ui5_input_inner_padding_with_icon: 0 0.2rem 0 0.5rem;
--_ui5_input_inner_space_to_tokenizer: 0.125rem;
--_ui5_input_inner_space_to_n_more_text: 0.125rem;
--_ui5_input_icon_min_width: var(--_ui5_input_compact_min_width);
--_ui5_input_icon_padding: .25rem .4375rem;
--_ui5_input_error_warning_icon_padding: .1875rem .375rem .1875rem .4375rem;
Expand Down

0 comments on commit fd7aa30

Please sign in to comment.