Skip to content

Commit 7f47ddb

Browse files
committed
add rtl support
1 parent b32b6cc commit 7f47ddb

File tree

7 files changed

+280
-204
lines changed

7 files changed

+280
-204
lines changed

resources/css/button.css

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,37 @@
22
display: flex;
33
gap: 1px;
44
}
5-
.btn-group button {
6-
border-radius: 0;
7-
}
5+
6+
7+
88
.btn-group button:first-of-type {
99
border-top-left-radius: 0.5rem;
1010
border-bottom-left-radius: 0.5rem;
11+
border-top-right-radius: 0;
12+
border-bottom-right-radius: 0;
13+
}
14+
15+
[dir="rtl"] .btn-group button:first-of-type {
16+
border-top-right-radius: 0.5rem;
17+
border-bottom-right-radius: 0.5rem;
18+
border-top-left-radius: 0;
19+
border-bottom-left-radius: 0;
1120
}
21+
1222
.btn-group button:last-of-type {
1323
border-top-right-radius: 0.5rem;
1424
border-bottom-right-radius: 0.5rem;
25+
border-top-left-radius: 0;
26+
border-bottom-left-radius: 0;
27+
}
28+
29+
[dir="rtl"] .btn-group button:last-of-type {
30+
border-top-left-radius: 0.5rem;
31+
border-bottom-left-radius: 0.5rem;
32+
border-top-right-radius: 0;
33+
border-bottom-right-radius: 0;
34+
}
35+
36+
.btn-group button:only-of-type {
37+
border-radius: 0.5rem !important;
1538
}

resources/css/jquery.nestable.css

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Nestable
33
*/
44

5-
.dd {
5+
.dd {
66
position: relative;
77
display: block;
88
margin: 0;
@@ -12,16 +12,24 @@
1212
font-size: 13px;
1313
line-height: 20px;
1414
}
15+
1516
.dd-list {
1617
display: block;
1718
position: relative;
1819
margin: 0;
1920
padding: 0;
2021
list-style: none;
2122
}
23+
2224
.dd-list .dd-list {
2325
padding-left: 30px;
2426
}
27+
28+
[dir="rtl"] .dd-list .dd-list {
29+
padding-left: unset !important;
30+
padding-right: 30px !important;
31+
}
32+
2533
.dd-empty,
2634
.dd-item,
2735
.dd-placeholder {
@@ -33,6 +41,7 @@
3341
font-size: 13px;
3442
line-height: 20px;
3543
}
44+
3645
.dd-handle {
3746
/* display: block;
3847
height: 30px;
@@ -46,19 +55,20 @@
4655
border-radius: 3px;
4756
box-sizing: border-box; */
4857
}
58+
4959
.dd-handle:hover {
5060
/* color: #2ea8e5;
5161
background: #fff; */
5262
}
53-
.dd-item > button {
63+
64+
.dd-item>button {
5465
position: relative;
5566
cursor: pointer;
5667
float: left;
5768
width: 25px;
5869
height: 20px;
5970
margin: 5px 0;
6071
padding: 0;
61-
text-indent: 100%;
6272
white-space: nowrap;
6373
overflow: hidden;
6474
border: 0;
@@ -68,29 +78,40 @@
6878
text-align: center;
6979
font-weight: 700;
7080
}
71-
.dd-item > button:before {
81+
82+
[dir="rtl"] .dd-item>button {
83+
float: right;
84+
}
85+
86+
.dd-item>button:before {
7287
display: block;
7388
position: absolute;
7489
width: 100%;
7590
text-align: center;
7691
text-indent: 0;
7792
}
78-
.dd-item > button.dd-expand:before {
93+
94+
.dd-item>button.dd-expand:before {
7995
content: "+";
8096
}
81-
.dd-item > button.dd-collapse:before {
97+
98+
.dd-item>button.dd-collapse:before {
8299
content: "-";
83100
}
101+
84102
.dd-expand {
85103
display: none;
86104
}
105+
87106
.dd-collapsed .dd-collapse,
88107
.dd-collapsed .dd-list {
89108
display: none;
90109
}
110+
91111
.dd-collapsed .dd-expand {
92112
display: block;
93113
}
114+
94115
.dd-empty,
95116
.dd-placeholder {
96117
margin: 5px 0;
@@ -101,24 +122,29 @@
101122
box-sizing: border-box;
102123
-moz-box-sizing: border-box;
103124
}
125+
104126
.dd-empty {
105127
border: 1px dashed #bbb;
106128
min-height: 100px;
107129
background-color: #e5e5e5;
108130
background-size: 60px 60px;
109131
background-position: 0 0, 30px 30px;
110132
}
133+
111134
.dd-dragel {
112135
position: absolute;
113136
pointer-events: none;
114137
z-index: 9999;
115138
}
116-
.dd-dragel > .dd-item .dd-handle {
139+
140+
.dd-dragel>.dd-item .dd-handle {
117141
margin-top: 0;
118142
}
143+
119144
.dd-dragel .dd-handle {
120145
box-shadow: 2px 4px 6px 0 rgba(0, 0, 0, 0.1);
121146
}
147+
122148
.dd-nochildren .dd-placeholder {
123149
display: none;
124150
}
@@ -129,12 +155,15 @@
129155
.dd {
130156
max-width: initial;
131157
}
158+
132159
.dd-handle {
133160
height: 55px;
134161
}
162+
135163
.dd-handle:hover {
136164
/* color: initial; */
137165
}
138-
.dd-item > button {
166+
167+
.dd-item>button {
139168
height: 45px;
140-
}
169+
}

resources/dist/filament-tree.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/dist/filament-tree.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)