@tsed/tailwind-formio 3.0.0-rc.8 → 3.0.0

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.
@@ -68,7 +68,9 @@ const e = {
68
68
  reset: "rotate-ccw",
69
69
  loader: "loader-circle",
70
70
  detail: "file-text",
71
- spreadsheet: "file-spreadsheet"
71
+ spreadsheet: "file-spreadsheet",
72
+ "sort-up": "arrow-up-narrow-wide",
73
+ "sort-down": "arrow-down-narrow-wide"
72
74
  };
73
75
  export {
74
76
  e as LucideIconsMapping
@@ -1 +1 @@
1
- {"version":3,"file":"lucideIconsMapping.js","sources":["../../../src/templates/tailwind/lucideIconsMapping.ts"],"sourcesContent":["export const LucideIconsMapping: Record<string, any> = {\n remove: \"trash\",\n \"question-sign\": \"circle-question-mark\",\n \"new-window\": \"app-window\",\n \"minus-square-o\": \"square-minus\",\n cog: \"cog\",\n move: \"move\",\n wrench: \"wrench\",\n save: \"save\",\n copy: \"copy\",\n calendar: \"calendar\",\n file: \"file\",\n wpforms: \"picture-in-picture-2\",\n \"files-o\": \"files\",\n refresh: \"refresh-cw\",\n indent: \"list-indent-increase\",\n tasks: \"rows-2\",\n th: \"grid-3x3\",\n \"th-list\": \"panel-top-open\",\n \"folder-open\": \"folder-open\",\n \"folder-o\": \"folder\",\n \"user-secret\": \"user-round-x\",\n table: \"table\",\n pencil: \"pencil\",\n code: \"code\",\n terminal: \"terminal\",\n home: \"house\",\n html5: \"file-text\",\n list: \"list\",\n usd: \"dollar-sign\",\n hashtag: \"hash\",\n tags: \"tags\",\n at: \"at-sign\",\n font: \"type\",\n asterisk: \"asterisk\",\n plus: \"plus\",\n \"plus-square\": \"list-check\",\n \"plus-square-o\": \"square-plus\",\n \"dot-circle-o\": \"circle-check\",\n \"phone-square\": \"phone\",\n \"clock-o\": \"clock\",\n link: \"link\",\n columns: \"columns-3\",\n \"th-large\": \"layout-grid\",\n \"list-alt\": \"app-window\",\n \"square-o\": \"square\",\n cubes: \"boxes\",\n stop: \"square\",\n \"check-square\": \"square-check\",\n \"remove-circle\": \"x\",\n \"circle-xmark\": \"circle-x\",\n bars: \"list\",\n edit: \"square-pen\",\n time: \"clock\",\n microphone: \"mic\",\n video: \"video\",\n \"times-circle\": \"circle-x\",\n minus: \"minus\",\n circle: \"circle\",\n \"search-plus\": \"zoom-in\",\n \"search-minus\": \"zoom-out\",\n \"hand-paper-o\": \"pointer\",\n undo: \"undo-2\",\n redo: \"redo-2\",\n repeat: \"repeat\",\n data: \"database\",\n \"paper-plane\": \"send\",\n reset: \"rotate-ccw\",\n loader: \"loader-circle\",\n detail: \"file-text\",\n spreadsheet: \"file-spreadsheet\"\n};\n"],"names":["LucideIconsMapping"],"mappings":"AAAO,MAAMA,IAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,KAAK;AAAA,EACL,SAAS;AAAA,EACT,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,eAAe;AAAA,EACf,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AACf;"}
1
+ {"version":3,"file":"lucideIconsMapping.js","sources":["../../../src/templates/tailwind/lucideIconsMapping.ts"],"sourcesContent":["export const LucideIconsMapping: Record<string, any> = {\n remove: \"trash\",\n \"question-sign\": \"circle-question-mark\",\n \"new-window\": \"app-window\",\n \"minus-square-o\": \"square-minus\",\n cog: \"cog\",\n move: \"move\",\n wrench: \"wrench\",\n save: \"save\",\n copy: \"copy\",\n calendar: \"calendar\",\n file: \"file\",\n wpforms: \"picture-in-picture-2\",\n \"files-o\": \"files\",\n refresh: \"refresh-cw\",\n indent: \"list-indent-increase\",\n tasks: \"rows-2\",\n th: \"grid-3x3\",\n \"th-list\": \"panel-top-open\",\n \"folder-open\": \"folder-open\",\n \"folder-o\": \"folder\",\n \"user-secret\": \"user-round-x\",\n table: \"table\",\n pencil: \"pencil\",\n code: \"code\",\n terminal: \"terminal\",\n home: \"house\",\n html5: \"file-text\",\n list: \"list\",\n usd: \"dollar-sign\",\n hashtag: \"hash\",\n tags: \"tags\",\n at: \"at-sign\",\n font: \"type\",\n asterisk: \"asterisk\",\n plus: \"plus\",\n \"plus-square\": \"list-check\",\n \"plus-square-o\": \"square-plus\",\n \"dot-circle-o\": \"circle-check\",\n \"phone-square\": \"phone\",\n \"clock-o\": \"clock\",\n link: \"link\",\n columns: \"columns-3\",\n \"th-large\": \"layout-grid\",\n \"list-alt\": \"app-window\",\n \"square-o\": \"square\",\n cubes: \"boxes\",\n stop: \"square\",\n \"check-square\": \"square-check\",\n \"remove-circle\": \"x\",\n \"circle-xmark\": \"circle-x\",\n bars: \"list\",\n edit: \"square-pen\",\n time: \"clock\",\n microphone: \"mic\",\n video: \"video\",\n \"times-circle\": \"circle-x\",\n minus: \"minus\",\n circle: \"circle\",\n \"search-plus\": \"zoom-in\",\n \"search-minus\": \"zoom-out\",\n \"hand-paper-o\": \"pointer\",\n undo: \"undo-2\",\n redo: \"redo-2\",\n repeat: \"repeat\",\n data: \"database\",\n \"paper-plane\": \"send\",\n reset: \"rotate-ccw\",\n loader: \"loader-circle\",\n detail: \"file-text\",\n spreadsheet: \"file-spreadsheet\",\n \"sort-up\": \"arrow-up-narrow-wide\",\n \"sort-down\": \"arrow-down-narrow-wide\"\n};\n"],"names":["LucideIconsMapping"],"mappings":"AAAO,MAAMA,IAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,KAAK;AAAA,EACL,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AAAA,EACN,KAAK;AAAA,EACL,SAAS;AAAA,EACT,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,WAAW;AAAA,EACX,MAAM;AAAA,EACN,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,gBAAgB;AAAA,EAChB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,eAAe;AAAA,EACf,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,WAAW;AAAA,EACX,aAAa;AACf;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/tailwind-formio",
3
- "version": "3.0.0-rc.8",
3
+ "version": "3.0.0",
4
4
  "description": "Tailwind templates for form.io forms.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -66,8 +66,5 @@
66
66
  "url": "https://github.com/tsedio/tsed-formio/issues"
67
67
  },
68
68
  "homepage": "https://github.com/tsedio/tsed-formio/tree/master/packages/tailwind-formio",
69
- "author": "Romain Lenzotti",
70
- "publishConfig": {
71
- "tag": "rc"
72
- }
69
+ "author": "Romain Lenzotti"
73
70
  }
