File tree 5 files changed +22
-13
lines changed
5 files changed +22
-13
lines changed Original file line number Diff line number Diff line change 1
1
<div
2
+ dir =" {{ effectiveDir }} "
2
3
class =" {{ classes.wrapper }} "
3
4
>
4
5
<span id =" {{ _id }} -hiddenText" class =" ui5-hidden-text" >{{ tokenizerLabel }} </span >
Original file line number Diff line number Diff line change @@ -296,12 +296,14 @@ class Tokenizer extends UI5Element {
296
296
}
297
297
298
298
return this . _getTokens ( ) . filter ( token => {
299
+ const isRTL = this . effectiveDir === "rtl" ;
300
+ const elementEnd = isRTL ? "left" : "right" ;
299
301
const parentRect = this . contentDom . getBoundingClientRect ( ) ;
300
302
const tokenRect = token . getBoundingClientRect ( ) ;
301
- const tokenLeft = tokenRect . left + tokenRect . width ;
302
- const parentLeft = parentRect . left + parentRect . width ;
303
+ const tokenEnd = tokenRect [ elementEnd ] ;
304
+ const parentEnd = parentRect [ elementEnd ] ;
303
305
304
- token . overflows = ( tokenLeft > parentLeft ) && ! this . expanded ;
306
+ token . overflows = isRTL ? ( ( tokenEnd < parentEnd ) && ! this . expanded ) : ( ( tokenEnd > parentEnd ) && ! this . expanded ) ;
305
307
306
308
return token . overflows ;
307
309
} ) ;
Original file line number Diff line number Diff line change 35
35
}
36
36
37
37
: host ([readonly ]) .ui5-token--wrapper {
38
- padding-right : 0.375 rem ;
38
+ padding-right : 0.3125 rem ;
39
39
}
40
40
41
41
: host ([selected ]) .ui5-token--wrapper : focus {
48
48
height : 100% ;
49
49
width : 100% ;
50
50
cursor : default;
51
+ padding : 0.25rem 0 ;
51
52
padding-left : 0.3125rem ;
52
- padding-top : 0.25rem ;
53
- padding-bottom : 0.25rem ;
54
53
box-sizing : border-box;
55
54
font-size : var (--sapFontSize );
56
55
font-family : "72override" , var (--sapFontFamily );
86
85
}
87
86
88
87
/* RTL */
89
- : host .ui5-token--wrapper [dir = "rtl" ] {
88
+ : host ( : not ([ readonly ])) .ui5-token--wrapper [dir = "rtl" ] {
90
89
padding-right : var (--_ui5_token_wrapper_right_padding );
91
90
padding-left : var (--_ui5_token_wrapper_left_padding );
92
91
}
93
-
94
- : host ([readonly ]) .ui5-token--wrapper [dir = "rtl" ] {
95
- padding-right : 0 ;
96
- padding-left : 0.375rem ;
97
- }
Original file line number Diff line number Diff line change 64
64
::slotted ([ui5-token ]) {
65
65
margin-left : .25rem ;
66
66
}
67
+
68
+ /* RTL */
69
+
70
+ [dir = "rtl" ] .ui5-tokenizer-more-text {
71
+ margin-right : .25rem ;
72
+ margin-left : 0 ;
73
+ }
74
+
75
+ [dir = rtl ] ::slotted ([ui5-token ]) {
76
+ margin-right : .25rem ;
77
+ margin-left : 0 ;
78
+ }
Original file line number Diff line number Diff line change 41
41
--_ui5_year_picker_item_height : 3rem ;
42
42
--_ui5_tokenizer_root_padding : 0.1875rem ;
43
43
--_ui5_token_height : 1.625rem ;
44
- --_ui5_token_icon_size : 1 rem ;
44
+ --_ui5_token_icon_size : .75 rem ;
45
45
--_ui5_token_icon_padding : 0.25rem 0.5rem ;
46
46
--_ui5_token_wrapper_right_padding : 0.3125rem ;
47
47
--_ui5_token_wrapper_left_padding : 0 ;
You can’t perform that action at this time.
0 commit comments