testio-tailwind 0.8.2 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/assets/stylesheets/components/buttons.css +36 -33
- package/src/assets/stylesheets/components/forms.css +3 -2
- package/src/assets/stylesheets/components/modals.css +9 -10
- package/src/assets/stylesheets/components/select.css +9 -3
- package/src/assets/stylesheets/components/select2.css +10 -11
- package/src/assets/stylesheets/components/trix_editor.css +23 -11
- package/src/pages/forms/select_native.haml +1 -1
- package/src/pages/forms/trix_editor.pug +11 -0
- package/src/static/app.compiled.css +157 -65
- package/src/static/app.compiled.css.map +1 -1
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
1
|
.btn,
|
|
3
|
-
input.btn,
|
|
2
|
+
input.btn,
|
|
4
3
|
input[type="submit"].btn {
|
|
5
4
|
@apply inline-flex justify-start items-center h-btn px-md text-buttons whitespace-nowrap text-primary border-0 rounded cursor-pointer select-none;
|
|
6
5
|
|
|
7
|
-
&:hover,
|
|
6
|
+
&:hover,
|
|
7
|
+
&:focus,
|
|
8
|
+
&:active {
|
|
8
9
|
@apply text-white bg-link-hover border-link-hover;
|
|
9
10
|
.icon {
|
|
10
11
|
@apply text-white;
|
|
@@ -12,8 +13,8 @@ input[type="submit"].btn {
|
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
.btn-primary,
|
|
16
|
-
input.btn-primary,
|
|
16
|
+
.btn-primary,
|
|
17
|
+
input.btn-primary,
|
|
17
18
|
input[type="submit"].btn-primary {
|
|
18
19
|
@apply text-white bg-primary;
|
|
19
20
|
}
|
|
@@ -67,13 +68,13 @@ input[type="submit"].btn-ghost-inverted {
|
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
.btn-danger,
|
|
70
|
-
input[type="submit"].btn-danger,
|
|
71
|
+
input[type="submit"].btn-danger,
|
|
71
72
|
.btn-warning,
|
|
72
73
|
input[type="submit"].btn-warning {
|
|
73
74
|
@apply text-white bg-danger;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
.btn-success,
|
|
77
|
+
.btn-success,
|
|
77
78
|
input[type="submit"].btn-success {
|
|
78
79
|
@apply text-white bg-success;
|
|
79
80
|
}
|
|
@@ -107,7 +108,7 @@ input[type="submit"].btn-white-secondary {
|
|
|
107
108
|
@apply h-btn-lg w-btn-lg p-0;
|
|
108
109
|
|
|
109
110
|
.icon {
|
|
110
|
-
@apply m-0;
|
|
111
|
+
@apply m-0;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
|
|
@@ -120,7 +121,6 @@ input[type="submit"].btn-white-secondary {
|
|
|
120
121
|
line-height: 1.2;
|
|
121
122
|
}
|
|
122
123
|
|
|
123
|
-
|
|
124
124
|
.btn-dashed,
|
|
125
125
|
input[type="submit"].btn-dashed {
|
|
126
126
|
@apply border-primary border-dashed border-1 bg-transparent;
|
|
@@ -143,38 +143,38 @@ input[type="submit"].btn-dashed {
|
|
|
143
143
|
|
|
144
144
|
.btn-intercom {
|
|
145
145
|
@apply flex items-center justify-center w-btn h-btn rounded-full bg-info hover:bg-link-hover focus:bg-link-hover;
|
|
146
|
-
box-shadow: 4px 4px 8px rgba(0, 0, 0, .2);
|
|
146
|
+
box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.2);
|
|
147
147
|
|
|
148
148
|
.icon-intercom::before {
|
|
149
149
|
@apply text-white;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
|
|
154
|
-
.btn
|
|
155
|
-
|
|
156
|
-
button
|
|
157
|
-
|
|
158
|
-
.btn
|
|
159
|
-
.btn-sm
|
|
160
|
-
.btn-sm
|
|
161
|
-
.btn-
|
|
162
|
-
.btn-lg-wrapper
|
|
163
|
-
.btn-lg-wrapper
|
|
164
|
-
.btn-lg
|
|
165
|
-
.btn-lg
|
|
166
|
-
.btn-lg
|
|
167
|
-
.btn-
|
|
168
|
-
.btn-xl
|
|
169
|
-
.btn-xl
|
|
170
|
-
.btn
|
|
171
|
-
input
|
|
172
|
-
input.btn[disabled],
|
|
173
|
-
input.btn-sm[disabled],
|
|
153
|
+
.btn:disabled,
|
|
154
|
+
.btn[disabled],
|
|
155
|
+
button:disabled,
|
|
156
|
+
button[disabled],
|
|
157
|
+
.btn.disabled,
|
|
158
|
+
.btn-sm:disabled,
|
|
159
|
+
.btn-sm[disabled],
|
|
160
|
+
.btn-sm.disabled,
|
|
161
|
+
.btn-lg-wrapper:disabled .btn-lg,
|
|
162
|
+
.btn-lg-wrapper[disabled] .btn-lg,
|
|
163
|
+
.btn-lg-wrapper.disabled .btn-lg,
|
|
164
|
+
.btn-lg:disabled,
|
|
165
|
+
.btn-lg[disabled],
|
|
166
|
+
.btn-lg.disabled,
|
|
167
|
+
.btn-xl:disabled,
|
|
168
|
+
.btn-xl[disabled],
|
|
169
|
+
.btn-xl.disabled,
|
|
170
|
+
input[type="submit"].btn[disabled],
|
|
171
|
+
input.btn[disabled],
|
|
172
|
+
input.btn-sm[disabled],
|
|
174
173
|
input.btn-lg[disabled] {
|
|
175
174
|
@apply text-disabled border border-disabled bg-pattern-disabled-bright hover:bg-pattern-disabled-bright bg-transparent hover:bg-transparent hover:text-disabled shadow-none cursor-not-allowed;
|
|
176
175
|
|
|
177
|
-
&:hover .icon,
|
|
176
|
+
&:hover .icon,
|
|
177
|
+
&:focus .icon {
|
|
178
178
|
@apply text-disabled;
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -187,7 +187,10 @@ input.btn-lg[disabled] {
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
button {
|
|
191
|
+
@apply font-semibold;
|
|
192
|
+
}
|
|
190
193
|
|
|
191
194
|
.btn-gray {
|
|
192
195
|
@apply bg-gray-lighter text-black;
|
|
193
|
-
}
|
|
196
|
+
}
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.form-group .form-label
|
|
19
|
+
.form-group .form-label,
|
|
20
|
+
.form-group .field_with_errors {
|
|
20
21
|
@apply pb-xxs md:pt-sm;
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
.form-hint {
|
|
49
|
-
@apply flex items-
|
|
50
|
+
@apply flex items-center text-sm mt-xs mb-xs;
|
|
50
51
|
|
|
51
52
|
&::before {
|
|
52
53
|
@apply inline-block h-icon w-icon mr-xs bg-gray;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
.modal-wrapper {
|
|
3
2
|
position: relative;
|
|
4
3
|
}
|
|
@@ -8,13 +7,14 @@
|
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
.modal-wrapper[open] .modal-trigger::before {
|
|
11
|
-
@apply fixed w-screen h-screen top-0 left-0 z-
|
|
10
|
+
@apply fixed w-screen h-screen top-0 left-0 z-50;
|
|
12
11
|
content: "";
|
|
13
|
-
background-color: rgba(0,0,0
|
|
12
|
+
background-color: rgba(0, 0, 0, 0.75);
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
.modal-wrapper[open] .modal-container {
|
|
17
|
-
@apply fixed flex justify-center items-start top-0 left-0 w-screen h-screen p-lg
|
|
16
|
+
@apply fixed flex justify-center items-start top-0 left-0 w-screen h-screen p-lg overflow-y-scroll pointer-events-none;
|
|
17
|
+
z-index: 51;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.modal-wrapper[open] .modal {
|
|
@@ -25,16 +25,15 @@
|
|
|
25
25
|
height: auto;
|
|
26
26
|
max-width: 100vw;
|
|
27
27
|
pointer-events: all;
|
|
28
|
-
z-index:
|
|
28
|
+
z-index: 52;
|
|
29
29
|
|
|
30
30
|
&.modal-sm {
|
|
31
31
|
@apply w-modal-sm;
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
&.modal-lg {
|
|
35
35
|
@apply w-modal-lg;
|
|
36
36
|
}
|
|
37
|
-
|
|
38
37
|
}
|
|
39
38
|
|
|
40
39
|
.modal-wrapper[open] .modal-header {
|
|
@@ -82,15 +81,15 @@
|
|
|
82
81
|
opacity: 0.25;
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
.btn.disabled,
|
|
84
|
+
.btn.disabled,
|
|
85
|
+
:disabled.btn {
|
|
86
86
|
@apply bg-transparent text-disabled;
|
|
87
87
|
background-image: url("/assets/images/btn-disabled-petrol.png");
|
|
88
88
|
background-repeat: repeat;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
|
|
92
91
|
/* prevent autoclosing when clicking on fade bg */
|
|
93
92
|
|
|
94
93
|
.modal-wrapper[open].fade-close-disabled .modal-trigger::before {
|
|
95
94
|
@apply pointer-events-none;
|
|
96
|
-
}
|
|
95
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
.form-select {
|
|
3
2
|
@apply w-full;
|
|
4
3
|
}
|
|
@@ -45,7 +44,14 @@ select {
|
|
|
45
44
|
|
|
46
45
|
.form-select-native option {
|
|
47
46
|
@apply appearance-none py-xxs;
|
|
48
|
-
&:hover,
|
|
47
|
+
&:hover,
|
|
48
|
+
&:focus {
|
|
49
49
|
@apply bg-link-hover;
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/*///// Validation errors /////*/
|
|
54
|
+
|
|
55
|
+
.form-select-native .field_with_errors select {
|
|
56
|
+
@apply bg-danger border-danger;
|
|
57
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
select.select2 {
|
|
3
2
|
display: none !important;
|
|
4
3
|
}
|
|
@@ -29,7 +28,6 @@ select.select2 {
|
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
.select2-container {
|
|
32
|
-
|
|
33
31
|
.select2-selection,
|
|
34
32
|
.select2-dropdown,
|
|
35
33
|
.select2-search__field {
|
|
@@ -67,7 +65,6 @@ select.select2 {
|
|
|
67
65
|
/*/ Dropdown open */
|
|
68
66
|
|
|
69
67
|
&.select2-container--open {
|
|
70
|
-
|
|
71
68
|
.select2-selection {
|
|
72
69
|
@apply border-link-hover;
|
|
73
70
|
}
|
|
@@ -92,7 +89,6 @@ select.select2 {
|
|
|
92
89
|
}
|
|
93
90
|
|
|
94
91
|
.select2-container {
|
|
95
|
-
|
|
96
92
|
.select2-selection,
|
|
97
93
|
.select2-search__field {
|
|
98
94
|
@apply bg-primary border-primary text-white;
|
|
@@ -119,7 +115,6 @@ select.select2 {
|
|
|
119
115
|
}
|
|
120
116
|
|
|
121
117
|
&.select2-container--open {
|
|
122
|
-
|
|
123
118
|
&.select2-container--below .select2-selection {
|
|
124
119
|
@apply border-primary;
|
|
125
120
|
}
|
|
@@ -142,10 +137,8 @@ select.select2 {
|
|
|
142
137
|
@apply py-xs px-sm;
|
|
143
138
|
}
|
|
144
139
|
|
|
145
|
-
|
|
146
140
|
/*///// Multi select /////*/
|
|
147
141
|
|
|
148
|
-
|
|
149
142
|
.select2-selection.select2-selection--multiple {
|
|
150
143
|
@apply min-h-btn p-xs;
|
|
151
144
|
}
|
|
@@ -167,7 +160,6 @@ select.select2 {
|
|
|
167
160
|
width: 100% !important;
|
|
168
161
|
}
|
|
169
162
|
|
|
170
|
-
|
|
171
163
|
/*/ multi select items */
|
|
172
164
|
|
|
173
165
|
.select2-container--testio li.select2-selection__choice {
|
|
@@ -200,7 +192,6 @@ select.select2 {
|
|
|
200
192
|
}
|
|
201
193
|
}
|
|
202
194
|
|
|
203
|
-
|
|
204
195
|
/*///// Optgroups /////*/
|
|
205
196
|
|
|
206
197
|
.select2-results__group {
|
|
@@ -215,14 +206,13 @@ select.select2 {
|
|
|
215
206
|
overflow: visible;
|
|
216
207
|
}
|
|
217
208
|
|
|
218
|
-
|
|
219
209
|
/*///// Disabled /////*/
|
|
220
210
|
|
|
221
211
|
.select2-container--disabled .select2-selection {
|
|
222
212
|
@apply border border-bordercolor text-disabled cursor-not-allowed bg-transparent;
|
|
223
213
|
background-image: url("/assets/images/pattern-striped-bright.png");
|
|
224
214
|
background-repeat: repeat;
|
|
225
|
-
&:hover{
|
|
215
|
+
&:hover {
|
|
226
216
|
@apply text-disabled;
|
|
227
217
|
}
|
|
228
218
|
&::before {
|
|
@@ -250,3 +240,12 @@ select.select2 {
|
|
|
250
240
|
.multi-select-inputs .select2-container {
|
|
251
241
|
@apply m-xs mr-0;
|
|
252
242
|
}
|
|
243
|
+
|
|
244
|
+
/*///// Validation errors /////*/
|
|
245
|
+
|
|
246
|
+
.form-select .field_with_errors .select2-container {
|
|
247
|
+
.select2-selection,
|
|
248
|
+
.select2-search__field {
|
|
249
|
+
@apply bg-danger border-danger;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
1
|
.form-group.trix-editor {
|
|
3
2
|
@apply gap-grid-gutter grid-rows-auto;
|
|
4
3
|
grid-template-rows: auto;
|
|
5
4
|
@screen md {
|
|
6
|
-
grid-template-areas:
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
grid-template-areas:
|
|
6
|
+
"label trix-toolbar"
|
|
7
|
+
"label trix-editor";
|
|
8
|
+
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
.trix-editor .trix-content {
|
|
12
12
|
@apply -mt-grid-gutter;
|
|
13
13
|
@screen md {
|
|
14
14
|
grid-area: trix-editor;
|
|
15
|
-
|
|
15
|
+
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.trix-editor .form-control {
|
|
@@ -23,7 +23,7 @@ trix-toolbar {
|
|
|
23
23
|
@apply border border-bordercolor rounded-t;
|
|
24
24
|
@screen md {
|
|
25
25
|
grid-area: trix-toolbar;
|
|
26
|
-
|
|
26
|
+
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
trix-toolbar .trix-button-group {
|
|
@@ -36,8 +36,8 @@ trix-toolbar .trix-button-row {
|
|
|
36
36
|
|
|
37
37
|
.trix-button-row::-webkit-scrollbar {
|
|
38
38
|
display: none;
|
|
39
|
-
-ms-overflow-style: none;
|
|
40
|
-
scrollbar-width: none;
|
|
39
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
40
|
+
scrollbar-width: none; /* Firefox */
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.trix-button-group.trix-button-group--history-tools {
|
|
@@ -47,7 +47,8 @@ trix-toolbar .trix-button-row {
|
|
|
47
47
|
trix-toolbar .trix-button {
|
|
48
48
|
@apply inline-flex justify-center items-center flex-shrink-0 w-btn-sm h-btn-sm min-w-btn-sm border-0 rounded bg-transparent;
|
|
49
49
|
font-size: 0; /* Fix for safari bug, we don't need to show any text in those buttons */
|
|
50
|
-
&:hover,
|
|
50
|
+
&:hover,
|
|
51
|
+
&:focus {
|
|
51
52
|
@apply text-white bg-link-hover;
|
|
52
53
|
}
|
|
53
54
|
&::before {
|
|
@@ -124,7 +125,6 @@ trix-toolbar .trix-button--icon-attach::before {
|
|
|
124
125
|
mask-image: url("/assets/images/redo.svg");
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
|
|
128
128
|
/*//// Add link/URL popover ////*/
|
|
129
129
|
|
|
130
130
|
trix-toolbar .trix-dialog {
|
|
@@ -147,7 +147,6 @@ trix-toolbar .trix-input--dialog {
|
|
|
147
147
|
@apply w-full h-btn-sm px-xs border border-bordercolor rounded;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
|
|
151
150
|
/*//// Attachments ////*/
|
|
152
151
|
|
|
153
152
|
trix-editor .attachment-gallery .attachment,
|
|
@@ -172,3 +171,16 @@ trix-editor .attachment__progress {
|
|
|
172
171
|
@apply h-progress-bar-thin-height bg-info;
|
|
173
172
|
}
|
|
174
173
|
}
|
|
174
|
+
|
|
175
|
+
/*///// Validation errors /////*/
|
|
176
|
+
|
|
177
|
+
.field_with_errors {
|
|
178
|
+
trix-toolbar {
|
|
179
|
+
@apply mb-5;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.trix-content,
|
|
183
|
+
select {
|
|
184
|
+
@apply border-red-500 border-1;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
@@ -33,7 +33,7 @@ title: Select native
|
|
|
33
33
|
%option{value:"Option 6"} WHY
|
|
34
34
|
%option{value:"Option 7"} XYZ
|
|
35
35
|
.form-hint.error
|
|
36
|
-
You made a mistake
|
|
36
|
+
You made a mistake
|
|
37
37
|
%p.mt-3 Use opt-groups to display hints inside the select
|
|
38
38
|
.form-group.form-select-native
|
|
39
39
|
%label.form-label Optgroup select
|
|
@@ -8,3 +8,14 @@ title: Trix Editor
|
|
|
8
8
|
input#space_branding_full_description_trix_input_space_branding_8(type='hidden', name='space_branding[full_description]', value='<h1><strong>Some text before image</strong></h1><div><br><i>some italic text after</i><br><br>LIst </div><ul><li>1<ul><li>2</li></ul></li><li>3<ul><li>4<br><br><br></li></ul></li></ul><div>Numbered list</div><div><br></div><ol><li>one<ol><li>two</li></ol></li><li>three<ol><li>four<br><br></li></ol></li></ol><div>Little bit of code<br><br></div><pre>def add(b, c)\b + c\end</pre>', autocomplete='off')
|
|
9
9
|
trix-editor#space_branding_full_description.form-control.trix-content
|
|
10
10
|
|
|
11
|
+
|
|
12
|
+
p.mt-3 If you have some errors on the field
|
|
13
|
+
|
|
14
|
+
.form-group.trix-editor
|
|
15
|
+
.field_with_errors
|
|
16
|
+
label.form-label(for='space_branding_full_description') Full description
|
|
17
|
+
.field_with_errors
|
|
18
|
+
input#space_branding_full_description_trix_input_space_branding_8(type='hidden', name='space_branding[full_description]', value='<h1><strong>Some text before image</strong></h1><div><br><i>some italic text after</i><br><br>LIst </div><ul><li>1<ul><li>2</li></ul></li><li>3<ul><li>4<br><br><br></li></ul></li></ul><div>Numbered list</div><div><br></div><ol><li>one<ol><li>two</li></ol></li><li>three<ol><li>four<br><br></li></ol></li></ol><div>Little bit of code<br><br></div><pre>def add(b, c)\b + c\end</pre>', autocomplete='off')
|
|
19
|
+
trix-editor#space_branding_full_description.form-control.trix-content
|
|
20
|
+
.form-hint.error can't be blank
|
|
21
|
+
|