iglooform 2.4.25 → 2.4.28

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 (209) hide show
  1. package/es/admin-upload/float.js +14 -14
  2. package/es/admin-upload/index.js +11 -11
  3. package/es/admin-upload/job-list.js +47 -47
  4. package/es/admin-upload/modal.js +10 -10
  5. package/es/alert-message/index.js +7 -7
  6. package/es/amount/index.js +2 -2
  7. package/es/back-top/index.js +4 -4
  8. package/es/button/index.js +9 -9
  9. package/es/card-detail/card-group.js +6 -6
  10. package/es/card-detail/card-item.js +5 -5
  11. package/es/card-detail/card-page.js +5 -5
  12. package/es/card-detail/card.js +7 -7
  13. package/es/checkbox/index.js +6 -6
  14. package/es/claim-list/index.js +19 -19
  15. package/es/confirmation/index.js +4 -4
  16. package/es/date-picker/buddhist.js +2 -2
  17. package/es/date-picker/index.js +9 -9
  18. package/es/declaration/index.js +5 -5
  19. package/es/detail-panel/index.js +26 -26
  20. package/es/documents/index.js +2 -2
  21. package/es/example/index.js +5 -5
  22. package/es/filter/checkBox.js +10 -10
  23. package/es/filter/customize.js +1 -1
  24. package/es/filter/index.js +43 -43
  25. package/es/filter/radioBox.js +7 -7
  26. package/es/filter/rangePicker.js +23 -23
  27. package/es/filter/style/index.less +10 -2
  28. package/es/form/addable-section/index.js +33 -18
  29. package/es/form/addable-section/style/index.less +6 -10
  30. package/es/form/divider/index.js +1 -1
  31. package/es/form/element/index.js +17 -17
  32. package/es/form/elements.js +6 -3
  33. package/es/form/index.js +7 -7
  34. package/es/form/login/index.js +6 -6
  35. package/es/form/page/index.js +8 -8
  36. package/es/form/pages/index.js +10 -10
  37. package/es/form/render/index.js +1 -1
  38. package/es/form/section/index.js +4 -4
  39. package/es/form/step/index.js +14 -14
  40. package/es/form/steps/index.js +2 -2
  41. package/es/free-form/addable-section/index.js +29 -14
  42. package/es/free-form/addable-section/style/index.less +0 -4
  43. package/es/free-form/element/index.js +10 -10
  44. package/es/free-form/index.js +3 -3
  45. package/es/free-form/page/index.js +15 -15
  46. package/es/free-form/pages/index.js +2 -2
  47. package/es/free-form/section/index.js +4 -4
  48. package/es/free-form/step/index.js +14 -14
  49. package/es/free-form/steps/index.js +2 -2
  50. package/es/global-message/index.js +12 -12
  51. package/es/home-menu/index.js +18 -18
  52. package/es/index.d.ts +1 -1
  53. package/es/index.js +1 -1
  54. package/es/input/amount.js +2 -2
  55. package/es/input/credit-card.js +4 -4
  56. package/es/input/email.js +1 -1
  57. package/es/input/expiry-date.js +3 -3
  58. package/es/input/input-date.js +3 -3
  59. package/es/input/input-number.js +1 -1
  60. package/es/input/input.js +1 -1
  61. package/es/input/otp.js +6 -6
  62. package/es/input/password.js +4 -4
  63. package/es/input/phone-number.js +4 -4
  64. package/es/input/text-area.js +4 -4
  65. package/es/layout/defaultFooter.js +28 -28
  66. package/es/layout/defaultHeader.js +6 -6
  67. package/es/layout/footer.js +66 -66
  68. package/es/layout/header.js +25 -25
  69. package/es/layout/index.js +4 -4
  70. package/es/locale/en-US/messages.json +1 -0
  71. package/es/locale/id-ID/messages.json +3 -2
  72. package/es/locale/locale-provider.js +2 -2
  73. package/es/locale/th-TH/messages.json +3 -2
  74. package/es/locale/vi-VN/messages.json +3 -2
  75. package/es/locale/zh-CN/messages.json +3 -2
  76. package/es/login-page/index.js +16 -16
  77. package/es/media/index.js +15 -15
  78. package/es/media/media.js +8 -8
  79. package/es/media/preview.js +6 -6
  80. package/es/mobile-insurer-detail/index.js +18 -18
  81. package/es/mobile-insurer-list/index.js +11 -11
  82. package/es/modal/index.js +8 -8
  83. package/es/platform/platform-card/index.js +5 -5
  84. package/es/platform/switch-platform/index.js +12 -12
  85. package/es/policy-list/index.js +4 -4
  86. package/es/policy-list/policy-card.js +32 -32
  87. package/es/radio/index.d.ts +2 -1
  88. package/es/radio/index.js +13 -12
  89. package/es/radio/radio-group-with-other.d.ts +6 -0
  90. package/es/radio/radio-group-with-other.js +85 -0
  91. package/es/select/attached-select.js +17 -20
  92. package/es/select/select.js +6 -9
  93. package/es/select/time-select.js +20 -20
  94. package/es/status-box/index.js +2 -2
  95. package/es/table/index.js +33 -33
  96. package/es/tabs/index.js +1 -1
  97. package/es/typography/index.js +10 -3
  98. package/es/upload/index.js +28 -28
  99. package/es/upload-photo/index.js +30 -34
  100. package/es/upload-photo/media.js +4 -4
  101. package/es/upload-preview/index.js +10 -10
  102. package/es/upload-preview/media.js +8 -8
  103. package/es/utils/form-utils.d.ts +1 -1
  104. package/es/utils/form-utils.js +11 -11
  105. package/lib/admin-upload/float.js +14 -14
  106. package/lib/admin-upload/index.js +11 -11
  107. package/lib/admin-upload/job-list.js +47 -47
  108. package/lib/admin-upload/modal.js +10 -10
  109. package/lib/alert-message/index.js +7 -7
  110. package/lib/amount/index.js +2 -2
  111. package/lib/back-top/index.js +4 -4
  112. package/lib/button/index.js +9 -9
  113. package/lib/card-detail/card-group.js +6 -6
  114. package/lib/card-detail/card-item.js +5 -5
  115. package/lib/card-detail/card-page.js +5 -5
  116. package/lib/card-detail/card.js +7 -7
  117. package/lib/checkbox/index.js +6 -6
  118. package/lib/claim-list/index.js +19 -19
  119. package/lib/confirmation/index.js +4 -4
  120. package/lib/date-picker/buddhist.js +2 -2
  121. package/lib/date-picker/index.js +9 -9
  122. package/lib/declaration/index.js +5 -5
  123. package/lib/detail-panel/index.js +26 -26
  124. package/lib/documents/index.js +2 -2
  125. package/lib/example/index.js +5 -5
  126. package/lib/filter/checkBox.js +10 -10
  127. package/lib/filter/customize.js +1 -1
  128. package/lib/filter/index.js +43 -43
  129. package/lib/filter/radioBox.js +7 -7
  130. package/lib/filter/rangePicker.js +23 -23
  131. package/lib/filter/style/index.less +10 -2
  132. package/lib/form/addable-section/index.js +37 -17
  133. package/lib/form/addable-section/style/index.less +6 -10
  134. package/lib/form/divider/index.js +1 -1
  135. package/lib/form/element/index.js +17 -17
  136. package/lib/form/elements.js +6 -2
  137. package/lib/form/index.js +7 -7
  138. package/lib/form/login/index.js +6 -6
  139. package/lib/form/page/index.js +8 -8
  140. package/lib/form/pages/index.js +10 -10
  141. package/lib/form/render/index.js +1 -1
  142. package/lib/form/section/index.js +4 -4
  143. package/lib/form/step/index.js +14 -14
  144. package/lib/form/steps/index.js +2 -2
  145. package/lib/free-form/addable-section/index.js +33 -13
  146. package/lib/free-form/addable-section/style/index.less +0 -4
  147. package/lib/free-form/element/index.js +10 -10
  148. package/lib/free-form/index.js +3 -3
  149. package/lib/free-form/page/index.js +15 -15
  150. package/lib/free-form/pages/index.js +2 -2
  151. package/lib/free-form/section/index.js +4 -4
  152. package/lib/free-form/step/index.js +14 -14
  153. package/lib/free-form/steps/index.js +2 -2
  154. package/lib/global-message/index.js +12 -12
  155. package/lib/home-menu/index.js +18 -18
  156. package/lib/index.d.ts +1 -1
  157. package/lib/index.js +7 -0
  158. package/lib/input/amount.js +2 -2
  159. package/lib/input/credit-card.js +4 -4
  160. package/lib/input/email.js +1 -1
  161. package/lib/input/expiry-date.js +3 -3
  162. package/lib/input/input-date.js +3 -3
  163. package/lib/input/input-number.js +1 -1
  164. package/lib/input/input.js +1 -1
  165. package/lib/input/otp.js +6 -6
  166. package/lib/input/password.js +4 -4
  167. package/lib/input/phone-number.js +4 -4
  168. package/lib/input/text-area.js +4 -4
  169. package/lib/layout/defaultFooter.js +28 -28
  170. package/lib/layout/defaultHeader.js +6 -6
  171. package/lib/layout/footer.js +66 -66
  172. package/lib/layout/header.js +25 -25
  173. package/lib/layout/index.js +4 -4
  174. package/lib/locale/en-US/messages.json +1 -0
  175. package/lib/locale/id-ID/messages.json +3 -2
  176. package/lib/locale/locale-provider.js +2 -2
  177. package/lib/locale/th-TH/messages.json +3 -2
  178. package/lib/locale/vi-VN/messages.json +3 -2
  179. package/lib/locale/zh-CN/messages.json +3 -2
  180. package/lib/login-page/index.js +16 -16
  181. package/lib/media/index.js +15 -15
  182. package/lib/media/media.js +8 -8
  183. package/lib/media/preview.js +6 -6
  184. package/lib/mobile-insurer-detail/index.js +18 -18
  185. package/lib/mobile-insurer-list/index.js +11 -11
  186. package/lib/modal/index.js +8 -8
  187. package/lib/platform/platform-card/index.js +5 -5
  188. package/lib/platform/switch-platform/index.js +12 -12
  189. package/lib/policy-list/index.js +4 -4
  190. package/lib/policy-list/policy-card.js +32 -32
  191. package/lib/radio/index.d.ts +2 -1
  192. package/lib/radio/index.js +21 -12
  193. package/lib/radio/radio-group-with-other.d.ts +6 -0
  194. package/lib/radio/radio-group-with-other.js +98 -0
  195. package/lib/select/attached-select.js +16 -19
  196. package/lib/select/select.js +5 -8
  197. package/lib/select/time-select.js +20 -20
  198. package/lib/status-box/index.js +2 -2
  199. package/lib/table/index.js +33 -33
  200. package/lib/tabs/index.js +1 -1
  201. package/lib/typography/index.js +10 -3
  202. package/lib/upload/index.js +28 -28
  203. package/lib/upload-photo/index.js +30 -34
  204. package/lib/upload-photo/media.js +4 -4
  205. package/lib/upload-preview/index.js +10 -10
  206. package/lib/upload-preview/media.js +8 -8
  207. package/lib/utils/form-utils.d.ts +1 -1
  208. package/lib/utils/form-utils.js +10 -10
  209. package/package.json +1 -1
