@tsed/tailwind-formio 3.0.0-alpha.7 → 3.0.0-alpha.9
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 +4 -4
- package/styles/choices.css +44 -9
- package/styles/form.css +7 -2
- package/styles/index.css +1 -0
- package/styles/react-select.css +91 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/tailwind-formio",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.9",
|
|
4
4
|
"description": "Tailwind templates for form.io forms.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {},
|
|
54
54
|
"peerDependencies": {},
|
|
55
|
-
"repository": "https://github.com/
|
|
55
|
+
"repository": "https://github.com/tsedio/tsed-formio",
|
|
56
56
|
"bugs": {
|
|
57
|
-
"url": "https://github.com/
|
|
57
|
+
"url": "https://github.com/tsedio/tsed-formio/issues"
|
|
58
58
|
},
|
|
59
|
-
"homepage": "https://github.com/
|
|
59
|
+
"homepage": "https://github.com/tsedio/tsed-formio/tree/master/packages/tailwind-formio",
|
|
60
60
|
"author": "Romain Lenzotti",
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"tag": "alpha"
|
package/styles/choices.css
CHANGED
|
@@ -153,6 +153,7 @@
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
|
|
156
157
|
&[data-type=select-multiple] {
|
|
157
158
|
&:after {
|
|
158
159
|
@apply h-0 w-0 border-solid absolute border-0 h-full top-0 m-0 right-1.5;
|
|
@@ -168,14 +169,16 @@
|
|
|
168
169
|
@apply pb-0;
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
|
-
}
|
|
172
172
|
|
|
173
|
-
.choices__list--multiple .choices__item {
|
|
174
|
-
|
|
173
|
+
.choices__list--multiple .choices__item {
|
|
174
|
+
@apply rounded-md bg-primary border-0 text-xs py-1 px-2;
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
}
|
|
175
177
|
}
|
|
176
178
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
|
|
180
|
+
.is-open .choices__inner, .is-flipped.is-open .choices__inner {
|
|
181
|
+
@apply rounded-md;
|
|
179
182
|
}
|
|
180
183
|
|
|
181
184
|
.choices__list {
|
|
@@ -188,7 +191,8 @@
|
|
|
188
191
|
.choices__item {
|
|
189
192
|
@apply w-full;
|
|
190
193
|
}
|
|
191
|
-
|
|
194
|
+
|
|
195
|
+
.choices__item.choices__item--selectable {
|
|
192
196
|
margin-bottom: -0.375rem;
|
|
193
197
|
}
|
|
194
198
|
}
|
|
@@ -207,6 +211,7 @@
|
|
|
207
211
|
|
|
208
212
|
&.is-highlighted {
|
|
209
213
|
@apply bg-secondary-500 border-secondary-600;
|
|
214
|
+
|
|
210
215
|
.choices__button {
|
|
211
216
|
@apply border-secondary-600;
|
|
212
217
|
}
|
|
@@ -214,8 +219,8 @@
|
|
|
214
219
|
}
|
|
215
220
|
}
|
|
216
221
|
|
|
217
|
-
&--dropdown {
|
|
218
|
-
@apply invisible absolute z-5 w-full bg-white border-1 border-solid border-gray-300 rounded overflow-hidden break-all top-full;
|
|
222
|
+
&--dropdown[aria-expanded=true] {
|
|
223
|
+
@apply invisible absolute z-5 w-full bg-white border-1 border-solid border-gray-300 rounded-md overflow-hidden break-all top-full;
|
|
219
224
|
will-change: visibility;
|
|
220
225
|
|
|
221
226
|
&.is-active {
|
|
@@ -310,7 +315,6 @@
|
|
|
310
315
|
}
|
|
311
316
|
}
|
|
312
317
|
|
|
313
|
-
|
|
314
318
|
.choices__heading {
|
|
315
319
|
@apply font-semibold p-2.5 border-solid border-gray-200 text-gray-600;
|
|
316
320
|
font-size: inherit;
|
|
@@ -337,3 +341,34 @@
|
|
|
337
341
|
.choices__placeholder {
|
|
338
342
|
@apply opacity-50;
|
|
339
343
|
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Choices Size rendering
|
|
347
|
+
*/
|
|
348
|
+
.form-group.-size-small {
|
|
349
|
+
.choices {
|
|
350
|
+
.choices__inner {
|
|
351
|
+
@apply px-2;
|
|
352
|
+
padding-top: 3px;
|
|
353
|
+
min-height: 0;
|
|
354
|
+
font-size: 14px;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
&[data-type*=select-one] .choices__inner {
|
|
358
|
+
padding-bottom: 1px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.choices__list--multiple .choices__item {
|
|
362
|
+
@apply py-0.5 px-1 text-xs;
|
|
363
|
+
margin-bottom: 3px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.choices__input {
|
|
367
|
+
margin-bottom: 1px;
|
|
368
|
+
}
|
|
369
|
+
&[data-type*=select-multiple] .choices__button,
|
|
370
|
+
&[data-type*=text] .choices__button{
|
|
371
|
+
margin: 0 -2px 0 6px;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
package/styles/form.css
CHANGED
|
@@ -23,14 +23,19 @@
|
|
|
23
23
|
@apply mb-5;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
|
|
26
27
|
.form-control {
|
|
27
28
|
@apply appearance-none bg-white leading-normal px-3 py-2 block w-full rounded-md border-1 border-gray-300 shadow-sm;
|
|
29
|
+
}
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
.form-group.-size-small {
|
|
32
|
+
.form-control {
|
|
30
33
|
@apply px-2 py-1 text-sm;
|
|
34
|
+
min-height: 32px;
|
|
31
35
|
}
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
|
|
34
39
|
.form-control:disabled, .form-control[readonly] {
|
|
35
40
|
@apply bg-gray-200 border-transparent shadow-none;
|
|
36
41
|
}
|
|
@@ -148,7 +153,7 @@ textarea.form-control {
|
|
|
148
153
|
}
|
|
149
154
|
|
|
150
155
|
.field-required:after {
|
|
151
|
-
@apply z-
|
|
156
|
+
@apply z-0 ml-1;
|
|
152
157
|
}
|
|
153
158
|
|
|
154
159
|
.formio-component hr,
|
package/styles/index.css
CHANGED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
|
|
2
|
+
.react-select-container {
|
|
3
|
+
display: block;
|
|
4
|
+
flex: 1;
|
|
5
|
+
|
|
6
|
+
.react-select__control {
|
|
7
|
+
@apply appearance-none bg-white leading-normal w-full rounded-md border-1 border-gray-300 shadow-sm;
|
|
8
|
+
|
|
9
|
+
&--is-focused {
|
|
10
|
+
@apply outline-none border-primary-300 ring ring-primary-50 ring-opacity-50;
|
|
11
|
+
outline-offset: theme('outline.none[1]');
|
|
12
|
+
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
13
|
+
border-color: theme('colors.blue.600');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.react-select__multi-value {
|
|
18
|
+
@apply bg-primary-600 text-white rounded-md;
|
|
19
|
+
|
|
20
|
+
&__label {
|
|
21
|
+
@apply text-white text-xs py-1 px-2;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&__remove {
|
|
26
|
+
@apply opacity-80;
|
|
27
|
+
|
|
28
|
+
&:hover {
|
|
29
|
+
@apply bg-transparent text-white opacity-100;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.react-select__value-container.react-select__value-container--is-multi {
|
|
35
|
+
@apply px-2 py-1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.form-group.-with-before {
|
|
40
|
+
.react-select-container .react-select__control {
|
|
41
|
+
border-top-left-radius: 0;
|
|
42
|
+
border-bottom-left-radius: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.form-group.-with-after {
|
|
47
|
+
.react-select-container .react-select__control {
|
|
48
|
+
border-top-right-radius: 0;
|
|
49
|
+
border-bottom-right-radius: 0;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* React Select size rendering
|
|
55
|
+
*/
|
|
56
|
+
.form-group.-size-small {
|
|
57
|
+
.react-select-container {
|
|
58
|
+
.react-select__control {
|
|
59
|
+
min-height: 28px;
|
|
60
|
+
}
|
|
61
|
+
.react-select__indicator {
|
|
62
|
+
padding: 3px;
|
|
63
|
+
}
|
|
64
|
+
.react-select__multi-value {
|
|
65
|
+
&__label {
|
|
66
|
+
@apply text-white text-xs py-0.5 px-1;
|
|
67
|
+
font-weight: 600;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&__remove {
|
|
71
|
+
@apply opacity-80;
|
|
72
|
+
|
|
73
|
+
&:hover {
|
|
74
|
+
@apply bg-transparent text-white opacity-100;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.react-select__input-container {
|
|
80
|
+
margin-top:1px;
|
|
81
|
+
margin-bottom: 1px;
|
|
82
|
+
}
|
|
83
|
+
.react-select__single-value {
|
|
84
|
+
@apply text-sm;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.react-select__value-container.react-select__value-container--is-multi {
|
|
88
|
+
@apply px-1 py-0;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|