intelicoreact 0.1.4 → 0.1.8

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
  };
@@ -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,4 @@
1
- @import '~anme/scss/anme-vars';
1
+ @import "../../../scss/vars";
2
2
 
3
3
  .table-header {
4
4
  &--weight-actions {
@@ -1,5 +1,5 @@
1
1
  @import "../../../scss/vars";
2
- @import "~anme/scss/anme-mixins";
2
+ @import "../../../scss/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 "../../scss/vars";
2
+ @import "../../scss/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 '../../../scss/vars';
2
+ @import '../../../scss/mixins';
3
3
 
4
4
  .accordion {
5
5
  &--item {
@@ -15,7 +15,11 @@ var _classnames = _interopRequireDefault(require("classnames"));
15
15
 
16
16
  require("./Button.scss");
17
17
 
18
+ var RC = 'button';
19
+
18
20
  var Button = function Button(_ref) {
21
+ var _cn;
22
+
19
23
  var label = _ref.label,
20
24
  _ref$variant = _ref.variant,
21
25
  variant = _ref$variant === void 0 ? 'primary' : _ref$variant,
@@ -25,11 +29,12 @@ var Button = function Button(_ref) {
25
29
  className = _ref.className,
26
30
  children = _ref.children,
27
31
  style = _ref.style,
28
- noIcon = _ref.noIcon;
32
+ noIcon = _ref.noIcon,
33
+ isIconRight = _ref.isIconRight;
29
34
  var noRenderIcon = noIcon || variant === "ellipse-apply" || variant === "ellipse-cancel";
30
35
  return /*#__PURE__*/_react.default.createElement("button", {
31
36
  style: style,
32
- className: (0, _classnames.default)(className, 'button', (0, _defineProperty2.default)({}, "button_".concat(variant), variant)),
37
+ className: (0, _classnames.default)(className, RC, (_cn = {}, (0, _defineProperty2.default)(_cn, "".concat(RC, "_").concat(variant), variant), (0, _defineProperty2.default)(_cn, 'button_icon-right', isIconRight), _cn)),
33
38
  onClick: onClick,
34
39
  disabled: disabled
35
40
  }, !noRenderIcon && icon, label && /*#__PURE__*/_react.default.createElement("div", {
@@ -58,5 +58,5 @@ ButtonTemplate.args = {
58
58
  },
59
59
  label: 'Button',
60
60
  icon: /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null),
61
- isIconRight: false
61
+ isIconRight: true
62
62
  };
@@ -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 "../../../scss/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,10 @@
49
50
  background-color: #e2e6f8;
50
51
  }
51
52
 
53
+ &--pending,
54
+ &--primary,
52
55
  &--warning {
56
+ color: #f59a2f;
53
57
  background-color: $color--sandy-beach;
54
58
  }
55
59
 
@@ -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;
@@ -0,0 +1,2 @@
1
+ @import "anme/scss/anme-mixins-media";
2
+ @import "anme/scss/anme-mixins";
@@ -1,5 +1,8 @@
1
- /* THEME COLORS*/
2
1
  @use "sass:math";
2
+ @import "anme/scss/anme-vars";
3
+ // @import "../../node_modules/anme/scss/anme-vars";
4
+
5
+ /* THEME COLORS*/
3
6
 
4
7
  $color--secondary: #f06d8d;
5
8
  $color--primary: #6b81dd;
@@ -1,5 +1,6 @@
1
1
  @import './fonts';
2
- @import '~anme/scss/styles.scss';
2
+ @import 'anme/scss/styles.scss';
3
+ // @import '../../node_modules/anme/scss/anme-vars';
3
4
 
4
5
  body {
5
6
  font-family: 'Roboto', sans-serif;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.1.4",
3
+ "version": "0.1.8",
4
4
  "description": "add postfix in dropdown",
5
5
  "main": "dist/index.js",
6
6
  "files": ["dist/*"],
@@ -16,13 +16,13 @@
16
16
  "react": "^17.0.2",
17
17
  "react-feather": "^2.0.9",
18
18
  "react-input-mask": "^2.0.4",
19
- "classnames": "^2.3.1"
19
+ "classnames": "^2.3.1",
20
+ "anme": "^1.0.1"
20
21
  },
21
22
  "devDependencies": {
22
23
  "@babel/cli": "^7.15.7",
23
24
  "@babel/core": "^7.15.5",
24
25
  "@babel/polyfill": "^7.12.1",
25
- "@babel/preset-env": "^7.15.6",
26
- "anme": "^1.0.0"
26
+ "@babel/preset-env": "^7.15.6"
27
27
  }
28
28
  }