@@ -33,6 +33,8 @@ var _uploadPhoto = _interopRequireDefault(require("../upload-photo"));
33
33
 
34
34
  var _render = _interopRequireDefault(require("./render"));
35
35
 
36
+ var _typography = _interopRequireDefault(require("../typography"));
37
+
36
38
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
39
 
38
40
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -54,6 +56,7 @@ var elementMap = {
54
56
  RangePicker: _datePicker.IglooRangePicker,
55
57
  Radio: _radio.default,
56
58
  RadioGroup: _radio.RadioGroup,
59
+ RadioGroupWithOther: _radio.RadioGroupWithOther,
57
60
  Button: _button.default,
58
61
  Select: _select.AttachedSelect,
59
62
  TimeSelect: _select.TimeSelect,
@@ -67,7 +70,8 @@ var elementMap = {
67
70
  UploadPhoto: _uploadPhoto.default,
68
71
  InputDate: _input.InputDate,
69
72
  Confirmation: _confirmation.default,
70
- ExpiryDate: _input.ExpiryDate
73
+ ExpiryDate: _input.ExpiryDate,
74
+ Typography: _typography.default
71
75
  };
72
76
 
73
77
  var Unknown = function Unknown() {
@@ -88,7 +92,7 @@ var useComponent = function useComponent(config) {
88
92
  return {
89
93
  Component: Component,
90
94
  formItemProps: formItemProps,
91
- withoutForm: type === 'Divider' || Boolean(config.withoutForm)
95
+ withoutForm: type === 'Divider' || Boolean(config.withoutForm) || !config.name
92
96
  };
93
97
  }, [config.type]);
94
98
  };
