Skip to content

Commit 23a4ce8

Browse files
Replacing left/right classes with start/end to support RTL (#1392)
1 parent 23e51c6 commit 23a4ce8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+147
-147
lines changed

Diff for: stubs/inertia/resources/js/Components/Banner.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ watchEffect(async () => {
3030
</svg>
3131
</span>
3232
33-
<p class="ml-3 font-medium text-sm text-white truncate">
33+
<p class="ms-3 font-medium text-sm text-white truncate">
3434
{{ message }}
3535
</p>
3636
</div>
3737
38-
<div class="shrink-0 sm:ml-3">
38+
<div class="shrink-0 sm:ms-3">
3939
<button
4040
type="button"
41-
class="-mr-1 flex p-2 rounded-md focus:outline-none sm:-mr-2 transition"
41+
class="-me-1 flex p-2 rounded-md focus:outline-none sm:-me-2 transition"
4242
:class="{ 'hover:bg-indigo-600 focus:bg-indigo-600': style == 'success', 'hover:bg-red-600 focus:bg-red-600': style == 'danger' }"
4343
aria-label="Dismiss"
4444
@click.prevent="show = false"

Diff for: stubs/inertia/resources/js/Components/ConfirmationModal.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const close = () => {
3838
</svg>
3939
</div>
4040

41-
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
41+
<div class="mt-3 text-center sm:mt-0 sm:ms-4 sm:text-start">
4242
<h3 class="text-lg font-medium text-gray-900 dark:text-gray-100">
4343
<slot name="title" />
4444
</h3>
@@ -50,7 +50,7 @@ const close = () => {
5050
</div>
5151
</div>
5252

53-
<div class="flex flex-row justify-end px-6 py-4 bg-gray-100 dark:bg-gray-800 text-right">
53+
<div class="flex flex-row justify-end px-6 py-4 bg-gray-100 dark:bg-gray-800 text-end">
5454
<slot name="footer" />
5555
</div>
5656
</Modal>

Diff for: stubs/inertia/resources/js/Components/ConfirmsPassword.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const closeModal = () => {
105105
</SecondaryButton>
106106

107107
<PrimaryButton
108-
class="ml-3"
108+
class="ms-3"
109109
:class="{ 'opacity-25': form.processing }"
110110
:disabled="form.processing"
111111
@click="confirmPassword"

Diff for: stubs/inertia/resources/js/Components/DialogModal.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const close = () => {
4040
</div>
4141
</div>
4242

43-
<div class="flex flex-row justify-end px-6 py-4 bg-gray-100 dark:bg-gray-800 text-right">
43+
<div class="flex flex-row justify-end px-6 py-4 bg-gray-100 dark:bg-gray-800 text-end">
4444
<slot name="footer" />
4545
</div>
4646
</Modal>

Diff for: stubs/inertia/resources/js/Components/Dropdown.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ const widthClass = computed(() => {
3535
3636
const alignmentClasses = computed(() => {
3737
if (props.align === 'left') {
38-
return 'origin-top-left left-0';
38+
return 'ltr:origin-top-left rtl:origin-top-right start-0';
3939
}
4040
4141
if (props.align === 'right') {
42-
return 'origin-top-right right-0';
42+
return 'ltr:origin-top-right rtl:origin-top-left end-0';
4343
}
4444
4545
return 'origin-top';

Diff for: stubs/inertia/resources/js/Components/DropdownLink.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ defineProps({
99

1010
<template>
1111
<div>
12-
<button v-if="as == 'button'" type="submit" class="block w-full px-4 py-2 text-left text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out">
12+
<button v-if="as == 'button'" type="submit" class="block w-full px-4 py-2 text-start text-sm leading-5 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-800 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-800 transition duration-150 ease-in-out">
1313
<slot />
1414
</button>
1515

Diff for: stubs/inertia/resources/js/Components/FormSection.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const hasActions = computed(() => !! useSlots().actions);
2929
</div>
3030
</div>
3131

32-
<div v-if="hasActions" class="flex items-center justify-end px-4 py-3 bg-gray-50 dark:bg-gray-800 text-right sm:px-6 shadow sm:rounded-bl-md sm:rounded-br-md">
32+
<div v-if="hasActions" class="flex items-center justify-end px-4 py-3 bg-gray-50 dark:bg-gray-800 text-end sm:px-6 shadow sm:rounded-bl-md sm:rounded-br-md">
3333
<slot name="actions" />
3434
</div>
3535
</form>

Diff for: stubs/inertia/resources/js/Components/ResponsiveNavLink.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ const props = defineProps({
1010
1111
const classes = computed(() => {
1212
return props.active
13-
? 'block w-full pl-3 pr-4 py-2 border-l-4 border-indigo-400 dark:border-indigo-600 text-left text-base font-medium text-indigo-700 dark:text-indigo-300 bg-indigo-50 dark:bg-indigo-900/50 focus:outline-none focus:text-indigo-800 dark:focus:text-indigo-200 focus:bg-indigo-100 dark:focus:bg-indigo-900 focus:border-indigo-700 dark:focus:border-indigo-300 transition duration-150 ease-in-out'
14-
: 'block w-full pl-3 pr-4 py-2 border-l-4 border-transparent text-left text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-gray-700 focus:border-gray-300 dark:focus:border-gray-600 transition duration-150 ease-in-out';
13+
? 'block w-full ps-3 pe-4 py-2 border-l-4 border-indigo-400 dark:border-indigo-600 text-start text-base font-medium text-indigo-700 dark:text-indigo-300 bg-indigo-50 dark:bg-indigo-900/50 focus:outline-none focus:text-indigo-800 dark:focus:text-indigo-200 focus:bg-indigo-100 dark:focus:bg-indigo-900 focus:border-indigo-700 dark:focus:border-indigo-300 transition duration-150 ease-in-out'
14+
: 'block w-full ps-3 pe-4 py-2 border-l-4 border-transparent text-start text-base font-medium text-gray-600 dark:text-gray-400 hover:text-gray-800 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700 hover:border-gray-300 dark:hover:border-gray-600 focus:outline-none focus:text-gray-800 dark:focus:text-gray-200 focus:bg-gray-50 dark:focus:bg-gray-700 focus:border-gray-300 dark:focus:border-gray-600 transition duration-150 ease-in-out';
1515
});
1616
</script>
1717

1818
<template>
1919
<div>
20-
<button v-if="as == 'button'" :class="classes" class="w-full text-left">
20+
<button v-if="as == 'button'" :class="classes" class="w-full text-start">
2121
<slot />
2222
</button>
2323

Diff for: stubs/inertia/resources/js/Components/Welcome.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo.vue';
2525
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" class="w-6 h-6 stroke-gray-400">
2626
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25" />
2727
</svg>
28-
<h2 class="ml-3 text-xl font-semibold text-gray-900 dark:text-white">
28+
<h2 class="ms-3 text-xl font-semibold text-gray-900 dark:text-white">
2929
<a href="https://laravel.com/docs">Documentation</a>
3030
</h2>
3131
</div>
@@ -38,7 +38,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo.vue';
3838
<a href="https://laravel.com/docs" class="inline-flex items-center font-semibold text-indigo-700 dark:text-indigo-300">
3939
Explore the documentation
4040

41-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="ml-1 w-5 h-5 fill-indigo-500 dark:fill-indigo-200">
41+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="ms-1 w-5 h-5 fill-indigo-500 dark:fill-indigo-200">
4242
<path fill-rule="evenodd" d="M5 10a.75.75 0 01.75-.75h6.638L10.23 7.29a.75.75 0 111.04-1.08l3.5 3.25a.75.75 0 010 1.08l-3.5 3.25a.75.75 0 11-1.04-1.08l2.158-1.96H5.75A.75.75 0 015 10z" clip-rule="evenodd" />
4343
</svg>
4444
</a>
@@ -50,7 +50,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo.vue';
5050
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" class="w-6 h-6 stroke-gray-400">
5151
<path stroke-linecap="round" d="M15.75 10.5l4.72-4.72a.75.75 0 011.28.53v11.38a.75.75 0 01-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 002.25-2.25v-9a2.25 2.25 0 00-2.25-2.25h-9A2.25 2.25 0 002.25 7.5v9a2.25 2.25 0 002.25 2.25z" />
5252
</svg>
53-
<h2 class="ml-3 text-xl font-semibold text-gray-900 dark:text-white">
53+
<h2 class="ms-3 text-xl font-semibold text-gray-900 dark:text-white">
5454
<a href="https://laracasts.com">Laracasts</a>
5555
</h2>
5656
</div>
@@ -63,7 +63,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo.vue';
6363
<a href="https://laracasts.com" class="inline-flex items-center font-semibold text-indigo-700 dark:text-indigo-300">
6464
Start watching Laracasts
6565

66-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="ml-1 w-5 h-5 fill-indigo-500 dark:fill-indigo-200">
66+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" class="ms-1 w-5 h-5 fill-indigo-500 dark:fill-indigo-200">
6767
<path fill-rule="evenodd" d="M5 10a.75.75 0 01.75-.75h6.638L10.23 7.29a.75.75 0 111.04-1.08l3.5 3.25a.75.75 0 010 1.08l-3.5 3.25a.75.75 0 11-1.04-1.08l2.158-1.96H5.75A.75.75 0 015 10z" clip-rule="evenodd" />
6868
</svg>
6969
</a>
@@ -75,7 +75,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo.vue';
7575
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" class="w-6 h-6 stroke-gray-400">
7676
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z" />
7777
</svg>
78-
<h2 class="ml-3 text-xl font-semibold text-gray-900 dark:text-white">
78+
<h2 class="ms-3 text-xl font-semibold text-gray-900 dark:text-white">
7979
<a href="https://tailwindcss.com/">Tailwind</a>
8080
</h2>
8181
</div>
@@ -90,7 +90,7 @@ import ApplicationLogo from '@/Components/ApplicationLogo.vue';
9090
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" class="w-6 h-6 stroke-gray-400">
9191
<path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" />
9292
</svg>
93-
<h2 class="ml-3 text-xl font-semibold text-gray-900 dark:text-white">
93+
<h2 class="ms-3 text-xl font-semibold text-gray-900 dark:text-white">
9494
Authentication
9595
</h2>
9696
</div>

Diff for: stubs/inertia/resources/js/Layouts/AppLayout.vue

+10-10
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,23 @@ const logout = () => {
4747
</div>
4848

4949
<!-- Navigation Links -->
50-
<div class="hidden space-x-8 sm:-my-px sm:ml-10 sm:flex">
50+
<div class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex">
5151
<NavLink :href="route('dashboard')" :active="route().current('dashboard')">
5252
Dashboard
5353
</NavLink>
5454
</div>
5555
</div>
5656

57-
<div class="hidden sm:flex sm:items-center sm:ml-6">
58-
<div class="ml-3 relative">
57+
<div class="hidden sm:flex sm:items-center sm:ms-6">
58+
<div class="ms-3 relative">
5959
<!-- Teams Dropdown -->
6060
<Dropdown v-if="$page.props.jetstream.hasTeamFeatures" align="right" width="60">
6161
<template #trigger>
6262
<span class="inline-flex rounded-md">
6363
<button type="button" class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-700 active:bg-gray-50 dark:active:bg-gray-700 transition ease-in-out duration-150">
6464
{{ $page.props.auth.user.current_team.name }}
6565

66-
<svg class="ml-2 -mr-0.5 h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
66+
<svg class="ms-2 -me-0.5 h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
6767
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 15L12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9" />
6868
</svg>
6969
</button>
@@ -98,7 +98,7 @@ const logout = () => {
9898
<form @submit.prevent="switchToTeam(team)">
9999
<DropdownLink as="button">
100100
<div class="flex items-center">
101-
<svg v-if="team.id == $page.props.auth.user.current_team_id" class="mr-2 h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
101+
<svg v-if="team.id == $page.props.auth.user.current_team_id" class="me-2 h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
102102
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
103103
</svg>
104104

@@ -114,7 +114,7 @@ const logout = () => {
114114
</div>
115115

116116
<!-- Settings Dropdown -->
117-
<div class="ml-3 relative">
117+
<div class="ms-3 relative">
118118
<Dropdown align="right" width="48">
119119
<template #trigger>
120120
<button v-if="$page.props.jetstream.managesProfilePhotos" class="flex text-sm border-2 border-transparent rounded-full focus:outline-none focus:border-gray-300 transition">
@@ -125,7 +125,7 @@ const logout = () => {
125125
<button type="button" class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-300 focus:outline-none focus:bg-gray-50 dark:focus:bg-gray-700 active:bg-gray-50 dark:active:bg-gray-700 transition ease-in-out duration-150">
126126
{{ $page.props.auth.user.name }}
127127

128-
<svg class="ml-2 -mr-0.5 h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
128+
<svg class="ms-2 -me-0.5 h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
129129
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
130130
</svg>
131131
</button>
@@ -160,7 +160,7 @@ const logout = () => {
160160
</div>
161161

162162
<!-- Hamburger -->
163-
<div class="-mr-2 flex items-center sm:hidden">
163+
<div class="-me-2 flex items-center sm:hidden">
164164
<button class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-900 focus:outline-none focus:bg-gray-100 dark:focus:bg-gray-900 focus:text-gray-500 dark:focus:text-gray-400 transition duration-150 ease-in-out" @click="showingNavigationDropdown = ! showingNavigationDropdown">
165165
<svg
166166
class="h-6 w-6"
@@ -199,7 +199,7 @@ const logout = () => {
199199
<!-- Responsive Settings Options -->
200200
<div class="pt-4 pb-1 border-t border-gray-200 dark:border-gray-600">
201201
<div class="flex items-center px-4">
202-
<div v-if="$page.props.jetstream.managesProfilePhotos" class="shrink-0 mr-3">
202+
<div v-if="$page.props.jetstream.managesProfilePhotos" class="shrink-0 me-3">
203203
<img class="h-10 w-10 rounded-full object-cover" :src="$page.props.auth.user.profile_photo_url" :alt="$page.props.auth.user.name">
204204
</div>
205205

@@ -258,7 +258,7 @@ const logout = () => {
258258
<form @submit.prevent="switchToTeam(team)">
259259
<ResponsiveNavLink as="button">
260260
<div class="flex items-center">
261-
<svg v-if="team.id == $page.props.auth.user.current_team_id" class="mr-2 h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
261+
<svg v-if="team.id == $page.props.auth.user.current_team_id" class="me-2 h-5 w-5 text-green-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
262262
<path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75L11.25 15 15 9.75M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
263263
</svg>
264264
<div>{{ team.name }}</div>

0 commit comments

Comments
 (0)