intelicoreact 0.1.4 → 0.1.6

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 _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
12
  var _TextSwitcher = _interopRequireDefault(require("../TextSwitcher/TextSwitcher"));
13
13
 
14
+ var _Status = _interopRequireDefault(require("../../UI/Status/Status"));
15
+
14
16
  require("./AdvancedStatus.scss");
15
17
 
16
18
  var AdvancedStatus = function AdvancedStatus(_ref) {
@@ -18,7 +20,9 @@ var AdvancedStatus = function AdvancedStatus(_ref) {
18
20
  inactiveText = _ref.inactiveText,
19
21
  activeText = _ref.activeText,
20
22
  value = _ref.value,
21
- disabled = _ref.disabled;
23
+ disabled = _ref.disabled,
24
+ isPrimary = _ref.isPrimary,
25
+ primaryStatusText = _ref.primaryStatusText;
22
26
  var isUndefined = value === undefined || value === null;
23
27
  return /*#__PURE__*/React.createElement("div", {
24
28
  className: (0, _classnames.default)('advanced-status', {
@@ -31,7 +35,10 @@ var AdvancedStatus = function AdvancedStatus(_ref) {
31
35
  inactiveText: inactiveText,
32
36
  activeText: activeText,
33
37
  className: "advanced-status__switcher"
34
- }));
38
+ }), isPrimary && /*#__PURE__*/React.createElement(_Status.default, {
39
+ className: "advanced-status__status",
40
+ status: "warning"
41
+ }, primaryStatusText));
35
42
  };
36
43
 
37
44
  var _default = AdvancedStatus;
@@ -1,6 +1,12 @@
1
1
  @import '../../../scss/vars';
2
2
 
3
3
  .advanced-status {
4
+ width: 100%;
5
+ display: flex;
6
+ flex-flow: row nowrap;
7
+ justify-content: flex-start;
8
+ align-items: center;
9
+
4
10
  &__switcher {
5
11
  height: fit-content;
6
12
  min-height: 28px;
@@ -54,4 +60,13 @@
54
60
  border: none;
55
61
  }
56
62
  }
63
+
64
+ &__status {
65
+ display: flex;
66
+ flex-flow: row nowrap;
67
+ justify-content: flex-start;
68
+ align-items: center;
69
+
70
+ margin-left: 5px;
71
+ }
57
72
  }
@@ -64,5 +64,7 @@ TemplateAdvancedStatus.args = {
64
64
  className: '',
65
65
  activeText: 'Approved',
66
66
  inactiveText: 'Review',
67
- disabled: false
67
+ disabled: false,
68
+ isPrimary: true,
69
+ primaryStatusText: 'Primary'
68
70
  };
@@ -1,4 +1,5 @@
1
- @import "../../../scss/vars";
1
+ // @import "../../../scss/vars";
2
+ @import "~anme/scss/_anme-vars";
2
3
 
3
4
  .dropdown {
4
5
  display: inline-flex;
@@ -194,7 +194,9 @@ var Input = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
194
194
  }
195
195
 
196
196
  (0, _react.useEffect)(function () {
197
- if (isEditing) inputRef.current.focus();
197
+ var _inputRef$current, _inputRef$current$foc;
198
+
199
+ if (isEditing) inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : (_inputRef$current$foc = _inputRef$current.focus) === null || _inputRef$current$foc === void 0 ? void 0 : _inputRef$current$foc.call(_inputRef$current);
198
200
  }, [isEditing, isFocused]);