package/lib/form/index.js CHANGED
@@ -272,16 +272,16 @@ var IglooForm = function IglooForm(props, ref) {
272
272
  scrollToFirstError: true,
273
273
  children: [type === 'Pages' && (0, _jsxRuntime.jsx)(_pages.default, {
274
274
  config: config
275
- }, void 0), type === 'Page' && (0, _jsxRuntime.jsx)(_page.default, {
275
+ }), type === 'Page' && (0, _jsxRuntime.jsx)(_page.default, {
276
276
  config: config
277
- }, void 0), type === 'Steps' && (0, _jsxRuntime.jsx)(_steps.default, {
277
+ }), type === 'Steps' && (0, _jsxRuntime.jsx)(_steps.default, {
278
278
  config: config
279
- }, void 0), type === 'Login' && (0, _jsxRuntime.jsx)(_login.default, {
279
+ }), type === 'Login' && (0, _jsxRuntime.jsx)(_login.default, {
280
280
  config: config
281
- }, void 0)]
282
- }, void 0)
283
- }, void 0)
284
- }, void 0);
281
+ })]
282
+ })
283
+ })
284
+ });
285
285
  };
286
286
 
287
287
  var ExportedForm = function () {
@@ -59,7 +59,7 @@ var Login = function Login(_ref) {
59
59
  children: [label && (0, _jsxRuntime.jsx)("div", {
60
60
  className: 'igloo-login-label',
61
61
  children: label
62
- }, void 0), (0, _jsxRuntime.jsx)("div", {
62
+ }), (0, _jsxRuntime.jsx)("div", {
63
63
  className: 'igloo-login-content',
64
64
  children: (0, _jsxRuntime.jsx)(_row.default, {
65
65
  gutter: [32, 24],
@@ -69,8 +69,8 @@ var Login = function Login(_ref) {
69
69
  config: child
70
70
  }, index);
71
71
  })
72
- }, void 0)
73
- }, void 0), showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
72
+ })
73
+ }), showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
74
74
  children: (0, _jsxRuntime.jsx)(_button.default, {
75
75
  type: "primary",
76
76
  htmlType: "submit",
@@ -79,9 +79,9 @@ var Login = function Login(_ref) {
79
79
  children: submitText || formatMessage({
80
80
  id: 'Log in'
81
81
  })
82
- }, void 0)
83
- }, void 0)]
84
- }, void 0);
82
+ })
83
+ })]
84
+ });
85
85
  };
86
86
 
87
87
  var _default = Login;
@@ -97,8 +97,8 @@ var Page = function Page(_ref) {
97
97
  parentName: (0, _formUtils.calcNamePath)(parentName, name)
98
98
  }, index);
99
99
  })