@@ -68,5 +68,7 @@ export const LucideIconsMapping: Record<string, any> = {
68
68
  reset: "rotate-ccw",
69
69
  loader: "loader-circle",
70
70
  detail: "file-text",
71
- spreadsheet: "file-spreadsheet"
71
+ spreadsheet: "file-spreadsheet",
72
+ "sort-up": "arrow-up-narrow-wide",
73
+ "sort-down": "arrow-down-narrow-wide"
72
74
  };
@@ -1,6 +1,7 @@
1
1
  .choices {
2
2
  @apply relative mb-4;
3
3
  font-size: inherit;
4
+ overflow: hidden;
4
5
 
5
6
  &:focus {
6
7
  @apply outline-none;
@@ -19,6 +20,10 @@
19
20
  @apply mb-0;
20
21
  }
21
22
 
23
+ &.is-open {
24
+ overflow: visible;
25
+ }
26
+
22
27
  &__inner {
23
28
  @apply appearance-none bg-white leading-normal px-3 py-2 pb-0 block w-full rounded-md border-1 border-gray-300 shadow-sm;
24
29
  min-height: 42px;
@@ -68,7 +73,10 @@
68
73
  }
69
74
 
70
75
  [hidden] {
71
- display: none !important
76
+ position: absolute;
77
+ inset: 0;
78
+ pointer-events: none;
79
+ opacity: 0;
72
80
  }
73
81
 
74
82
  &[data-type*=select-one] {
@@ -104,7 +112,8 @@
104
112
  }
105
113
  }
