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.
- package/.eslintcache +1 -0
- package/lib/@types/SizePixels.d.ts +1 -1
- package/lib/assets/styles/checkbox.scss +30 -29
- package/lib/assets/styles/commons.scss +1 -0
- package/lib/assets/styles/fieldset.scss +3 -0
- package/lib/assets/styles/hint.scss +4 -0
- package/lib/checkbox/index.js +6 -1
- package/lib/fieldset/index.js +4 -2
- package/lib/fieldset/types.d.ts +2 -0
- package/lib/hint/helpers.d.ts +3 -0
- package/lib/hint/helpers.js +21 -0
- package/lib/hint/index.d.ts +1 -1
- package/lib/hint/index.js +5 -15
- package/lib/hint/types.d.ts +1 -0
- package/lib/inputs/base/InputTextBase.js +1 -0
- package/package.json +1 -1
|
@@ -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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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: $
|
|
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;
|
package/lib/checkbox/index.js
CHANGED
|
@@ -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
|
|
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"
|
package/lib/fieldset/index.js
CHANGED
|
@@ -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)));
|
package/lib/fieldset/types.d.ts
CHANGED
|
@@ -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;
|
package/lib/hint/index.d.ts
CHANGED
|
@@ -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;
|
package/lib/hint/types.d.ts
CHANGED
|
@@ -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
|