linear-react-components-ui 1.1.2-beta.13 → 1.1.2-beta.15

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.
@@ -1,3 +1,3 @@
1
- type SizePixels = 10 | 16 | 18 | 22 | 24 | 32 | 40 | 64 | 128 | 200;
1
+ type SizePixels = 10 | 12 | 14 | 16 | 18 | 22 | 24 | 32 | 40 | 64 | 128 | 200;
2
2
 
3
3
  export type { SizePixels };
@@ -4,68 +4,69 @@
4
4
 
5
5
  .checkbox-component {
6
6
  > .inputcontent {
7
+ display: flex;
8
+ align-items: center;
9
+ gap: 4px;
7
10
  > .input {
8
- position: absolute;
9
- z-index: 0;
10
- left: -9999999999999px;
11
+ display: none;
12
+ visibility: hidden;
13
+ pointer-events: none;
14
+ width: 0;
15
+ height: 0;
11
16
  &:disabled + span {
12
17
  @extend %component-disabled;
18
+ border: 1px solid $component-border-color;
13
19
  }
20
+
21
+ &:checked:disabled + span {
22
+ border: 1px solid $component-border-color;
23
+
24
+ > svg {
25
+ @extend %component-menu-disabled
26
+ }
27
+ }
28
+
14
29
  &:disabled + span + .description {
15
30
  @extend %component-menu-disabled;
16
31
  }
17
- &:checked + span:before {
18
- content: "✓";
19
- display: flex;
20
- align-items: center;
21
- justify-content: center;
22
- position: static;
23
- margin-top: -5px;
24
- font-weight: 600;
25
- height: 28px;
32
+ &:checked + span > svg {
33
+ display: block;
34
+ fill: $font-color-second;
35
+ margin: 0;
26
36
  }
27
37
  + span {
28
- display: inline-block;
29
38
  position: relative;
30
- top: -1px;
31
39
  width: 18px;
32
40
  height: 18px;
33
- margin: -1px 0px 0 0;
34
- margin-right: 4px;
35
41
  vertical-align: middle;
36
42
  background: $font-color-second left top no-repeat;
37
43
  border: 1px solid $component-border-color;
38
44
  cursor: pointer;
45
+ display: flex;
46
+ align-items: center;
47
+ justify-content: center;
39
48
  &:hover {
40
49
  animation-duration: .5s;
41
50
  animation-name: blink-effect;
42
51
  animation-iteration-count: infinite;
43
52
  animation-direction: alternate;
44
53
  }
54
+ & > svg {
55
+ display: none;
56
+ }
45
57
  }
46
58
  &:checked + span {
47
- background-color: $check-background;
59
+ background-color: $checked-effect;
60
+ border-color: $checked;
48
61
  color: $font-color-second;
49
62
  animation-duration: .2s;
50
63
  animation-name: select-checkbox;
51
64
  animation-iteration-count: 1;
52
65
  animation-direction: Normal;
53
- box-shadow: inset 0 0 0 1px $checked,
54
- inset 0 0 0 0 #FFFFFF,
55
- inset 0 0 0 16px $checked-effect;
56
66
  }
57
67
  &:focus + span {
58
68
  border: 2px solid $component-selected-color;
59
69
  }
60
- &:disabled:checked + span:before {
61
- @extend %component-menu-disabled;
62
- border: 1px solid;
63
- margin-top: -1px;
64
- width: 18px;
65
- height: 18px;
66
- background-color: rgb(229, 229, 229);
67
- margin-left: -1px;
68
- }
69
70
  }
70
71
  > .description {
71
72
  @extend %input-label;
@@ -9,6 +9,7 @@
9
9
 
10
10
  %component-menu-disabled {
11
11
  color: #bbbbbb;
12
+ fill: #bbbbbb;
12
13
  background-color: transparent,
13
14
  }
14
15
 
@@ -65,6 +65,9 @@
65
65
  text-transform: uppercase;
66
66
  border-radius: 0px 10px 0px 0px;
67
67
  z-index: 9;
68
+ display: flex;
69
+ align-items: center;
70
+ gap: 8px;
68
71
  }
69
72
  > .errormessage {
70
73
  position: relative;
@@ -6,4 +6,8 @@
6
6
  &.-skeletonized > span {
7
7
  @extend %skeleton-component;
8
8
  }
9
+
10
+ &.-disabled > span {
11
+ opacity: 0.4;
12
+ }
9
13
  }
@@ -11,6 +11,7 @@ var _gridlayout = _interopRequireDefault(require("../gridlayout"));
11
11
  var _permissionValidations = require("../permissionValidations");
12
12
  require("../assets/styles/checkbox.scss");
13
13
  var _errorMessage = require("../inputs/errorMessage");
14
+ var _ = require("..");
14
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -94,12 +95,16 @@ const CheckBox = _ref => {
94
95
  value: value,
95
96
  id: id,
96
97
  onChange: () => {}
97
- }), /*#__PURE__*/_react.default.createElement("span", null), label && /*#__PURE__*/_react.default.createElement(_Label.default, {
98
+ }), /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_.Icon, {
99
+ size: 12,
100
+ name: "checkmark"
101
+ })), label && /*#__PURE__*/_react.default.createElement(_Label.default, {
98
102
  label: label,
99
103
  tooltip: tooltip,
100
104
  tooltipWidth: tooltipWidth,
101
105
  tooltipPosition: tooltipPosition
102
106
  })), /*#__PURE__*/_react.default.createElement(_hint.default, {
107
+ disabled: disabled,
103
108
  visible: !!hint,
104
109
  description: hint,
105
110
  customClass: "hint"
@@ -28,7 +28,9 @@ const Fieldset = props => {
28
28
  styleTitle,
29
29
  template = 'none',
30
30
  titleCustomClass,
31
- permissionAttr
31
+ permissionAttr,
32
+ leftElements = null,
33
+ rightElements = null
32
34
  } = props;
33
35
  const {
34
36
  hideContent,
@@ -69,7 +71,7 @@ const Fieldset = props => {
69
71
  style: styleTitle,
70
72
  align: titleAlign,
71
73
  className: "legend ".concat(titleCustomClass)
72
- }, title), /*#__PURE__*/_react.default.createElement("div", {
74
+ }, leftElements, title, rightElements), /*#__PURE__*/_react.default.createElement("div", {
73
75
  className: "contentfieldset -template".concat(template, " "),
74
76
  style: Object.assign(getContentStyle(props), styleContent)
75
77
  }, children)));