100
- }, void 0)
101
- }, void 0), showFooter && showSubmitButton && (0, _jsxRuntime.jsxs)("div", {
100
+ })
101
+ }), showFooter && showSubmitButton && (0, _jsxRuntime.jsxs)("div", {
102
102
  className: 'igloo-page-footer',
103
103
  children: [onCancel && (0, _jsxRuntime.jsx)(_col.default, {
104
104
  children: (0, _jsxRuntime.jsx)(_button.default, {
@@ -107,8 +107,8 @@ var Page = function Page(_ref) {
107
107
  children: cancelText || formatMessage({
108
108
  id: 'Cancel'
109
109
  })
110
- }, void 0)
111
- }, void 0), !onCancel && (0, _jsxRuntime.jsx)("div", {}, void 0), (0, _jsxRuntime.jsx)(_form.default.Item, {
110
+ })
111
+ }), !onCancel && (0, _jsxRuntime.jsx)("div", {}), (0, _jsxRuntime.jsx)(_form.default.Item, {
112
112
  children: (0, _jsxRuntime.jsx)(_button.default, {
113
113
  type: "primary",
114
114
  htmlType: "submit",
@@ -118,10 +118,10 @@ var Page = function Page(_ref) {
118
118
  children: submitText || formatMessage({
119
119
  id: 'Submit'
120
120
  })
121
- }, void 0)
122
- }, void 0)]
123
- }, void 0)]
124
- }, void 0);
121
+ })
122
+ })]
123
+ })]
124
+ });
125
125
  };
126
126
 
127
127
  var _default = Page;
@@ -199,7 +199,7 @@ var Pages = function Pages(_ref) {
199
199
  padding: md ? 0 : '0 16px'
200
200
  },
201
201
  children: renderElements[current].label
202
- }, void 0), (0, _jsxRuntime.jsxs)("div", {
202
+ }), (0, _jsxRuntime.jsxs)("div", {
203
203
  className: 'igloo-pages-content',
204
204
  children: [renderElements.map(function (child, index) {
205
205
  (0, _invariant.default)(child.type === 'Page', 'Child of Pages should be Page');
@@ -214,11 +214,11 @@ var Pages = function Pages(_ref) {
214
214
  config: child,
215
215
  parentName: (0, _formUtils.calcNamePath)(parentName, name),
216
216
  showFooter: false
217
- }, void 0)
217
+ })
218
218
  }, child.key || child.name);
219
219
  }), (0, _jsxRuntime.jsxs)("div", {
220
220
  className: 'igloo-pages-footer',
221
- children: [current === 0 && (0, _jsxRuntime.jsx)("div", {}, void 0), current > 0 && (0, _jsxRuntime.jsx)(_button.default, {
221
+ children: [current === 0 && (0, _jsxRuntime.jsx)("div", {}), current > 0 && (0, _jsxRuntime.jsx)(_button.default, {
222
222
  className: 'igloo-pages-preview-button',
223
223
  onClick: function onClick() {
224
224
  return setCurrent(current - 1);
@@ -227,7 +227,7 @@ var Pages = function Pages(_ref) {
227
227
  children: previewText || formatMessage({
228
228
  id: 'Previous'
229
229
  })
230
- }, void 0), current < renderElements.length - 1 && (0, _jsxRuntime.jsx)(_button.default, {
230
+ }), current < renderElements.length - 1 && (0, _jsxRuntime.jsx)(_button.default, {
231
231
  className: 'igloo-pages-next-button',
232
232
  onClick: handleNext,
233
233
  disabled: buttonDisabled,
@@ -235,7 +235,7 @@ var Pages = function Pages(_ref) {
235
235
  children: nextText || formatMessage({
236
236
  id: 'Next'
237
237
  })
238
- }, void 0), current === renderElements.length - 1 && showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
238
+ }), current === renderElements.length - 1 && showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
239
239
  children: (0, _jsxRuntime.jsx)(_button.default, {
240
240
  type: "primary",
241
241
  htmlType: "submit",
@@ -245,11 +245,11 @@ var Pages = function Pages(_ref) {
245
245
  children: submitText || formatMessage({
246
246
  id: 'Submit'
247
247
  })
248
- }, void 0)
249
- }, void 0)]
250
- }, void 0)]
251
- }, void 0)]
252
- }, void 0);
248
+ })
249
+ })]
250
+ })]
251
+ })]
252
+ });
253
253
  };
254
254
 
255
255
  var _default = Pages;
@@ -39,7 +39,7 @@ RenderElement.formItemPropsHandler = function (_ref2) {
39
39
  render: render,
40
40
  preview: true,
41
41
  value: value
42
- }, void 0);
42
+ });
43
43
  },
44
44
  fullRow: true,
45
45
  required: false
@@ -94,7 +94,7 @@ var Section = function Section(_ref) {
94
94
  level: "h4",
95
95
  wrapElement: "div",
96
96
  children: label
97
- }), void 0), (0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
97
+ })), (0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
98
98
  className: 'igloo-section-content'
99
99
  }, contentProps), {}, {
100
100
  children: (0, _jsxRuntime.jsx)(_row.default, {
@@ -108,9 +108,9 @@ var Section = function Section(_ref) {
108
108
  setShowStepButton: setShowStepButton
109
109
  }, index);
110
110
  })
111
- }, void 0)
112
- }), void 0)]
113
- }, void 0) : null;
111
+ })
112
+ }))]
113
+ }) : null;
114
114
  };
