From f98b91c22ae21071a25f69cc8682eb6197a54c5a Mon Sep 17 00:00:00 2001
From: Malik-Jouda <48517781+Malik-Jouda@users.noreply.github.com>
Date: Mon, 9 Dec 2024 11:17:05 +0200
Subject: [PATCH] fix(ColorPicker): handle RTL mode (#2858)
---
src/theme/color-picker.ts | 2 +-
.../ColorPicker-vue.spec.ts.snap | 26 +++++++++----------
.../__snapshots__/ColorPicker.spec.ts.snap | 26 +++++++++----------
3 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/src/theme/color-picker.ts b/src/theme/color-picker.ts
index 00e1638220..840b2938ca 100644
--- a/src/theme/color-picker.ts
+++ b/src/theme/color-picker.ts
@@ -6,7 +6,7 @@ export default {
selectorBackground: 'w-full h-full relative rounded-[calc(var(--ui-radius)*1.2)]',
selectorThumb: '-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-[var(--color-white)] rounded-full cursor-pointer data-[disabled]:cursor-not-allowed',
track: 'w-[8px] relative rounded-[calc(var(--ui-radius)*1.5)]',
- trackThumb: 'absolute transform -translate-y-1/2 -translate-x-[4px] size-4 rounded-full ring-2 ring-[var(--color-white)] cursor-pointer data-[disabled]:cursor-not-allowed'
+ trackThumb: 'absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-[var(--color-white)] cursor-pointer data-[disabled]:cursor-not-allowed'
},
variants: {
size: {
diff --git a/test/components/__snapshots__/ColorPicker-vue.spec.ts.snap b/test/components/__snapshots__/ColorPicker-vue.spec.ts.snap
index d457a02aab..186b3c890f 100644
--- a/test/components/__snapshots__/ColorPicker-vue.spec.ts.snap
+++ b/test/components/__snapshots__/ColorPicker-vue.spec.ts.snap
@@ -9,7 +9,7 @@ exports[`ColorPicker > renders with as correctly 1`] = `
"
@@ -24,7 +24,7 @@ exports[`ColorPicker > renders with class correctly 1`] = `
"
@@ -39,7 +39,7 @@ exports[`ColorPicker > renders with disabled correctly 1`] = `
"
@@ -54,7 +54,7 @@ exports[`ColorPicker > renders with format hex correctly 1`] = `
"
@@ -69,7 +69,7 @@ exports[`ColorPicker > renders with format hsl correctly 1`] = `
"
@@ -84,7 +84,7 @@ exports[`ColorPicker > renders with format hwb correctly 1`] = `
"
@@ -99,7 +99,7 @@ exports[`ColorPicker > renders with format rgb correctly 1`] = `
"
@@ -114,7 +114,7 @@ exports[`ColorPicker > renders with size lg correctly 1`] = `
"
@@ -129,7 +129,7 @@ exports[`ColorPicker > renders with size md correctly 1`] = `
"
@@ -144,7 +144,7 @@ exports[`ColorPicker > renders with size sm correctly 1`] = `
"
@@ -159,7 +159,7 @@ exports[`ColorPicker > renders with size xl correctly 1`] = `
"
@@ -174,7 +174,7 @@ exports[`ColorPicker > renders with size xs correctly 1`] = `
"
@@ -189,7 +189,7 @@ exports[`ColorPicker > renders with ui correctly 1`] = `
"
diff --git a/test/components/__snapshots__/ColorPicker.spec.ts.snap b/test/components/__snapshots__/ColorPicker.spec.ts.snap
index ac012573de..927fbbc91c 100644
--- a/test/components/__snapshots__/ColorPicker.spec.ts.snap
+++ b/test/components/__snapshots__/ColorPicker.spec.ts.snap
@@ -9,7 +9,7 @@ exports[`ColorPicker > renders with as correctly 1`] = `
"
@@ -24,7 +24,7 @@ exports[`ColorPicker > renders with class correctly 1`] = `
"
@@ -39,7 +39,7 @@ exports[`ColorPicker > renders with disabled correctly 1`] = `
"
@@ -54,7 +54,7 @@ exports[`ColorPicker > renders with format hex correctly 1`] = `
"
@@ -69,7 +69,7 @@ exports[`ColorPicker > renders with format hsl correctly 1`] = `
"
@@ -84,7 +84,7 @@ exports[`ColorPicker > renders with format hwb correctly 1`] = `
"
@@ -99,7 +99,7 @@ exports[`ColorPicker > renders with format rgb correctly 1`] = `
"
@@ -114,7 +114,7 @@ exports[`ColorPicker > renders with size lg correctly 1`] = `
"
@@ -129,7 +129,7 @@ exports[`ColorPicker > renders with size md correctly 1`] = `
"
@@ -144,7 +144,7 @@ exports[`ColorPicker > renders with size sm correctly 1`] = `
"
@@ -159,7 +159,7 @@ exports[`ColorPicker > renders with size xl correctly 1`] = `
"
@@ -174,7 +174,7 @@ exports[`ColorPicker > renders with size xs correctly 1`] = `
"
@@ -189,7 +189,7 @@ exports[`ColorPicker > renders with ui correctly 1`] = `
"