@formio/uswds 2.4.8-rc.1 → 2.5.0-rc.1

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.
@@ -41,6 +41,53 @@ span[role=link]:hover {
41
41
  display: none;
42
42
  }
43
43
 
44
+ .dropdown-menu {
45
+ position: absolute;
46
+ z-index: 1000;
47
+ display: none;
48
+ min-width: 10rem;
49
+ padding: 0.5rem 0;
50
+ margin: 0;
51
+ font-size: 1rem;
52
+ color: #212529;
53
+ text-align: left;
54
+ list-style: none;
55
+ background-color: #fff;
56
+ background-clip: padding-box;
57
+ border: 1px solid rgba(0, 0, 0, 0.15);
58
+ border-radius: 0.25rem;
59
+ }
60
+
61
+ .dropdown-menu.show {
62
+ display: block;
63
+ }
64
+
65
+ .dropdown-item {
66
+ display: block;
67
+ width: 100%;
68
+ padding: 0.25rem 1rem;
69
+ clear: both;
70
+ font-weight: 400;
71
+ color: #212529;
72
+ text-align: inherit;
73
+ text-decoration: none;
74
+ white-space: nowrap;
75
+ background-color: transparent;
76
+ border: 0;
77
+ }
78
+
79
+ .dropdown-item:hover, .dropdown-item:focus {
80
+ color: #1e2125;
81
+ background-color: #e9ecef;
82
+ }
83
+
84
+ .dropdown-divider {
85
+ height: 0;
86
+ margin: 0.5rem 0;
87
+ overflow: hidden;
88
+ border-top: 1px solid #e9ecef;
89
+ }
90
+
44
91
  .flatpickr-current-month .flatpickr-monthDropdown-months:focus,
45
92
  .flatpickr-current-month input.cur-year:focus,