115
115
 
116
116
  var _default = Section;
@@ -124,11 +124,11 @@ var Step = function Step(_ref) {
124
124
  children: [(index !== total - 1 || showLastIndex) && (0, _jsxRuntime.jsx)("span", {
125
125
  className: "igloo-step-label-index",
126
126
  children: specialDisplayIndex(index + 1)
127
- }, void 0), (0, _jsxRuntime.jsx)("span", {
127
+ }), (0, _jsxRuntime.jsx)("span", {
128
128
  className: "igloo-step-label-text",
129
129
  children: label
130
- }, void 0)]
131
- }, void 0), !preview && (index !== total - 1 || showLastIndex) && (0, _jsxRuntime.jsx)("div", {
130
+ })]
131
+ }), !preview && (index !== total - 1 || showLastIndex) && (0, _jsxRuntime.jsx)("div", {
132
132
  className: "igloo-step-label-step-count",
133
133
  children: formatMessage({
134
134
  id: "{currentStep} of {allSteps}",
@@ -137,7 +137,7 @@ var Step = function Step(_ref) {
137
137
  allSteps: displayTotal
138
138
  }
139
139
  })
140
- }, void 0), preview && (0, _jsxRuntime.jsx)(_button.default, {
140
+ }), preview && (0, _jsxRuntime.jsx)(_button.default, {
141
141
  type: "link",
142
142
  className: "igloo-step-label-edit",
143
143
  onClick: handleEdit,
@@ -145,8 +145,8 @@ var Step = function Step(_ref) {
145
145
  children: editButtonLabel || formatMessage({
146
146
  id: 'Edit'
147
147
  })
148
- }, void 0)]
149
- }, void 0), (edit || preview) && (0, _jsxRuntime.jsxs)("div", {
148
+ })]
149
+ }), (edit || preview) && (0, _jsxRuntime.jsxs)("div", {
150
150
  className: 'igloo-step-content',
151
151
  children: [(0, _jsxRuntime.jsx)(_row.default, {
152
152
  gutter: [32, preview ? 16 : 24],
@@ -158,7 +158,7 @@ var Step = function Step(_ref) {
158
158
  preview: preview
159
159
  }, index);
160
160
  })
161
- }, void 0), edit && index !== total - 1 && showButton && (0, _jsxRuntime.jsx)(_row.default, {
161
+ }), edit && index !== total - 1 && showButton && (0, _jsxRuntime.jsx)(_row.default, {
162
162
  children: (0, _jsxRuntime.jsx)(_button.default, {
163
163
  onClick: handleNext,
164
164
  className: 'igloo-step-button',
@@ -167,8 +167,8 @@ var Step = function Step(_ref) {
167
167
  children: buttonText || continueText || formatMessage({
168
168
  id: 'Continue'
169
169
  })
170
- }, void 0)
171
- }, void 0), edit && index === total - 1 && showButton && showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
170
+ })
171
+ }), edit && index === total - 1 && showButton && showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
172
172
  style: {
173
173
  marginBottom: 0
174
174
  },
@@ -181,12 +181,12 @@ var Step = function Step(_ref) {
181
181
  children: buttonText || submitText || formatMessage({
182
182
  id: 'Submit'
183
183
  })
184
- }, void 0)
185
- }, void 0)]
186
- }, void 0), !edit && !preview && (0, _jsxRuntime.jsx)(_divider.default, {
184
+ })
185
+ })]
186
+ }), !edit && !preview && (0, _jsxRuntime.jsx)(_divider.default, {
187
187
  className: "igloo-step-divider"
188
- }, void 0)]
189
- }, void 0);
188
+ })]
189
+ });
190
190
  };
191
191
 
192
192
  var _default = Step;
@@ -202,8 +202,8 @@ var Steps = function Steps(_ref) {
202
202
  shouldScroll: shouldScroll
203
203
  }, child.key || child.name);
204
204
  })
205
- }, void 0)
206
- }, void 0);
205
+ })
206
+ });
207
207
  };
208
208
 
209
209
  var _default = Steps;
@@ -9,10 +9,18 @@ require("antd/es/row/style");
9
9
 
10
10
  var _row = _interopRequireDefault(require("antd/es/row"));
11
11
 
12
+ require("antd/es/divider/style");
13
+
14
+ var _divider = _interopRequireDefault(require("antd/es/divider"));
15
+
12
16
  require("antd/es/col/style");
13
17
 
14
18
  var _col = _interopRequireDefault(require("antd/es/col"));
15
19
 
20
+ require("antd/es/grid/style");
21
+
22
+ var _grid = _interopRequireDefault(require("antd/es/grid"));
23
+
16
24
  var _jsxRuntime = require("react/jsx-runtime");
17
25
 
18
26
  var _react = require("react");
@@ -59,6 +67,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
59
67
 
60
68
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
61
69
 