@@ -18,6 +18,8 @@ interface IFieldsetProps {
18
18
  hasError?: boolean;
19
19
  gridCols?: string;
20
20
  permissionAttr?: PermissionAttr | PermissionAttr[];
21
+ leftElements?: ReactNode;
22
+ rightElements?: ReactNode;
21
23
  }
22
24
  interface ExpandedElement extends Element {
23
25
  name?: string;
@@ -0,0 +1,3 @@
1
+ declare const showHintList: (arrayHint: string[]) => JSX.Element;
2
+
3
+ export { showHintList };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.showHintList = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ const showHintList = arrayHint => /*#__PURE__*/_react.default.createElement("div", {
10
+ className: "rules-list",
11
+ style: {
12
+ padding: '15px 0px'
13
+ }
14
+ }, /*#__PURE__*/_react.default.createElement("ul", {
15
+ style: {
16
+ listStyleType: 'none'
17
+ }
18
+ }, arrayHint.map((hint, index) => /*#__PURE__*/_react.default.createElement("li", {
19
+ key: index.toString()
20
+ }, "- ", hint))));
21
+ exports.showHintList = showHintList;
@@ -1,6 +1,6 @@
1
1
  import { HintProps } from './types.js';
2
2
  import 'react';
3
3
 
4
- declare const Hint: ({ visible, description, customClass, skeletonize, style, }: HintProps) => JSX.Element | null;
4
+ declare const Hint: ({ visible, description, customClass, skeletonize, style, disabled, }: HintProps) => JSX.Element | null;
5
5
 
6
6
  export { Hint as default };
package/lib/hint/index.js CHANGED
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
+ var _helpers = require("./helpers");
8
9
  require("../assets/styles/hint.scss");
9
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
11
  const Hint = _ref => {
@@ -13,24 +14,13 @@ const Hint = _ref => {
13
14
  description,
14
15
  customClass,
15
16
  skeletonize = false,
16
- style
17
+ style,
18
+ disabled = false
17
19
  } = _ref;
18
20
  if (!visible || !description) return null;
19
- const showHintList = arrayHint => /*#__PURE__*/_react.default.createElement("div", {
20
- className: "rules-list",
21
- style: {
22
- padding: '15px 0px'
23
- }
24
- }, /*#__PURE__*/_react.default.createElement("ul", {
25
- style: {
26
- listStyleType: 'none'
27
- }
28
- }, arrayHint.map((hint, index) => /*#__PURE__*/_react.default.createElement("li", {
29
- key: index.toString()
30
- }, "- ", hint))));
31
21
  return /*#__PURE__*/_react.default.createElement("div", {
32
22
  style: style,
33
- className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ")
34
- }, Array.isArray(description) ? showHintList(description) : /*#__PURE__*/_react.default.createElement("span", null, description));
23
+ className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ").concat(disabled ? '-disabled' : '', "\n ")
24
+ }, Array.isArray(description) ? (0, _helpers.showHintList)(description) : /*#__PURE__*/_react.default.createElement("span", null, description));
35
25
  };
36
26
  var _default = exports.default = Hint;
@@ -5,6 +5,7 @@ interface HintProps {
5
5
  visible?: boolean;
6
6
  customClass?: string;
7
7
  skeletonize?: boolean;
8
+ disabled?: boolean;
8
9
  style?: CSSProperties;
9
10
  }
10
11
 
@@ -180,6 +180,7 @@ const InputTextBase = props => {
180
180
  autoComplete: autoComplete,
181
181
  tabIndex: applyTabIndex()
182
182
  }, inputProps())), children), helpers.getRightElements(errorMessages || [], skeletonize, rightElements)), /*#__PURE__*/_react.default.createElement(_hint.default, {
183
+ disabled: disabled,
183
184
  visible: !!hint,
184
185
  customClass: "hint",
185
186
  description: hint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.1.2-beta.13",
3
+ "version": "1.1.2-beta.15",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",