46
93
  .flatpickr-days:focus {
package/lib/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  declare const _default: {
2
- framework: string;
3
2
  templates: {
4
3
  uswds: {
5
4
  transform(type: any, text: any): any;
@@ -56,6 +55,10 @@ declare const _default: {
56
55
  form: string;
57
56
  html: string;
58
57
  };
58
+ datatable: {
59
+ form: string;
60
+ html: string;
61
+ };
59
62
  day: {
60
63
  form: string;
61
64
  };
@@ -191,8 +194,9 @@ declare const _default: {
191
194
  select: typeof import("./components/Select").default;
192
195
  radio: import("formiojs").ClassWithEditForm<typeof import("formiojs/types/components/_classes/field/field").Field>;
193
196
  button: typeof import("./components/button/Button").default;
194
- checkbox: typeof import("./components/Checkbox/Checkbox").default;
197
+ checkbox: typeof import("./components/checkbox/Checkbox").default;
195
198
  selectboxes: typeof import("./components/selectboxes/SelectBoxes").default;
196
199
  };
200
+ framework: string;
197
201
  };
198
202
  export default _default;
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var templates_1 = require("./templates");
4
4
  var components_1 = require("./components");
5
5
  exports.default = {
6
- framework: 'uswds',
7
6
  templates: templates_1.default,
8
7
  components: components_1.default,
8
+ framework: 'uswds',
9
9
  };
@@ -67,6 +67,53 @@ span[role="link"] {
67
67
  display: none;
68
68
  }
69
69
 
70
+ .dropdown-menu {
71
+ position: absolute;
72
+ z-index: 1000;
73
+ display: none;
74
+ min-width: 10rem;
75
+ padding: 0.5rem 0;
76
+ margin: 0;
77
+ font-size: 1rem;
78
+ color: #212529;
79
+ text-align: left;
80
+ list-style: none;
81
+ background-color: #fff;
82
+ background-clip: padding-box;
83
+ border: 1px solid rgba(0, 0, 0, 0.15);
84
+ border-radius: 0.25rem;
85
+ }
86
+
87
+ .dropdown-menu.show {
88
+ display: block;
89
+ }
90
+
91
+ .dropdown-item {
92
+ display: block;
93
+ width: 100%;
94
+ padding: 0.25rem 1rem;
95
+ clear: both;
96
+ font-weight: 400;
97
+ color: #212529;
98
+ text-align: inherit;
99
+ text-decoration: none;
100
+ white-space: nowrap;
101
+ background-color: transparent;
102
+ border: 0;
103
+ }
104
+
105
+ .dropdown-item:hover, .dropdown-item:focus {
106
+ color: #1e2125;
107
+ background-color: #e9ecef;
108
+ }
109
+
110
+ .dropdown-divider {
111
+ height: 0;
112
+ margin: 0.5rem 0;
113
+ overflow: hidden;
114
+ border-top: 1px solid #e9ecef;
115
+ }
116
+
70
117
  .flatpickr-current-month .flatpickr-monthDropdown-months:focus,
71
118
  .flatpickr-current-month input.cur-year:focus,
72
119
  .flatpickr-days:focus {
@@ -54,6 +54,10 @@ declare const _default: {
54
54
  form: string;
55
55
  html: string;
56
56
  };
57
+ datatable: {
58
+ form: string;
59
+ html: string;
60
+ };
57
61
  day: {
58
62
  form: string;
59
63
  };
@@ -0,0 +1,43 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.default=function(ctx) {
5
+ var __t, __p = '', __j = Array.prototype.join;
6
+ function print() { __p += __j.call(arguments, '') }
7
+ __p += '<div ref="tableContainer"></div>\n<div class="formio-component-modal-wrapper formio-component-modal-wrapper-' +
8
+ ((__t = ( ctx.component.type )) == null ? '' : __t) +
9
+ '" ref="componentModalWrapper">\n <div class="formio-dialog formio-dialog-theme-default component-rendering-hidden" ref="dataTableModalWrapper">\n <div class="formio-dialog-overlay" ref="dataTableModalOverlay"></div>\n <div class="formio-dialog-content" ref="dataTableModalContents">\n <div ref="dataTableModalContents">\n <div class="editgrid-listgroup">\n ';
10
+ if (ctx.header) { ;
11
+ __p += '\n <div>\n ' +
12
+ ((__t = (ctx.header)) == null ? '' : __t) +
13
+ '\n </div>\n ';
14
+ } ;
15
+ __p += '\n ';
16
+ ctx.rows.forEach(function(row, rowIndex) { ;
17
+ __p += '\n <div class="margin-bottom-1" ref="' +
18
+ ((__t = (ctx.ref.row)) == null ? '' : __t) +
19
+ '">\n ' +
20
+ ((__t = (row)) == null ? '' : __t) +
21
+ '\n ';
22
+ if (ctx.openRows[rowIndex] && !ctx.readOnly) { ;
23
+ __p += '\n <div class="editgrid-actions">\n <button class="usa-button usa-button--accent-cool" ref="' +
24
+ ((__t = (ctx.ref.saveRow)) == null ? '' : __t) +
25
+ '">' +
26
+ ((__t = (ctx.t(ctx.component.saveRow || 'Save'))) == null ? '' : __t) +
27
+ '</button>\n ';
28
+ if (ctx.component.removeRow) { ;
29
+ __p += '\n <button class="usa-button usa-button--secondary" ref="' +
30
+ ((__t = (ctx.ref.cancelRow)) == null ? '' : __t) +
31
+ '">' +
32
+ ((__t = (ctx.t(ctx.component.removeRow || 'Cancel'))) == null ? '' : __t) +
33
+ '</button>\n ';
34
+ } ;
35
+ __p += '\n </div>\n ';
36
+ } ;
37
+ __p += '\n <div class="usa-has-error">\n <div class="editgrid-row-error text-base">\n ' +
38
+ ((__t = (ctx.errors[rowIndex])) == null ? '' : __t) +
39
+ '\n </div>\n </div>\n </div>\n ';
40
+ }) ;
41
+ __p += '\n </div>\n </div>\n <button class="formio-dialog-close float-right" aria-label="close" ref="dataTableModalClose"></button>\n </div>\n </div>\n</div>\n';
42
+ return __p
43
+ }
@@ -0,0 +1,47 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.default=function(ctx) {
5
+ var __t, __p = '', __j = Array.prototype.join;
6
+ function print() { __p += __j.call(arguments, '') }
7
+ __p += '<ul class="editgrid-listgroup usa-list usa-list--unstyled">\n ';
8
+ if (ctx.header) { ;
9
+ __p += '\n <li class="position-relative display-block padding-105 border">\n ' +
10
+ ((__t = (ctx.header)) == null ? '' : __t) +
11
+ '\n </li>\n ';
12
+ } ;
13
+ __p += '\n ';
14
+ ctx.rows.forEach(function(row, rowIndex) { ;
15
+ __p += '\n <li class="position-relative display-block padding-105 border" ref="' +
16
+ ((__t = (ctx.editgridKey)) == null ? '' : __t) +
17
+ '">\n ' +
18
+ ((__t = (row)) == null ? '' : __t) +
19
+ '\n ';
20
+ if (ctx.openRows[rowIndex] && !ctx.readOnly) { ;
21
+ __p += '\n <div class="editgrid-actions">\n <button class="usa-button usa-button--accent-cool" ref="' +
22
+ ((__t = (ctx.editgridKey)) == null ? '' : __t) +
23
+ '-saveRow">' +
24
+ ((__t = (ctx.t(ctx.component.saveRow || 'Save'))) == null ? '' : __t) +
25
+ '</button>\n ';
26
+ if (ctx.component.removeRow) { ;
27
+ __p += '\n <button class="usa-button usa-button--secondary" ref="' +
28
+ ((__t = (ctx.editgridKey)) == null ? '' : __t) +
29
+ '-cancelRow">' +
30
+ ((__t = (ctx.t(ctx.component.removeRow || 'Cancel'))) == null ? '' : __t) +
31
+ '</button>\n ';
32
+ } ;
33
+ __p += '\n </div>\n ';
34
+ } ;
35
+ __p += '\n <div class="usa-has-error">\n <div class="editgrid-row-error text-base">\n ' +
36
+ ((__t = (ctx.errors[rowIndex])) == null ? '' : __t) +
37
+ '\n </div>\n </div>\n </li>\n ';
38
+ }) ;
39
+ __p += '\n ';
40
+ if (ctx.footer) { ;
41
+ __p += '\n <li class="position-relative display-block padding-105 border">\n ' +
42
+ ((__t = (ctx.footer)) == null ? '' : __t) +
43
+ '\n </li>\n ';
44
+ } ;
45
+ __p += '\n</ul>\n';
46
+ return __p
47
+ }
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ form: string;
3
+ html: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var form_ejs_1 = require("./form.ejs");
4
+ var html_ejs_1 = require("./html.ejs");
5
+ exports.default = { form: form_ejs_1.default, html: html_ejs_1.default };
@@ -53,6 +53,10 @@ declare const _default: {
53
53
  form: string;
54
54
  html: string;
55
55
  };
56
+ datatable: {
57
+ form: string;
58
+ html: string;
59
+ };
56
60
  day: {
57
61
  form: string;
58
62
  };
@@ -17,6 +17,7 @@ var component_1 = require("./component");
17
17
  var componentModal_1 = require("./componentModal");
18
18
  var container_1 = require("./container");
19
19
  var datagrid_1 = require("./datagrid");
20
+ var datatable_1 = require("./datatable");
20
21
  var day_1 = require("./day");
21
22
  var dialog_1 = require("./dialog");
22
23
  var editgrid_1 = require("./editgrid");
@@ -81,6 +82,7 @@ exports.default = {
81
82
  componentModal: componentModal_1.default,
82
83
  container: container_1.default,
83
84
  datagrid: datagrid_1.default,
85
+ datatable: datatable_1.default,
84
86
  day: day_1.default,
85
87
  dialog: dialog_1.default,
86
88
  editgrid: editgrid_1.default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/uswds",
3
- "version": "2.4.8-rc.1",
3
+ "version": "2.5.0-rc.1",
4
4
  "description": "US Web Design System templates for form.io",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
File without changes
File without changes
File without changes
File without changes