@hexure/ui 1.13.48 → 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 +28 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/BulkActionBar/BulkActionBar.d.ts +1 -0
- package/dist/cjs/types/components/Field/Field.d.ts +2 -0
- package/dist/cjs/types/components/Pagination/Pagination.d.ts +1 -0
- package/dist/esm/index.js +29 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/BulkActionBar/BulkActionBar.d.ts +1 -0
- package/dist/esm/types/components/Field/Field.d.ts +2 -0
- package/dist/esm/types/components/Pagination/Pagination.d.ts +1 -0
- package/dist/index.d.ts +4 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1368,9 +1368,30 @@ const Validation = styled.div `
|
|
|
1368
1368
|
color: ${Colors.RED.Hex};
|
|
1369
1369
|
margin: 4px 0 0 0;
|
|
1370
1370
|
box-sizing: border-box;
|
|
1371
|
+
min-height: 19px;
|
|
1371
1372
|
`;
|
|
1373
|
+
const ValidationNew = styled.span `
|
|
1374
|
+
font-size: ${FontSizes.SMALL};
|
|
1375
|
+
font-weight: 400;
|
|
1376
|
+
line-height: 1.3em;
|
|
1377
|
+
font-family: ${FontStyles.DEFAULT};
|
|
1378
|
+
color: ${Colors.BLACK.Hex};
|
|
1379
|
+
box-sizing: border-box;
|
|
1380
|
+
align-items: center;
|
|
1381
|
+
display: flex;
|
|
1382
|
+
`;
|
|
1383
|
+
const ValidationInnerIcon = styled.span `
|
|
1384
|
+
padding-right: 5px;
|
|
1385
|
+
display: flex;
|
|
1386
|
+
`;
|
|
1387
|
+
const ValidationInnerMessage = styled.span ``;
|
|
1388
|
+
const MessageWrapper = message => (React.createElement(ValidationNew, null,
|
|
1389
|
+
React.createElement(ValidationInnerIcon, null,
|
|
1390
|
+
React.createElement(Icon, { path: js.mdiAlertCircle, size: '17px' })),
|
|
1391
|
+
' ',
|
|
1392
|
+
React.createElement(ValidationInnerMessage, null, message)));
|
|
1372
1393
|
const Field = (_a) => {
|
|
1373
|
-
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"]);
|
|
1394
|
+
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"]);
|
|
1374
1395
|
const baseId = dataItemid || 'field';
|
|
1375
1396
|
return (React.createElement(Wrapper$9, Object.assign({ "$customStyle": style }, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
1376
1397
|
React.createElement(LabelRow, { "data-itemid": `${baseId}-label-row` },
|
|
@@ -1381,7 +1402,9 @@ const Field = (_a) => {
|
|
|
1381
1402
|
action ? (React.createElement(Action, { "data-itemid": `${baseId}-action`, onClick: action.onClick }, action.label)) : null),
|
|
1382
1403
|
description ? (React.createElement(Description, { "data-itemid": `${baseId}-description` }, description)) : null,
|
|
1383
1404
|
React.createElement("div", { "data-itemid": `${baseId}-children` }, children),
|
|
1384
|
-
React.createElement(Validation, { className: 'field-validation-wrapper', "data-itemid": `${baseId}-validation`, title: validationText }, validationText
|
|
1405
|
+
React.createElement(Validation, { className: 'field-validation-wrapper', "data-itemid": `${baseId}-validation`, title: validationText }, validationText && isNewMessageType
|
|
1406
|
+
? MessageWrapper(validationText)
|
|
1407
|
+
: validationText || '\u00A0')));
|
|
1385
1408
|
};
|
|
1386
1409
|
|
|
1387
1410
|
const Wrapper$8 = styled.fieldset `
|
|
@@ -2358,7 +2381,7 @@ const Wrapper$3 = styled.nav `
|
|
|
2358
2381
|
column-gap: 10px;
|
|
2359
2382
|
`;
|
|
2360
2383
|
const Pagination = (_a) => {
|
|
2361
|
-
var { currentPage = 1, onClick, pageCount = 0, dataItemid } = _a, accessibleProps = __rest(_a, ["currentPage", "onClick", "pageCount", "dataItemid"]);
|
|
2384
|
+
var { currentPage = 1, onClick, pageCount = 0, dataItemid, type = null } = _a, accessibleProps = __rest(_a, ["currentPage", "onClick", "pageCount", "dataItemid", "type"]);
|
|
2362
2385
|
const is_first_page = currentPage === 1;
|
|
2363
2386
|
const is_last_page = currentPage === pageCount;
|
|
2364
2387
|
const handlePrevClick = () => {
|
|
@@ -2379,12 +2402,12 @@ const Pagination = (_a) => {
|
|
|
2379
2402
|
};
|
|
2380
2403
|
const baseId = dataItemid || 'pagination';
|
|
2381
2404
|
return (React.createElement(Wrapper$3, Object.assign({}, accessibleProps, { "data-itemid": `${baseId}-wrapper` }),
|
|
2382
|
-
React.createElement(Button, { "data-itemid": `${baseId}-prev-button`, disabled: is_first_page, icon: js.mdiChevronLeft, onClick: handlePrevClick, small: true }),
|
|
2405
|
+
React.createElement(Button, { "data-itemid": `${baseId}-prev-button`, disabled: is_first_page, icon: js.mdiChevronLeft, onClick: handlePrevClick, small: true, type: type }),
|
|
2383
2406
|
React.createElement(Select, { "data-itemid": `${baseId}-select`, onChange: handlePageChange, options: Array.from(Array(pageCount).keys(), p => p + 1).map(p => ({
|
|
2384
2407
|
label: `Page ${p}`,
|
|
2385
2408
|
value: `${p}`,
|
|
2386
2409
|
})), value: `${currentPage}` }),
|
|
2387
|
-
React.createElement(Button, { "data-itemid": `${baseId}-next-button`, disabled: is_last_page, icon: js.mdiChevronRight, onClick: handleNextClick, small: true })));
|
|
2410
|
+
React.createElement(Button, { "data-itemid": `${baseId}-next-button`, disabled: is_last_page, icon: js.mdiChevronRight, onClick: handleNextClick, small: true, type: type })));
|
|
2388
2411
|
};
|
|
2389
2412
|
|
|
2390
2413
|
const Wrapper$2 = styled.label `
|