106
114
 
107
- .choices__item[data-value=''] .choices__button {
115
+ .choices__item[data-value=''] .choices__button,
116
+ .choices__item[data-placeholder] .choices__button {
108
117
  @apply hidden;
109
118
  }
110
119
 
@@ -176,25 +185,29 @@
176
185
  }
177
186
  }
178
187
 
179
-
180
- .is-open .choices__inner, .is-flipped.is-open .choices__inner {
181
- @apply rounded-md;
182
- }
183
-
184
188
  .choices__list {
185
189
  @apply m-0 pl-0;
186
190
  list-style: none;
187
191
 
192
+ &[aria-expanded] {
193
+ @apply absolute z-5 w-full bg-white border-1 border-solid border-gray-300 overflow-hidden break-all top-full;
194
+ margin-top: -1px;
195
+ border-bottom-left-radius: 0.375rem;
196
+ border-bottom-right-radius: 0.375rem;
197
+ display: none;
198
+
199
+ &.is-active {
200
+ display: block;
201
+ }
202
+ }
203
+
188
204
  &--single {
189
- @apply inline-block p-0 w-full;
205
+ @apply inline-block w-full;
206
+ padding: 4px 16px 4px 4px;
190
207
 
191
208
  .choices__item {
192
209
  @apply w-full;
193
210
  }
194
-
195
- .choices__item.choices__item--selectable {
196
- margin-bottom: -0.375rem;
197
- }
198
211
  }
199
212
 
200
213
  &--multiple {
@@ -219,23 +232,12 @@
219
232
  }
220
233
  }
