linear-react-components-ui 1.1.2-beta.25 → 1.1.2-beta.27
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 -1
- package/lib/assets/styles/hint.scss +17 -0
- package/lib/assets/styles/input.scss +5 -0
- package/lib/form/Field.d.ts +2 -0
- package/lib/form/FieldArray.d.ts +2 -0
- package/lib/form/FieldNumber.d.ts +2 -0
- package/lib/form/FieldPeriod.d.ts +2 -0
- package/lib/form/helpers.d.ts +2 -0
- package/lib/form/index.d.ts +2 -0
- package/lib/form/types.d.ts +2 -0
- package/lib/form/withFieldHOC.d.ts +2 -0
- package/lib/form/withFormSecurity.d.ts +2 -0
- package/lib/hint/index.d.ts +2 -1
- package/lib/hint/index.js +7 -3
- package/lib/hint/types.d.ts +2 -0
- package/lib/icons/helper.d.ts +4 -0
- package/lib/icons/helper.js +4 -0
- package/lib/inputs/base/InputTextBase.d.ts +6 -1
- package/lib/inputs/base/InputTextBase.js +45 -8
- package/lib/inputs/base/Label.d.ts +14 -0
- package/lib/inputs/base/Label.js +35 -0
- package/lib/inputs/base/helpers.d.ts +2 -0
- package/lib/inputs/base/types.d.ts +14 -2
- package/lib/inputs/date/Dialog.d.ts +2 -0
- package/lib/inputs/date/Dropdown.d.ts +2 -0
- package/lib/inputs/date/helpers.d.ts +2 -0
- package/lib/inputs/date/index.d.ts +2 -0
- package/lib/inputs/date/types.d.ts +2 -0
- package/lib/inputs/errorMessage/index.d.ts +2 -1
- package/lib/inputs/file/DefaultFile.d.ts +2 -0
- package/lib/inputs/file/DragDropFile.d.ts +2 -0
- package/lib/inputs/file/File.d.ts +2 -0
- package/lib/inputs/file/FileButtonSettings.d.ts +2 -0
- package/lib/inputs/file/helpers.d.ts +2 -0
- package/lib/inputs/file/index.d.ts +2 -0
- package/lib/inputs/file/types.d.ts +2 -0
- package/lib/inputs/inputHOC.d.ts +2 -1
- package/lib/inputs/mask/BaseMask.d.ts +2 -0
- package/lib/inputs/mask/Cnpj.d.ts +2 -0
- package/lib/inputs/mask/Cpf.d.ts +2 -0
- package/lib/inputs/mask/Phone.d.ts +2 -0
- package/lib/inputs/mask/ZipCode.d.ts +2 -0
- package/lib/inputs/mask/helpers.d.ts +2 -1
- package/lib/inputs/mask/imaskHOC.d.ts +2 -1
- package/lib/inputs/mask/index.d.ts +2 -0
- package/lib/inputs/mask/types.d.ts +2 -0
- package/lib/inputs/multiSelect/ActionButtons.d.ts +2 -0
- package/lib/inputs/multiSelect/Dropdown.d.ts +2 -0
- package/lib/inputs/multiSelect/helper.d.ts +2 -0
- package/lib/inputs/multiSelect/index.d.ts +2 -0
- package/lib/inputs/multiSelect/types.d.ts +2 -0
- package/lib/inputs/number/BaseNumber.d.ts +2 -1
- package/lib/inputs/number/Currency.d.ts +2 -1
- package/lib/inputs/number/Decimal.d.ts +2 -1
- package/lib/inputs/number/index.d.ts +2 -1
- package/lib/inputs/number/types.d.ts +2 -1
- package/lib/inputs/period/Dialog.d.ts +2 -0
- package/lib/inputs/period/Dropdown.d.ts +2 -0
- package/lib/inputs/period/PeriodList.d.ts +2 -0
- package/lib/inputs/period/helper.d.ts +2 -0
- package/lib/inputs/period/index.d.ts +2 -0
- package/lib/inputs/period/types.d.ts +2 -0
- package/lib/inputs/search/index.d.ts +2 -1
- package/lib/inputs/select/ActionButtons.d.ts +2 -1
- package/lib/inputs/select/Dropdown.d.ts +2 -1
- package/lib/inputs/select/helper.d.ts +2 -1
- package/lib/inputs/select/index.d.ts +2 -0
- package/lib/inputs/select/multiple/Selecteds.d.ts +2 -0
- package/lib/inputs/select/multiple/index.d.ts +2 -0
- package/lib/inputs/select/simple/index.d.ts +2 -0
- package/lib/inputs/select/types.d.ts +2 -0
- package/lib/inputs/textarea/index.d.ts +2 -0
- package/lib/inputs/textarea/types.d.ts +2 -0
- package/lib/inputs/types.d.ts +1 -0
- package/lib/internals/withTooltip.js +7 -3
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@import "commons.scss";
|
|
2
|
+
@import "colors.scss";
|
|
2
3
|
|
|
3
4
|
.hint-component {
|
|
4
5
|
@extend %hint-text;
|
|
@@ -10,4 +11,20 @@
|
|
|
10
11
|
&.-disabled > span {
|
|
11
12
|
opacity: 0.4;
|
|
12
13
|
}
|
|
14
|
+
|
|
15
|
+
&.-primary {
|
|
16
|
+
color: $primary-color;
|
|
17
|
+
}
|
|
18
|
+
&.-warning {
|
|
19
|
+
color: $warning-color;
|
|
20
|
+
}
|
|
21
|
+
&.-danger {
|
|
22
|
+
color: $danger-color;
|
|
23
|
+
}
|
|
24
|
+
&.-success {
|
|
25
|
+
color: $success-color;
|
|
26
|
+
}
|
|
27
|
+
&.-info {
|
|
28
|
+
color: $info-color;
|
|
29
|
+
}
|
|
13
30
|
}
|
package/lib/form/Field.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const _default: React__default.ForwardRefExoticComponent<Pick<IFieldProps & React__default.RefAttributes<unknown>, keyof IFieldProps | "key"> & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
package/lib/form/FieldArray.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const _default: React__default.ForwardRefExoticComponent<IFieldArrayProps & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const _default: React__default.ForwardRefExoticComponent<IFieldProps & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const _default: React__default.ForwardRefExoticComponent<IFieldPeriodProps & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
package/lib/form/helpers.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const securityBeforeUnload = "securityBeforeUnload";
|
|
11
13
|
declare const FormContext: React__default.Context<FormContextProps>;
|
package/lib/form/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ import '../@types/DataCombo.js';
|
|
|
10
10
|
import '../@types/PermissionAttr.js';
|
|
11
11
|
import '../inputs/base/types.js';
|
|
12
12
|
import '../@types/Period.js';
|
|
13
|
+
import '../internals/types.js';
|
|
14
|
+
import '../@types/Position.js';
|
|
13
15
|
|
|
14
16
|
declare const Form: ({ submitOnPressEnterKey, dataSource, securityBeforeUnload, handlerReset, handlerSubmit, handlerValidates, style, customClass, securityTitle, securityText, securityData, onDataChange, onValidateForm, externalFieldErrors, onSubmit, skeletonize, disabled, children, useInternalState, }: FormProps) => JSX.Element;
|
|
15
17
|
|
package/lib/form/types.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import '../@types/DataCombo.js';
|
|
|
5
5
|
import '../@types/PermissionAttr.js';
|
|
6
6
|
import '../inputs/base/types.js';
|
|
7
7
|
import '../@types/Period.js';
|
|
8
|
+
import '../internals/types.js';
|
|
9
|
+
import '../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
type Validator = (value: string) => string | undefined;
|
|
10
12
|
type PeriodValidator = (value: {
|
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const withFieldHOC: <ComponentProps extends WithFieldProps>(WrappedComponent: React__default.ComponentType<ComponentProps>) => React__default.ForwardRefExoticComponent<React__default.PropsWithoutRef<ComponentProps> & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const FormSecurityContext: React__default.Context<IFormSecurityContext>;
|
|
11
13
|
declare const withFormSecurity: <ComponentProps extends IWithFormSecurity>(WrappedComponent: React__default.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
|
package/lib/hint/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HintProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
|
+
import '../@types/ColorStyles.js';
|
|
3
4
|
|
|
4
|
-
declare const Hint: ({ visible, description, customClass, skeletonize, style, disabled, }: HintProps) => JSX.Element | null;
|
|
5
|
+
declare const Hint: ({ visible, description, customClass, skeletonize, style, disabled, color, }: HintProps) => JSX.Element | null;
|
|
5
6
|
|
|
6
7
|
export { Hint as default };
|
package/lib/hint/index.js
CHANGED
|
@@ -15,12 +15,16 @@ const Hint = _ref => {
|
|
|
15
15
|
customClass,
|
|
16
16
|
skeletonize = false,
|
|
17
17
|
style,
|
|
18
|
-
disabled = false
|
|
18
|
+
disabled = false,
|
|
19
|
+
color
|
|
19
20
|
} = _ref;
|
|
20
21
|
if (!visible || !description) return null;
|
|
21
22
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
+
"aria-disabled": disabled,
|
|
22
24
|
style: style,
|
|
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",
|
|
25
|
+
className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ").concat(disabled ? '-disabled' : '', "\n -").concat(color, "\n ")
|
|
26
|
+
}, Array.isArray(description) ? (0, _helpers.showHintList)(description) : /*#__PURE__*/_react.default.createElement("span", {
|
|
27
|
+
"aria-disabled": disabled
|
|
28
|
+
}, description));
|
|
25
29
|
};
|
|
26
30
|
var _default = exports.default = Hint;
|
package/lib/hint/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
+
import { ColorStyles } from '../@types/ColorStyles.js';
|
|
2
3
|
|
|
3
4
|
interface HintProps {
|
|
4
5
|
description?: string | string[];
|
|
@@ -7,6 +8,7 @@ interface HintProps {
|
|
|
7
8
|
skeletonize?: boolean;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
style?: CSSProperties;
|
|
11
|
+
color?: ColorStyles;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export type { HintProps };
|
package/lib/icons/helper.d.ts
CHANGED
package/lib/icons/helper.js
CHANGED
|
@@ -608,5 +608,9 @@ var _default = exports.default = {
|
|
|
608
608
|
videoCamOutline: {
|
|
609
609
|
viewbox: '0 0 16 16',
|
|
610
610
|
paths: ['M15.294 4.004c-0.165 0-0.335 0.058-0.491 0.168l-2.803 1.978v-1.651c0-0.825-0.675-1.5-1.5-1.5h-9c-0.825 0-1.5 0.675-1.5 1.5v7c0 0.825 0.675 1.5 1.5 1.5h9c0.825 0 1.5-0.675 1.5-1.5v-1.65l2.803 1.978c0.156 0.11 0.326 0.168 0.491 0.168 0 0 0 0 0 0 0.22 0 0.421-0.101 0.551-0.278 0.101-0.137 0.154-0.313 0.154-0.51v-6.415c-0-0.518-0.355-0.788-0.706-0.788zM15 10.743l-2.469-1.743h-1.531v2.5c0 0.271-0.229 0.5-0.5 0.5h-9c-0.271 0-0.5-0.229-0.5-0.5v-7c0-0.271 0.229-0.5 0.5-0.5h9c0.271 0 0.5 0.229 0.5 0.5v2.5h1.531l2.469-1.743v5.486z', 'M4 5l5 3-5 3z']
|
|
611
|
+
},
|
|
612
|
+
user_block: {
|
|
613
|
+
viewbox: '0 0 16 16',
|
|
614
|
+
paths: ['M7.5 16h-6.977c-0.14 0-0.274-0.059-0.369-0.163s-0.141-0.242-0.129-0.382c0.11-1.22 0.585-2.363 1.373-3.305 0.697-0.832 1.59-1.452 2.602-1.809l0-0.475c-0.562-0.385-1.037-0.926-1.385-1.582-0.402-0.758-0.615-1.634-0.615-2.535 0-1.251 0.405-2.431 1.139-3.323 0.758-0.92 1.774-1.427 2.861-1.427 2.119 0 3.874 1.966 3.993 4.476 0.013 0.276-0.2 0.51-0.476 0.523s-0.51-0.2-0.523-0.476c-0.094-1.976-1.41-3.524-2.995-3.524-1.654 0-3 1.682-3 3.75 0 1.457 0.687 2.795 1.75 3.408 0.155 0.089 0.25 0.254 0.25 0.433l-0 1.116c0 0.224-0.149 0.42-0.364 0.481-0.967 0.274-1.822 0.828-2.471 1.604-0.538 0.643-0.901 1.397-1.064 2.208h6.4c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5z', 'M11.5 7c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5 4.5-2.019 4.5-4.5-2.019-4.5-4.5-4.5zM8 11.5c0-1.93 1.57-3.5 3.5-3.5 0.785 0 1.511 0.26 2.095 0.698l-4.897 4.897c-0.438-0.584-0.698-1.31-0.698-2.095zM11.5 15c-0.785 0-1.511-0.26-2.095-0.698l4.897-4.897c0.438 0.584 0.698 1.31 0.698 2.095 0 1.93-1.57 3.5-3.5 3.5z']
|
|
611
615
|
}
|
|
612
616
|
};
|
|
@@ -3,7 +3,12 @@ import 'react';
|
|
|
3
3
|
import '../../@types/Align.js';
|
|
4
4
|
import '../../@types/Period.js';
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
6
8
|
|
|
7
|
-
declare const _default:
|
|
9
|
+
declare const _default: {
|
|
10
|
+
(props: IBaseProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
8
13
|
|
|
9
14
|
export { _default as default };
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
|
-
var _inputHOC = _interopRequireDefault(require("../inputHOC"));
|
|
10
9
|
require("../../assets/styles/input.scss");
|
|
11
10
|
var helpers = _interopRequireWildcard(require("./helpers"));
|
|
12
11
|
var _withTooltip = _interopRequireDefault(require("../../internals/withTooltip"));
|
|
13
12
|
var _permissionValidations = require("../../permissionValidations");
|
|
14
13
|
var _hint = _interopRequireDefault(require("../../hint"));
|
|
15
14
|
var _errorMessage = require("../errorMessage");
|
|
15
|
+
var _Label = _interopRequireDefault(require("./Label"));
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
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); }
|
|
18
18
|
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; }
|
|
@@ -70,11 +70,13 @@ const InputTextBase = props => {
|
|
|
70
70
|
} = props;
|
|
71
71
|
let propsInput;
|
|
72
72
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
73
|
+
const labelRef = (0, _react.useRef)(null);
|
|
73
74
|
const onDenied = onDeniedActions || (0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr);
|
|
74
75
|
const {
|
|
75
76
|
hideContent,
|
|
76
77
|
unvisible
|
|
77
78
|
} = onDenied;
|
|
79
|
+
const [showTooltip, setShowTooltip] = (0, _react.useState)(false);
|
|
78
80
|
(0, _react.useEffect)(() => {
|
|
79
81
|
if (handlerSetOnDenied) handlerSetOnDenied(onDenied);
|
|
80
82
|
}, []);
|
|
@@ -145,6 +147,39 @@ const InputTextBase = props => {
|
|
|
145
147
|
}
|
|
146
148
|
return propsInput;
|
|
147
149
|
};
|
|
150
|
+
const onHoverLabel = e => {
|
|
151
|
+
const target = e.target;
|
|
152
|
+
if (target.offsetWidth < target.scrollWidth) {
|
|
153
|
+
setShowTooltip(true);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
(0, _react.useEffect)(() => {
|
|
157
|
+
const resize = new ResizeObserver(_ref => {
|
|
158
|
+
let [element] = _ref;
|
|
159
|
+
const {
|
|
160
|
+
target
|
|
161
|
+
} = element;
|
|
162
|
+
setShowTooltip(prevState => {
|
|
163
|
+
var overflowing = target.clientWidth < target.scrollWidth;
|
|
164
|
+
return prevState === overflowing ? prevState : overflowing;
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
if (labelRef.current) {
|
|
168
|
+
resize.observe(labelRef.current);
|
|
169
|
+
}
|
|
170
|
+
return () => {
|
|
171
|
+
if (resize) {
|
|
172
|
+
resize.disconnect();
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}, []);
|
|
176
|
+
if (labelRef.current) {
|
|
177
|
+
const element = labelRef.current;
|
|
178
|
+
const overflowing = element.offsetWidth < element.scrollWidth;
|
|
179
|
+
if (overflowing && !showTooltip) {
|
|
180
|
+
setShowTooltip(true);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
148
183
|
if (!visible || unvisible) return null;
|
|
149
184
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
150
185
|
style: style,
|
|
@@ -155,12 +190,14 @@ const InputTextBase = props => {
|
|
|
155
190
|
style: {
|
|
156
191
|
textAlign: textAlign === 'center' ? 'left' : textAlign
|
|
157
192
|
}
|
|
158
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
193
|
+
}, /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
194
|
+
labelRef: labelRef,
|
|
195
|
+
label: label,
|
|
196
|
+
required: required,
|
|
197
|
+
onHoverLabel: onHoverLabel,
|
|
198
|
+
tooltip: showTooltip ? label.toString() : undefined,
|
|
199
|
+
tooltipPosition: "top"
|
|
200
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
164
201
|
"data-testid": "testInputWrapper",
|
|
165
202
|
style: styleForWrapper,
|
|
166
203
|
className: helpers.getInputWrapperClass(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -188,4 +225,4 @@ const InputTextBase = props => {
|
|
|
188
225
|
messages: errorMessages
|
|
189
226
|
}));
|
|
190
227
|
};
|
|
191
|
-
var _default = exports.default = (0,
|
|
228
|
+
var _default = exports.default = (0, _withTooltip.default)(InputTextBase);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputLabelProps } from './types.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '../../@types/Align.js';
|
|
4
|
+
import '../../@types/Period.js';
|
|
5
|
+
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
8
|
+
|
|
9
|
+
declare const _default: {
|
|
10
|
+
(props: InputLabelProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { _default as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _withTooltip = _interopRequireDefault(require("../../internals/withTooltip"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const Label = props => {
|
|
11
|
+
const {
|
|
12
|
+
label,
|
|
13
|
+
styleForLabel,
|
|
14
|
+
customClassForLabel,
|
|
15
|
+
labelUppercase,
|
|
16
|
+
required,
|
|
17
|
+
targetRef,
|
|
18
|
+
labelRef,
|
|
19
|
+
onHoverLabel
|
|
20
|
+
} = props;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
22
|
+
style: styleForLabel,
|
|
23
|
+
ref: ref => {
|
|
24
|
+
if (ref) {
|
|
25
|
+
if (labelRef) labelRef.current = ref;
|
|
26
|
+
if (targetRef) targetRef(ref);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
onMouseEnter: onHoverLabel,
|
|
30
|
+
className: "label ".concat(customClassForLabel, " ").concat(labelUppercase && ' -uppercase')
|
|
31
|
+
}, label, required && /*#__PURE__*/_react.default.createElement("span", {
|
|
32
|
+
className: "-requiredlabel"
|
|
33
|
+
}, "*"));
|
|
34
|
+
};
|
|
35
|
+
var _default = exports.default = (0, _withTooltip.default)(Label);
|
|
@@ -3,6 +3,8 @@ import { TextAlign } from '../../@types/Align.js';
|
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../../@types/Period.js';
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
6
8
|
|
|
7
9
|
declare const getInputClass: ({ textAlign, readOnly, readOnlyClass, }: {
|
|
8
10
|
textAlign?: TextAlign | undefined;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { KeyboardEvent, DragEvent,
|
|
1
|
+
import { MutableRefObject, KeyboardEvent, DragEvent, RefObject, CSSProperties } from 'react';
|
|
2
2
|
import { TextAlign } from '../../@types/Align.js';
|
|
3
3
|
import { Period } from '../../@types/Period.js';
|
|
4
4
|
import { PermissionAttr, OnDenied } from '../../@types/PermissionAttr.js';
|
|
5
|
+
import { WithTooltipProps } from '../../internals/types.js';
|
|
6
|
+
import '../../@types/Position.js';
|
|
5
7
|
|
|
6
8
|
interface CustomInputEvent {
|
|
7
9
|
preventDefault?: () => void;
|
|
@@ -15,6 +17,16 @@ interface CustomInputEvent {
|
|
|
15
17
|
files?: FileList | null;
|
|
16
18
|
};
|
|
17
19
|
}
|
|
20
|
+
interface InputLabelProps extends WithTooltipProps {
|
|
21
|
+
label?: string | string[];
|
|
22
|
+
customClassForLabel?: string;
|
|
23
|
+
styleForLabel?: object;
|
|
24
|
+
labelUppercase?: boolean;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
targetRef?: (ref: HTMLSpanElement | null) => void;
|
|
27
|
+
labelRef?: MutableRefObject<HTMLSpanElement | null>;
|
|
28
|
+
onHoverLabel?: (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void;
|
|
29
|
+
}
|
|
18
30
|
interface IBaseProps {
|
|
19
31
|
inputHasFocus?: boolean;
|
|
20
32
|
onInputReceiveFocus?: () => void;
|
|
@@ -79,4 +91,4 @@ interface IBaseProps {
|
|
|
79
91
|
autoComplete?: 'on' | 'off';
|
|
80
92
|
}
|
|
81
93
|
|
|
82
|
-
export type { CustomInputEvent, IBaseProps };
|
|
94
|
+
export type { CustomInputEvent, IBaseProps, InputLabelProps };
|
|
@@ -5,6 +5,8 @@ import '../../@types/PermissionAttr.js';
|
|
|
5
5
|
import '../base/types.js';
|
|
6
6
|
import '../../@types/Align.js';
|
|
7
7
|
import '../../@types/Period.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const Dialog: ({ handlerClose, children, dialogSize }: IDateDialogProps) => JSX.Element;
|
|
10
12
|
|
|
@@ -5,6 +5,8 @@ import '../../@types/PermissionAttr.js';
|
|
|
5
5
|
import '../base/types.js';
|
|
6
6
|
import '../../@types/Align.js';
|
|
7
7
|
import '../../@types/Period.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const Dropdown: (props: IDateDropdownProps) => React.ReactPortal;
|
|
10
12
|
|
|
@@ -6,6 +6,8 @@ import '../../@types/PermissionAttr.js';
|
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Align.js';
|
|
8
8
|
import '../../@types/Period.js';
|
|
9
|
+
import '../../internals/types.js';
|
|
10
|
+
import '../../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const PT_BR_FORMAT = "DD/MM/YYYY";
|
|
11
13
|
declare const EN_US_FORMAT = "YYYY-MM-DD";
|
|
@@ -5,6 +5,8 @@ import '../../@types/PermissionAttr.js';
|
|
|
5
5
|
import '../base/types.js';
|
|
6
6
|
import '../../@types/Align.js';
|
|
7
7
|
import '../../@types/Period.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const DatePicker: (props: IDatePickerProps) => JSX.Element | null;
|
|
10
12
|
|
|
@@ -4,6 +4,8 @@ import { PermissionAttr } from '../../@types/PermissionAttr.js';
|
|
|
4
4
|
import { CustomInputEvent } from '../base/types.js';
|
|
5
5
|
import '../../@types/Align.js';
|
|
6
6
|
import '../../@types/Period.js';
|
|
7
|
+
import '../../internals/types.js';
|
|
8
|
+
import '../../@types/Position.js';
|
|
7
9
|
|
|
8
10
|
interface IDatePickerProps {
|
|
9
11
|
value?: string;
|
|
@@ -6,8 +6,9 @@ import '../../@types/DataCombo.js';
|
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Align.js';
|
|
8
8
|
import '../../@types/Period.js';
|
|
9
|
-
import '../../
|
|
9
|
+
import '../../internals/types.js';
|
|
10
10
|
import '../../@types/Position.js';
|
|
11
|
+
import '../../drawer/types.js';
|
|
11
12
|
import '../../@types/Icon.js';
|
|
12
13
|
import '../../icons/helper.js';
|
|
13
14
|
|
|
@@ -5,6 +5,8 @@ import '../base/types.js';
|
|
|
5
5
|
import '../../@types/Align.js';
|
|
6
6
|
import '../../@types/Period.js';
|
|
7
7
|
import '../../@types/PermissionAttr.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const DefaultFile: (props: IDefaultFileProps) => JSX.Element;
|
|
10
12
|
|
|
@@ -5,6 +5,8 @@ import '../base/types.js';
|
|
|
5
5
|
import '../../@types/Align.js';
|
|
6
6
|
import '../../@types/Period.js';
|
|
7
7
|
import '../../@types/PermissionAttr.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const DragDropFile: (props: IDragDropFileProps) => JSX.Element;
|
|
10
12
|
|
|
@@ -5,6 +5,8 @@ import '../base/types.js';
|
|
|
5
5
|
import '../../@types/Align.js';
|
|
6
6
|
import '../../@types/Period.js';
|
|
7
7
|
import '../../@types/PermissionAttr.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const File: ({ applyDragDrop, defaultFiles, gridLayout, ...rest }: IFileProps) => JSX.Element;
|
|
10
12
|
|
|
@@ -5,6 +5,8 @@ import '../base/types.js';
|
|
|
5
5
|
import '../../@types/Align.js';
|
|
6
6
|
import '../../@types/Period.js';
|
|
7
7
|
import '../../@types/PermissionAttr.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const FileButtonSettings: (props: IFileButtonSettingsProps) => JSX.Element;
|
|
10
12
|
|
|
@@ -5,6 +5,8 @@ import '../base/types.js';
|
|
|
5
5
|
import '../../@types/Align.js';
|
|
6
6
|
import '../../@types/Period.js';
|
|
7
7
|
import '../../@types/PermissionAttr.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const transformFilesToFileList: (files: CustomFile) => FileList;
|
|
10
12
|
|
|
@@ -4,6 +4,8 @@ import { CustomInputEvent } from '../base/types.js';
|
|
|
4
4
|
import '../../@types/Align.js';
|
|
5
5
|
import '../../@types/Period.js';
|
|
6
6
|
import '../../@types/PermissionAttr.js';
|
|
7
|
+
import '../../internals/types.js';
|
|
8
|
+
import '../../@types/Position.js';
|
|
7
9
|
|
|
8
10
|
type CustomFile = FileList | File | File[];
|
|
9
11
|
interface IFileProps {
|
package/lib/inputs/inputHOC.d.ts
CHANGED
|
@@ -6,8 +6,9 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import './base/types.js';
|
|
7
7
|
import '../@types/Align.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
-
import '../
|
|
9
|
+
import '../internals/types.js';
|
|
10
10
|
import '../@types/Position.js';
|
|
11
|
+
import '../drawer/types.js';
|
|
11
12
|
import '../@types/Icon.js';
|
|
12
13
|
import '../icons/helper.js';
|
|
13
14
|
|
|
@@ -5,6 +5,8 @@ import '../../@types/Align.js';
|
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Period.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const _default: {
|
|
10
12
|
(props: IBaseMaskProps): JSX.Element;
|
|
@@ -5,6 +5,8 @@ import '../../@types/Align.js';
|
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Period.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const CnpjField: {
|
|
10
12
|
(props: ICnpjFieldProps): JSX.Element;
|
package/lib/inputs/mask/Cpf.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import '../../@types/Align.js';
|
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Period.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const CpfField: {
|
|
10
12
|
(props: ICpfProps): JSX.Element;
|
|
@@ -5,6 +5,8 @@ import '../../@types/Align.js';
|
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Period.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const PhoneField: (props: IPhoneFieldProps) => JSX.Element;
|
|
10
12
|
|
|
@@ -5,6 +5,8 @@ import '../../@types/Align.js';
|
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Period.js';
|
|
8
|
+
import '../../internals/types.js';
|
|
9
|
+
import '../../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
declare const ZipCodeField: (props: IZipCode) => JSX.Element;
|
|
10
12
|
|
|
@@ -6,8 +6,9 @@ import '../../@types/DataCombo.js';
|
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Align.js';
|
|
8
8
|
import '../../@types/Period.js';
|
|
9
|
-
import '../../
|
|
9
|
+
import '../../internals/types.js';
|
|
10
10
|
import '../../@types/Position.js';
|
|
11
|
+
import '../../drawer/types.js';
|
|
11
12
|
import '../../@types/Icon.js';
|
|
12
13
|
import '../../icons/helper.js';
|
|
13
14
|
|
|
@@ -6,8 +6,9 @@ import '../../@types/DataCombo.js';
|
|
|
6
6
|
import '../base/types.js';
|
|
7
7
|
import '../../@types/Align.js';
|
|
8
8
|
import '../../@types/Period.js';
|
|
9
|
-
import '../../
|
|
9
|
+
import '../../internals/types.js';
|
|
10
10
|
import '../../@types/Position.js';
|
|
11
|
+
import '../../drawer/types.js';
|
|
11
12
|
import '../../@types/Icon.js';
|
|
12
13
|
import '../../icons/helper.js';
|
|
13
14
|
|