@tsed/tailwind-formio 1.11.1 → 1.13.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.
Files changed (140) hide show
  1. package/dist/tailwind.js +1 -1
  2. package/gulpfile.js +24 -22
  3. package/lib/index.d.ts +19 -0
  4. package/lib/templates/index.d.ts +19 -0
  5. package/lib/templates/tailwind/address/form.ejs.js +3 -1
  6. package/lib/templates/tailwind/address/html.ejs.js +16 -0
  7. package/lib/templates/tailwind/alert/form.ejs.js +27 -0
  8. package/lib/templates/tailwind/alert/index.d.ts +6 -0
  9. package/lib/templates/tailwind/alert/index.js +4 -0
  10. package/lib/templates/tailwind/builderComponent/form.ejs.js +6 -6
  11. package/lib/templates/tailwind/builderEditForm/form.ejs.js +20 -20
  12. package/lib/templates/tailwind/builderSidebarGroup/form.ejs.js +3 -3
  13. package/lib/templates/tailwind/button/form.ejs.js +12 -2
  14. package/lib/templates/tailwind/checkbox/form.ejs.js +12 -2
  15. package/lib/templates/tailwind/columns/form.ejs.js +1 -1
  16. package/lib/templates/tailwind/componentModal/form.ejs.js +31 -3
  17. package/lib/templates/tailwind/datagrid/form.ejs.js +29 -13
  18. package/lib/templates/tailwind/datagrid/html.ejs.js +3 -3
  19. package/lib/templates/tailwind/day/form.ejs.js +21 -1
  20. package/lib/templates/tailwind/dialog/form.ejs.js +1 -1
  21. package/lib/templates/tailwind/editgrid/form.ejs.js +4 -4
  22. package/lib/templates/tailwind/editgrid/html.ejs.js +2 -2
  23. package/lib/templates/tailwind/editgridTable/form.ejs.js +69 -0
  24. package/lib/templates/tailwind/editgridTable/html.ejs.js +59 -0
  25. package/lib/templates/tailwind/editgridTable/index.d.ts +5 -0
  26. package/lib/templates/tailwind/editgridTable/index.js +5 -0
  27. package/lib/templates/tailwind/errorsList/form.ejs.js +25 -0
  28. package/lib/templates/tailwind/errorsList/index.d.ts +4 -0
  29. package/lib/templates/tailwind/errorsList/index.js +4 -0
  30. package/lib/templates/tailwind/field/align.ejs.js +1 -1
  31. package/lib/templates/tailwind/field/form.ejs.js +6 -2
  32. package/lib/templates/tailwind/fieldset/form.ejs.js +6 -6
  33. package/lib/templates/tailwind/file/form.ejs.js +37 -13
  34. package/lib/templates/tailwind/iconClass.d.ts +1 -0
  35. package/lib/templates/tailwind/iconClass.js +2 -1
  36. package/lib/templates/tailwind/index.d.ts +19 -0
  37. package/lib/templates/tailwind/index.js +14 -4
  38. package/lib/templates/tailwind/input/form.ejs.js +62 -32
  39. package/lib/templates/tailwind/label/form.ejs.js +14 -4
  40. package/lib/templates/tailwind/message/form.ejs.js +6 -2
  41. package/lib/templates/tailwind/modalPreview/form.ejs.js +16 -4
  42. package/lib/templates/tailwind/multiValueTable/form.ejs.js +1 -1
  43. package/lib/templates/tailwind/panel/form.ejs.js +18 -4
  44. package/lib/templates/tailwind/pdfBuilder/form.ejs.js +1 -1
  45. package/lib/templates/tailwind/radio/form.ejs.js +32 -6
  46. package/lib/templates/tailwind/radio/html.ejs.js +2 -2
  47. package/lib/templates/tailwind/resourceAdd/form.ejs.js +1 -1
  48. package/lib/templates/tailwind/select/form.ejs.js +14 -2
  49. package/lib/templates/tailwind/selectOption/form.ejs.js +3 -3
  50. package/lib/templates/tailwind/selectOption/html.ejs.js +1 -1
  51. package/lib/templates/tailwind/signature/form.ejs.js +3 -3
  52. package/lib/templates/tailwind/survey/form.ejs.js +26 -6
  53. package/lib/templates/tailwind/tab/flat.ejs.js +1 -1
  54. package/lib/templates/tailwind/tab/form.ejs.js +14 -8
  55. package/lib/templates/tailwind/table/form.ejs.js +3 -1
  56. package/lib/templates/tailwind/tableComponents/form.ejs.js +15 -0
  57. package/lib/templates/tailwind/tableComponents/index.d.ts +4 -0
  58. package/lib/templates/tailwind/tableComponents/index.js +4 -0
  59. package/lib/templates/tailwind/webform/builder.ejs.js +1 -1
  60. package/lib/templates/tailwind/wizard/builder.ejs.js +1 -1
  61. package/lib/templates/tailwind/wizard/form.ejs.js +33 -6
  62. package/lib/templates/tailwind/wizardHeader/form.ejs.js +21 -7
  63. package/lib/templates/tailwind/wizardHeaderClassic/form.ejs.js +29 -0
  64. package/lib/templates/tailwind/wizardHeaderClassic/index.d.ts +4 -0
  65. package/lib/templates/tailwind/wizardHeaderClassic/index.js +4 -0
  66. package/lib/templates/tailwind/wizardHeaderVertical/form.ejs.js +31 -0
  67. package/lib/templates/tailwind/wizardHeaderVertical/index.d.ts +4 -0
  68. package/lib/templates/tailwind/wizardHeaderVertical/index.js +4 -0
  69. package/lib/templates/tailwind/wizardNav/form.ejs.js +44 -20
  70. package/package.json +2 -5
  71. package/readme.md +96 -115
  72. package/src/templates/stories/builder.stories.js +8 -23
  73. package/src/templates/stories/pagination.stories.js +1 -6
  74. package/src/templates/stories/wizard.stories.js +8 -23
  75. package/src/templates/tailwind/address/form.ejs +1 -0
  76. package/src/templates/tailwind/address/html.ejs +1 -0
  77. package/src/templates/tailwind/alert/form.ejs +10 -0
  78. package/src/templates/tailwind/alert/index.js +3 -0
  79. package/src/templates/tailwind/builderComponent/form.ejs +42 -6
  80. package/src/templates/tailwind/builderEditForm/form.ejs +53 -49
  81. package/src/templates/tailwind/builderSidebarGroup/form.ejs +3 -3
  82. package/src/templates/tailwind/button/form.ejs +6 -3
  83. package/src/templates/tailwind/checkbox/form.ejs +5 -1
  84. package/src/templates/tailwind/columns/form.ejs +1 -1
  85. package/src/templates/tailwind/componentModal/form.ejs +12 -3
  86. package/src/templates/tailwind/datagrid/form.ejs +13 -12
  87. package/src/templates/tailwind/datagrid/html.ejs +2 -2
  88. package/src/templates/tailwind/day/form.ejs +10 -1
  89. package/src/templates/tailwind/dialog/form.ejs +2 -2
  90. package/src/templates/tailwind/editgrid/form.ejs +3 -3
  91. package/src/templates/tailwind/editgrid/html.ejs +2 -2
  92. package/src/templates/tailwind/editgridTable/form.ejs +55 -0
  93. package/src/templates/tailwind/editgridTable/html.ejs +49 -0
  94. package/src/templates/tailwind/editgridTable/index.ts +4 -0
  95. package/src/templates/tailwind/errorsList/form.ejs +19 -0
  96. package/src/templates/tailwind/errorsList/index.ts +3 -0
  97. package/src/templates/tailwind/field/align.ejs +1 -1
  98. package/src/templates/tailwind/field/form.ejs +1 -1
  99. package/src/templates/tailwind/fieldset/form.ejs +5 -4
  100. package/src/templates/tailwind/file/form.ejs +35 -11
  101. package/src/templates/tailwind/iconClass.ts +3 -6
  102. package/src/templates/tailwind/index.ts +14 -4
  103. package/src/templates/tailwind/input/form.ejs +47 -34
  104. package/src/templates/tailwind/label/form.ejs +7 -2
  105. package/src/templates/tailwind/message/form.ejs +1 -1
  106. package/src/templates/tailwind/modalPreview/form.ejs +13 -2
  107. package/src/templates/tailwind/multiValueTable/form.ejs +1 -1
  108. package/src/templates/tailwind/panel/form.ejs +12 -4
  109. package/src/templates/tailwind/pdfBuilder/form.ejs +0 -1
  110. package/src/templates/tailwind/radio/form.ejs +16 -6
  111. package/src/templates/tailwind/radio/html.ejs +2 -2
  112. package/src/templates/tailwind/resourceAdd/form.ejs +1 -1
  113. package/src/templates/tailwind/select/form.ejs +5 -0
  114. package/src/templates/tailwind/selectOption/form.ejs +2 -2
  115. package/src/templates/tailwind/selectOption/html.ejs +1 -1
  116. package/src/templates/tailwind/signature/form.ejs +3 -3
  117. package/src/templates/tailwind/survey/form.ejs +13 -3
  118. package/src/templates/tailwind/tab/flat.ejs +1 -1
  119. package/src/templates/tailwind/tab/form.ejs +11 -5
  120. package/src/templates/tailwind/table/form.ejs +1 -0
  121. package/src/templates/tailwind/tableComponents/form.ejs +5 -0
  122. package/src/templates/tailwind/tableComponents/index.ts +3 -0
  123. package/src/templates/tailwind/webform/builder.ejs +1 -1
  124. package/src/templates/tailwind/wizard/builder.ejs +1 -1
  125. package/src/templates/tailwind/wizard/form.ejs +28 -7
  126. package/src/templates/tailwind/wizardHeader/form.ejs +9 -4
  127. package/src/templates/tailwind/wizardHeaderClassic/form.ejs +16 -0
  128. package/src/templates/tailwind/wizardHeaderClassic/index.ts +3 -0
  129. package/src/templates/tailwind/wizardHeaderVertical/form.ejs +14 -0
  130. package/src/templates/tailwind/wizardHeaderVertical/index.ts +3 -0
  131. package/src/templates/tailwind/wizardNav/form.ejs +27 -21
  132. package/styles/alert.css +9 -0
  133. package/styles/choices.css +3 -0
  134. package/styles/fieldset.css +5 -0
  135. package/styles/form.css +3 -0
  136. package/styles/index.css +1 -0
  137. package/styles/tables.css +9 -1
  138. package/tsconfig.json +3 -14
  139. package/.eslintrc +0 -40
  140. package/.prettierrc +0 -10