221
234
 
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;
224
- will-change: visibility;
225
-
226
- &.is-active {
227
- visibility: visible
228
- }
229
-
235
+ &--dropdown {
230
236
  .choices__list {
231
237
  @apply relative overflow-auto;
232
238
  max-height: 300px;
233
239
  -webkit-overflow-scrolling: touch;
234
240
  will-change: scroll-position;
235
-
236
- .choices__item--selectable.is-highlighted:after {
237
- @apply opacity-50;
238
- }
239
241
  }
240
242
 
241
243
  .choices__item {
@@ -243,6 +245,7 @@
243
245
  padding: 10px;
244
246
  font-size: 14px;
245
247
 
248
+ &--selectable.is-selected,
246
249
  &--selectable.is-highlighted {
247
250
  @apply bg-gray-200;
248
251
  }
@@ -284,30 +287,50 @@
284
287
  border-radius: .25rem .25rem 0 0
285
288
  }
286
289
 
290
+ .is-open .choices__inner {
291
+ border-bottom-left-radius: 0;
292
+ border-bottom-right-radius: 0;
293
+ }
294
+
295
+ .is-flipped.is-open .choices__inner {
296
+ border-top-left-radius: 0;
297
+ border-top-right-radius: 0;
298
+ border-bottom-left-radius: 0.375rem;
299
+ border-bottom-right-radius: 0.375rem;
300
+ }
301
+
287
302
  @media (min-width: 640px) {
288
303
  .choices__list--dropdown {
289
304
  .choices__item--selectable {
290
- padding-right: 100px;
305
+ &.is-highlighted[data-select-text] {
306
+ padding-right: 100px;
307
+ }
291
308
 
292
- &:after {
309
+ &.is-highlighted[data-select-text]::after {
293
310
  content: attr(data-select-text);
294
311
  font-size: 12px;
295
- opacity: 0;
296
312
  position: absolute;
297
313
  right: 10px;
298
314
  top: 50%;
299
315
  transform: translateY(-50%)
300
316
  }
317
+
318
+ &.is-selected::after {
319
+ content: none !important;
320
+ }
301
321
  }
302
322
  }
303
323
 
304
324
  [dir=rtl] .choices__list--dropdown {
305
325
  .choices__item--selectable {
306
326
  text-align: right;
307
- padding-left: 100px;
308
327
  padding-right: 10px;
309
328
 
310
- &:after {
329
+ &.is-highlighted[data-select-text] {
330
+ padding-left: 100px;
331
+ }
332
+
333
+ &.is-highlighted[data-select-text]::after {
311
334
  right: auto;
312
335
  left: 10px
313
336
  }
@@ -331,6 +354,22 @@
331
354
 
332
355
  .choices__input {
333
356
  @apply inline-block align-baseline bg-white pb-1 rounded-none border-0 max-w-full text-sm;
357
+ margin-bottom: 5px;
358
+ padding: 4px 0 4px 2px;
359
+
360
+ &::-webkit-search-decoration,
361
+ &::-webkit-search-cancel-button,
362
+ &::-webkit-search-results-button,
363
+ &::-webkit-search-results-decoration {
364
+ display: none;
365
+ }
366
+
367
+ &::-ms-clear,
368
+ &::-ms-reveal {
369
+ display: none;
370
+ width: 0;
371
+ height: 0;
372
+ }
334
373
  }
335
374
 
336
375
  [dir=rtl] .choices__input {
@@ -372,3 +411,4 @@
372
411
  }
373
412
  }
374
413
  }
414
+
@@ -58,7 +58,9 @@
58
58
  .react-select__control {
59
59
  min-height: 28px;
60
60
  }
61
-
61
+ .react-select__placeholder {
62
+ white-space: nowrap;
63
+ }
62
64
  .react-select__value-container {
63
65
  padding-top: 0;
64
66
  padding-bottom: 0;
package/styles/tables.css CHANGED
@@ -33,7 +33,7 @@
33
33
  @apply flex items-center justify-center;
34
34
 
35
35
  > span:first-child {
36
- @apply flex-1;
36
+ @apply flex-1 whitespace-nowrap overflow-hidden text-ellipsis;
37
37
  }
38
38
  }
39
39
 
@@ -99,7 +99,11 @@
99
99
  }
100
100
 
101
101
  .table-group {
102
- @apply border-1 border-gray-300 dark:border-gray-700 flex flex-col w-full overflow-x-auto;
102
+ @apply border-1 border-gray-300 dark:border-gray-700 flex flex-col w-full;
103
+
104
+ .table-group-body {
105
+ @apply overflow-x-auto;
106
+ }
103
107
 
104
108
  &.border-top-0 {
105
109
  @apply border-t-0;
@@ -112,11 +116,11 @@
112
116
  }
113
117
  }
114
118
 
115
- .pagination-group {
116
- @apply border-t-1 border-gray-300 dark:border-gray-700 p-3;
119
+ .table-group-footer {
120
+ @apply overflow-hidden flex flex-wrap;
117
121
  }
118
122
 
119
- .table-group-footer {
120
- @apply overflow-hidden flex flex-wrap
123
+ .pagination-group {
124
+ @apply border-t-1 border-gray-300 dark:border-gray-700 p-3;
121
125
  }
122
126
  }