@hexure/ui 1.13.49 → 1.13.50
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/dist/cjs/index.js +25 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Field/Field.d.ts +2 -0
- package/dist/esm/index.js +26 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Field/Field.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -24,6 +24,8 @@ export interface FieldProps extends AccessibleProps {
|
|
|
24
24
|
tooltip?: TooltipProps;
|
|
25
25
|
/** Optional ID for automation purposes */
|
|
26
26
|
dataItemid?: string;
|
|
27
|
+
/** Optional for black message with icon */
|
|
28
|
+
isNewMessageType?: boolean;
|
|
27
29
|
}
|
|
28
30
|
declare const Field: FC<FieldProps>;
|
|
29
31
|
export default Field;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useContext, useRef, useEffect } from 'react';
|
|
2
2
|
import styled, { ThemeContext, keyframes } from 'styled-components';
|
|
3
3
|
import Icon, { Icon as Icon$1 } from '@mdi/react';
|
|
4
|
-
import { mdiChevronUp, mdiChevronDown, mdiInformationOutline, mdiLoading, mdiAlertOctagonOutline, mdiAlertOutline, mdiCheckboxMarkedCircleOutline, mdiClose, mdiChevronRight, mdiChevronLeft, mdiDotsHorizontal, mdiMinusCircle, mdiFolderPlusOutline, mdiCheck } from '@mdi/js';
|
|
4
|
+
import { mdiChevronUp, mdiChevronDown, mdiInformationOutline, mdiLoading, mdiAlertOctagonOutline, mdiAlertOutline, mdiCheckboxMarkedCircleOutline, mdiClose, mdiChevronRight, mdiChevronLeft, mdiDotsHorizontal, mdiAlertCircle, mdiMinusCircle, mdiFolderPlusOutline, mdiCheck } from '@mdi/js';
|
|
5
5
|
import dayjs from 'dayjs';
|
|
6
6
|
import Numeral from 'numeral';
|
|
7
7
|
import Moment from 'moment';
|
|
@@ -1366,9 +1366,30 @@ const Validation = styled.div `
|
|
|
1366
1366
|
color: ${Colors.RED.Hex};
|
|
1367
1367
|
margin: 4px 0 0 0;
|
|
1368
1368
|
box-sizing: border-box;
|
|
1369
|
+
min-height: 19px;
|
|
1369
1370
|
`;
|
|
1371
|
+
const ValidationNew = styled.span `
|
|
1372
|
+
font-size: ${FontSizes.SMALL};
|
|
1373
|
+
font-weight: 400;
|
|
1374
|
+
line-height: 1.3em;
|
|
1375
|
+
font-family: ${FontStyles.DEFAULT};
|
|
1376
|
+
color: ${Colors.BLACK.Hex};
|
|
1377
|
+
box-sizing: border-box;
|
|
1378
|
+
align-items: center;
|
|
1379
|
+
display: flex;
|
|
1380
|
+
`;
|
|
1381
|
+
const ValidationInnerIcon = styled.span `
|
|
1382
|
+
padding-right: 5px;
|
|
1383
|
+
display: flex;
|
|
1384
|
+
`;
|
|
1385
|
+
const ValidationInnerMessage = styled.span ``;
|
|
1386
|
+
const MessageWrapper = message => (React.createElement(ValidationNew, null,
|
|
1387
|
+
React.createElement(ValidationInnerIcon, null,
|
|
1388
|
+
React.createElement(Icon, { path: mdiAlertCircle, size: '17px' })),
|
|
1389
|
+
' ',
|
|
1390
|
+
React.createElement(ValidationInnerMessage, null, message)));
|
|
1370
1391
|
const Field = (_a) => {
|
|
1371
|
-
var { action, children, validationText, label, description, required, htmlFor, style = {}, tooltip, dataItemid } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip", "dataItemid"]);
|
|
1392
|
+
var { action, children, validationText, label, description, required, htmlFor, style = {}, tooltip, dataItemid, isNewMessageType } = _a, accessibleProps = __rest(_a, ["action", "children", "validationText", "label", "description", "required", "htmlFor", "style", "tooltip", "dataItemid", "isNewMessageType"]);
|
|
1372
1393
|
const baseId = dataItemid || 'field';
|
|
1373
1394
|
return (React.createElement(Wrapper$9, Object.assign({ "$customStyle": style }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
1374
1395
|
React.createElement(LabelRow, { "data-itemid": `${baseId}-label-row` },
|
|
@@ -1379,7 +1400,9 @@ const Field = (_a) => {
|
|
|
1379
1400
|
action ? (React.createElement(Action, { "data-itemid": `${baseId}-action`, onClick: action.onClick }, action.label)) : null),
|
|
1380
1401
|
description ? (React.createElement(Description, { "data-itemid": `${baseId}-description` }, description)) : null,
|
|
1381
1402
|
React.createElement("div", { "data-itemid": `${baseId}-children` }, children),
|
|
1382
|
-
React.createElement(Validation, { className: 'field-validation-wrapper', "data-itemid": `${baseId}-validation`, title: validationText }, validationText
|
|
1403
|
+
React.createElement(Validation, { className: 'field-validation-wrapper', "data-itemid": `${baseId}-validation`, title: validationText }, validationText && isNewMessageType
|
|
1404
|
+
? MessageWrapper(validationText)
|
|
1405
|
+
: validationText || '\u00A0')));
|
|
1383
1406
|
};
|
|
1384
1407
|
|
|
1385
1408
|
const Wrapper$8 = styled.fieldset `
|