70
+ var useBreakpoint = _grid.default.useBreakpoint;
71
+
62
72
  var AddableSection = function AddableSection(props) {
63
73
  var name = props.name,
64
74
  _props$label = props.label,
@@ -81,6 +91,9 @@ var AddableSection = function AddableSection(props) {
81
91
  addButtonIcon = props.addButtonIcon,
82
92
  children = props.children;
83
93
 
94
+ var _useBreakpoint = useBreakpoint(),
95
+ md = _useBreakpoint.md;
96
+
84
97
  var _useReducer = (0, _react.useReducer)(function (r) {
85
98
  return r + 1;
86
99
  }, 0),
@@ -244,14 +257,18 @@ var AddableSection = function AddableSection(props) {
244
257
  return (0, _jsxRuntime.jsxs)(_col.default, {
245
258
  span: 24,
246
259
  className: 'igloo-addable-section',
247
- children: [(groupKeys.length > min && !preview || label) && (0, _jsxRuntime.jsxs)(_row.default, {
260
+ children: [index > 0 && (0, _jsxRuntime.jsx)(_divider.default, {
261
+ style: {
262
+ margin: !md ? preview ? '16px 0 24px 0' : '24px 0' : preview ? '16px 0 24px' : '32px 0 24px 0'
263
+ }
264
+ }), (groupKeys.length > min && !preview || label) && (0, _jsxRuntime.jsxs)(_row.default, {
248
265
  justify: "space-between",
249
266
  className: 'igloo-addable-section-label',
250
- children: [label ? (0, _jsxRuntime.jsxs)(_typography.default, _objectSpread(_objectSpread({}, labelProps), {}, {
251
- level: "h4",
267
+ children: [label ? (0, _jsxRuntime.jsx)(_typography.default, _objectSpread(_objectSpread({}, labelProps), {}, {
268
+ level: !md ? 'body1' : 'h3b',
252
269
  wrapElement: "div",
253
- children: [label, " ", index + 1]
254
- }), void 0) : (0, _jsxRuntime.jsx)("div", {}, void 0), groupKeys.length > min && !preview && (0, _jsxRuntime.jsx)(_button.default, {
270
+ children: label
271
+ })) : (0, _jsxRuntime.jsx)("div", {}), groupKeys.length > min && !preview && (0, _jsxRuntime.jsx)(_button.default, {
255
272
  type: "link",
256
273
  className: "igloo-addable-section-label-remove",
257
274
  onClick: function onClick() {
@@ -263,15 +280,18 @@ var AddableSection = function AddableSection(props) {
263
280
  children: formatMessage({
264
281
  id: 'Remove'
265
282
  })
266
- }, void 0)]
267
- }, void 0), (0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
283
+ })]
284
+ }), (0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
268
285
  className: 'igloo-addable-section-content'
269
286
  }, contentProps), {}, {
287
+ style: {
288
+ marginTop: !md ? 16 : preview ? 16 : 24
289
+ },
270
290
  children: (0, _jsxRuntime.jsx)(_row.default, {
271
291
  gutter: [32, preview ? 16 : 24],
272
292
  children: transformChildren(parentName)
273
- }, void 0)
274
- }), void 0)]
293
+ })
294
+ }))]
275
295
  }, key);
276
296
  });
277
297
  return (0, _jsxRuntime.jsxs)("div", {
@@ -282,7 +302,7 @@ var AddableSection = function AddableSection(props) {
282
302
  children: [groups, groupKeys.length < max && !preview && (0, _jsxRuntime.jsx)(_col.default, {
283
303
  span: 24,
284
304
  style: {
285
- marginTop: 16
305
+ marginTop: !md ? 24 : 32
286
306
  },
287
307
  children: (0, _jsxRuntime.jsx)(_button.default, {
288
308
  onClick: function onClick() {
@@ -296,9 +316,9 @@ var AddableSection = function AddableSection(props) {
296
316
  children: addButtonText || "".concat(formatMessage({
297
317
  id: 'Add'
298
318
  }), " ").concat(label)
299
- }, void 0)
300
- }, void 0)]
301
- }, void 0);
319
+ })
320
+ })]
321
+ });
302
322
  };
303
323
 
304
324
  var _default = AddableSection;
@@ -10,10 +10,6 @@
10
10
  .igloo-addable-section-content {
11
11
  margin-top: 16px;
12
12
  }
13
-
14
- & + .igloo-addable-section {
15
- margin-top: 24px;
16
- }
17
13
  }
18
14
 
19
15
  .igloo-addable-section-button {
@@ -280,7 +280,7 @@ var Element = function Element(props) {
280
280
  xs: 24,
281
281
  className: "igloo-freeform-element-preview-label",
282
282
  children: rest.previewLabel || rest.label
283
- }, void 0), (0, _jsxRuntime.jsxs)(_col.default, {
283
+ }), (0, _jsxRuntime.jsxs)(_col.default, {
284
284
  span: rest.previewLabel || rest.label ? 12 : 24,
285
285
  md: rest.previewLabel || rest.label ? 12 : 24,
286
286
  sm: 24,
@@ -288,13 +288,13 @@ var Element = function Element(props) {
288
288
  className: "igloo-freeform-element-preview-value",
289
289
  children: [error && !!error.length && (0, _jsxRuntime.jsx)(_iglooicon.AlertFilled, {
290
290
  className: "igloo-freeform-element-preview-value-icon"
291
- }, void 0), (0, _jsxRuntime.jsx)("div", {
291
+ }), (0, _jsxRuntime.jsx)("div", {
292
292
  children: previewFormater ? previewFormater(value, form) : _typeof(value) === 'object' ? JSON.stringify(value) : value
293
- }, void 0)]
294
- }, void 0)]
295
- }, void 0)
296
- }), void 0)
297
- }, void 0);
293
+ })]
294
+ })]
295
+ })
296
+ }))
297
+ });
298
298
  }
