intelicoreact 0.2.93 → 0.2.96

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.
@@ -49,7 +49,7 @@ var CheckboxInput = function CheckboxInput(_ref) {
49
49
  ref: function ref(elem) {
50
50
  if (elem) elem.indeterminate = isStark;
51
51
  },
52
- "data-testid": "checkbox--input--".concat(testId || id || key || (label === null || label === void 0 ? void 0 : label.replace(/\s/g, '-')))
52
+ "data-testid": "checkbox--input--".concat(testId || key)
53
53
  })), /*#__PURE__*/_react.default.createElement("span", {
54
54
  className: "checkbox-input__mark"
55
55
  })), label && /*#__PURE__*/_react.default.createElement("div", {
@@ -77,7 +77,6 @@ var TieredCheckboxes = function TieredCheckboxes(_ref) {
77
77
  return item;
78
78
  });
79
79
  parent.disabled = true;
80
- console.log(parent);
81
80
  } else {
82
81
  var _parent = items.find(function (item) {
83
82
  return item.key === parentKey;
@@ -108,6 +107,7 @@ var TieredCheckboxes = function TieredCheckboxes(_ref) {
108
107
  key: child.key,
109
108
  className: "".concat(RC, "__children")
110
109
  }, /*#__PURE__*/_react.default.createElement(_CheckboxInput.default, {
110
+ testId: child.key,
111
111
  label: child.label,
112
112
  value: child.value,
113
113
  disabled: child === null || child === void 0 ? void 0 : child.disabled,
@@ -75,22 +75,36 @@ var AccordionTable = function AccordionTable(_ref) {
75
75
  key = _ref3[0],
76
76
  value = _ref3[1];
77
77
 
78
- return /*#__PURE__*/_react.default.createElement("div", {
78
+ return key !== 'promoDetails' && /*#__PURE__*/_react.default.createElement("div", {
79
79
  key: key,
80
80
  style: {
81
81
  flexBasis: "".concat((_getHeaderItem = getHeaderItem(key)) === null || _getHeaderItem === void 0 ? void 0 : _getHeaderItem.width, "%")
82
82
  },
83
- className: (0, _classnames.default)('accordion-table__td', (_getHeaderItem2 = getHeaderItem(key)) === null || _getHeaderItem2 === void 0 ? void 0 : _getHeaderItem2.className)
83
+ className: (0, _classnames.default)('accordion-table__td', "accordion-table__td--".concat(key), (_getHeaderItem2 = getHeaderItem(key)) === null || _getHeaderItem2 === void 0 ? void 0 : _getHeaderItem2.className)
84
84
  }, (0, _typeof2.default)(value) !== 'object' ? value : value.value);
85
85
  });
86
86
  };
87
87
 
88
88
  var renderTr = function renderTr(rows) {
89
89
  return rows === null || rows === void 0 ? void 0 : rows.map(function (row, index) {
90
+ var _row$cols, _row$cols2, _row$cols3;
91
+
90
92
  return /*#__PURE__*/_react.default.createElement("div", {
91
93
  key: index,
92
- className: (0, _classnames.default)('accordion-table__tr', row.className)
93
- }, renderTd(row.cols || row));
94
+ className: (0, _classnames.default)('accordion-table__tr', {
95
+ 'accordion-table__tr-with-promo': row.promoDetails || ((_row$cols = row.cols) === null || _row$cols === void 0 ? void 0 : _row$cols.promoDetails)
96
+ }, row.className)
97
+ }, /*#__PURE__*/_react.default.createElement("div", {
98
+ className: "df w100"
99
+ }, renderTd(row.cols || row)), row.promoDetails || ((_row$cols2 = row.cols) === null || _row$cols2 === void 0 ? void 0 : _row$cols2.promoDetails) && /*#__PURE__*/_react.default.createElement("div", {
100
+ className: "accordion-table__tr-promo-wrapper"
101
+ }, /*#__PURE__*/_react.default.createElement("div", {
102
+ className: "accordion-table__tr-promo"
103
+ }, /*#__PURE__*/_react.default.createElement(_reactFeather.Tag, {
104
+ className: "tr-promo-icon"
105
+ }), /*#__PURE__*/_react.default.createElement("span", {
106
+ className: "tr-promo-label"
107
+ }, "PROMOTION"), row.promoDetails || ((_row$cols3 = row.cols) === null || _row$cols3 === void 0 ? void 0 : _row$cols3.promoDetails))));
94
108
  });
95
109
  };
96
110
 
@@ -101,14 +115,32 @@ var AccordionTable = function AccordionTable(_ref) {
101
115
  },
102
116
  className: "accordion-table__accordion-label-box"
103
117
  }, /*#__PURE__*/_react.default.createElement("div", {
104
- className: "j4"
118
+ className: "accordion-table__accordion-label-wrapper j4"
105
119
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.ChevronDown, {
120
+ width: 8,
121
+ height: 4,
106
122
  className: (0, _classnames.default)('accordion-label-box__icon', {
107
123
  'accordion-label-box__icon--open': row.isOpen
108
124
  })
109
125
  }), /*#__PURE__*/_react.default.createElement("span", {
110
126
  className: "accordion-label-box__label"
111
- }, row.label)), /*#__PURE__*/_react.default.createElement("div", null, row.titleContent));
127
+ }, row.label), row.statistics && /*#__PURE__*/_react.default.createElement("div", {
128
+ className: (0, _classnames.default)('accordion-table__tr', row.className)
129
+ }, Object.entries(row.statistics).map(function (_ref4) {
130
+ var _getHeaderItem3, _getHeaderItem4;
131
+
132
+ var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
133
+ key = _ref5[0],
134
+ value = _ref5[1];
135
+
136
+ return /*#__PURE__*/_react.default.createElement("div", {
137
+ key: key,
138
+ style: {
139
+ flexBasis: "".concat((_getHeaderItem3 = getHeaderItem(key)) === null || _getHeaderItem3 === void 0 ? void 0 : _getHeaderItem3.width, "%")
140
+ },
141
+ className: (0, _classnames.default)('accordion-table__statistics-td', (_getHeaderItem4 = getHeaderItem(key)) === null || _getHeaderItem4 === void 0 ? void 0 : _getHeaderItem4.className)
142
+ }, value);
143
+ }))), row.titleContent);
112
144
  };