199
201
  (0, _react.useEffect)(function () {
200
202
  setEditing(isSelect !== null && isSelect !== void 0 ? isSelect : false);
@@ -1,4 +1,5 @@
1
- @import "../../../scss/vars";
1
+ // @import "../../../scss/vars";
2
+ @import "~anme/scss/_anme-vars";
2
3
 
3
4
  .radio-input {
4
5
  display: inline-flex;
@@ -1,4 +1,5 @@
1
- @import "../../../scss/vars";
1
+ // @import "../../../scss/vars";
2
+ @import "~anme/scss/_anme-vars";
2
3
 
3
4
  .switcher {
4
5
  display: inline-flex;
@@ -1,4 +1,4 @@
1
- @import '~anme/scss/anme-vars';
1
+ @import '~anme/scss/_anme-vars';
2
2
 
3
3
  .table-header {
4
4
  &--weight-actions {
@@ -1,4 +1,5 @@
1
- @import "../../../scss/vars";
1
+ // @import "../../../scss/vars";
2
+ @import "~anme/scss/_anme-vars";
2
3
 
3
4
  .tag {
4
5
  display: inline-flex;
@@ -1,4 +1,5 @@
1
- @import "../../../scss/vars";
1
+ // @import "../../../scss/vars";
2
+ @import "~anme/scss/_anme-vars";
2
3
 
3
4
  .tags-dropdown {
4
5
  display: inline-flex;
@@ -1,5 +1,5 @@
1
- @import "../../../scss/vars";
2
- @import "~anme/scss/anme-mixins";
1
+ @import "../../../scss/_vars";
2
+ @import "~anme/scss/_anme-mixins";
3
3
 
4
4
  .textarea {
5
5
  border: 1px solid #e2e5ec;
@@ -1,5 +1,5 @@
1
- @import "~anme/scss/anme-vars";
2
- @import "~anme/scss/anme-mixins";
1
+ @import "~anme/scss/_anme-vars";
2
+ @import "~anme/scss/_anme-mixins";
3
3
 
4
4
  .main-menu {
5
5
  display: flex;
@@ -1,5 +1,5 @@
1
- @import '~anme/scss/anme-vars';
2
- @import '~anme/scss/anme-mixins';
1
+ @import '~anme/scss/_anme-vars';
2
+ @import '~anme/scss/_anme-mixins';
3
3
 
4
4
  .accordion {
5
5
  &--item {
@@ -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 label = _ref.label,
17
+ var value = _ref.value,
18
+ label = _ref.label,
18
19
  status = _ref.status,
19
20
  disabled = _ref.disabled,
20
21
  type = _ref.type,
@@ -25,6 +26,8 @@ var Status = function Status(_ref) {
25
26
  className = _ref.className,
26
27
  noBackground = _ref.noBackground,
27
28
  children = _ref.children;
29
+ var text = children && typeof children === 'string' ? children : value || label || status;
30
+ var formatedLabel = (text === null || text === void 0 ? void 0 : text[0].toUpperCase()) + (text === null || text === void 0 ? void 0 : text.slice(1));
28
31
  return /*#__PURE__*/_react.default.createElement("div", {
29
32
  className: (0, _classnames.default)({
30
33
  disabled: disabled
@@ -45,7 +48,7 @@ var Status = function Status(_ref) {
45
48
  }, {
46
49
  'color--gray-gull': noBackground && status === 'pause' && !className
47
50
  })
48
- }, children || label));
51
+ }, formatedLabel));
49
52
  };
50
53
 
51
54
  var _default = Status;
@@ -1,4 +1,4 @@
1
- @import "~anme/scss/anme-vars";
1
+ @import "~anme/scss/_anme-vars";
2
2
 
3
3
  .status {
4
4
  display: inline-flex;
@@ -29,15 +29,16 @@
29
29
  background-color: #9aa0b9;
30
30
  }
31
31
 
32
+ &--review,
32
33
  &--pause,
33
34
  &--reject,
34
35
  &--No,
35
- &--declined {
36
+ &--declined,
37
+ &--blocked {
36
38
  color: $color--froly;
37
39
  background-color: #fce2e8;
38
40
  }
39
-
40
- &--pending,
41
+
41
42
  &--processing {
42
43
  color: #9aa0b9;
43
44
  background-color: #e2e6f8;
@@ -49,7 +50,9 @@
49
50
  background-color: #e2e6f8;
50
51
  }
51
52
 
53
+ &--primary,
52
54
  &--warning {
55
+ color: #f59a2f;
53
56
  background-color: $color--sandy-beach;
54
57
  }
55
58
 
@@ -1,3 +1,7 @@
1
+ .form-element {
2
+ position: relative;
3
+ }
4
+
1
5
  .form-element__error {
2
6
  margin-top: 2px;
3
7
  margin-left: 1px;
@@ -1,3 +1,5 @@
1
+ @import "~anme/scss/_anme-vars";
2
+
1
3
  /* THEME COLORS*/
2
4
  @use "sass:math";
3
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "add postfix in dropdown",
5
5
  "main": "dist/index.js",
6
6
  "files": ["dist/*"],