299
299
 
300
300
  return props.hideWhenEdit ? null : (0, _jsxRuntime.jsx)(_col.default, _objectSpread(_objectSpread({}, restColProps), {}, {
@@ -315,9 +315,9 @@ var Element = function Element(props) {
315
315
  }, (0, _omit.default)(formItemProps, ['copiedValue', 'selectedValue'])), {}, {
316
316
  className: "igloo-freeform-element-edit",
317
317
  children: transformChildren()
318
- }), void 0)
319
- }, void 0)
320
- }), void 0);
318
+ }))
319
+ })
320
+ }));
321
321
  };
322
322
 
323
323
  Element.displayName = 'Igloo_Free_Form_Item';
@@ -223,9 +223,9 @@ var FreeForm = function FreeForm(props) {
223
223
  initialValues: initialValues,
224
224
  scrollToFirstError: true,
225
225
  children: children
226
- }, void 0)
227
- }, void 0)
228
- }, void 0);
226
+ })
227
+ })
228
+ });
229
229
  };
230
230
 
231
231
  FreeForm.useForm = _form.default.useForm;
@@ -213,7 +213,7 @@ var Page = function Page(_ref) {
213
213
  marginBottom: 8
214
214
  },
215
215
  children: label
216
- }, void 0), (0, _jsxRuntime.jsx)(_typography.default, {
216
+ }), (0, _jsxRuntime.jsx)(_typography.default, {
217
217
  level: "body1",
218
218
  wrapElement: "div",
219
219
  style: {
@@ -221,15 +221,15 @@ var Page = function Page(_ref) {
221
221
  color: '#666666'
222
222
  },
223
223
  children: description
224
- }, void 0), (0, _jsxRuntime.jsx)("div", {
224
+ }), (0, _jsxRuntime.jsx)("div", {
225
225
  className: 'igloo-freeform-page-content',
226
226
  children: (0, _jsxRuntime.jsx)(_row.default, {
227
227
  gutter: [32, 24],
228
228
  children: tranformChildren()
229
- }, void 0)
230
- }, void 0), showFooter && showSubmitButton && (current === undefined || index === undefined || total === undefined ? (0, _jsxRuntime.jsxs)("div", {
229
+ })
230
+ }), showFooter && showSubmitButton && (current === undefined || index === undefined || total === undefined ? (0, _jsxRuntime.jsxs)("div", {
231
231
  className: 'igloo-freeform-page-footer',
232
- children: [buttonPlacement === 'right' && (0, _jsxRuntime.jsx)("div", {}, void 0), (0, _jsxRuntime.jsx)(_form.default.Item, {
232
+ children: [buttonPlacement === 'right' && (0, _jsxRuntime.jsx)("div", {}), (0, _jsxRuntime.jsx)(_form.default.Item, {
233
233
  children: (0, _jsxRuntime.jsx)(_button.default, {
234
234
  type: "primary",
235
235
  htmlType: "submit",
@@ -239,11 +239,11 @@ var Page = function Page(_ref) {
239
239
  children: submitText || formatMessage({
240
240
  id: 'Submit'
241
241
  })
242
- }, void 0)
243
- }, void 0), buttonPlacement === 'left' && (0, _jsxRuntime.jsx)("div", {}, void 0)]
244
- }, void 0) : (0, _jsxRuntime.jsxs)("div", {
242
+ })
243
+ }), buttonPlacement === 'left' && (0, _jsxRuntime.jsx)("div", {})]
244
+ }) : (0, _jsxRuntime.jsxs)("div", {
245
245
  className: 'igloo-freeform-page-footer',
246
- children: [index === 0 && (0, _jsxRuntime.jsx)("div", {}, void 0), index > 0 && total > 1 && (0, _jsxRuntime.jsx)(_button.default, {
246
+ children: [index === 0 && (0, _jsxRuntime.jsx)("div", {}), index > 0 && total > 1 && (0, _jsxRuntime.jsx)(_button.default, {
247
247
  className: 'igloo-freeform-page-preview-button',
248
248
  onClick: function onClick() {
249
249
  return handlePreviousPage && handlePreviousPage(index);
@@ -252,7 +252,7 @@ var Page = function Page(_ref) {
252
252
  children: previewText || formatMessage({
253
253
  id: 'Previous'
254
254
  })
255
- }, void 0), index < total - 1 && (0, _jsxRuntime.jsx)(_button.default, {
255
+ }), index < total - 1 && (0, _jsxRuntime.jsx)(_button.default, {
256
256
  className: 'igloo-freeform-page-next-button',
257
257
  onClick: handleNext,
258
258
  disabled: buttonDisabled,
@@ -260,7 +260,7 @@ var Page = function Page(_ref) {
260
260
  children: nextText || formatMessage({
261
261
  id: 'Next'
262
262
  })
263
- }, void 0), current === total - 1 && (0, _jsxRuntime.jsx)(_form.default.Item, {
263
+ }), current === total - 1 && (0, _jsxRuntime.jsx)(_form.default.Item, {
264
264
  children: (0, _jsxRuntime.jsx)(_button.default, {
265
265
  type: "primary",
266
266
  htmlType: "submit",
@@ -270,10 +270,10 @@ var Page = function Page(_ref) {
270
270
  children: submitText || formatMessage({
271
271
  id: 'Submit'
272
272
  })
273
- }, void 0)
274
- }, void 0)]
275
- }, void 0))]
276
- }, void 0);
273
+ })
274
+ })]
275
+ }))]
276
+ });
277
277
  };
