linear-react-components-ui 1.1.2-beta.8 → 1.1.2
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/.gitlab-ci.yml +1 -0
- package/.vscode/settings.json +10 -1
- package/lib/@types/Align.d.ts +1 -1
- package/lib/@types/ButtonTypes.d.ts +1 -1
- package/lib/@types/ColorStyles.d.ts +1 -1
- package/lib/@types/DataCombo.d.ts +1 -1
- package/lib/@types/Icon.d.ts +1 -1
- package/lib/@types/LabelStyles.d.ts +1 -1
- package/lib/@types/Period.d.ts +1 -1
- package/lib/@types/PermissionAttr.d.ts +1 -1
- package/lib/@types/PointerEvents.d.ts +1 -1
- package/lib/@types/Position.d.ts +1 -1
- package/lib/@types/PositionAlert.d.ts +1 -1
- package/lib/@types/Size.d.ts +1 -1
- package/lib/@types/SizePixels.d.ts +2 -2
- package/lib/@types/StorageMock.d.ts +1 -1
- package/lib/alerts/types.d.ts +1 -1
- package/lib/assets/styles/checkbox.scss +37 -38
- package/lib/assets/styles/colors.scss +2 -0
- package/lib/assets/styles/commons.scss +1 -0
- package/lib/assets/styles/error.scss +9 -0
- package/lib/assets/styles/fieldset.scss +3 -0
- package/lib/assets/styles/gridlayout.scss +0 -2
- package/lib/assets/styles/hint.scss +21 -0
- package/lib/assets/styles/input.scss +7 -7
- package/lib/avatar/types.d.ts +1 -1
- package/lib/badge/types.d.ts +1 -1
- package/lib/buttons/types.d.ts +1 -1
- package/lib/calendar/types.d.ts +1 -1
- package/lib/checkbox/Label.js +13 -4
- package/lib/checkbox/index.js +14 -10
- package/lib/checkbox/types.d.ts +1 -1
- package/lib/dialog/Custom.js +4 -2
- package/lib/dialog/base/index.js +3 -2
- package/lib/dialog/form/index.js +3 -3
- package/lib/dialog/types.d.ts +1 -1
- package/lib/drawer/Drawer.js +1 -1
- package/lib/drawer/types.d.ts +1 -1
- package/lib/dropdown/types.d.ts +1 -1
- package/lib/fieldset/index.js +4 -2
- package/lib/fieldset/types.d.ts +3 -1
- package/lib/form/Field.d.ts +3 -1
- 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 +3 -1
- package/lib/form/withFieldHOC.d.ts +2 -0
- package/lib/form/withFormSecurity.d.ts +2 -0
- package/lib/gridlayout/GridRow.js +10 -2
- package/lib/gridlayout/types.d.ts +2 -2
- package/lib/hint/helpers.d.ts +3 -0
- package/lib/hint/helpers.js +21 -0
- package/lib/hint/index.d.ts +2 -1
- package/lib/hint/index.js +9 -15
- package/lib/hint/types.d.ts +4 -1
- package/lib/icons/helper.d.ts +4 -0
- package/lib/icons/helper.js +4 -0
- package/lib/icons/types.d.ts +1 -1
- package/lib/inputs/base/InputTextBase.d.ts +2 -0
- package/lib/inputs/base/InputTextBase.js +51 -7
- package/lib/inputs/base/Label.d.ts +14 -0
- package/lib/inputs/base/Label.js +35 -0
- package/lib/inputs/base/helpers.d.ts +3 -2
- package/lib/inputs/base/helpers.js +1 -8
- package/lib/inputs/base/types.d.ts +14 -2
- package/lib/inputs/color/types.d.ts +1 -1
- 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/index.js +2 -0
- package/lib/inputs/date/types.d.ts +4 -1
- package/lib/inputs/errorMessage/index.d.ts +17 -0
- package/lib/inputs/errorMessage/index.js +26 -0
- package/lib/inputs/file/DefaultFile.d.ts +2 -0
- package/lib/inputs/file/DefaultFile.js +4 -2
- package/lib/inputs/file/DragDropFile.d.ts +2 -0
- package/lib/inputs/file/DragDropFile.js +4 -2
- 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 +3 -1
- package/lib/inputs/inputHOC.d.ts +3 -1
- package/lib/inputs/mask/BaseMask.d.ts +3 -0
- package/lib/inputs/mask/Cnpj.d.ts +3 -0
- package/lib/inputs/mask/Cpf.d.ts +3 -0
- package/lib/inputs/mask/Phone.d.ts +3 -0
- package/lib/inputs/mask/ZipCode.d.ts +3 -0
- package/lib/inputs/mask/helpers.d.ts +2 -1
- package/lib/inputs/mask/imaskHOC.d.ts +3 -1
- package/lib/inputs/mask/index.d.ts +3 -0
- package/lib/inputs/mask/types.d.ts +6 -2
- 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/index.js +2 -2
- package/lib/inputs/multiSelect/types.d.ts +3 -1
- package/lib/inputs/number/BaseNumber.d.ts +3 -1
- package/lib/inputs/number/Currency.d.ts +3 -1
- package/lib/inputs/number/Decimal.d.ts +3 -1
- package/lib/inputs/number/index.d.ts +3 -1
- package/lib/inputs/number/types.d.ts +4 -2
- 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/index.js +4 -1
- package/lib/inputs/period/types.d.ts +3 -1
- package/lib/inputs/search/index.d.ts +3 -1
- package/lib/inputs/select/ActionButtons.d.ts +3 -1
- package/lib/inputs/select/Dropdown.d.ts +3 -1
- package/lib/inputs/select/helper.d.ts +3 -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/multiple/index.js +9 -3
- package/lib/inputs/select/simple/index.d.ts +2 -0
- package/lib/inputs/select/simple/index.js +9 -3
- package/lib/inputs/select/types.d.ts +5 -3
- package/lib/inputs/text/types.d.ts +1 -1
- package/lib/inputs/textarea/index.d.ts +2 -0
- package/lib/inputs/textarea/types.d.ts +3 -1
- package/lib/inputs/types.d.ts +10 -3
- package/lib/internals/types.d.ts +1 -1
- package/lib/internals/withTooltip.js +7 -3
- package/lib/labelMessages/types.d.ts +1 -1
- package/lib/labels/types.d.ts +1 -1
- package/lib/list/types.d.ts +1 -1
- package/lib/menus/float/index.d.ts +10 -10
- package/lib/menus/float/types.d.ts +1 -1
- package/lib/menus/sidenav/index.js +3 -3
- package/lib/menus/sidenav/popup_menu_search/index.js +1 -1
- package/lib/menus/sidenav/types.d.ts +1 -1
- package/lib/panel/types.d.ts +1 -1
- package/lib/popover/types.d.ts +1 -1
- package/lib/progress/types.d.ts +1 -1
- package/lib/radio/types.d.ts +1 -1
- package/lib/shortcuts/types.d.ts +1 -1
- package/lib/skeleton/types.d.ts +1 -1
- package/lib/spinner/types.d.ts +1 -1
- package/lib/split/helpers.d.ts +1 -1
- package/lib/split/types.d.ts +1 -1
- package/lib/table/types.d.ts +1 -1
- package/lib/tabs/types.d.ts +1 -1
- package/lib/toolbar/types.d.ts +1 -1
- package/lib/tooltip/index.js +2 -2
- package/lib/tooltip/types.d.ts +1 -1
- package/lib/treetable/Row.d.ts +1 -1
- package/lib/treetable/helpers.d.ts +1 -1
- package/lib/treetable/index.d.ts +2 -2
- package/lib/treeview/Node.js +2 -2
- package/lib/treeview/types.d.ts +1 -1
- package/lib/{types.d-DvJcBS8L.d.ts → types.d-73cece43.d.ts} +1 -1
- package/lib/uitour/types.d.ts +1 -1
- package/package.json +8 -8
- package/.tool-versions +0 -1
|
@@ -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: {
|
|
@@ -217,4 +219,4 @@ type FieldValidator = {
|
|
|
217
219
|
[name: string]: Validator | Validator[];
|
|
218
220
|
};
|
|
219
221
|
|
|
220
|
-
export
|
|
222
|
+
export { CustomEvent, CustomKeyboardEvent, FieldErrors, FieldValidator, FormContextProps, FormProps, IEventParams, IFieldArrayProps, IFieldPeriodProps, IFieldProps, IFormSecurityContext, IGetErrorMessagesParams, IWithFieldContext, IWithFormSecurity, OnFielChangeEvent, PeriodChangeEvent, PeriodValidator, Validator, WithFieldProps };
|
|
@@ -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;
|
|
@@ -7,17 +7,25 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
require("../assets/styles/gridlayout.scss");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
12
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
14
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
15
|
+
const getClass = props => "row ".concat(props.customClass, "\n ").concat(props.withTrim && ' -withtrim', "\n ").concat(props.verticalAlign && " align-items-".concat(props.verticalAlign), "\n ").concat(props.horizontalAlign && " justify-content-".concat(props.horizontalAlign));
|
|
11
16
|
const GridRow = props => {
|
|
12
17
|
const {
|
|
13
18
|
style,
|
|
14
19
|
children,
|
|
20
|
+
verticalAlign = 'start',
|
|
15
21
|
visible = true
|
|
16
22
|
} = props;
|
|
17
23
|
if (!visible) return null;
|
|
18
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
25
|
style: style,
|
|
20
|
-
className: getClass(props)
|
|
26
|
+
className: getClass(_objectSpread(_objectSpread({}, props), {}, {
|
|
27
|
+
verticalAlign
|
|
28
|
+
}))
|
|
21
29
|
}, children);
|
|
22
30
|
};
|
|
23
31
|
var _default = exports.default = GridRow;
|
|
@@ -9,7 +9,7 @@ interface IGridCol {
|
|
|
9
9
|
}
|
|
10
10
|
interface IGridRow {
|
|
11
11
|
children: ReactNode | ReactNode[];
|
|
12
|
-
verticalAlign?:
|
|
12
|
+
verticalAlign?: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
|
|
13
13
|
horizontalAlign?: string;
|
|
14
14
|
style?: CSSProperties;
|
|
15
15
|
withTrim?: boolean;
|
|
@@ -17,4 +17,4 @@ interface IGridRow {
|
|
|
17
17
|
customClass?: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export
|
|
20
|
+
export { IGridCol, IGridRow };
|
|
@@ -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,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, }: 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
|
@@ -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,17 @@ const Hint = _ref => {
|
|
|
13
14
|
description,
|
|
14
15
|
customClass,
|
|
15
16
|
skeletonize = false,
|
|
16
|
-
style
|
|
17
|
+
style,
|
|
18
|
+
disabled = false,
|
|
19
|
+
color
|
|
17
20
|
} = _ref;
|
|
18
21
|
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
22
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
+
"aria-disabled": disabled,
|
|
32
24
|
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",
|
|
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));
|
|
35
29
|
};
|
|
36
30
|
var _default = exports.default = Hint;
|
package/lib/hint/types.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
+
import { ColorStyles } from '../@types/ColorStyles.js';
|
|
2
3
|
|
|
3
4
|
interface HintProps {
|
|
4
5
|
description?: string | string[];
|
|
5
6
|
visible?: boolean;
|
|
6
7
|
customClass?: string;
|
|
7
8
|
skeletonize?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
8
10
|
style?: CSSProperties;
|
|
11
|
+
color?: ColorStyles;
|
|
9
12
|
}
|
|
10
13
|
|
|
11
|
-
export
|
|
14
|
+
export { 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
|
};
|
package/lib/icons/types.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ 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
9
|
declare const _default: (props: IBaseProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -12,6 +12,8 @@ var helpers = _interopRequireWildcard(require("./helpers"));
|
|
|
12
12
|
var _withTooltip = _interopRequireDefault(require("../../internals/withTooltip"));
|
|
13
13
|
var _permissionValidations = require("../../permissionValidations");
|
|
14
14
|
var _hint = _interopRequireDefault(require("../../hint"));
|
|
15
|
+
var _errorMessage = require("../errorMessage");
|
|
16
|
+
var _Label = _interopRequireDefault(require("./Label"));
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
18
|
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); }
|
|
17
19
|
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; }
|
|
@@ -69,11 +71,13 @@ const InputTextBase = props => {
|
|
|
69
71
|
} = props;
|
|
70
72
|
let propsInput;
|
|
71
73
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
74
|
+
const labelRef = (0, _react.useRef)(null);
|
|
72
75
|
const onDenied = onDeniedActions || (0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr);
|
|
73
76
|
const {
|
|
74
77
|
hideContent,
|
|
75
78
|
unvisible
|
|
76
79
|
} = onDenied;
|
|
80
|
+
const [showTooltip, setShowTooltip] = (0, _react.useState)(false);
|
|
77
81
|
(0, _react.useEffect)(() => {
|
|
78
82
|
if (handlerSetOnDenied) handlerSetOnDenied(onDenied);
|
|
79
83
|
}, []);
|
|
@@ -144,6 +148,39 @@ const InputTextBase = props => {
|
|
|
144
148
|
}
|
|
145
149
|
return propsInput;
|
|
146
150
|
};
|
|
151
|
+
const onHoverLabel = e => {
|
|
152
|
+
const target = e.target;
|
|
153
|
+
if (target.offsetWidth < target.scrollWidth) {
|
|
154
|
+
setShowTooltip(true);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
(0, _react.useEffect)(() => {
|
|
158
|
+
const resize = new ResizeObserver(_ref => {
|
|
159
|
+
let [element] = _ref;
|
|
160
|
+
const {
|
|
161
|
+
target
|
|
162
|
+
} = element;
|
|
163
|
+
setShowTooltip(prevState => {
|
|
164
|
+
var overflowing = target.clientWidth < target.scrollWidth;
|
|
165
|
+
return prevState === overflowing ? prevState : overflowing;
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
if (labelRef.current) {
|
|
169
|
+
resize.observe(labelRef.current);
|
|
170
|
+
}
|
|
171
|
+
return () => {
|
|
172
|
+
if (resize) {
|
|
173
|
+
resize.disconnect();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}, []);
|
|
177
|
+
if (labelRef.current) {
|
|
178
|
+
const element = labelRef.current;
|
|
179
|
+
const overflowing = element.offsetWidth < element.scrollWidth;
|
|
180
|
+
if (overflowing && !showTooltip) {
|
|
181
|
+
setShowTooltip(true);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
147
184
|
if (!visible || unvisible) return null;
|
|
148
185
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
149
186
|
style: style,
|
|
@@ -154,12 +191,16 @@ const InputTextBase = props => {
|
|
|
154
191
|
style: {
|
|
155
192
|
textAlign: textAlign === 'center' ? 'left' : textAlign
|
|
156
193
|
}
|
|
157
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
194
|
+
}, /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
195
|
+
labelRef: labelRef,
|
|
196
|
+
label: label,
|
|
197
|
+
required: required,
|
|
198
|
+
onHoverLabel: onHoverLabel,
|
|
199
|
+
customClassForLabel: customClassForLabel,
|
|
200
|
+
labelUppercase: labelUppercase,
|
|
201
|
+
tooltip: showTooltip ? label.toString() : undefined,
|
|
202
|
+
tooltipPosition: "top"
|
|
203
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
163
204
|
"data-testid": "testInputWrapper",
|
|
164
205
|
style: styleForWrapper,
|
|
165
206
|
className: helpers.getInputWrapperClass(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -179,9 +220,12 @@ const InputTextBase = props => {
|
|
|
179
220
|
autoComplete: autoComplete,
|
|
180
221
|
tabIndex: applyTabIndex()
|
|
181
222
|
}, inputProps())), children), helpers.getRightElements(errorMessages || [], skeletonize, rightElements)), /*#__PURE__*/_react.default.createElement(_hint.default, {
|
|
223
|
+
disabled: disabled,
|
|
182
224
|
visible: !!hint,
|
|
183
225
|
customClass: "hint",
|
|
184
226
|
description: hint
|
|
185
|
-
}),
|
|
227
|
+
}), /*#__PURE__*/_react.default.createElement(_errorMessage.ErrorMessage, {
|
|
228
|
+
messages: errorMessages
|
|
229
|
+
}));
|
|
186
230
|
};
|
|
187
231
|
var _default = exports.default = (0, _inputHOC.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;
|
|
@@ -10,7 +12,6 @@ declare const getInputClass: ({ textAlign, readOnly, readOnlyClass, }: {
|
|
|
10
12
|
readOnlyClass?: string | undefined;
|
|
11
13
|
}) => string;
|
|
12
14
|
declare const getInputWrapperClass: (props: IBaseProps) => string;
|
|
13
|
-
declare const getErrorMessages: (messages: string[]) => JSX.Element;
|
|
14
15
|
declare const getRightElements: (errorMessages: string[], skeletonize: boolean, rightElements?: JSX.Element | JSX.Element[]) => JSX.Element[] | null;
|
|
15
16
|
|
|
16
|
-
export {
|
|
17
|
+
export { getInputClass, getInputWrapperClass, getRightElements };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getRightElements = exports.getInputWrapperClass = exports.getInputClass =
|
|
6
|
+
exports.getRightElements = exports.getInputWrapperClass = exports.getInputClass = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -27,13 +27,6 @@ const getInputWrapperClass = props => {
|
|
|
27
27
|
return "inputwrapper ".concat(inputHasFocus && ' -focusable', "\n ").concat(customClassForWrapper, "\n ").concat(errorMessages && errorMessages.length > 0 && ' -requirederror', "\n ").concat(rounded && ' -roundedborders', "\n ").concat(disabled && ' -disabled');
|
|
28
28
|
};
|
|
29
29
|
exports.getInputWrapperClass = getInputWrapperClass;
|
|
30
|
-
const getErrorMessages = messages => {
|
|
31
|
-
if (!messages || messages.length === 0) return /*#__PURE__*/_react.default.createElement("noscript", null);
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement("p", {
|
|
33
|
-
className: "errormessages"
|
|
34
|
-
}, messages.join(', '));
|
|
35
|
-
};
|
|
36
|
-
exports.getErrorMessages = getErrorMessages;
|
|
37
30
|
const getRightElements = (errorMessages, skeletonize, rightElements) => {
|
|
38
31
|
let elements = rightElements || [];
|
|
39
32
|
if (skeletonize) return null;
|
|
@@ -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
|
|
94
|
+
export { 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
|
|
package/lib/inputs/date/index.js
CHANGED
|
@@ -32,6 +32,7 @@ const DatePicker = props => {
|
|
|
32
32
|
required = false,
|
|
33
33
|
value = '',
|
|
34
34
|
name = '',
|
|
35
|
+
inputRef: inputRefProp,
|
|
35
36
|
dialogSize = {
|
|
36
37
|
width: '350px',
|
|
37
38
|
height: '350px'
|
|
@@ -233,6 +234,7 @@ const DatePicker = props => {
|
|
|
233
234
|
},
|
|
234
235
|
inputRef: el => {
|
|
235
236
|
inputRef.current = el;
|
|
237
|
+
if (inputRefProp) inputRefProp.current = el;
|
|
236
238
|
},
|
|
237
239
|
rightElements: getButtonOpen(),
|
|
238
240
|
required: required,
|
|
@@ -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;
|
|
@@ -12,6 +14,7 @@ interface IDatePickerProps {
|
|
|
12
14
|
setFocusOnSelect?: boolean;
|
|
13
15
|
openOnFocus?: boolean;
|
|
14
16
|
showCalendarInDialog?: boolean;
|
|
17
|
+
inputRef?: React.MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
15
18
|
dialogSize?: {
|
|
16
19
|
width: string;
|
|
17
20
|
height: string;
|
|
@@ -52,4 +55,4 @@ interface IDateDialogProps {
|
|
|
52
55
|
};
|
|
53
56
|
}
|
|
54
57
|
|
|
55
|
-
export
|
|
58
|
+
export { IDateDialogProps, IDateDropdownProps, IDatePickerProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { ErrorProps } from '../types.js';
|
|
3
|
+
import 'imask';
|
|
4
|
+
import '../../@types/PermissionAttr.js';
|
|
5
|
+
import '../../@types/DataCombo.js';
|
|
6
|
+
import '../base/types.js';
|
|
7
|
+
import '../../@types/Align.js';
|
|
8
|
+
import '../../@types/Period.js';
|
|
9
|
+
import '../../internals/types.js';
|
|
10
|
+
import '../../@types/Position.js';
|
|
11
|
+
import '../../drawer/types.js';
|
|
12
|
+
import '../../@types/Icon.js';
|
|
13
|
+
import '../../icons/helper.js';
|
|
14
|
+
|
|
15
|
+
declare const ErrorMessage: React__default.ForwardRefExoticComponent<ErrorProps & React__default.RefAttributes<HTMLParagraphElement>>;
|
|
16
|
+
|
|
17
|
+
export { ErrorMessage, ErrorMessage as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.ErrorMessage = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
require("../../assets/styles/error.scss");
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
const ErrorMessage = exports.ErrorMessage = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
12
|
+
let {
|
|
13
|
+
customClass = '',
|
|
14
|
+
messages: messagesProp,
|
|
15
|
+
style
|
|
16
|
+
} = _ref;
|
|
17
|
+
if (!messagesProp || messagesProp.length === 0) return null;
|
|
18
|
+
const messages = Array.isArray(messagesProp) ? messagesProp : [messagesProp];
|
|
19
|
+
return /*#__PURE__*/_react.default.createElement("p", {
|
|
20
|
+
ref: ref,
|
|
21
|
+
style: style,
|
|
22
|
+
className: "errormessages-component ".concat(customClass)
|
|
23
|
+
}, messages.join(', '));
|
|
24
|
+
});
|
|
25
|
+
ErrorMessage.displayName = 'ErrorMessage';
|
|
26
|
+
var _default = exports.default = ErrorMessage;
|
|
@@ -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
|
|