113
145
 
114
146
  (0, _react.useEffect)(function () {
@@ -1,9 +1,9 @@
1
1
  .accordion-table {
2
2
  display: flex;
3
- flex-direction: column;
3
+ overflow-x: auto;
4
4
  align-items: flex-start;
5
+ flex-direction: column;
5
6
  justify-content: flex-start;
6
- overflow-x: auto;
7
7
  width: 100%;
8
8
  min-width: 700px;
9
9
 
@@ -17,22 +17,23 @@
17
17
  &__header-item {
18
18
  display: flex;
19
19
  align-items: center;
20
- white-space: nowrap;
20
+ padding: 5px 10px;
21
21
  user-select: none;
22
+ white-space: nowrap;
22
23
  text-transform: uppercase;
23
24
  color: #757f8c;
25
+ background-color: #ebeff2;
24
26
  font-size: 11px;
25
27
  font-weight: 500;
26
- padding: 5px 10px;
27
- background-color: #ebeff2;
28
28
 
29
29
  &:first-child {
30
- border-top-left-radius: 8px;
31
30
  padding-left: 15px;
31
+ border-top-left-radius: 8px;
32
32
  }
33
+
33
34
  &:last-child {
34
- border-top-right-radius: 8px;
35
35
  padding-right: 15px;
36
+ border-top-right-radius: 8px;
36
37
  }
37
38
  }
38
39
 
@@ -44,27 +45,29 @@
44
45
  &:not(:first-child) {
45
46
  border-top: 1px solid #ebeff2;
46
47
  }
48
+
47
49
  &:last-child {
48
50
  .mono-accordion__container {
49
- border-bottom-left-radius: 8px;
50
51
  border-bottom-right-radius: 8px;
52
+ border-bottom-left-radius: 8px;
51
53
  }
52
54
  }
53
55
 
54
56
  &--closed {
55
57
  .mono-accordion__head {
56
58
  transition: all 0.3s ease-out;
57
- box-shadow: 0px 5px 8px rgba(255, 255, 255, 0.12)!important;
59
+ box-shadow: 0 5px 8px rgb(255 255 255 / 12%) !important;
58
60
  }
59
61
 
60
62
  .mono-accordion__container {
61
63
  transition: all 0.3s ease-out;
62
64
  opacity: 0;
63
65
  }
66
+
64
67
  &:last-child {
65
68
  .mono-accordion__head {
66
- border-bottom-left-radius: 8px;
67
69
  border-bottom-right-radius: 8px;
70
+ border-bottom-left-radius: 8px;
68
71
  }
69
72
  }
70
73
  }
@@ -82,9 +85,9 @@
82
85
  }
83
86
 
84
87
  &__td {
85
- padding: 15px 0px;
86
- border-bottom: 1px solid #ebeff2;
88
+ padding: 11.5px 0;
87
89
  white-space: nowrap;
90
+ border-bottom: 1px solid #ebeff2;
88
91
  font-size: 14px;
89
92
  font-weight: 400;
90
93
 
@@ -96,8 +99,14 @@
96
99
  margin-right: 15px;
97
100
  }
98
101
 
99
- &:not(:first-child):not(:last-child) {
100
- padding-right: 30px;
102
+ &:not(:first-child, :last-child) {
103
+ padding-right: 20px;
104
+ }
105
+
106
+ &--name {
107
+ text-overflow: ellipsis;
108
+ white-space: nowrap;
109
+ overflow: hidden;
101
110
  }
102
111
  }
103
112
 
@@ -107,24 +116,107 @@
107
116
  justify-content: space-between;
108
117
  }
109
118
 
119
+ &__accordion-label-wrapper {
120
+ width: 100%;
121
+ max-height: 19px;
122
+
123
+ .accordion-table__tr {
124
+ justify-content: flex-end;
125
+ background-color: unset !important;
126
+ }
127
+
128
+ .accordion-table__td:first-child {
129
+ margin-left: 0;
130
+ }
131
+
132
+ .accordion-table__td:last-child {
133
+ margin-right: 0;
134
+ }
135
+ }
136
+
137
+ &__statistics-td {
138
+ padding: 15px 0;
139
+ white-space: nowrap;
140
+ font-size: 14px;
141
+ font-weight: 400;
142
+
143
+ &:not(:last-child) {
144
+ padding-right: 53px;
145
+ display: flex;
146
+ align-items: center;
147
+ }
148
+ }
149
+
150
+ &__tr-promo-wrapper {
151
+ margin-left: 50px;
152
+ margin-right: 15px;
153
+ border-bottom: 1px solid #ebeff2;
154
+ }
155
+
156
+ &__tr-with-promo {
157
+ flex-direction: column;
158
+
159
+ .accordion-table__td {
160
+ border-bottom: none;
161
+ padding: 15px 0 8px;
162
+ }
163
+ }
164
+
165
+ &__tr-promo {
166
+ background-color: #fff4e5;
167
+ border: 1px solid #ffce9f;
168
+ border-radius: 8px;
169
+ height: 16px;
170
+ display: flex;
171
+ align-items: center;
172
+ padding: 4px 8px;
173
+ font-size: 12px;
174
+ font-weight: 400;
175
+ line-height: 18px;
176
+ letter-spacing: 0.2px;
177
+ color: #3b414b;
178
+ margin-bottom: 10px;
179
+ width: 40%;
180
+ }
181
+
182
+ &__status-icon {
183
+ color: #fa564c;
184
+ margin-right: 5px;
185
+ margin-top: 2px;
186
+ }
187
+
188
+ .tr-promo-icon {
189
+ color: #ff7d00;
190
+ }
191
+
192
+ .tr-promo-label {
193
+ font-weight: 600;
194
+ color: #ff7d00;
195
+ margin-right: 8px;
196
+ }
197
+
110
198
  .accordion-label-box {
111
199
  &__label {
112
200
  user-select: none;
201
+ white-space: nowrap;
202
+ margin-left: 15px;
113
203
  }
204
+
114
205
  &__icon {
115
- transition: all 0.2s ease-out;
116
- color: #757f8c;
117
- margin-right: 5px;
118
- min-width: 32px;
119
- max-width: 32px;
206
+ min-width: 15px;
207
+ max-width: 15px;
120
208
  min-height: 16px;
121
209
  max-height: 16px;
210
+ transition: all 0.2s ease-out;
211
+ color: #757f8c;
122
212
 
123
213
  &--open {
124
214
  transform: rotate(180deg);
125
215
  }
126
216
  }
217
+
127
218
  &__status {
219
+ white-space: nowrap;
128
220
  font-size: 12px;
129
221
  font-weight: 400;
130
222
  }
@@ -132,17 +224,19 @@
132
224
 
133
225
  .mono-accordion {
134
226
  &__head {
135
- padding: 14.5px;
136
- box-shadow: 0px 5px 8px rgba(39, 73, 113, 0.12);
137
- background-color: #ffff;
138
227
  position: relative;
139
228
  z-index: 2;
229
+ padding: 14.5px 15px 14.5px 20px;
230
+ background-color: #ffff;
231
+ box-shadow: 0 5px 8px rgb(39 73 113 / 12%);
140
232
  }
233
+
141
234
  &__container {
142
- flex-direction: row;
143
235
  position: relative;
236
+ flex-direction: row;
144
237
  background-color: #ffff;
145
238
  }
239
+
146
240
  &__content-wrapper {
147
241
  width: 100%;
148
242
  padding: 0;
@@ -14,7 +14,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
14
14
  require("./Status.scss");
15
15
 
16
16
  var Status = function Status(_ref) {
17
- var value = _ref.value,
17
+ var icon = _ref.icon,
18
+ value = _ref.value,
18
19
  label = _ref.label,
19
20
  status = _ref.status,
20
21
  disabled = _ref.disabled,
@@ -30,7 +31,7 @@ var Status = function Status(_ref) {
30
31
  var text = children && typeof children === 'string' ? children : value || label || status;
31
32
  var formatedLabel = (text === null || text === void 0 ? void 0 : text[0].toUpperCase()) + (text === null || text === void 0 ? void 0 : text.slice(1));
32
33
  return /*#__PURE__*/_react.default.createElement("div", {
33
- "data-testid": 'test-status',
34
+ "data-testid": "test-status",
34
35
  className: (0, _classnames.default)({
35
36
  disabled: disabled
36
37
  }, className)
@@ -49,8 +50,10 @@ var Status = function Status(_ref) {
49
50
  'status--no-bg': noBackground
50
51
  }, {
51
52
  'color--gray-gull': noBackground && status === 'pause' && !className
53
+ }, {
54
+ j4: icon
52
55
  })
53
- }, formatedLabel));
56
+ }, icon, formatedLabel));
54
57
  };
55
58
 
56
59
  var _default = Status;
@@ -18,6 +18,7 @@
18
18
  border-radius: 15px;
19
19
  height: 20px;
20
20
  }
21
+
21
22
  &--active,
22
23
  &--approved {
23
24
  color: $color--green-haze;
@@ -76,4 +77,9 @@
76
77
  background-color: $color--border;
77
78
  color: #777;
78
79
  }
80
+
81
+ &--outline {
82
+ border: 1px solid #D6D9E4;
83
+ color: #1F7499;
84
+ }
79
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.2.93",
3
+ "version": "0.2.96",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [