feat: Add RTL Support to Widget (#11022)

This PR adds RTL support to the web widget for improved right-to-left language compatibility, updates colors, and cleans up code.

Fixes https://linear.app/chatwoot/issue/CW-4089/rtl-issues-on-widget

https://github.com/chatwoot/chatwoot/issues/9791

Other PR: https://github.com/chatwoot/chatwoot/pull/11016
This commit is contained in:
Sivin Varghese
2025-03-21 22:09:03 +05:30
committed by GitHub
parent e4ea078e52
commit 3a693947b5
76 changed files with 966 additions and 2406 deletions

View File

@@ -103,17 +103,17 @@ export default {
<template>
<div
class="w-full h-full bg-slate-25 dark:bg-slate-800"
class="w-full h-full bg-n-slate-2 dark:bg-n-solid-1"
:class="{ 'overflow-auto': isOnHomeView }"
@keydown.esc="closeWindow"
>
<div class="relative flex flex-col h-full">
<div
class="sticky top-0 z-40 transition-all header-wrap"
:class="{
expanded: !isHeaderCollapsed,
collapsed: isHeaderCollapsed,
'custom-header-shadow': isHeaderCollapsed,
'shadow-[0_10px_15px_-16px_rgba(50,50,93,0.08),0_4px_6px_-8px_rgba(50,50,93,0.04)]':
isHeaderCollapsed,
...opacityClass,
}"
>
@@ -140,29 +140,3 @@ export default {
</div>
</div>
</template>
<style scoped lang="scss">
@import 'widget/assets/scss/variables';
@import 'widget/assets/scss/mixins';
.custom-header-shadow {
@include shadow-large;
}
.header-wrap {
flex-shrink: 0;
transition: max-height 100ms;
&.expanded {
max-height: 16rem;
}
&.collapsed {
max-height: 4.5rem;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 667px) {
border-radius: 0;
}
}
</style>