@@ -4,40 +4,64 @@ Object.defineProperty(exports, "__esModule", {
4
4
  exports.default=function(ctx) {
5
5
  var __t, __p = '', __j = Array.prototype.join;
6
6
  function print() { __p += __j.call(arguments, '') }
7
- __p += '<ul class="list-inline" id="' +
7
+ __p += '<ul class="formio-wizard-nav-container list-inline" id="' +
8
8
  ((__t = ( ctx.wizardKey )) == null ? '' : __t) +
9
9
  '-nav">\n ';
10
- if (ctx.buttons.cancel) { ;
11
- __p += '\n <li class="list-inline-item">\n <button class="btn btn-secondary btn-wizard-nav-cancel" ref="' +
10
+ ctx.buttonOrder.forEach(function(button) { ;
11
+ __p += '\n ';
12
+ if (button === 'cancel' && ctx.buttons.cancel) { ;
13
+ __p += '\n <li>\n <button class="btn btn-secondary btn-wizard-nav-cancel" ref="' +
12
14
  ((__t = (ctx.wizardKey)) == null ? '' : __t) +
13
- '-cancel">' +
15
+ '-cancel" aria-label="' +
16
+ ((__t = (ctx.t('cancelButtonAriaLabel'))) == null ? '' : __t) +
17
+ '">' +
14
18
  ((__t = (ctx.t('cancel'))) == null ? '' : __t) +
15
- '</button>\n </li>\n ';
19
+ '</button>\n </li>\n ';
16
20
  } ;
17
- __p += '\n ';
18
- if (ctx.buttons.previous) { ;
19
- __p += '\n <li class="list-inline-item">\n <button class="btn btn-primary btn-wizard-nav-previous" ref="' +
21
+ __p += '\n ';
22
+ if (button === 'previous' && ctx.buttons.previous) { ;
23
+ __p += '\n <li>\n <button class="btn btn-primary btn-wizard-nav-previous" ref="' +
20
24
  ((__t = (ctx.wizardKey)) == null ? '' : __t) +
21
- '-previous">' +
25
+ '-previous" aria-label="' +
26
+ ((__t = (ctx.t('previousButtonAriaLabel'))) == null ? '' : __t) +
27
+ '">' +
22
28
  ((__t = (ctx.t('previous'))) == null ? '' : __t) +
23
- '</button>\n </li>\n ';
29
+ '</button>\n </li>\n ';
24
30
  } ;
25
- __p += '\n ';
26
- if (ctx.buttons.next) { ;
27
- __p += '\n <li class="list-inline-item">\n <button class="btn btn-primary btn-wizard-nav-next" ref="' +
31
+ __p += '\n ';
32
+ if (button === 'next' && ctx.buttons.next) { ;
33
+ __p += '\n <li>\n <button class="btn btn-primary btn-wizard-nav-next" ref="' +
28
34
  ((__t = (ctx.wizardKey)) == null ? '' : __t) +
29
- '-next">' +
35
+ '-next" aria-label="' +
36
+ ((__t = (ctx.t('nextButtonAriaLabel'))) == null ? '' : __t) +
37
+ '">' +
30
38
  ((__t = (ctx.t('next'))) == null ? '' : __t) +
31
- '</button>\n </li>\n ';
39
+ '</button>\n </li>\n ';
32
40
  } ;
33
- __p += '\n ';
34
- if (ctx.buttons.submit) { ;
35
- __p += '\n <li class="list-inline-item">\n <button class="btn btn-primary btn-wizard-nav-submit" ref="' +
41
+ __p += '\n ';
42
+ if (button === 'submit' && ctx.buttons.submit) { ;
43
+ __p += '\n <li>\n ';
44
+ if (ctx.disableWizardSubmit){ ;
45
+ __p += '\n <button disabled class="btn btn-primary btn-wizard-nav-submit" ref="' +
36
46
  ((__t = (ctx.wizardKey)) == null ? '' : __t) +
37
- '-submit">' +
47
+ '-submit" aria-label="' +
48
+ ((__t = (ctx.t('submitButtonAriaLabel'))) == null ? '' : __t) +
49
+ '">' +
38
50
  ((__t = (ctx.t('submit'))) == null ? '' : __t) +
39
- '</button>\n </li>\n ';
51
+ '</button>\n ';
52
+ } else { ;
53
+ __p += '\n <button class="btn btn-primary btn-wizard-nav-submit" ref="' +
54
+ ((__t = (ctx.wizardKey)) == null ? '' : __t) +
55
+ '-submit" aria-label="' +
56
+ ((__t = (ctx.t('submitButtonAriaLabel'))) == null ? '' : __t) +
57
+ '">' +
58
+ ((__t = (ctx.t('submit'))) == null ? '' : __t) +
59
+ '</button>\n ';
60
+ } ;
61
+ __p += '\n </li>\n ';
40
62
  } ;
63
+ __p += '\n ';
64
+ }) ;
41
65
  __p += '\n</ul>\n';
42
66
  return __p
43
67
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/tailwind-formio",
3
- "version": "1.11.1",
3
+ "version": "1.13.0",
4
4
  "description": "Tailwind templates for form.io forms.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -14,10 +14,7 @@
14
14
  },
15
15
  "scripts": {
16
16
  "watch": "nodemon --watch ./src --ext ts,js,ejs --exec \"yarn build\"",
17
- "build": "tsc --noEmit false && gulp templates && yarn webpack",
18
- "lint:fix": "yarn lint --fix",
19
- "lint": "yarn eslint --config .eslintrc --cache --quiet \"./src/**/*.{ts,tsx,js,jsx}\"",
20
- "prettier": "prettier '{src,test}/**/*.{ts,tsx,js,jsx}' --write"
17
+ "build": "tsc --noEmit false && gulp templates && yarn webpack"
21
18
  },
22
19
  "dependencies": {},
23
20
  "peerDependencies": {},
package/readme.md CHANGED
@@ -42,7 +42,6 @@ If you use `create-react-app`, you'll need to follow the official tailwind guide
42
42
 
43
43
  Edit the `craco.config.js` (or `postcss.config.js`) and add the `postcss-nested` to the postcss plugins list:
44
44
 
45
-
46
45
  ```diff
47
46
  module.exports = {
48
47
  style: {
@@ -68,8 +67,8 @@ npx tailwindcss-cli@latest init
68
67
  Edit the `tailwind.config.js` and copy the following content:
69
68
 
70
69
  ```js
71
- const primary = 'hsla(208, 100%, 43%, 1)'
72
- const secondary = 'hsla(190, 81%, 42%, 1)'
70
+ const primary = "hsla(208, 100%, 43%, 1)";
71
+ const secondary = "hsla(190, 81%, 42%, 1)";
73
72
 
74
73
  module.exports = {
75
74
  purge: [],
@@ -79,142 +78,126 @@ module.exports = {
79
78
  colors: {
80
79
  primary: {
81
80
  DEFAULT: primary,
82
- 50: 'hsla(208, 100%, 91%, 1)',
83
- 100: 'hsla(208, 100%, 83%, 1)',
84
- 200: 'hsla(208, 100%, 75%, 1)',
85
- 300: 'hsla(208, 100%, 67%, 1)',
86
- 400: 'hsla(208, 100%, 59%, 1)',
87
- 500: 'hsla(208, 100%, 51%, 1)',
81
+ 50: "hsla(208, 100%, 91%, 1)",
82
+ 100: "hsla(208, 100%, 83%, 1)",
83
+ 200: "hsla(208, 100%, 75%, 1)",
84
+ 300: "hsla(208, 100%, 67%, 1)",
85
+ 400: "hsla(208, 100%, 59%, 1)",
86
+ 500: "hsla(208, 100%, 51%, 1)",
88
87
  600: primary,
89
- 700: 'hsla(208, 100%, 35%, 1)',
90
- 800: 'hsla(208, 100%, 27%, 1)',
91
- 900: 'hsla(208, 100%, 19%, 1)'
88
+ 700: "hsla(208, 100%, 35%, 1)",
89
+ 800: "hsla(208, 100%, 27%, 1)",
90
+ 900: "hsla(208, 100%, 19%, 1)"
92
91
  },
93
92
  secondary: {
94
93
  DEFAULT: secondary,
95
- 50: 'hsla(190, 81%, 90%, 1)',
96
- 100: 'hsla(190, 81%, 82%, 1)',
97
- 200: 'hsla(190, 81%, 74%, 1)',
98
- 300: 'hsla(190, 81%, 66%, 1)',
99
- 400: 'hsla(190, 81%, 58%, 1)',
100
- 500: 'hsla(190, 81%, 50%, 1)',
94
+ 50: "hsla(190, 81%, 90%, 1)",
95
+ 100: "hsla(190, 81%, 82%, 1)",
96
+ 200: "hsla(190, 81%, 74%, 1)",
97
+ 300: "hsla(190, 81%, 66%, 1)",
98
+ 400: "hsla(190, 81%, 58%, 1)",
99
+ 500: "hsla(190, 81%, 50%, 1)",
101
100
  600: secondary,
102
- 700: 'hsla(190, 81%, 34%, 1)',
103
- 800: 'hsla(190, 81%, 28%, 1)',
104
- 900: 'hsla(190, 81%, 20%, 1)'
101
+ 700: "hsla(190, 81%, 34%, 1)",
102
+ 800: "hsla(190, 81%, 28%, 1)",
103
+ 900: "hsla(190, 81%, 20%, 1)"
105
104
  },
106
- 'gray-darker': '#504747'
105
+ "gray-darker": "#504747"
107
106
  },
108
107
  spacing: {
109
- '7.5': '1.875rem', // 30px
110
- 15: '3.75rem', // 60px
111
- 22: '5.5rem', // 88px
112
- 25: '6.25rem', // 100px
113
- 26: '6.5rem', // 104px
114
- 30: '8.5rem', // 136px
115
- 32: '9rem', // 144px
116
- 68: '17rem' // 272px
108
+ 7.5: "1.875rem", // 30px
109
+ 15: "3.75rem", // 60px
110
+ 22: "5.5rem", // 88px
111
+ 25: "6.25rem", // 100px
112
+ 26: "6.5rem", // 104px
113
+ 30: "8.5rem", // 136px
114
+ 32: "9rem", // 144px
115
+ 68: "17rem" // 272px
117
116
  },
118
117
  padding: {
119
- px: '1px'
118
+ px: "1px"
120
119
  },
121
120
  margin: {
122
- px: '1px',
123
- '-px': '-1px',
124
- '-2px': '-2px',
125
- auto: 'auto'
121
+ px: "1px",
122
+ "-px": "-1px",
123
+ "-2px": "-2px",
124
+ auto: "auto"
126
125
  },
127
126
  fontSize: {
128
- micro: '.5rem', // 8px
129
- xxs: '.625rem', // 10px
130
- md: '1.125rem' // 18px
127
+ micro: ".5rem", // 8px
128
+ xxs: ".625rem", // 10px
129
+ md: "1.125rem" // 18px
131
130
  },
132
131
  fontWeight: {
133
132
  hairline: 100
134
133
  },
135
134
  fontFamily: {
136
- brand: [
137
- 'Source Sans Pro',
138
- 'sans-serif'
139
- ],
140
- sans: [
141
- 'Source Sans Pro',
142
- 'sans-serif'
143
- ],
144
- serif: [
145
- 'Source Sans Pro',
146
- 'sans-serif'
147
- ],
148
- inconsolata: ['Inconsolata'],
149
- source: [
150
- 'source-code-pro',
151
- 'Menlo',
152
- 'Monaco',
153
- 'Consolas',
154
- 'Courier New',
155
- 'monospace'
156
- ]
135
+ brand: ["Source Sans Pro", "sans-serif"],
136
+ sans: ["Source Sans Pro", "sans-serif"],
137
+ serif: ["Source Sans Pro", "sans-serif"],
138
+ inconsolata: ["Inconsolata"],
139
+ source: ["source-code-pro", "Menlo", "Monaco", "Consolas", "Courier New", "monospace"]
157
140
  },
158
141
  minWidth: {
159
- site: '18.75rem',
160
- 'input-mini': '17.5rem',
161
- 'input-small': '31.25rem',
162
- 'input-medium': '36.3125rem',
163
- 'input-large': '61.45rem',
164
- 'button-mini': '5.5rem',
165
- 'button-small': '7rem',
166
- 'button-medium': '9.875rem',
167
- 'button-large': '10rem'
142
+ site: "18.75rem",
143
+ "input-mini": "17.5rem",
144
+ "input-small": "31.25rem",
145
+ "input-medium": "36.3125rem",
146
+ "input-large": "61.45rem",
147
+ "button-mini": "5.5rem",
148
+ "button-small": "7rem",
149
+ "button-medium": "9.875rem",
150
+ "button-large": "10rem"
168
151
  },
169
152
  width: {
170
- arrow: '.8rem',
171
- '3/10': '30%',
172
- '7/10': '70%',
173
- '9/10': '90%',
174
- '12/25': '48%'
153
+ arrow: ".8rem",
154
+ "3/10": "30%",
155
+ "7/10": "70%",
156
+ "9/10": "90%",
157
+ "12/25": "48%"
175
158
  },
176
159
  maxWidth: {
177
- sm: '30rem',
178
- md: '40rem',
179
- lg: '50rem',
180
- xl: '60rem',
181
- '2xl': '70rem',
182
- '3xl': '80rem',
183
- '4xl': '90rem',
184
- '5xl': '100rem',
185
- '1/4': '25%',
186
- '1/2': '50%',
187
- '3/5': '60%',
188
- '4/5': '80%',
189
- '9/10': '90%',
190
- 'site-mini': '17.5rem',
191
- 'site-small': '31.25rem',
192
- 'site-medium': '43.75rem',
193
- 'site-large': '56.25rem',
194
- site: '73.75rem',
195
- screen: '100vw'
160
+ sm: "30rem",
161
+ md: "40rem",
162
+ lg: "50rem",
163
+ xl: "60rem",
164
+ "2xl": "70rem",
165
+ "3xl": "80rem",
166
+ "4xl": "90rem",
167
+ "5xl": "100rem",
168
+ "1/4": "25%",
169
+ "1/2": "50%",
170
+ "3/5": "60%",
171
+ "4/5": "80%",
172
+ "9/10": "90%",
173
+ "site-mini": "17.5rem",
174
+ "site-small": "31.25rem",
175
+ "site-medium": "43.75rem",
176
+ "site-large": "56.25rem",
177
+ site: "73.75rem",
178
+ screen: "100vw"
196
179
  },
197
180
  height: {
198
- arrow: '.4rem',
199
- px: '1px',
200
- 4: '1rem',
201
- 5: '1.25rem',
202
- 8: '1.8rem',
203
- 9: '2.25rem',
204
- 10: '2.5rem',
205
- 11: '2.75rem',
206
- 12: '3rem',
207
- 16: '4rem',
208
- 24: '6rem',
209
- 32: '8rem'
181
+ arrow: ".4rem",
182
+ px: "1px",
183
+ 4: "1rem",
184
+ 5: "1.25rem",
185
+ 8: "1.8rem",
186
+ 9: "2.25rem",
187
+ 10: "2.5rem",
188
+ 11: "2.75rem",
189
+ 12: "3rem",
190
+ 16: "4rem",
191
+ 24: "6rem",
192
+ 32: "8rem"
210
193
  },
211
194
  borderWidth: {
212
- 1: '1px',
213
- 5: '5px'
195
+ 1: "1px",
196
+ 5: "5px"
214
197
  },
215
198
  borderRadius: {
216
- half: '50%',
217
- full: '100%'
199
+ half: "50%",
200
+ full: "100%"
218
201
  },
219
202
  zIndex: {
220
203
  1: 1,
@@ -225,11 +208,11 @@ module.exports = {
225
208
  6: 6
226
209
  },
227
210
  fill: {
228
- transparent: 'transparent'
211
+ transparent: "transparent"
229
212
  },
230
213
  flex: {
231
- '2': '2 2 0%',
232
- '3': '3 3 0%'
214
+ 2: "2 2 0%",
215
+ 3: "3 3 0%"
233
216
  }
234
217
  }
235
218
  },
@@ -240,7 +223,7 @@ module.exports = {
240
223
  borderCollapse: true
241
224
  },
242
225
  plugins: []
243
- }
226
+ };
244
227
  ```
245
228
 
246
229
  Then create a `tailwind.css` in `styles` directory and add the following lines:
@@ -301,18 +284,17 @@ reportWebVitals();
301
284
  Finally, start the application!
302
285
 
303
286
  ## Contributors
287
+
304
288
  Please read [contributing guidelines here](./CONTRIBUTING.md).
305
289
 
306
290
  <a href="https://github.com/TypedProject/tsed/graphs/contributors"><img src="https://opencollective.com/tsed/contributors.svg?width=890" /></a>
307
291
 
308
-
309
292
  ## Backers
310
293
 
311
294
  Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/tsed#backer)]
312
295
 
313
296
  <a href="https://opencollective.com/tsed#backers" target="_blank"><img src="https://opencollective.com/tsed/tiers/backer.svg?width=890"></a>
314
297
 
315
-
316
298
  ## Sponsors
317
299
 
318
300
  Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/tsed#sponsor)]
@@ -330,4 +312,3 @@ The above copyright notice and this permission notice shall be included in all c
330
312
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
331
313
 
332
314
  [travis]: https://travis-ci.org/
333
-
@@ -67,12 +67,7 @@ export default {
67
67
  };
68
68
 
69
69
  export const Sandbox = (args) => {
70
- return (
71
- <WrapperFormBuilder
72
- form={{ ...args.form, display: args.display }}
73
- options={{ template: args.template, iconset: args.iconset }}
74
- />
75
- );
70
+ return <WrapperFormBuilder form={{ ...args.form, display: args.display }} options={{ template: args.template, iconset: args.iconset }} />;
76
71
  };
77
72
 
78
73
  Sandbox.args = {
@@ -1177,8 +1172,7 @@ Sandbox.args = {
1177
1172
  key: "address1",
1178
1173
  type: "textfield",
1179
1174
  input: true,
1180
- customConditional:
1181
- "show = _.get(instance, 'parent.manualMode', false);",
1175
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1182
1176
  placeholder: "",
1183
1177
  prefix: "",
1184
1178
  customClass: "",
@@ -1240,8 +1234,7 @@ Sandbox.args = {
1240
1234
  key: "address2",
1241
1235
  type: "textfield",
1242
1236
  input: true,
1243
- customConditional:
1244
- "show = _.get(instance, 'parent.manualMode', false);",
1237
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1245
1238
  placeholder: "",
1246
1239
  prefix: "",
1247
1240
  customClass: "",
@@ -1303,8 +1296,7 @@ Sandbox.args = {
1303
1296
  key: "city",
1304
1297
  type: "textfield",
1305
1298
  input: true,
1306
- customConditional:
1307
- "show = _.get(instance, 'parent.manualMode', false);",
1299
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1308
1300
  placeholder: "",
1309
1301
  prefix: "",
1310
1302
  customClass: "",
@@ -1366,8 +1358,7 @@ Sandbox.args = {
1366
1358
  key: "state",
1367
1359
  type: "textfield",
1368
1360
  input: true,
1369
- customConditional:
1370
- "show = _.get(instance, 'parent.manualMode', false);",
1361
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1371
1362
  placeholder: "",
1372
1363
  prefix: "",
1373
1364
  customClass: "",
@@ -1429,8 +1420,7 @@ Sandbox.args = {
1429
1420
  key: "country",
1430
1421
  type: "textfield",
1431
1422
  input: true,
1432
- customConditional:
1433
- "show = _.get(instance, 'parent.manualMode', false);",
1423
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1434
1424
  placeholder: "",
1435
1425
  prefix: "",
1436
1426
  customClass: "",
@@ -1492,8 +1482,7 @@ Sandbox.args = {
1492
1482
  key: "zip",
1493
1483
  type: "textfield",
1494
1484
  input: true,
1495
- customConditional:
1496
- "show = _.get(instance, 'parent.manualMode', false);",
1485
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1497
1486
  placeholder: "",
1498
1487
  prefix: "",
1499
1488
  customClass: "",
@@ -1907,11 +1896,7 @@ Sandbox.args = {
1907
1896
  display: "form",
1908
1897
  access: [
1909
1898
  {
1910
- roles: [
1911
- "5d0797bc872fc747da559858",
1912
- "5d0797bc872fc71d05559859",
1913
- "5d0797bc872fc7da3b55985a"
1914
- ],
1899
+ roles: ["5d0797bc872fc747da559858", "5d0797bc872fc71d05559859", "5d0797bc872fc7da3b55985a"],
1915
1900
  type: "read_all"
1916
1901
  }
1917
1902
  ],
@@ -18,12 +18,7 @@ export const Sandbox = (args) => {
18
18
  <nav aria-label='...'>
19
19
  <ul className='pagination'>
20
20
  <li className='page-item disabled'>
21
- <a
22
- className='page-link'
23
- href='#'
24
- tabIndex='-1'
25
- aria-disabled='true'
26
- >
21
+ <a className='page-link' href='#' tabIndex='-1' aria-disabled='true'>
27
22
  Previous
28
23
  </a>
29
24
  </li>
@@ -67,12 +67,7 @@ export default {
67
67
  };
68
68
 
69
69
  export const Sandbox = (args) => {
70
- return (
71
- <WrapperFormBuilder
72
- form={{ ...args.form, display: args.display }}
73
- options={{ template: args.template, iconset: args.iconset }}
74
- />
75
- );
70
+ return <WrapperFormBuilder form={{ ...args.form, display: args.display }} options={{ template: args.template, iconset: args.iconset }} />;
76
71
  };
77
72
 
78
73
  Sandbox.args = {
@@ -1177,8 +1172,7 @@ Sandbox.args = {
1177
1172
  key: "address1",
1178
1173
  type: "textfield",
1179
1174
  input: true,
1180
- customConditional:
1181
- "show = _.get(instance, 'parent.manualMode', false);",
1175
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1182
1176
  placeholder: "",
1183
1177
  prefix: "",
1184
1178
  customClass: "",
@@ -1240,8 +1234,7 @@ Sandbox.args = {
1240
1234
  key: "address2",
1241
1235
  type: "textfield",
1242
1236
  input: true,
1243
- customConditional:
1244
- "show = _.get(instance, 'parent.manualMode', false);",
1237
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1245
1238
  placeholder: "",
1246
1239
  prefix: "",
1247
1240
  customClass: "",
@@ -1303,8 +1296,7 @@ Sandbox.args = {
1303
1296
  key: "city",
1304
1297
  type: "textfield",
1305
1298
  input: true,
1306
- customConditional:
1307
- "show = _.get(instance, 'parent.manualMode', false);",
1299
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1308
1300
  placeholder: "",
1309
1301
  prefix: "",
1310
1302
  customClass: "",
@@ -1366,8 +1358,7 @@ Sandbox.args = {
1366
1358
  key: "state",
1367
1359
  type: "textfield",
1368
1360
  input: true,
1369
- customConditional:
1370
- "show = _.get(instance, 'parent.manualMode', false);",
1361
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1371
1362
  placeholder: "",
1372
1363
  prefix: "",
1373
1364
  customClass: "",
@@ -1429,8 +1420,7 @@ Sandbox.args = {
1429
1420
  key: "country",
1430
1421
  type: "textfield",
1431
1422
  input: true,
1432
- customConditional:
1433
- "show = _.get(instance, 'parent.manualMode', false);",
1423
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1434
1424
  placeholder: "",
1435
1425
  prefix: "",
1436
1426
  customClass: "",
@@ -1492,8 +1482,7 @@ Sandbox.args = {
1492
1482
  key: "zip",
1493
1483
  type: "textfield",
1494
1484
  input: true,
1495
- customConditional:
1496
- "show = _.get(instance, 'parent.manualMode', false);",
1485
+ customConditional: "show = _.get(instance, 'parent.manualMode', false);",
1497
1486
  placeholder: "",
1498
1487
  prefix: "",
1499
1488
  customClass: "",
@@ -1907,11 +1896,7 @@ Sandbox.args = {
1907
1896
  display: "form",
1908
1897
  access: [
1909
1898
  {
1910
- roles: [
1911
- "5d0797bc872fc747da559858",
1912
- "5d0797bc872fc71d05559859",
1913
- "5d0797bc872fc7da3b55985a"
1914
- ],
1899
+ roles: ["5d0797bc872fc747da559858", "5d0797bc872fc71d05559859", "5d0797bc872fc7da3b55985a"],
1915
1900
  type: "read_all"
1916
1901
  }
1917
1902
  ],
@@ -7,6 +7,7 @@
7
7
  {% } %}
8
8
  value="{{ ctx.displayValue }}"
9
9
  autocomplete="off"
10
+ aria-label="{{ctx.t('autocomplete')}}"
10
11
  >
11
12
  {% if (!ctx.component.disableClearIcon) { %}
12
13
  <i
@@ -0,0 +1 @@
1
+ <div ref="value">{% if (ctx.displayValue) { %}{{ctx.displayValue}}{% } else { %}-{% } %}</div>
@@ -0,0 +1,10 @@
1
+ <div
2
+ {% for (var attr in ctx.attrs) { %}
3
+ {{attr}}="{{ctx.attrs[attr]}}"
4
+ {% } %}
5
+ >
6
+ {{ctx.message}}
7
+ {% if (ctx.options.vpat) { %}
8
+ <span class="sr-only" id="hotkey-i-{{ctx.form._id}}">{{ctx.t('errorListHotkey')}}</span>
9
+ {% } %}
10
+ </div>
@@ -0,0 +1,3 @@
1
+ import form from "./form.ejs";
2
+
3
+ export default { form };