@inseefr/lunatic 0.4.11-v2 → 0.4.14-v2

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.
@@ -11,6 +11,8 @@ var _commons = require("../../commons");
11
11
 
12
12
  var _commons2 = require("../commons");
13
13
 
14
+ require("./checkbox.scss");
15
+
14
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
17
 
16
18
  function onClick() {}
@@ -70,10 +72,7 @@ function CheckboxGroup(_ref3) {
70
72
  var labelId = "lunatic-checkbox-label-".concat(id, "-").concat(name);
71
73
  return /*#__PURE__*/_react["default"].createElement(CheckboxGroupContainer, {
72
74
  key: checkboxId
73
- }, /*#__PURE__*/_react["default"].createElement(_commons.Label, {
74
- id: labelId,
75
- htmlFor: checkboxId
76
- }, label), /*#__PURE__*/_react["default"].createElement(CheckBoxOptionWrapper, {
75
+ }, /*#__PURE__*/_react["default"].createElement(CheckBoxOptionWrapper, {
77
76
  checkboxId: checkboxId,
78
77
  labelId: labelId,
79
78
  checked: optionValue,
@@ -81,7 +80,10 @@ function CheckboxGroup(_ref3) {
81
80
  onKeyDown: onClick,
82
81
  response: response,
83
82
  handleChange: handleChange
84
- }));
83
+ }), /*#__PURE__*/_react["default"].createElement(_commons.Label, {
84
+ id: labelId,
85
+ htmlFor: checkboxId
86
+ }, label));
85
87
  }
86
88
  }
87
89
 
@@ -0,0 +1,3 @@
1
+ .lunatic-checkbox-group-option {
2
+ display: flex;
3
+ }
@@ -38,7 +38,7 @@
38
38
  min-height: 30px;
39
39
  min-width: 260px;
40
40
  width: 100%;
41
-
41
+ height: 100%;
42
42
  .lunatic-combo-box-content {
43
43
  .lunatic-combo-box-selection {
44
44
  border-radius: 5px;
@@ -172,6 +172,7 @@
172
172
  }
173
173
 
174
174
  width: 100%;
175
+ height: 100%;
175
176
  /* */
176
177
  }
177
178
 
@@ -1,4 +1,3 @@
1
1
  .lunatic-icon {
2
2
  display: flex;
3
- justify-content: center;
4
3
  }
@@ -61,7 +61,6 @@
61
61
  padding: 0;
62
62
  font-size: 0.75rem;
63
63
  font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
64
- line-height: 0.75rem;
65
64
  font-weight: bold;
66
65
  margin-bottom: 0.375rem;
67
66
  }
@@ -121,13 +120,11 @@
121
120
  display: inline;
122
121
  }
123
122
 
124
-
125
123
  .field {
126
124
  width: 100%;
127
125
  position: relative;
128
126
  }
129
127
 
130
-
131
128
  .link-md .field-md {
132
129
  border-bottom: dashed 0.1em var(--color-primary-dark);
133
130
  &:hover {
@@ -31,10 +31,10 @@ function InputNumber(_ref) {
31
31
  max = _ref.max,
32
32
  step = _ref.step,
33
33
  unit = _ref.unit;
34
- var valueEffective = value !== null && value !== void 0 ? value : '';
34
+ var valueEffective = value !== null && value !== void 0 ? value : NaN;
35
35
  var handleChange = (0, _react.useCallback)(function (e) {
36
36
  var val = e.target.valueAsNumber;
37
- onChange(val);
37
+ onChange(isNaN(val) ? null : val);
38
38
  }, [onChange]);
39
39
  return /*#__PURE__*/_react["default"].createElement("div", {
40
40
  className: "lunatic-input-number-container"
@@ -79,8 +79,6 @@ function ModalControls(_ref3) {
79
79
  });
80
80
  }, []);
81
81
  return /*#__PURE__*/_react["default"].createElement(_modalContainer["default"], null, /*#__PURE__*/_react["default"].createElement("div", {
82
- className: "title"
83
- }, title), /*#__PURE__*/_react["default"].createElement("div", {
84
82
  className: "body"
85
83
  }, content), /*#__PURE__*/_react["default"].createElement(_closeOrSkip["default"], {
86
84
  onSkip: goNext,
@@ -19,27 +19,32 @@
19
19
  .title {
20
20
  height: 32px;
21
21
  background-color: darkslateblue;
22
- color: gainsboro;
22
+ color: black;
23
23
  font-size: 18px;
24
24
  font-weight: bolder;
25
25
  line-height: 32px;
26
26
  padding: 0 12px;
27
-
27
+ font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
28
28
  border-radius: 8px 8px 0 0;
29
29
  }
30
30
 
31
31
  .body {
32
- padding: 0 12px 0 12px;
32
+ // padding: 0 12px 0 12px;
33
+ padding: 12px 0 0 12px;
33
34
  height: 60%;
34
- background-color: aquamarine;
35
+ color: black;
36
+ font-size: 16px;
37
+ font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
35
38
  }
36
39
 
37
40
  .modal-buttons {
38
- display: block;
39
41
  position: absolute;
40
42
  bottom: 0;
41
43
  right: 0;
42
44
  margin: 0 12px 12px 0;
45
+ :first-child {
46
+ margin-right: 10px;
47
+ }
43
48
  }
44
49
  }
45
50
 
@@ -29,10 +29,7 @@ function Radio(_ref) {
29
29
  return /*#__PURE__*/_react["default"].createElement("div", {
30
30
  key: radioId,
31
31
  className: "lunatic-radio-group-option"
32
- }, /*#__PURE__*/_react["default"].createElement(_commons.Label, {
33
- id: labelId,
34
- htmlFor: radioId
35
- }, label), /*#__PURE__*/_react["default"].createElement(_radioOption["default"], {
32
+ }, /*#__PURE__*/_react["default"].createElement(_radioOption["default"], {
36
33
  id: radioId,
37
34
  labelledBy: labelId,
38
35
  index: index,
@@ -41,7 +38,10 @@ function Radio(_ref) {
41
38
  value: valueOption,
42
39
  onKeyDown: onKeyDown,
43
40
  checkboxStyle: checkboxStyle
44
- }));
41
+ }), /*#__PURE__*/_react["default"].createElement(_commons.Label, {
42
+ id: labelId,
43
+ htmlFor: radioId
44
+ }, label));
45
45
  });
46
46
  }
47
47
 
@@ -57,3 +57,7 @@
57
57
  // margin-top: 0.325em;
58
58
  // }
59
59
  }
60
+
61
+ .lunatic-radio-group-option {
62
+ display: flex;
63
+ }
@@ -174,7 +174,6 @@ function OrchestratorForStories(_ref2) {
174
174
  maxPage: maxPage,
175
175
  getData: getData
176
176
  }), /*#__PURE__*/_react["default"].createElement(lunatic.Modal, {
177
- title: "Des points requi\xE8rent votre attention.",
178
177
  errors: modalErrors,
179
178
  goNext: goNextPage
180
179
  }), /*#__PURE__*/_react["default"].createElement(_waiting["default"], {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inseefr/lunatic",
3
- "version": "0.4.11-v2",
3
+ "version": "0.4.14-v2",
4
4
  "workersVersion": "0.2.4-experimental",
5
5
  "description": "Library of questionnaire components",
6
6
  "repository": {