diff --git a/package-lock.json b/package-lock.json index 5239388d9b1..ee6ec8c99ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -75,7 +75,7 @@ "vue": "^2.7.14", "vue-clickaway": "~2.2.2", "vue-countable": "^1.0.9", - "vue-draggable-nested-tree": "^2.2.20", + "vue-draggable-nested-tree": "^2.3.0-beta.1", "vue-js-modal": "^2.0.1", "vue-select": "^3.10.1", "vue-toasted": "^1.1.27", @@ -9901,9 +9901,9 @@ } }, "node_modules/vue-draggable-nested-tree": { - "version": "2.2.20", - "resolved": "https://registry.npmjs.org/vue-draggable-nested-tree/-/vue-draggable-nested-tree-2.2.20.tgz", - "integrity": "sha512-IrhJpPV31O54iJKH/WN0zDS4QOZJMkE8gygxKp4Jok52qCQ5p4ArGTaPGr5tZgljx5Hbpl+rwXtMYoMEsL64sA==", + "version": "2.3.0-beta.1", + "resolved": "https://registry.npmjs.org/vue-draggable-nested-tree/-/vue-draggable-nested-tree-2.3.0-beta.1.tgz", + "integrity": "sha512-SuxWl6TJOBGSRAllYRZG4oiVnz5+QtpzyF7b4KidS3MzbrkjjsMDxy+hylksG++XCSn0heclVml0xriH2K0vug==", "hasInstallScript": true, "dependencies": { "draggable-helper": "1.0.20", diff --git a/package.json b/package.json index 64c33a91093..21d937e9096 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "vue": "^2.7.14", "vue-clickaway": "~2.2.2", "vue-countable": "^1.0.9", - "vue-draggable-nested-tree": "^2.2.20", + "vue-draggable-nested-tree": "^2.3.0-beta.1", "vue-js-modal": "^2.0.1", "vue-select": "^3.10.1", "vue-toasted": "^1.1.27", diff --git a/resources/css/components/array.css b/resources/css/components/array.css index d4364adb738..1266e738a21 100644 --- a/resources/css/components/array.css +++ b/resources/css/components/array.css @@ -13,7 +13,7 @@ } } .array-table { - @apply rounded text-sm text-left w-full; + @apply rounded text-sm rtl:text-right ltr:text-left w-full; &:focus { @apply outline-none; } @@ -25,7 +25,7 @@ } th { - @apply border-r p-2 bg-gray-300; + @apply rtl:border-l ltr:border-r p-2 bg-gray-300; } td { @@ -33,20 +33,20 @@ } tr:first-child th { - @apply rounded-tl; + @apply rtl:rounded-tr ltr:rounded-tl; } tr:first-child td, tr:first-child .input-text-minimal { - @apply rounded-tr; + @apply rtl:rounded-tl ltr:rounded-tr; } tr:last-child th { - @apply rounded-bl; + @apply rtl:rounded-br ltr:rounded-bl; } tr:last-child td:last-child, tr:last-child .input-minimal { - @apply rounded-br; + @apply rtl:rounded-bl ltr:rounded-br; } &:focus-within { diff --git a/resources/css/components/assets.css b/resources/css/components/assets.css index ff60b973a04..a59e3cf64be 100644 --- a/resources/css/components/assets.css +++ b/resources/css/components/assets.css @@ -16,7 +16,7 @@ i { position: relative; top: -1px; - margin-right: 10px; + margin-right: 10px ; [dir="rtl"] & { margin-left: 10px ; margin-right: 0 ; } } } } @@ -60,12 +60,12 @@ .search { flex: 1; - margin-right: 15px; - margin-left: 0; + margin-right: 15px ; [dir="rtl"] & { margin-left: 15px ; margin-right: 0 ; } + margin-left: 0 ; [dir="rtl"] & { margin-right: 0 ; margin-left: 0 ; } } > .btn { - margin-right: 15px; + margin-right: 15px ; [dir="rtl"] & { margin-left: 15px ; margin-right: 0 ; } } } @@ -148,9 +148,9 @@ > * { @apply absolute w-auto h-auto max-w-full max-h-full; - left: 50%; + left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } top: 50%; - transform: translate(-50%, -50%); + transform: translate(-50%, -50%) ; [dir="rtl"] & { transform: translate(50%, -50%); } box-shadow: 0 0 32px rgba(0, 0, 0, .35); } } diff --git a/resources/css/components/blueprints.css b/resources/css/components/blueprints.css index 6778b6e0114..be798ec8281 100644 --- a/resources/css/components/blueprints.css +++ b/resources/css/components/blueprints.css @@ -41,7 +41,9 @@ &:before { content: ''; @apply border rounded absolute bg-gray-200 shadow-sm; - top: -3px; left: 6px; right: 0; bottom: 3px; z-index: 1; + top: -3px; left: 6px ; right: 0 ; bottom: 3px; z-index: 1; + + [dir="rtl"] & { left: 0 ; right: 6px ; } } } diff --git a/resources/css/components/configure.css b/resources/css/components/configure.css index 420decaf6b5..a338b4a92e9 100644 --- a/resources/css/components/configure.css +++ b/resources/css/components/configure.css @@ -11,6 +11,6 @@ > .publish-fields > .toggle-fieldtype { @apply flex justify-between items-center flex-wrap; .help-block, .help-block p { @apply mb-0; } - .field-inner { @apply pr-8; } + .field-inner { @apply rtl:pl-8 ltr:pr-8; } } } diff --git a/resources/css/components/fieldtypes/array.css b/resources/css/components/fieldtypes/array.css index a1053d00c5b..603a2cbf37e 100644 --- a/resources/css/components/fieldtypes/array.css +++ b/resources/css/components/fieldtypes/array.css @@ -24,13 +24,13 @@ tr:last-child { td, th { border-radius: 0; } } - tr > :first-child { border-left: 0; } - tr > :last-child { border-right: 0; } + tr > :first-child { border-left: 0 ; [dir="rtl"] & { border-left: 0 ; border-right: 0 ; } } + tr > :last-child { border-right: 0 ; [dir="rtl"] & { border-right: 0 ; border-left: 0 ; } } } /* Dynamic Mode */ .array-dynamic .btn { - @apply text-blue block w-full h-auto border-0 text-left shadow-none; + @apply text-blue block w-full h-auto border-0 rtl:text-right ltr:text-left shadow-none; background: #f4f4f4; padding: 10px 10px 11px; margin: 15px 0 0; diff --git a/resources/css/components/fieldtypes/assets.css b/resources/css/components/fieldtypes/assets.css index 5302970491b..a2d38bba6f2 100644 --- a/resources/css/components/fieldtypes/assets.css +++ b/resources/css/components/fieldtypes/assets.css @@ -14,7 +14,7 @@ } .asset-upload-control { - @apply mt-2 @sm:ml-4 @sm:mt-0 text-xs text-gray-600 leading-tight; + @apply mt-2 @sm:rtl:mr-4 @sm:ltr:ml-4 @sm:mt-0 text-xs text-gray-600 leading-tight; } .upload-text-button { @@ -26,7 +26,7 @@ } .assets-fieldtype .drag-drop-text { - @apply ml-1 text-gray-700; + @apply rtl:mr-1 ltr:ml-1 text-gray-700; } .assets-fieldtype .asset-upload-control { diff --git a/resources/css/components/fieldtypes/bard.css b/resources/css/components/fieldtypes/bard.css index 9a4291b95dc..f464f55b431 100644 --- a/resources/css/components/fieldtypes/bard.css +++ b/resources/css/components/fieldtypes/bard.css @@ -125,7 +125,7 @@ border-top-color: black; position: absolute; top: 100%; - left: 50%; + left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } margin-left: -3px } @@ -163,7 +163,7 @@ } .bard-add-set-button { - @apply flex items-center justify-center absolute -left-4 top-[-6px] z-1; + @apply flex items-center justify-center absolute rtl:-right-4 ltr:-left-4 top-[-6px] z-1; } .bard-footer-toolbar { @@ -192,8 +192,8 @@ /* transition: all .15s ease-in-out; */ .dropdown-menu { - left: -5px; - right: auto; + left: -5px ; [dir="rtl"] & { left: auto ; right: -5px ; } + right: auto ; [dir="rtl"] & { right: auto ; left: auto ; } } } @@ -240,16 +240,16 @@ } .bard-set-selector { - @apply ml-6; + @apply rtl:mr-6 ltr:ml-6; } .bard-field-options { @apply fixed top-0 inset-x-0 bg-gray-700 p-4 w-full; - text-align: right; + @apply ltr:text-right rtl:text-left; z-index: 1; /* to appear over the top of .bard-editor */ .icon { font-size: 24px; } - a { margin-left: 16px; color: #fff; opacity: 1; } + a { margin-left: 16px ; [dir="rtl"] & { margin-right: 16px ; margin-left: 0 ; } color: #fff; opacity: 1; } } } @@ -382,14 +382,14 @@ padding: 0; margin: 0; margin-bottom: .85em; - padding-left: 2em; + padding-left: 2em ; [dir="rtl"] & { padding-right: 2em ; padding-left: 0 ; } } .tableWrapper table ol, .tableWrapper table ul { padding: 0; margin: 0; - padding-left: 2em; + padding-left: 2em ; [dir="rtl"] & { padding-right: 2em ; padding-left: 0 ; } } ol ol, @@ -398,7 +398,7 @@ ul ul { margin-top: 0; margin-bottom: 0; - padding-left: 2em; + padding-left: 2em ; [dir="rtl"] & { padding-right: 2em ; padding-left: 0 ; } } ul ul { @@ -418,7 +418,7 @@ } blockquote { - @apply text-gray-800 border-l-4 border-blue px-4; + @apply text-gray-800 rtl:border-r-4 ltr:border-l-4 border-blue px-4; margin: 0 0 .85em; } @@ -439,7 +439,7 @@ table-layout: fixed; th { - @apply font-bold text-left bg-gray-200; + @apply font-bold rtl:text-right ltr:text-left bg-gray-200; } td, th { @@ -490,7 +490,7 @@ .bard-fieldtype .ProseMirror > p.is-editor-empty:first-child::before { @apply text-gray-600; content: attr(data-placeholder); - float: left; + float: left ; [dir="rtl"] & { float: right ; } height: 0; pointer-events: none; } @@ -538,6 +538,6 @@ table .column-resize-handle { @apply absolute top-0 bottom-0 pointer-events-none bg-blue-200; width: 3px; - right: -2px; + right: -2px ; [dir="rtl"] & { right: auto ; left: -2px ; } } } diff --git a/resources/css/components/fieldtypes/checkboxes.css b/resources/css/components/fieldtypes/checkboxes.css index ea48181c1db..0dbbd38e1d8 100644 --- a/resources/css/components/fieldtypes/checkboxes.css +++ b/resources/css/components/fieldtypes/checkboxes.css @@ -8,6 +8,6 @@ } .option + label { - @apply ml-2; + @apply rtl:mr-2 ltr:ml-2; } } diff --git a/resources/css/components/fieldtypes/code.css b/resources/css/components/fieldtypes/code.css index b1c71f78166..2f9dcf276b6 100644 --- a/resources/css/components/fieldtypes/code.css +++ b/resources/css/components/fieldtypes/code.css @@ -1,6 +1,14 @@ +.code-fieldtype-container { + direction: ltr; +} + .code-fieldtype-toolbar { @apply bg-white shadow-none rounded-t border border-b-0 text-sm flex flex-wrap items-center justify-end gap-2; padding: 4px 8px; + + [dir='rtl'] & { + direction: rtl; + } } .code-fieldtype-toolbar select { diff --git a/resources/css/components/fieldtypes/datetime.css b/resources/css/components/fieldtypes/datetime.css index 1e962bb339a..3264ba2d2f5 100644 --- a/resources/css/components/fieldtypes/datetime.css +++ b/resources/css/components/fieldtypes/datetime.css @@ -5,7 +5,7 @@ .daterange { outline: none; width: 100%; - .icon-remove { right: 32px; } + .icon-remove { right: 32px ; [dir="rtl"] & { right: auto ; left: 32px ; } } .dr-calendar { max-width: 250px; } @@ -24,7 +24,7 @@ color: #777; height: 18px; width: 18px; - margin-right: 8px; + margin-right: 8px ; [dir="rtl"] & { margin-left: 8px ; margin-right: 0 ; } text-shadow: 0 1px 1px #FFF; } diff --git a/resources/css/components/fieldtypes/environment.css b/resources/css/components/fieldtypes/environment.css index 085bd35a51b..12ce34710f7 100644 --- a/resources/css/components/fieldtypes/environment.css +++ b/resources/css/components/fieldtypes/environment.css @@ -8,7 +8,7 @@ .icon { display: inline-block; vertical-align: middle; - margin-right: 5px; + margin-right: 5px ; [dir="rtl"] & { margin-left: 5px ; margin-right: 0 ; } &:before { top: 1px; } diff --git a/resources/css/components/fieldtypes/grid.css b/resources/css/components/fieldtypes/grid.css index f29eaf6c28a..460556d1c55 100644 --- a/resources/css/components/fieldtypes/grid.css +++ b/resources/css/components/fieldtypes/grid.css @@ -3,7 +3,7 @@ ========================================================================== */ .grid-table { - @apply w-full text-left border text-gray relative mb-4 outline-none shadow-sm rounded; + @apply w-full rtl:text-right ltr:text-left border text-gray relative mb-4 outline-none shadow-sm rounded; border-collapse: separate; border-spacing: 0; table-layout: auto; @@ -17,8 +17,8 @@ top: -1px; z-index: auto; - &:first-child { @apply rounded-tl pl-3; } - &:last-child { @apply rounded-tr; } + &:first-child { @apply rtl:rounded-tr ltr:rounded-tl rtl:pr-3 ltr:pl-3; } + &:last-child { @apply rtl:rounded-tl ltr:rounded-tr; } &.grid-drag-handle-header { @apply w-3; } @@ -40,11 +40,11 @@ @apply border-b px-2 py-3 align-top; &:first-child.grid-cell { - @apply pl-3; + @apply rtl:pr-3 ltr:pl-3; } &.drag-handle { - @apply border-r h-full p-2; + @apply rtl:border-l ltr:border-r h-full p-2; width: 1%; cursor: grab; background: theme('colors.gray.200') url('../../../svg/icons/light/drag-dots.svg') center center no-repeat; @@ -55,8 +55,8 @@ tr:last-child td { @apply border-b-0; - &:first-child { @apply rounded-bl; } - &:last-child { @apply rounded-br; } + &:first-child { @apply rtl:rounded-br ltr:rounded-bl; } + &:last-child { @apply rtl:rounded-bl ltr:rounded-br; } } tr.draggable-source--is-dragging td { @@ -65,7 +65,7 @@ } .grid-table tbody .row-controls { - @apply pl-0 text-center; + @apply rtl:pr-0 ltr:pl-0 text-center; width: 1%; padding-top: 21px; /* pseudo-center for text/select fields */ } diff --git a/resources/css/components/fieldtypes/markdown.css b/resources/css/components/fieldtypes/markdown.css index 3b8d019db1d..c0ee9176a8f 100644 --- a/resources/css/components/fieldtypes/markdown.css +++ b/resources/css/components/fieldtypes/markdown.css @@ -37,7 +37,7 @@ @apply flex items-center; button { - @apply text-gray-700 inline-block focus:outline-none px-2 py-1 mr-1; + @apply text-gray-700 inline-block focus:outline-none px-2 py-1 rtl:ml-1 ltr:mr-1; &:hover { @apply text-blue; @@ -154,7 +154,7 @@ } .markdown-preview { - @apply border-none p-2 text-left; + @apply border-none p-2 rtl:text-right ltr:text-left; p { line-height: 1.2; } } } diff --git a/resources/css/components/fieldtypes/replicator.css b/resources/css/components/fieldtypes/replicator.css index 90a1b9bea10..55b54cc677e 100644 --- a/resources/css/components/fieldtypes/replicator.css +++ b/resources/css/components/fieldtypes/replicator.css @@ -11,14 +11,14 @@ } .replicator-set-header { - @apply bg-gray-300 border-b rounded-t pr-3 flex select-none; + @apply bg-gray-300 border-b rounded-t rtl:pl-3 ltr:pr-3 flex select-none; &.collapsed { @apply rounded border-b-0; } .sortable-handle { - @apply w-4 border-r rounded-tl p-2; + @apply w-4 rtl:border-l ltr:border-r rtl:rounded-tr ltr:rounded-tl p-2; cursor: grab; background: transparent url('../../../svg/icons/light/drag-dots.svg') center center no-repeat; background-size: 7px 17px; diff --git a/resources/css/components/fieldtypes/table.css b/resources/css/components/fieldtypes/table.css index bdaa4a29a8d..95f1b235e4d 100644 --- a/resources/css/components/fieldtypes/table.css +++ b/resources/css/components/fieldtypes/table.css @@ -3,7 +3,7 @@ ========================================================================== */ .table-fieldtype-table { - @apply w-full text-left border text-gray relative mb-4 outline-none shadow-sm rounded; + @apply w-full rtl:text-right ltr:text-left border text-gray relative mb-4 outline-none shadow-sm rounded; border-collapse: separate; border-spacing: 0; table-layout: fixed; @@ -11,13 +11,13 @@ .table-fieldtype-table thead { th { - @apply font-medium border-r p-2 border-b z-10 bg-gray-200 text-gray-900 text-sm; + @apply font-medium rtl:border-l ltr:border-r p-2 border-b z-10 bg-gray-200 text-gray-900 text-sm; display: table-cell; position: sticky; top: -1px; - &:first-child { @apply rounded-tl pl-3; } - &:last-child { @apply rounded-tr border-r-0; } + &:first-child { @apply rtl:rounded-tr ltr:rounded-tl rtl:pr-3 ltr:pl-3; } + &:last-child { @apply rtl:rounded-tl ltr:rounded-tr rtl:border-l-0 ltr:border-r-0; } &.grid-drag-handle-header { @apply w-3; } @@ -39,18 +39,18 @@ } td { - @apply border-b border-r p-0; + @apply border-b rtl:border-l ltr:border-r p-0; &:first-child.grid-cell { - @apply pl-3; + @apply rtl:pr-3 ltr:pl-3; } &:last-child { - @apply border-r-0; + @apply rtl:border-l-0 ltr:border-r-0; } &.table-drag-handle { - @apply w-3 border-r h-full p-2; + @apply w-3 rtl:border-l ltr:border-r h-full p-2; cursor: grab; background: theme('colors.gray.200') url('../../../svg/icons/light/drag-dots.svg') center center no-repeat; background-size: 7px 17px; @@ -60,8 +60,8 @@ tr:last-child td { @apply border-b-0; - &:first-child { @apply rounded-bl; } - &:last-child { @apply rounded-br; } + &:first-child { @apply rtl:rounded-br ltr:rounded-bl; } + &:last-child { @apply rtl:rounded-bl ltr:rounded-br; } } tr.draggable-source--is-dragging td { @@ -70,7 +70,7 @@ } .table-fieldtype-table .row-controls { - @apply w-8 pl-0 text-center; + @apply w-8 rtl:pr-0 ltr:pl-0 text-center; vertical-align: middle; &:focus-within { @apply bg-gray-200; diff --git a/resources/css/components/fieldtypes/video.css b/resources/css/components/fieldtypes/video.css index c34d8452d69..3261716751d 100644 --- a/resources/css/components/fieldtypes/video.css +++ b/resources/css/components/fieldtypes/video.css @@ -18,7 +18,7 @@ @apply rounded; position: absolute; top: 0; - left: 0; + left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } width: 100%; height: 100%; } diff --git a/resources/css/components/fieldtypes/width.css b/resources/css/components/fieldtypes/width.css index 7f053f04717..7219724d0e2 100644 --- a/resources/css/components/fieldtypes/width.css +++ b/resources/css/components/fieldtypes/width.css @@ -9,18 +9,18 @@ } .field-width-notch { - @apply relative border border-gray-400 border-l-0 flex-1; + @apply relative border border-gray-400 rtl:border-r-0 ltr:border-l-0 flex-1; &:first-of-type { - @apply border-l rounded-l-sm; + @apply rtl:border-r ltr:border-l rtl:rounded-r-sm ltr:rounded-l-sm; } &.filled { - @apply border-gray-400 border-r-0 pr-px bg-white -my-px; + @apply border-gray-400 rtl:border-l-0 ltr:border-r-0 rtl:pl-px ltr:pr-px bg-white -my-px; } &.selected { - @apply border-r rounded-r-sm; + @apply rtl:border-l ltr:border-r rtl:rounded-l-sm ltr:rounded-r-sm; } } } @@ -34,7 +34,7 @@ .field-width-notch { @apply bg-gray-200 border-r-gray-400 border-y-gray-500; &:last-child { - @apply border-r-gray-500 rounded-r-sm; + @apply border-r-gray-500 rtl:rounded-l-sm ltr:rounded-r-sm; } &.filled { diff --git a/resources/css/components/fieldtypes/yaml.css b/resources/css/components/fieldtypes/yaml.css index 921eb14e692..8d6423bc572 100644 --- a/resources/css/components/fieldtypes/yaml.css +++ b/resources/css/components/fieldtypes/yaml.css @@ -10,7 +10,7 @@ .grid-fieldtype .yaml-fieldtype-wrapper { > span { border-top: 0; - border-right: 0; + border-right: 0 ; [dir="rtl"] & { border-right: 0 ; border-left: 0 ; } } .editor { diff --git a/resources/css/components/filters.css b/resources/css/components/filters.css index 30658159474..c42cb959339 100644 --- a/resources/css/components/filters.css +++ b/resources/css/components/filters.css @@ -22,8 +22,8 @@ border-radius: 50%; opacity: .9; position: absolute; - left: 50%; - margin-left: -1px; + left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } + margin-left: -1px ; [dir="rtl"] & { margin-right: -1px ; margin-left: 0 ; } bottom: 1px; } diff --git a/resources/css/components/focal-point.css b/resources/css/components/focal-point.css index ac21cb98ac1..33210a531be 100644 --- a/resources/css/components/focal-point.css +++ b/resources/css/components/focal-point.css @@ -10,7 +10,7 @@ .focal-point-toolbox { position: absolute; top: 20px; - left: 20px; + left: 20px ; [dir="rtl"] & { left: auto ; right: 20px ; } z-index: 120; width: 380px; overflow-y: auto; @@ -48,15 +48,15 @@ background: white; border-radius: 50%; top: 50%; - left: 50%; - margin: -4px 0 0 -4px; + left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } + margin: -4px 0 0 -4px ; [dir="rtl"] & { margin: -4px -4px 0 0 ; } box-shadow: 0 0 4px rgba(0,0,0,.75); } } .focal-point .frame { position: absolute; - margin: -5px 0 0 -5px; + margin: -5px 0 0 -5px ; [dir="rtl"] & { margin: -5px -5px 0 0 ; } border: 10px solid #394045; box-sizing: content-box; overflow: hidden; @@ -70,9 +70,9 @@ } .focal-point { - .frame-1, .frame-4, .frame-7 { left: 0; width: 66.6666667%; } - .frame-2, .frame-5, .frame-8 { left: 66.6666667%; width: 22.2222222%; } - .frame-3, .frame-6, .frame-9 { left: 88.8888889%; width: 11.1111111%; } + .frame-1, .frame-4, .frame-7 { left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } width: 66.6666667%; } + .frame-2, .frame-5, .frame-8 { left: 66.6666667% ; [dir="rtl"] & { left: auto ; right: 66.6666667% ; } width: 22.2222222%; } + .frame-3, .frame-6, .frame-9 { left: 88.8888889% ; [dir="rtl"] & { left: auto ; right: 88.8888889% ; } width: 11.1111111%; } .frame-1, .frame-2, .frame-3 { top: 0; height: 66.6666667%; } .frame-4, .frame-5, .frame-6 { top: 66.6666667%; height: 22.2222222%; } .frame-7, .frame-8, .frame-9 { top: 88.8888889%; height: 11.1111111%; } diff --git a/resources/css/components/global-header.css b/resources/css/components/global-header.css index 604bc826781..7a7c1f405e8 100644 --- a/resources/css/components/global-header.css +++ b/resources/css/components/global-header.css @@ -3,7 +3,7 @@ ========================================================================== */ .global-header { - @apply bg-white shadow pr-4 h-13 items-center flex relative w-full; + @apply bg-white shadow rtl:pl-4 ltr:pr-4 h-13 items-center flex relative w-full; z-index: 3; /* The search focus overlay sits underneath using z-index 2. */ } @@ -22,8 +22,8 @@ .search-input { @apply text-sm w-full max-w-full; - padding-left: 5px; - padding-right: 20px; + padding-left: 5px ; + padding-right: 20px ; [dir="rtl"] & { padding-left: 20px ; padding-right: 5px ; } height: 32px; &:focus { outline: 0; @@ -33,13 +33,13 @@ .global-search-results { @apply shadow-lg absolute p-0 w-full bg-white rounded border border-gray-500; top: 36px; - left: -1px; /* border offset */ + left: -1px ; [dir="rtl"] & { left: auto ; right: -1px ; } /* border offset */ z-index: 999; } .global-search-loading-indicator { position: absolute; - right: 8px; + right: 8px ; [dir="rtl"] & { right: auto ; left: 8px ; } } .global-search-result-item { @@ -67,7 +67,7 @@ } .status { - float: right; + float: right ; [dir="rtl"] & { float: left ; } background: #ddd; border-radius: 2px; padding: 2px 4px; @@ -87,7 +87,7 @@ .reset { font-size: 21px; - left: -3px; + left: -3px ; [dir="rtl"] & { left: auto ; right: -3px ; } position: relative; } @@ -108,7 +108,7 @@ .v-select { @apply h-full } .vs__dropdown-toggle { @apply border-none bg-none } .vs__actions { @apply hidden } - .vs__search { @apply p-0 } + .vs__search { @apply p-0; [dir="rtl"] & { @apply p-0; } [dir="ltr"] & { @apply p-0; } } .vs__selected-options { @apply border-none shadow-none p-0 bg-none } .vs__selected { @apply flex } .vs__dropdown-toggle { diff --git a/resources/css/components/items.css b/resources/css/components/items.css index c1cffcce6ae..8940523217c 100644 --- a/resources/css/components/items.css +++ b/resources/css/components/items.css @@ -2,7 +2,7 @@ @apply text-sm outline-none flex w-full justify-between rounded border bg-white shadow-sm items-center; .item-move { - @apply w-4 self-stretch border-r rounded-l p-2; + @apply w-4 self-stretch rtl:border-l ltr:border-r rtl:rounded-r ltr:rounded-l p-2; cursor: grab; background: theme('colors.gray.200') url('../../svg/icons/light/drag-dots.svg') center center no-repeat; background-size: 7px 17px; diff --git a/resources/css/components/modal.css b/resources/css/components/modal.css index bfec7eab807..378f36598f8 100644 --- a/resources/css/components/modal.css +++ b/resources/css/components/modal.css @@ -1,9 +1,16 @@ /* ========================================================================== MODALS ========================================================================== */ +.vm--container { + direction: ltr; +} .vm--modal { @apply rounded-lg !important; + + [dir='rtl'] & { + direction: rtl; + } } .vm--overlay { diff --git a/resources/css/components/nav-main.css b/resources/css/components/nav-main.css index b9a30d3ed01..85dfbada931 100644 --- a/resources/css/components/nav-main.css +++ b/resources/css/components/nav-main.css @@ -3,7 +3,7 @@ ========================================================================== */ .nav-main { - @apply hidden select-none bg-white shadow h-screen absolute left-0 overflow-scroll w-56; + @apply hidden select-none bg-white shadow h-screen absolute rtl:right-0 ltr:left-0 overflow-scroll w-56; transition: all .3s; h6 { @apply mt-6; } @@ -26,7 +26,7 @@ } i { - @apply block h-7 p-1 w-7 mr-2 rounded-full; + @apply block h-7 p-1 w-7 rtl:ml-2 ltr:mr-2 rounded-full; } } @@ -40,11 +40,11 @@ li ul { @apply mb-2; - margin-left: 1.5rem; + margin-left: 1.5rem ; [dir="rtl"] & { margin-right: 1.5rem ; margin-left: 0 ; } li { @apply text-xs; - margin-left: 12px; + margin-left: 12px ; [dir="rtl"] & { margin-right: 12px ; margin-left: 0 ; } } li a { @@ -53,7 +53,7 @@ } .nav-closed & { - left: -110%; + left: -110% ; [dir="rtl"] & { left: auto ; right: -110% ; } } .nav-section-top-level { @@ -63,7 +63,7 @@ @screen md { .nav-main { - @apply fixed flex bg-transparent shadow-none overflow-auto border-r; + @apply fixed flex bg-transparent shadow-none overflow-auto rtl:border-l ltr:border-r; height: calc(100% - 52px); .showing-license-banner & { height: calc(100% - 120px); @@ -72,11 +72,11 @@ } .nav-main-inner { - @apply pl-6 pr-4 pt-2; + @apply rtl:pr-6 ltr:pl-6 rtl:pl-4 ltr:pr-4 pt-2; } .nav-toggle { - @apply flex items-center justify-center h-6 p-1 w-6 mr-3 rounded; + @apply flex items-center justify-center h-6 p-1 w-6 rtl:ml-3 ltr:mr-3 rounded; outline: none !important; &:hover { diff --git a/resources/css/components/nav-mobile.css b/resources/css/components/nav-mobile.css index 53d6f3a8427..122f05d5fbb 100644 --- a/resources/css/components/nav-mobile.css +++ b/resources/css/components/nav-mobile.css @@ -3,17 +3,17 @@ ========================================================================== */ .nav-main.nav-mobile { - left: -110%; + left: -110% ; [dir="rtl"] & { left: auto ; right: -110% ; } display: block; z-index: 996; .nav-main-inner { - padding-left: 12px; + padding-left: 12px ; [dir="rtl"] & { padding-right: 12px ; padding-left: 0 ; } } } .nav-mobile-open { .nav-main.nav-mobile { - left: 0; + left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } } } diff --git a/resources/css/components/notifications.css b/resources/css/components/notifications.css index 3838fb7043f..631db9fa9ab 100644 --- a/resources/css/components/notifications.css +++ b/resources/css/components/notifications.css @@ -17,7 +17,7 @@ height: 48px; i { - @apply flex items-center rounded-l mr-4 h-full px-4 text-white; + @apply flex items-center rtl:rounded-r ltr:rounded-l rtl:ml-4 ltr:mr-4 h-full px-4 text-white; } &.success i { @@ -33,7 +33,7 @@ } .action { - @apply font-normal text-xl px-4 h-full text-gray-600 m-0 ml-2 flex items-center; + @apply font-normal text-xl px-4 h-full text-gray-600 m-0 rtl:mr-2 ltr:ml-2 flex items-center; &:hover { @apply no-underline text-gray-900; } diff --git a/resources/css/components/page-tree.css b/resources/css/components/page-tree.css index e001141588e..254dae356bf 100644 --- a/resources/css/components/page-tree.css +++ b/resources/css/components/page-tree.css @@ -16,7 +16,7 @@ } .page-move { - @apply w-6 border-r rounded-l; + @apply w-6 rtl:border-l ltr:border-r rtl:rounded-r ltr:rounded-l; cursor: grab; background-color: hsla(210, 30%, 95%, .5); background-image: url('../../svg/icons/light/drag-dots.svg'); @@ -28,7 +28,7 @@ .page-root { background-color: hsla(210, 30%, 95%, .5); - @apply flex w-6 rounded-l items-center border-r; + @apply flex w-6 rtl:rounded-r ltr:rounded-l items-center rtl:border-l ltr:border-r; } } diff --git a/resources/css/components/pagination.css b/resources/css/components/pagination.css index 570caa1ffce..cc1ec453fff 100644 --- a/resources/css/components/pagination.css +++ b/resources/css/components/pagination.css @@ -6,7 +6,7 @@ @apply flex justify-center shadow items-center list-none p-0 rounded overflow-hidden; li a { - @apply h-full px-3 py-2 border-r bg-white block text-gray-800; + @apply h-full px-3 py-2 rtl:border-l ltr:border-r bg-white block text-gray-800; &:hover { @apply bg-gray-100 text-gray-800; @@ -14,7 +14,7 @@ } li > .unclickable { - @apply h-full px-3 py-2 border-r bg-white block text-gray-500; + @apply h-full px-3 py-2 rtl:border-l ltr:border-r bg-white block text-gray-500; &:hover { cursor: text; @@ -22,7 +22,7 @@ } li:last-child a { - @apply border-r-0; + @apply rtl:border-l-0 ltr:border-r-0; } li.current a { diff --git a/resources/css/components/preview.css b/resources/css/components/preview.css index 1b1e685cb89..20f01526459 100644 --- a/resources/css/components/preview.css +++ b/resources/css/components/preview.css @@ -3,7 +3,7 @@ } .live-preview-header { - @apply relative pr-4 pl-6 py-2 h-13 shadow-md flex items-center justify-between; + @apply relative rtl:pl-4 ltr:pr-4 rtl:pr-6 ltr:pl-6 py-2 h-13 shadow-md flex items-center justify-between; background: linear-gradient(180deg, #fff, #f9fafb); border-bottom: 1px solid #c4cdd6; z-index: 2; @@ -40,7 +40,7 @@ } .live-preview .publish-tabs { - @apply pl-4 @4xl/live-preview:pl-6; + @apply rtl:pr-4 ltr:pl-4 rtl:@4xl/live-preview:pr-6 ltr:@4xl/live-preview:pl-6; } .live-preview .publish-sections-section { @@ -66,7 +66,7 @@ } .live-preview-resizer { - @apply w-4 border-l border-r border-gray-400 shadow-sm; + @apply w-4 rtl:border-r ltr:border-l rtl:border-l ltr:border-r border-gray-400 shadow-sm; z-index: 1; cursor: ew-resize; background: theme('colors.gray.100') url('../../svg/icons/light/drag-dots.svg') center center no-repeat; diff --git a/resources/css/components/progress.css b/resources/css/components/progress.css index 389d7d8e188..21b032fb0d1 100644 --- a/resources/css/components/progress.css +++ b/resources/css/components/progress.css @@ -4,14 +4,14 @@ } #nprogress .bar { - @apply bg-blue fixed top-0 left-0 w-full;; + @apply bg-blue fixed top-0 rtl:right-0 ltr:left-0 w-full;; height: 2px; z-index: 10000; /* above global-header */ } /* Fancy blur effect */ #nprogress .peg { - @apply block absolute right-0 w-full h-full opacity-100; + @apply block absolute rtl:left-0 ltr:right-0 w-full h-full opacity-100; box-shadow: 0 0 5px theme('colors.blue.DEFAULT'), 0 0 2px theme('colors.blue.DEFAULT'); } diff --git a/resources/css/components/publish.css b/resources/css/components/publish.css index 06a1a83f4e8..98b427dabf4 100644 --- a/resources/css/components/publish.css +++ b/resources/css/components/publish.css @@ -27,7 +27,7 @@ .head .status { display: inline-block; label { - margin: 0 6px 0 0; + margin: 0 6px 0 0 ; [dir="rtl"] & { margin: 0 0 0 6px ; } position: relative; top: 3px; } @@ -41,7 +41,7 @@ code.parent-url { @apply block text-3xs bg-none text-gray-700; - padding: 0 0 3px 0; + padding: 0 0 3px 0 ; [dir="rtl"] & { padding: 0 0 3px 0 ; } } .publish-fields { @@ -95,7 +95,7 @@ code.parent-url { .publish-sidebar { @apply shrink-0; - margin-left: 20px; + margin-left: 20px ; [dir="rtl"] & { margin-right: 20px ; margin-left: 0 ; } width: 300px; .publish-fields .form-group { diff --git a/resources/css/components/revisions.css b/resources/css/components/revisions.css index 39ada720f7b..bba44f0df25 100644 --- a/resources/css/components/revisions.css +++ b/resources/css/components/revisions.css @@ -34,7 +34,7 @@ } .revision-item .badge { - @apply uppercase text-4xs ml-2 text-white rounded-sm; + @apply uppercase text-4xs rtl:mr-2 ltr:ml-2 text-white rounded-sm; height: 16px; &.publish { @apply bg-green-600; } diff --git a/resources/css/components/roles.css b/resources/css/components/roles.css index 5064ffe3d58..d726dbf1d52 100644 --- a/resources/css/components/roles.css +++ b/resources/css/components/roles.css @@ -4,7 +4,7 @@ .roles { li li { - margin-left: 30px; + margin-left: 30px ; [dir="rtl"] & { margin-right: 30px ; margin-left: 0 ; } } .disabled { diff --git a/resources/css/components/settings.css b/resources/css/components/settings.css index 173135ee739..7670aa566d9 100644 --- a/resources/css/components/settings.css +++ b/resources/css/components/settings.css @@ -3,7 +3,7 @@ @apply p-3 @sm:p-4 m-0; .field-inner { - @apply w-full md:w-1/2 md:pr-8; + @apply w-full md:w-1/2 rtl:md:pl-8 ltr:md:pr-8; } .field-inner + div { diff --git a/resources/css/components/shortcuts.css b/resources/css/components/shortcuts.css index 575f189a9d6..5aa475a3b16 100644 --- a/resources/css/components/shortcuts.css +++ b/resources/css/components/shortcuts.css @@ -18,7 +18,7 @@ min-width: 18px; height: 18px; margin: 0 .25em; - padding: 0 2px 2px 2px; + padding: 0 2px 2px 2px ; [dir="rtl"] & { padding: 0 2px 2px 2px ; } } .shortcut-combo { diff --git a/resources/css/components/stacks.css b/resources/css/components/stacks.css index 58f4b04f64b..c2280b86e85 100644 --- a/resources/css/components/stacks.css +++ b/resources/css/components/stacks.css @@ -17,6 +17,10 @@ .stack-container { @apply absolute inset-0; transition: left .3s ease; + + [dir='rtl'] & { + transition: right .3s ease; + } } .stack-overlay { @@ -44,12 +48,20 @@ &.stack-slide-leave-to { transform: translateX(10px); opacity: 0; + + [dir='rtl'] & { + transform: translateX(-10px); + } } } .hovering .stack-content { transform: translateX(-16px); + + [dir='rtl'] & { + transform: translateX(16px); + } } .breadcrumb svg { @@ -60,5 +72,10 @@ @media all and (max-width: 980px) { .stacks-on-stacks .stack-container { left: 0 !important; + + [dir='rtl'] & { + left: unset !important; + right: 0 !important; + } } } diff --git a/resources/css/components/tabs.css b/resources/css/components/tabs.css index 7763a2f2afb..bcd44c46d98 100644 --- a/resources/css/components/tabs.css +++ b/resources/css/components/tabs.css @@ -10,11 +10,11 @@ } .fade-left { - @apply left-0 bg-gradient-to-r; + @apply rtl:right-0 ltr:left-0 rtl:bg-gradient-to-l ltr:bg-gradient-to-r; } .fade-right { - @apply right-0 bg-gradient-to-l; + @apply rtl:left-0 ltr:right-0 rtl:bg-gradient-to-r ltr:bg-gradient-to-l; } } @@ -25,7 +25,7 @@ .tabs { @apply flex space-x-2 overflow-hidden relative w-full max-w-full; &-scrolled { - @apply pl-0 ml-0; + @apply rtl:pr-0 ltr:pl-0 rtl:mr-0 ltr:ml-0; } } @@ -66,7 +66,7 @@ } .button-tab { - @apply text-gray-700 inline-block focus:outline-none px-2 py-1 mr-1; + @apply text-gray-700 inline-block focus:outline-none px-2 py-1 rtl:ml-1 ltr:mr-1; &:hover { @apply text-blue; diff --git a/resources/css/components/toggle.css b/resources/css/components/toggle.css index cfa101240ab..193ddcd05f8 100644 --- a/resources/css/components/toggle.css +++ b/resources/css/components/toggle.css @@ -11,7 +11,7 @@ } .inline-label { - @apply ml-2 font-normal text-gray-700; + @apply rtl:mr-2 ltr:ml-2 font-normal text-gray-700; a { @apply text-gray-800 underline; &:hover { @@ -53,7 +53,7 @@ .toggle-knob { position: absolute; top: 1px; - right: 0; + right: 0 ; [dir="rtl"] & { right: auto ; left: 0 ; } width: 20px; height: 20px; border-radius: 50%; @@ -117,7 +117,7 @@ .publish-sidebar .toggle-fieldtype { @apply flex items-center justify-between flex-wrap; .field-inner > label { margin: 0; } - .toggle-fieldtype-wrapper { margin-left: 8px; } + .toggle-fieldtype-wrapper { margin-left: 8px ; [dir="rtl"] & { margin-right: 8px ; margin-left: 0 ; } } .help-block { margin-top: 4px !important; } } diff --git a/resources/css/components/updater.css b/resources/css/components/updater.css index af16092212b..a616c18fd55 100644 --- a/resources/css/components/updater.css +++ b/resources/css/components/updater.css @@ -8,7 +8,7 @@ h2 { font-weight: 400; font-size: 30px; - margin: 0 0 25px 0; + margin: 0 0 25px 0 ; [dir="rtl"] & { margin: 0 0 25px 0 ; } -webkit-font-smoothing: antialiased; } @@ -23,24 +23,24 @@ margin-top: 50px; dt { - margin: 30px 0 15px 0; + margin: 30px 0 15px 0 ; [dir="rtl"] & { margin: 30px 0 15px 0 ; } } dd { - padding-left: 30px; + padding-left: 30px ; [dir="rtl"] & { padding-right: 30px ; padding-left: 0 ; } position: relative; font-size: 16px; margin-bottom: 15px; &.no-icon { - padding-left: 0; + padding-left: 0 ; [dir="rtl"] & { padding-right: 0 ; padding-left: 0 ; } } } .icon { position: absolute; top: 0; - left: 0; + left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } } } } @@ -69,7 +69,7 @@ @apply p-0; li { - @apply my-2 pb-2 relative text-base pl-6; + @apply my-2 pb-2 relative text-base rtl:pr-6 ltr:pl-6; } li:before { @@ -78,12 +78,12 @@ width: 6px; content: ""; top: 7px; - left: 4px; + left: 4px ; [dir="rtl"] & { left: auto ; right: 4px ; } } .label { - @apply text-3xs relative inline-block mr-2 uppercase text-center text-white rounded; + @apply text-3xs relative inline-block rtl:ml-2 ltr:mr-2 uppercase text-center text-white rounded; padding: 2px; width: 54px; top: -2px; diff --git a/resources/css/components/wizard.css b/resources/css/components/wizard.css index ffa26305def..87b49540c45 100644 --- a/resources/css/components/wizard.css +++ b/resources/css/components/wizard.css @@ -8,14 +8,14 @@ .step:not(:first-child):before { @apply absolute h-1 w-1/2 bg-gray-300; content: ''; - left: 0; + left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } top: 18px; } .step:not(:last-child):after { @apply absolute h-1 w-1/2 bg-gray-300; content: ''; - left: 50%; + left: 50% ; [dir="rtl"] & { left: auto ; right: 50% ; } top: 18px; } diff --git a/resources/css/core/layout.css b/resources/css/core/layout.css index b2c6c3734b3..723d52489b9 100644 --- a/resources/css/core/layout.css +++ b/resources/css/core/layout.css @@ -28,6 +28,11 @@ a { cursor: pointer; } +.break-all { + overflow: hidden; + text-overflow: ellipsis; +} + @screen md { #main { @@ -35,16 +40,16 @@ a { } #main .workspace { - padding-left: 14rem; + padding-left: 14rem ; [dir="rtl"] & { padding-right: 14rem ; padding-left: 0 ; } } #main.nav-closed { .nav-main { - left: -14rem; + left: -14rem ; [dir="rtl"] & { left: auto ; right: -14rem ; } } .workspace { - padding-left: 0; + padding-left: 0 ; [dir="rtl"] & { padding-right: 0 ; padding-left: 0 ; } } } } diff --git a/resources/css/core/typography.css b/resources/css/core/typography.css index c60e2560878..bc6edeffc3a 100644 --- a/resources/css/core/typography.css +++ b/resources/css/core/typography.css @@ -110,7 +110,7 @@ sup { .little-heading { font-size: 11px; font-weight: bold; - padding: 15px 0 0 20px; + padding: 15px 0 0 20px ; [dir="rtl"] & { padding: 15px 20px 0 0 ; } letter-spacing: 1px; text-transform: uppercase; } diff --git a/resources/css/core/utilities.css b/resources/css/core/utilities.css index c2845dacee1..6d7405a7f29 100644 --- a/resources/css/core/utilities.css +++ b/resources/css/core/utilities.css @@ -34,12 +34,12 @@ } &.loading-basic { - text-align: left; + @apply ltr:text-left rtl:text-right; padding: 0; .icon { display: inline-block; - margin: -2px 5px 0 0; + margin: -2px 5px 0 0 ; [dir="rtl"] & { margin: -2px 0 0 5px ; } } } } @@ -67,7 +67,7 @@ i { position: relative; top: -1px; - margin-right: 10px; + margin-right: 10px ; [dir="rtl"] & { margin-left: 10px ; margin-right: 0 ; } } } diff --git a/resources/css/elements/badges.css b/resources/css/elements/badges.css index e9c978e7133..9c87f4de6dd 100644 --- a/resources/css/elements/badges.css +++ b/resources/css/elements/badges.css @@ -29,7 +29,7 @@ .filter-badge { @apply text-2xs text-gray-800 bg-white border border-dashed border-gray-600 flex items-center rounded-full; height: 1.625rem; - padding-left: 10px; + padding-left: 10px ; [dir="rtl"] & { padding-right: 10px ; padding-left: 0 ; } button { @apply px-2 text-base text-gray-600 flex items-center rounded; diff --git a/resources/css/elements/buttons.css b/resources/css/elements/buttons.css index fea10da5dd9..e190f872e1b 100644 --- a/resources/css/elements/buttons.css +++ b/resources/css/elements/buttons.css @@ -166,15 +166,15 @@ button { } button:not(:last-child):not(.active) { - @apply border-r-0; + @apply rtl:border-l-0 ltr:border-r-0; } button.active + button { - @apply border-l-0; + @apply rtl:border-r-0 ltr:border-l-0; } button:first-child { - @apply rounded-l; + @apply rtl:rounded-r ltr:rounded-l; } button.disabled { @@ -182,9 +182,9 @@ button { } button:last-child { - @apply rounded-r border-l; + @apply rtl:rounded-l ltr:rounded-r rtl:border-r ltr:border-l; padding: .475rem .5rem; - &.btn-flat { @apply border-r-0; } + &.btn-flat { @apply rtl:border-l-0 ltr:border-r-0; } } .btn:focus { @apply ring-inset; @@ -215,7 +215,7 @@ td .btn-icon { } .btn-with-icon .icon { - margin: -5px 7px 0 -3px; + margin: -5px 7px 0 -3px ; [dir="rtl"] & { margin: -5px -3px 0 7px ; } position: relative; top: 1px; } @@ -224,7 +224,7 @@ td .btn-icon { @apply flex items-center; svg { - margin: 0 8px 0 -4px; + margin: 0 8px 0 -4px ; [dir="rtl"] & { margin: 0 -4px 0 8px ; } height: 16px; width: 16px; @@ -247,7 +247,7 @@ td .btn-icon { ========================================================================== */ .btn-close { - @apply ml-4 text-center p-0 text-xl text-gray-600 rounded-full w-8 h-8 outline-none shrink-0 leading-none inline-flex items-center justify-center; + @apply rtl:mr-4 ltr:ml-4 text-center p-0 text-xl text-gray-600 rounded-full w-8 h-8 outline-none shrink-0 leading-none inline-flex items-center justify-center; &:hover { @apply bg-gray-400; diff --git a/resources/css/elements/dropdowns.css b/resources/css/elements/dropdowns.css index b7bd59899d1..f7d51f7aefd 100644 --- a/resources/css/elements/dropdowns.css +++ b/resources/css/elements/dropdowns.css @@ -6,7 +6,7 @@ @apply p-2; button, a { - @apply block w-full text-left rounded-sm text-xs font-normal px-2 py-1 text-gray-800; + @apply block w-full rtl:text-right ltr:text-left rounded-sm text-xs font-normal px-2 py-1 text-gray-800; line-height: 1.4; white-space: nowrap; @@ -16,12 +16,12 @@ .icon { color: #d0d4d7 !important; - margin-right: 6px; - margin-left: -4px; + margin-right: 6px ; [dir="rtl"] & { margin-left: 6px ; margin-right: 0 ; } + margin-left: -4px ; [dir="rtl"] & { margin-right: -4px ; margin-left: 0 ; } font-size: 12px; width: 20px; display: block; - float: left; + float: left ; [dir="rtl"] & { float: right ; } position: relative; top: 2px; line-height: inherit; @@ -43,6 +43,6 @@ } .align-left & { - right: auto; + right: auto ; [dir="rtl"] & { right: auto ; left: auto ; } } } diff --git a/resources/css/elements/forms.css b/resources/css/elements/forms.css index fdedd8ed8f5..b615e32a444 100644 --- a/resources/css/elements/forms.css +++ b/resources/css/elements/forms.css @@ -76,15 +76,19 @@ input.input-text-minimal:read-only, } .input-text:not(:first-child) { - @apply rounded-l-none border-l-0; + @apply rtl:rounded-r-none ltr:rounded-l-none rtl:border-r-0 ltr:border-l-0; } .input-text:not(:last-child) { - @apply rounded-r-none border-r-0; + @apply rtl:rounded-l-none ltr:rounded-r-none rtl:border-l-0 ltr:border-r-0; + } + + .input-text[dir='ltr']:not(:last-child) { + @apply rtl:rounded-r rtl:border-r; } .input-group-prepend, .input-group-append, .input-group-item { - @apply rounded-l px-2 border text-sm text-gray-800 select-none; + @apply rtl:rounded-r ltr:rounded-l px-2 border text-sm text-gray-800 select-none; background: linear-gradient(180deg, #fff, #f9fafb); border: 1px solid #c4cdd6; box-shadow: 0 1px 0 0 rgba(25,30,35,.05); @@ -104,7 +108,7 @@ input.input-text-minimal:read-only, } .input-group-item { - @apply rounded-l-none -mx-px; + @apply rtl:rounded-r-none ltr:rounded-l-none -mx-px; } button.input-group-item:hover:not(:disabled), @@ -118,13 +122,13 @@ input.input-text-minimal:read-only, } .input-group-append { - @apply rounded-l-none border-r-0; /* Rounded on the right side */ - &:last-child { @apply rounded-r border-r; } + @apply rtl:rounded-r-none ltr:rounded-l-none rtl:border-l-0 ltr:border-r-0; /* Rounded on the right side */ + &:last-child { @apply rtl:rounded-l ltr:rounded-r rtl:border-l ltr:border-r; } } > *:last-child[class*="input-group-"], > *:last-child [class*="input-group-"] { - @apply rounded-r; + @apply rtl:rounded-l ltr:rounded-r; } } @@ -151,7 +155,7 @@ input.input-text-minimal:read-only, } input { - @apply leading-normal mr-1; + @apply leading-normal rtl:ml-1 ltr:mr-1; } label { @@ -164,7 +168,7 @@ input.input-text-minimal:read-only, @apply flex items-center flex-wrap; .option { - @apply mr-4 mb-3; + @apply rtl:ml-4 ltr:mr-4 mb-3; &:first-child { @apply mt-3; } @@ -185,14 +189,14 @@ input.input-text-minimal:read-only, @apply rounded relative; select { - @apply text-sm text-gray-800 shadow-button cursor-pointer block w-full h-full text-left relative max-w-full; + @apply text-sm text-gray-800 shadow-button cursor-pointer block w-full h-full rtl:text-right ltr:text-left relative max-w-full; @apply select-none rounded leading-normal align-middle whitespace-nowrap appearance-none subpixel-antialiased; background: linear-gradient(180deg, #fff, #f9fafb); border: 1px solid #c4cdd6; height: 2.375rem; /* 38px */ letter-spacing: -0.01em; - padding: .475rem 1.75rem .475rem .75rem; + padding: .475rem 1.75rem .475rem .75rem ; [dir="rtl"] & { padding: .475rem .75rem .475rem 1.75rem ; } &:hover:not(:disabled), &:active:not(:disabled) { background: linear-gradient(180deg, #f9fafb, #f4f6f8); @@ -201,7 +205,7 @@ input.input-text-minimal:read-only, } .select-input-toggle { - @apply pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-900; + @apply pointer-events-none absolute inset-y-0 rtl:left-0 ltr:right-0 flex items-center px-2 text-gray-900; svg { @apply fill-current h-4 w-4; @@ -215,7 +219,7 @@ label .required { font-style: normal; + .localizable-icon { - margin-left: 5px; + margin-left: 5px ; [dir="rtl"] & { margin-right: 5px ; margin-left: 0 ; } } } diff --git a/resources/css/elements/tables.css b/resources/css/elements/tables.css index d0637f9cbab..d7fc2cc07b0 100644 --- a/resources/css/elements/tables.css +++ b/resources/css/elements/tables.css @@ -17,11 +17,11 @@ .data-list-bulk-actions { @apply bg-white absolute w-full py-2 z-1; - padding-left: 56px; + padding-left: 56px ; [dir="rtl"] & { padding-right: 56px ; padding-left: 0 ; } } .mode-grid .data-list-bulk-actions { - @apply bg-white w-full pt-3 pb-1 z-10 pl-4 static; + @apply bg-white w-full pt-3 pb-1 z-10 rtl:pr-4 ltr:pl-4 static; } .mode-grid .rotating-dots-button { @@ -29,11 +29,11 @@ } .data-list-footer { - @apply py-3 pr-4 flex items-center border-t; + @apply py-3 rtl:pl-4 ltr:pr-4 flex items-center border-t; } .data-table { - @apply text-left text-gray-700 outline-none max-w-full w-full; + @apply rtl:text-right ltr:text-left text-gray-700 outline-none max-w-full w-full; overflow-x: auto; thead { @@ -45,8 +45,8 @@ th { @apply font-medium px-4 py-3 whitespace-nowrap; - &:first-child { @apply rounded-tl-lg; } - &:last-child { @apply rounded-tr-lg; } + &:first-child { @apply rtl:rounded-tr-lg ltr:rounded-tl-lg; } + &:last-child { @apply rtl:rounded-tl-lg ltr:rounded-tr-lg; } &:hover { @apply text-gray-900; } @@ -55,7 +55,7 @@ @apply p-0 w-4; } .type-column { - text-align: right; + @apply ltr:text-right rtl:text-left; } } @@ -70,11 +70,11 @@ &:first-child { td:first-child, th:first-child { - @apply rounded-tl-md; + @apply rtl:rounded-tr-md ltr:rounded-tl-md; } td:last-child, th:last-child { - @apply rounded-tr-md; + @apply rtl:rounded-tl-md ltr:rounded-tr-md; } } @@ -82,11 +82,11 @@ @apply border-none; td:first-child, th:first-child { - @apply rounded-bl-md; + @apply rtl:rounded-br-md ltr:rounded-bl-md; } td:last-child, th:last-child { - @apply rounded-br-md; + @apply rtl:rounded-bl-md ltr:rounded-br-md; } } @@ -95,7 +95,7 @@ } th { - @apply py-2 pr-4; + @apply py-2 rtl:pl-4 ltr:pr-4; } td { @@ -103,12 +103,12 @@ } td.table-drag-handle { - @apply w-1 border-r h-full py-2 px-0; + @apply w-1 rtl:border-l ltr:border-r h-full py-2 px-0; } } .type-column { - text-align: right; + @apply ltr:text-right rtl:text-left; } } @@ -141,42 +141,42 @@ /* Sticky Meta Columns */ .data-table { thead th.checkbox-column { - @apply p-0 pr-2 sticky z-1 -left-px; + @apply p-0 rtl:pl-2 ltr:pr-2 sticky z-1 rtl:-right-px ltr:-left-px; width: 45px; min-width: 45px; &:after { - @apply absolute left-0 right-0 top-0 bottom-0 -z-1 ; + @apply absolute rtl:right-0 ltr:left-0 rtl:left-0 ltr:right-0 top-0 bottom-0 -z-1 ; content: ''; background-image: linear-gradient(to right, theme(colors.gray.100) 70%, theme(colors.gray.100 / 0%) 100%); } } thead th.actions-column { - @apply p-0 pl-2 text-right sticky -right-px; + @apply p-0 rtl:pr-2 ltr:pl-2 rtl:text-left ltr:text-right sticky rtl:-left-px ltr:-right-px; width: 45px; min-width: 45px; &:after { - @apply absolute left-0 right-0 top-0 bottom-0 -z-1; + @apply absolute rtl:right-0 ltr:left-0 rtl:left-0 ltr:right-0 top-0 bottom-0 -z-1; content: ''; background-image: linear-gradient(to left, theme(colors.gray.100) 70%, theme(colors.gray.100 / 0%) 100%); } } tbody th.checkbox-column { - @apply px-3 sticky -left-px; + @apply px-3 sticky rtl:-right-px ltr:-left-px; &:after { - @apply absolute left-0 right-0 top-0 bottom-0 -z-1; + @apply absolute rtl:right-0 ltr:left-0 rtl:left-0 ltr:right-0 top-0 bottom-0 -z-1; content: ''; background-image: linear-gradient(to right, rgba(255,255,255,1) 70%, rgba(255,255,255,0) 100%); } } tbody th.actions-column { - @apply p-0 pl-2 text-right sticky -right-px; + @apply p-0 rtl:pr-2 ltr:pl-2 rtl:text-left ltr:text-right sticky rtl:-left-px ltr:-right-px; min-width: 45px; width: 45px; &:after { - @apply absolute left-0 right-0 top-0 bottom-0 -z-1; + @apply absolute rtl:right-0 ltr:left-0 rtl:left-0 ltr:right-0 top-0 bottom-0 -z-1; content: ''; background-image: linear-gradient(to left, rgba(255,255,255,1) 70%, rgba(255,255,255,0) 100%); } @@ -223,7 +223,7 @@ } .data-list-filter-link { - @apply border-gray-400 text-gray-600 mr-2 p-3 pb-2; + @apply border-gray-400 text-gray-600 rtl:ml-2 ltr:mr-2 p-3 pb-2; &:hover { @apply border-b-3 text-gray-700; @@ -241,7 +241,7 @@ } td.table-drag-handle { - @apply w-3 border-r h-full p-2; + @apply w-3 rtl:border-l ltr:border-r h-full p-2; min-width: 16px; cursor: grab; background: theme('colors.gray.200') url('../../svg/icons/light/drag-dots.svg') center center no-repeat; @@ -263,7 +263,7 @@ td.table-drag-handle { text-align: center; height: 22px; width: 22px; - float: right; + float: right ; [dir="rtl"] & { float: left ; } cursor: pointer; &:hover { @@ -280,8 +280,8 @@ td.table-drag-handle { content: ""; position: absolute; bottom: -1px; - left: 0; - right: 0; + left: 0 ; [dir="rtl"] & { left: auto ; right: 0 ; } + right: 0 ; [dir="rtl"] & { right: auto ; left: 0 ; } height: 2px; } @@ -293,9 +293,9 @@ td.table-drag-handle { } .icon { position: relative; - float: right; + float: right ; [dir="rtl"] & { float: left ; } top: 6px; - right: 5px; + right: 5px ; [dir="rtl"] & { right: auto ; left: 5px ; } } .icon, .icon:before { @@ -309,7 +309,7 @@ td.table-drag-handle { } .column-actions { - text-align: right; + @apply ltr:text-right rtl:text-left; width: 30px; } @@ -319,7 +319,7 @@ table.control { .flush table.control { tr th:first-child { - padding-left: 30px; + padding-left: 30px ; [dir="rtl"] & { padding-right: 30px ; padding-left: 0 ; } } } @@ -343,7 +343,7 @@ table.control { .relationship-index-field { min-width: 10vw; .relationship-index-field-item { - @apply rounded bg-gray-100 border px-1 flex items-center text-2xs mr-1; + @apply rounded bg-gray-100 border px-1 flex items-center text-2xs rtl:ml-1 ltr:mr-1; a { @apply line-clamp-1; } diff --git a/resources/css/rtl.css b/resources/css/rtl.css new file mode 100644 index 00000000000..56eab3a7028 --- /dev/null +++ b/resources/css/rtl.css @@ -0,0 +1,30 @@ +[dir='rtl'] { + .space-x-1>:not([hidden])~:not([hidden]) { + margin-left: calc(.25rem * var(--tw-space-x-reverse)) !important; + margin-right: calc(.25rem * calc(1 - var(--tw-space-x-reverse))) !important; + } + .space-x-2>:not([hidden])~:not([hidden]) { + margin-left: calc(.5rem * var(--tw-space-x-reverse)) !important; + margin-right: calc(.5rem * calc(1 - var(--tw-space-x-reverse))) !important; + } + .space-x-3>:not([hidden])~:not([hidden]) { + margin-left: calc(.75rem * var(--tw-space-x-reverse))!important; + margin-right: calc(.75rem * calc(1 - var(--tw-space-x-reverse)))!important; + } + + input[name='url'] { + direction: ltr; + } + + .vc-arrow { + transform: rotate(180deg); + } +} +@media (min-width: 576px) { + [dir='rtl'] { + .sm\:space-x-3 > :not([hidden]) ~ :not([hidden]) { + margin-left: calc(.75rem * var(--tw-space-x-reverse)) !important; + margin-right: calc(.75rem * calc(1 - var(--tw-space-x-reverse))) !important; + } + } +} diff --git a/resources/css/tailwind.css b/resources/css/tailwind.css index dfeb0ff22ba..86aa4b63044 100644 --- a/resources/css/tailwind.css +++ b/resources/css/tailwind.css @@ -3,3 +3,4 @@ @import "tailwindcss/components"; @import "tailwindcss/utilities"; @import "core/utilities"; +@import "rtl"; diff --git a/resources/css/vendors/codemirror.css b/resources/css/vendors/codemirror.css index e5fd8737dae..bace7523671 100644 --- a/resources/css/vendors/codemirror.css +++ b/resources/css/vendors/codemirror.css @@ -36,7 +36,7 @@ .CodeMirror-linenumber { padding: 0 3px 0 5px; min-width: 20px; - text-align: right; + @apply text-right; color: #999; white-space: nowrap; } @@ -270,7 +270,7 @@ .CodeMirror-widget {} - .CodeMirror-rtl pre { direction: rtl; } + .CodeMirror-rtl pre { direction: ltr; } .CodeMirror-code { outline: none; diff --git a/resources/css/vendors/vue-select.css b/resources/css/vendors/vue-select.css index d232af064f8..a279b3159f5 100644 --- a/resources/css/vendors/vue-select.css +++ b/resources/css/vendors/vue-select.css @@ -1,5 +1,9 @@ .v-select { @apply rounded min-w-0 relative font-sans; + + [dir='rtl'] & { + direction: rtl; + } } .vs__fade-enter-active, @@ -68,7 +72,7 @@ .v-select .vs__selected-options { @apply appearance-none text-gray-800 text-sm; - @apply flex basis-1 grow rounded-l relative h-full py-1 pl-2 leading-normal; + @apply flex basis-1 grow rounded-s relative h-full py-1 rtl:pr-2 ltr:pl-2 leading-normal; width: calc(100% - 32px); transition: border-color .15s ease-in-out, @@ -81,12 +85,12 @@ .vs--single.vs--unsearchable .vs__selected-options { @apply clickable; - @apply flex flex-1 rounded-l relative h-full border-0; + @apply flex flex-1 rounded-s relative h-full border-0; width: calc(100% - 34px); } .vs__actions { - @apply flex items-center rounded-r; + @apply flex items-center rounded-e; height: 2.375rem; } @@ -100,7 +104,7 @@ .vs__open-indicator { @apply clickable; - @apply flex items-center rounded-r px-2 text-sm shrink-0 h-full border-r-0; + @apply flex items-center rounded-e px-2 text-sm shrink-0 h-full border-e-0; /* height: 2.375rem; */ } @@ -123,7 +127,7 @@ } .vs__clear { - @apply text-gray-900 pr-2 pl-px @xs:pl-2 cursor-pointer text-base bg-transparent shadow-none; + @apply text-gray-900 rtl:pl-2 ltr:pr-2 rtl:pr-px ltr:pl-px rtl:@xs:pr-2 ltr:@xs:pl-2 cursor-pointer text-base bg-transparent shadow-none; &:hover { @apply text-blue; } @@ -131,15 +135,18 @@ .vs__dropdown-menu { @apply block absolute z-top m-0 w-full; - @apply bg-white flex flex-col shadow-popover block p-4 rounded-md text-left; + @apply bg-white flex flex-col shadow-popover block p-4 rounded-md rtl:text-right ltr:text-left; top: 46px; - left: 0; padding: 0; max-height: 350px; min-width: 160px; overflow-y: auto; - text-align: left; + @apply ltr:text-left rtl:text-right; list-style: none; + + .v-select & { + @apply ltr:left-0 rtl:right-0; + } } .vs__no-options { @@ -162,13 +169,13 @@ .v-select:not(.vs--single) .vs__selected { @apply clickable; - @apply flex items-center text-sm rounded py-0 px-2 mr-2; + @apply flex items-center text-sm rounded py-0 px-2 rtl:ml-2 ltr:mr-2; &.sortable-item { @apply cursor-grab; } } .vs__deselect { - @apply flex items-center cursor-pointer text-gray-600 ml-1 p-0 outline-none; + @apply flex items-center cursor-pointer text-gray-600 rtl:mr-1 ltr:ml-1 p-0 outline-none; &:hover { @apply text-gray-700; @@ -212,7 +219,7 @@ .vs__search, .vs__search:focus { - @apply appearance-none text-sm text-gray-800 pr-2 border-transparent outline-none m-0 p-0 bg-transparent max-w-full; + @apply appearance-none text-sm text-gray-800 rtl:pl-2 ltr:pr-2 border-transparent outline-none m-0 p-0 bg-transparent max-w-full; line-height: 1.4; border-left: none; box-shadow: none; diff --git a/resources/js/components/AddonDetails.vue b/resources/js/components/AddonDetails.vue index 5149f516845..9d56a4775b1 100644 --- a/resources/js/components/AddonDetails.vue +++ b/resources/js/components/AddonDetails.vue @@ -2,7 +2,7 @@