278
278
 
279
279
  Page.displayName = 'Igloo_Free_Form_Page';
@@ -95,8 +95,8 @@ var Pages = function Pages(_ref) {
95
95
  children: (0, _jsxRuntime.jsx)("div", {
96
96
  className: 'igloo-freeform-pages-content',
97
97
  children: transformChildren()
98
- }, void 0)
99
- }, void 0);
98
+ })
99
+ });
100
100
  };
101
101
 
102
102
  var _default = Pages;
@@ -197,15 +197,15 @@ var Section = function Section(props) {
197
197
  level: "h4",
198
198
  wrapElement: "div",
199
199
  children: label
200
- }), void 0), (0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
200
+ })), (0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({
201
201
  className: 'igloo-freeform-section-content'
202
202
  }, contentProps), {}, {
203
203
  children: (0, _jsxRuntime.jsx)(_row.default, {
204
204
  gutter: [32, preview ? 16 : 24],
205
205
  children: transformChildren()
206
- }, void 0)
207
- }), void 0)]
208
- }, void 0) : null;
206
+ })
207
+ }))]
208
+ }) : null;
209
209
  };
210
210
 
211
211
  Section.displayName = 'Igloo_Free_Form_Section';
@@ -252,11 +252,11 @@ var Step = function Step(_ref) {
252
252
  children: [(index !== total - 1 || showLastIndex) && (0, _jsxRuntime.jsx)("span", {
253
253
  className: "igloo-freeform-step-label-index",
254
254
  children: specialDisplayIndex(index + 1)
255
- }, void 0), (0, _jsxRuntime.jsx)("span", {
255
+ }), (0, _jsxRuntime.jsx)("span", {
256
256
  className: "igloo-freeform-step-label-text",
257
257
  children: label
258
- }, void 0)]
259
- }, void 0), !preview && (index !== total - 1 || showLastIndex) && (0, _jsxRuntime.jsx)("div", {
258
+ })]
259
+ }), !preview && (index !== total - 1 || showLastIndex) && (0, _jsxRuntime.jsx)("div", {
260
260
  className: "igloo-freeform-step-label-step-count",
261
261
  children: formatMessage({
262
262
  id: "{currentStep} of {allSteps}",
@@ -265,7 +265,7 @@ var Step = function Step(_ref) {
265
265
  allSteps: displayTotal
266
266
  }
267
267
  })
268
- }, void 0), preview && (0, _jsxRuntime.jsx)(_button.default, {
268
+ }), preview && (0, _jsxRuntime.jsx)(_button.default, {
269
269
  type: "link",
270
270
  className: "igloo-freeform-step-label-edit",
271
271
  onClick: handleEdit,
@@ -273,13 +273,13 @@ var Step = function Step(_ref) {
273
273
  children: editButtonLabel || formatMessage({
274
274
  id: 'Edit'
275
275
  })
276
- }, void 0)]
277
- }, void 0), (edit || preview) && (0, _jsxRuntime.jsxs)("div", {
276
+ })]
277
+ }), (edit || preview) && (0, _jsxRuntime.jsxs)("div", {
278
278
  className: 'igloo-freeform-step-content',
279
279
  children: [(0, _jsxRuntime.jsx)(_row.default, {
280
280
  gutter: [32, preview ? 16 : 24],
281
281
  children: transformChildren()
282
- }, void 0), edit && index !== total - 1 && showButton && (0, _jsxRuntime.jsx)(_row.default, {
282
+ }), edit && index !== total - 1 && showButton && (0, _jsxRuntime.jsx)(_row.default, {
283
283
  children: (0, _jsxRuntime.jsx)(_button.default, {
284
284
  onClick: handleNext,
285
285
  className: 'igloo-freeform-step-button',
@@ -288,8 +288,8 @@ var Step = function Step(_ref) {
288
288
  children: buttonText || continueText || formatMessage({
289
289
  id: 'Continue'
290
290
  })
291
- }, void 0)
292
- }, void 0), edit && index === total - 1 && showButton && showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
291
+ })
292
+ }), edit && index === total - 1 && showButton && showSubmitButton && (0, _jsxRuntime.jsx)(_form.default.Item, {
293
293
  style: {
294
294
  marginBottom: 0
295
295
  },
@@ -302,12 +302,12 @@ var Step = function Step(_ref) {
302
302
  children: buttonText || submitText || formatMessage({
303
303
  id: 'Submit'
304
304
  })
305
- }, void 0)
306
- }, void 0)]
307
- }, void 0), !edit && !preview && (0, _jsxRuntime.jsx)(_divider.default, {
305
+ })
306
+ })]
307
+ }), !edit && !preview && (0, _jsxRuntime.jsx)(_divider.default, {
308
308
  className: "igloo-freeform-step-divider"
309
- }, void 0)]
310
- }, void 0);
309
+ })]
310
+ });
311
311
  };
312
312
 
313
313
  var _default = Step;