diff --git a/collections/forms/i18n/en.pot b/collections/forms/i18n/en.pot
index fbbe186a81..b5e4f3ae1d 100644
--- a/collections/forms/i18n/en.pot
+++ b/collections/forms/i18n/en.pot
@@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
-"POT-Creation-Date: 2023-05-05T12:46:11.864Z\n"
-"PO-Revision-Date: 2023-05-05T12:46:11.864Z\n"
+"POT-Creation-Date: 2024-02-12T09:23:49.018Z\n"
+"PO-Revision-Date: 2024-02-12T09:23:49.018Z\n"
msgid "Upload file"
msgstr "Upload file"
diff --git a/components/node/src/toggle.js b/components/node/src/toggle.js
index 0f2fbd0e45..1937586128 100644
--- a/components/node/src/toggle.js
+++ b/components/node/src/toggle.js
@@ -4,18 +4,20 @@ import PropTypes from 'prop-types'
import React from 'react'
const ArrowDown = () => (
-
+
)
export const Toggle = ({ open, onOpen, onClose, dataTest }) => {
@@ -55,20 +57,21 @@ export const Toggle = ({ open, onOpen, onClose, dataTest }) => {
z-index: 2;
fill: ${colors.grey900};
}
- div :global(svg) {
+ div :global(.nodeArrow) {
vertical-align: top;
transform: rotate(-90deg);
transition: transform 0.1s ease-out;
}
- div :global(svg:dir(rtl)) {
+ div :global(.nodeArrow:dir(rtl)) {
transform: rotate(90deg);
}
- .open :global(svg) {
+ .open :global(.nodeArrow) {
transform: rotate(0);
}
- .open :global(svg:dir(rtl)) {
+ .open :global(.nodeArrow:dir(rtl)) {
transform: rotate(0);
}
+
div:hover {
cursor: pointer;
border-radius: 3px;
diff --git a/components/switch/src/switch/switch-icons.js b/components/switch/src/switch/switch-icons.js
index cb2b9e8fcd..9f7a74c744 100644
--- a/components/switch/src/switch/switch-icons.js
+++ b/components/switch/src/switch/switch-icons.js
@@ -15,6 +15,10 @@ const styles = css`
transform: scale(-1, 1);
}
+ svg[dir='rtl'] {
+ transform: scale(-1, 1);
+ }
+
svg.dense {
height: 14px;
width: 27px;
@@ -35,6 +39,10 @@ const styles = css`
display: none;
}
+ svg[dir='rtl'] .checkmark {
+ display: none;
+ }
+
svg.checked .handle-unchecked,
svg:not(.checked) .handle-checked {
fill: none;
@@ -93,6 +101,7 @@ export function SwitchRegular({ className }) {
viewBox="0 0 42 22"
xmlns="http://www.w3.org/2000/svg"
className={className}
+ dir={document.documentElement?.dir ?? 'ltr'}
>
(
-
-
-
-
-
-)
+export const RTL = (args) => {
+ useEffect(() => {
+ document.documentElement.setAttribute('dir', 'rtl')
+ return () => {
+ document.documentElement.setAttribute('dir', 'ltr')
+ }
+ }, [])
+
+ return (
+
+
+
+
+
+ )
+}
diff --git a/components/table/src/table/table-cell-head.js b/components/table/src/table/table-cell-head.js
index 5450cbeb1a..3dd0986875 100644
--- a/components/table/src/table/table-cell-head.js
+++ b/components/table/src/table/table-cell-head.js
@@ -12,6 +12,10 @@ const tableCellHeadStyles = css`
height: 45px;
}
+ th:dir(rtl) {
+ text-align: right;
+ }
+
.dense {
padding: 9px 12px;
height: 36px;
diff --git a/components/table/src/table/table-cell.js b/components/table/src/table/table-cell.js
index d54fe0867e..8de551e205 100644
--- a/components/table/src/table/table-cell.js
+++ b/components/table/src/table/table-cell.js
@@ -12,6 +12,10 @@ const tableCellStyles = css`
height: 45px;
}
+ td:dir(rtl) {
+ text-align: right;
+ }
+
.dense {
padding: 9px 12px;
height: 36px;
diff --git a/components/table/src/table/table.stories.js b/components/table/src/table/table.stories.js
index f81f1039cc..ae529d91a0 100644
--- a/components/table/src/table/table.stories.js
+++ b/components/table/src/table/table.stories.js
@@ -594,3 +594,131 @@ export const CustomAlternatingBgColor = () => (
)
+
+export const RTL = (args) => (
+
+
+
+
+ First name
+ Last name
+ Incident date
+ Last updated
+ Age
+ Registering unit
+ Assigned user
+ Status
+
+
+
+
+ Onyekachukwu
+ Kariuki
+ 02/06/2007
+ 05/25/1972
+ 66
+ Jawi
+ Sofie Hubert
+ Incomplete
+
+
+ Kwasi
+ Okafor
+ 08/11/2010
+ 02/26/1991
+ 38
+ Mokassie MCHP
+ Dashonte Clarke
+ Complete
+
+
+ Siyabonga
+ Abiodun
+ 07/21/1981
+ 02/06/2007
+ 98
+ Bathurst MCHP
+ Unassigned
+ Incomplete
+
+
+ Chiyembekezo
+ Okeke
+ 01/23/1982
+ 07/15/2003
+ 2
+ Mayolla MCHP
+ Wan Gengxin
+ Incomplete
+
+
+ Mtendere
+ Afolayan
+ 08/12/1994
+ 05/12/1972
+ 37
+ Gbangadu MCHP
+ Gvozden Boskovsky
+ Complete
+
+
+ Inyene
+ Okonkwo
+ 04/01/1971
+ 03/16/2000
+ 70
+ Kunike Barina
+ Oscar de la CavallerÃa
+ Complete
+
+
+ Amaka
+ Pretorius
+ 01/25/1996
+ 09/15/1986
+ 32
+ Bargbo
+ Alberto Raya
+ Incomplete
+
+
+ Meti
+ Abiodun
+ 10/24/2010
+ 07/26/1989
+ 8
+ Majihun MCHP
+ Unassigned
+ Complete
+
+
+ Eshe
+ Okeke
+ 01/31/1995
+ 01/31/1995
+ 63
+ Mambiama CHP
+ Shadrias Pearson
+ Incomplete
+
+
+ Obi
+ Okafor
+ 06/07/1990
+ 01/03/2006
+ 28
+ Dalakuru CHP
+ Anatoliy Shcherbatykh
+ Incomplete
+
+
+
+
+
+
+
+
+
+
+
+)
diff --git a/components/transfer/src/icons.js b/components/transfer/src/icons.js
index 3b41cd605a..b39d47ff7f 100644
--- a/components/transfer/src/icons.js
+++ b/components/transfer/src/icons.js
@@ -7,34 +7,37 @@ const centerButtonStyles = css`
svg {
min-width: 20px;
}
- svg:dir(rtl) {
+ div.centerButton:dir(rtl) {
transform: rotate(180deg) translateX(4px);
}
`
export const IconAddAll = ({ dataTest, disabled }) => (
-
+ >
)
IconAddAll.propTypes = {
@@ -43,18 +46,21 @@ IconAddAll.propTypes = {
}
export const IconAddIndividual = ({ dataTest, disabled }) => (
-
+ >
)
IconAddIndividual.propTypes = {
@@ -63,30 +69,33 @@ IconAddIndividual.propTypes = {
}
export const IconRemoveAll = ({ dataTest, disabled }) => (
-
+ >
)
IconRemoveAll.propTypes = {
@@ -95,21 +104,24 @@ IconRemoveAll.propTypes = {
}
export const IconRemoveIndividual = ({ dataTest, disabled }) => (
-
+ >
)
IconRemoveIndividual.propTypes = {