From 1df2d306a627e7d5b6a2780ad4fe3e4b32eef30d Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 21 Oct 2024 10:46:28 +0300 Subject: [PATCH] AutoComplete RTL --- .../autocomplete/style/AutoCompleteStyle.js | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/packages/primevue/src/autocomplete/style/AutoCompleteStyle.js b/packages/primevue/src/autocomplete/style/AutoCompleteStyle.js index 42450110f..fad49ec8c 100644 --- a/packages/primevue/src/autocomplete/style/AutoCompleteStyle.js +++ b/packages/primevue/src/autocomplete/style/AutoCompleteStyle.js @@ -10,11 +10,11 @@ const theme = ({ dt }) => ` position: absolute; top: 50%; margin-top: -0.5rem; - right: ${dt('autocomplete.padding.x')}; + inset-inline-end: ${dt('autocomplete.padding.x')}; } .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-loader { - right: calc(${dt('autocomplete.dropdown.width')} + ${dt('autocomplete.padding.x')}); + inset-inline-end: calc(${dt('autocomplete.dropdown.width')} + ${dt('autocomplete.padding.x')}); } .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input { @@ -24,25 +24,24 @@ const theme = ({ dt }) => ` .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input, .p-autocomplete:has(.p-autocomplete-dropdown) .p-autocomplete-input-multiple { - border-top-right-radius: 0; - border-bottom-right-radius: 0; + border-start-end-radius: 0; + border-end-end-radius: 0; } .p-autocomplete-dropdown { cursor: pointer; display: inline-flex; - cursor: pointer; user-select: none; align-items: center; justify-content: center; overflow: hidden; position: relative; width: ${dt('autocomplete.dropdown.width')}; - border-top-right-radius: ${dt('autocomplete.dropdown.border.radius')}; - border-bottom-right-radius: ${dt('autocomplete.dropdown.border.radius')}; + border-start-end-radius: ${dt('autocomplete.dropdown.border.radius')}; + border-end-end-radius: ${dt('autocomplete.dropdown.border.radius')}; background: ${dt('autocomplete.dropdown.background')}; border: 1px solid ${dt('autocomplete.dropdown.border.color')}; - border-left: 0 none; + border-inline-start: 0 none; color: ${dt('autocomplete.dropdown.color')}; transition: background ${dt('autocomplete.transition.duration')}, color ${dt('autocomplete.transition.duration')}, border-color ${dt('autocomplete.transition.duration')}, outline-color ${dt('autocomplete.transition.duration')}, box-shadow ${dt( 'autocomplete.transition.duration' @@ -190,14 +189,14 @@ const theme = ({ dt }) => ` } .p-autocomplete-chip.p-chip { - padding-top: calc(${dt('autocomplete.padding.y')} / 2); - padding-bottom: calc(${dt('autocomplete.padding.y')} / 2); + padding-block-start: calc(${dt('autocomplete.padding.y')} / 2); + padding-block-end: calc(${dt('autocomplete.padding.y')} / 2); border-radius: ${dt('autocomplete.chip.border.radius')}; } .p-autocomplete-input-multiple:has(.p-autocomplete-chip) { - padding-left: calc(${dt('autocomplete.padding.y')} / 2); - padding-right: calc(${dt('autocomplete.padding.y')} / 2); + padding-inline-start: calc(${dt('autocomplete.padding.y')} / 2); + padding-inline-end: calc(${dt('autocomplete.padding.y')} / 2); } .p-autocomplete-chip-item.p-focus .p-autocomplete-chip { @@ -208,8 +207,8 @@ const theme = ({ dt }) => ` .p-autocomplete-input-chip { flex: 1 1 auto; display: inline-flex; - padding-top: calc(${dt('autocomplete.padding.y')} / 2); - padding-bottom: calc(${dt('autocomplete.padding.y')} / 2); + padding-block-start: calc(${dt('autocomplete.padding.y')} / 2); + padding-block-end: calc(${dt('autocomplete.padding.y')} / 2); } .p-autocomplete-input-chip input {