@transferwise/components 45.13.0 → 45.14.0
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/build/index.esm.js +152 -91
- package/build/index.esm.js.map +1 -1
- package/build/index.js +156 -94
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/inputs/InputGroup.css +1 -0
- package/build/styles/main.css +1 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +18 -28
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/avatarWrapper/index.d.ts +1 -1
- package/build/types/avatarWrapper/index.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts +2 -2
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/badge/index.d.ts +2 -1
- package/build/types/badge/index.d.ts.map +1 -1
- package/build/types/body/Body.d.ts +2 -2
- package/build/types/common/hooks/useEffectEvent.d.ts +2 -0
- package/build/types/common/hooks/useEffectEvent.d.ts.map +1 -0
- package/build/types/common/hooks/useResizeObserver.d.ts +3 -0
- package/build/types/common/hooks/useResizeObserver.d.ts.map +1 -0
- package/build/types/common/index.d.ts +1 -1
- package/build/types/common/panel/Panel.d.ts +1 -1
- package/build/types/common/propsValues/profileType.d.ts +2 -0
- package/build/types/common/propsValues/profileType.d.ts.map +1 -1
- package/build/types/common/propsValues/sentiment.d.ts +1 -0
- package/build/types/common/propsValues/sentiment.d.ts.map +1 -1
- package/build/types/common/responsivePanel/ResponsivePanel.d.ts +1 -1
- package/build/types/dimmer/Dimmer.d.ts +1 -1
- package/build/types/image/Image.d.ts +17 -21
- package/build/types/image/Image.d.ts.map +1 -1
- package/build/types/image/index.d.ts +1 -1
- package/build/types/image/index.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inlineAlert/InlineAlert.d.ts +12 -15
- package/build/types/inlineAlert/InlineAlert.d.ts.map +1 -1
- package/build/types/inlineAlert/index.d.ts +1 -1
- package/build/types/inlineAlert/index.d.ts.map +1 -1
- package/build/types/inputs/Input.d.ts +4 -8
- package/build/types/inputs/Input.d.ts.map +1 -1
- package/build/types/inputs/InputGroup.d.ts +21 -0
- package/build/types/inputs/InputGroup.d.ts.map +1 -0
- package/build/types/inputs/TextArea.d.ts +4 -7
- package/build/types/inputs/TextArea.d.ts.map +1 -1
- package/build/types/promoCard/PromoCard.d.ts.map +1 -1
- package/build/types/select/searchBox/SearchBox.d.ts +1 -1
- package/build/types/utilities/cssValueWithUnit.d.ts +2 -0
- package/build/types/utilities/cssValueWithUnit.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/avatarWrapper/AvatarWrapper.spec.tsx +105 -0
- package/src/avatarWrapper/AvatarWrapper.story.tsx +1 -41
- package/src/avatarWrapper/{AvatarWrapper.js → AvatarWrapper.tsx} +25 -56
- package/src/avatarWrapper/__snapshots__/{AvatarWrapper.spec.js.snap → AvatarWrapper.spec.tsx.snap} +76 -76
- package/src/badge/Badge.tsx +2 -2
- package/src/badge/index.ts +2 -0
- package/src/common/hooks/useEffectEvent.ts +22 -0
- package/src/common/hooks/useResizeObserver.ts +22 -0
- package/src/common/index.js +1 -1
- package/src/common/propsValues/profileType.ts +3 -0
- package/src/common/propsValues/sentiment.ts +10 -0
- package/src/image/{Image.spec.js → Image.spec.tsx} +5 -5
- package/src/image/{Image.story.js → Image.story.tsx} +3 -3
- package/src/image/Image.tsx +65 -0
- package/src/index.ts +2 -0
- package/src/inlineAlert/{InlineAlert.story.js → InlineAlert.story.tsx} +3 -2
- package/src/inlineAlert/InlineAlert.tsx +59 -0
- package/src/inputs/Input.tsx +13 -7
- package/src/inputs/InputGroup.css +1 -0
- package/src/inputs/InputGroup.less +61 -0
- package/src/inputs/InputGroup.story.tsx +73 -0
- package/src/inputs/InputGroup.tsx +142 -0
- package/src/inputs/TextArea.tsx +7 -6
- package/src/main.css +1 -1
- package/src/main.less +1 -0
- package/src/promoCard/PromoCard.tsx +1 -6
- package/src/promoCard/__snapshots__/PromoCardGroup.spec.tsx.snap +2 -2
- package/src/utilities/cssValueWithUnit.ts +3 -0
- package/src/avatarWrapper/AvatarWrapper.spec.js +0 -81
- package/src/badge/index.js +0 -1
- package/src/image/Image.js +0 -78
- package/src/inlineAlert/InlineAlert.js +0 -62
- /package/src/avatarWrapper/{index.js → index.ts} +0 -0
- /package/src/image/{index.js → index.ts} +0 -0
- /package/src/inlineAlert/{InlineAlert.spec.js → InlineAlert.spec.tsx} +0 -0
- /package/src/inlineAlert/{index.js → index.ts} +0 -0
package/build/index.js
CHANGED
|
@@ -1369,7 +1369,6 @@ const Badge = ({
|
|
|
1369
1369
|
})]
|
|
1370
1370
|
});
|
|
1371
1371
|
};
|
|
1372
|
-
var Badge$1 = Badge;
|
|
1373
1372
|
|
|
1374
1373
|
const OptionalBadge = ({
|
|
1375
1374
|
url,
|
|
@@ -1379,7 +1378,7 @@ const OptionalBadge = ({
|
|
|
1379
1378
|
...rest
|
|
1380
1379
|
}) => {
|
|
1381
1380
|
if (url) {
|
|
1382
|
-
return /*#__PURE__*/jsxRuntime.jsx(Badge
|
|
1381
|
+
return /*#__PURE__*/jsxRuntime.jsx(Badge, {
|
|
1383
1382
|
badge: /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
1384
1383
|
src: url,
|
|
1385
1384
|
alt: altText
|
|
@@ -1389,7 +1388,7 @@ const OptionalBadge = ({
|
|
|
1389
1388
|
});
|
|
1390
1389
|
}
|
|
1391
1390
|
if (statusIcon) {
|
|
1392
|
-
return /*#__PURE__*/jsxRuntime.jsx(Badge
|
|
1391
|
+
return /*#__PURE__*/jsxRuntime.jsx(Badge, {
|
|
1393
1392
|
badge: /*#__PURE__*/jsxRuntime.jsx(StatusIcon, {
|
|
1394
1393
|
sentiment: statusIcon,
|
|
1395
1394
|
size: exports.Size.SMALL
|
|
@@ -1398,18 +1397,9 @@ const OptionalBadge = ({
|
|
|
1398
1397
|
children: children
|
|
1399
1398
|
});
|
|
1400
1399
|
}
|
|
1401
|
-
return
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
url: PropTypes__default.default.string,
|
|
1405
|
-
altText: PropTypes__default.default.string,
|
|
1406
|
-
statusIcon: PropTypes__default.default.oneOf([exports.Sentiment.POSITIVE, exports.Sentiment.NEGATIVE, exports.Sentiment.NEUTRAL, exports.Sentiment.WARNING, exports.Sentiment.PENDING]),
|
|
1407
|
-
children: PropTypes__default.default.node.isRequired
|
|
1408
|
-
};
|
|
1409
|
-
OptionalBadge.defaultProps = {
|
|
1410
|
-
url: undefined,
|
|
1411
|
-
altText: undefined,
|
|
1412
|
-
statusIcon: undefined
|
|
1400
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
1401
|
+
children: children
|
|
1402
|
+
});
|
|
1413
1403
|
};
|
|
1414
1404
|
const AvatarWrapper = ({
|
|
1415
1405
|
url,
|
|
@@ -1424,7 +1414,6 @@ const AvatarWrapper = ({
|
|
|
1424
1414
|
}) => {
|
|
1425
1415
|
const [hasImageLoadError, setImageLoadError] = React.useState(false);
|
|
1426
1416
|
const isBusinessProfile = profileType === exports.ProfileType.BUSINESS;
|
|
1427
|
-
|
|
1428
1417
|
// Reset the errored state when url changes
|
|
1429
1418
|
React.useEffect(() => setImageLoadError(false), [url]);
|
|
1430
1419
|
const getAvatarProps = () => {
|
|
@@ -1486,29 +1475,6 @@ function getInitials(name) {
|
|
|
1486
1475
|
}
|
|
1487
1476
|
return allInitials[0] + allInitials.slice(-1);
|
|
1488
1477
|
}
|
|
1489
|
-
AvatarWrapper.defaultProps = {
|
|
1490
|
-
url: undefined,
|
|
1491
|
-
profileType: undefined,
|
|
1492
|
-
profileId: undefined,
|
|
1493
|
-
badgeUrl: undefined,
|
|
1494
|
-
badgeAltText: undefined,
|
|
1495
|
-
badgeStatusIcon: undefined,
|
|
1496
|
-
name: undefined,
|
|
1497
|
-
avatarProps: {},
|
|
1498
|
-
badgeProps: {}
|
|
1499
|
-
};
|
|
1500
|
-
AvatarWrapper.propTypes = {
|
|
1501
|
-
url: PropTypes__default.default.string,
|
|
1502
|
-
profileType: PropTypes__default.default.oneOf([exports.ProfileType.PERSONAL, exports.ProfileType.BUSINESS]),
|
|
1503
|
-
profileId: PropTypes__default.default.number,
|
|
1504
|
-
badgeUrl: PropTypes__default.default.string,
|
|
1505
|
-
badgeAltText: PropTypes__default.default.string,
|
|
1506
|
-
badgeStatusIcon: PropTypes__default.default.oneOf([exports.Sentiment.POSITIVE, exports.Sentiment.NEGATIVE, exports.Sentiment.NEUTRAL, exports.Sentiment.WARNING, exports.Sentiment.PENDING]),
|
|
1507
|
-
name: PropTypes__default.default.string,
|
|
1508
|
-
avatarProps: PropTypes__default.default.shape({}),
|
|
1509
|
-
badgeProps: PropTypes__default.default.shape({})
|
|
1510
|
-
};
|
|
1511
|
-
var AvatarWrapper$1 = AvatarWrapper;
|
|
1512
1478
|
|
|
1513
1479
|
const THROTTLE_MS = 100;
|
|
1514
1480
|
const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
@@ -5770,11 +5736,11 @@ const Image = ({
|
|
|
5770
5736
|
onError,
|
|
5771
5737
|
className,
|
|
5772
5738
|
loading,
|
|
5773
|
-
stretch,
|
|
5739
|
+
stretch = true,
|
|
5774
5740
|
role,
|
|
5775
|
-
shrink
|
|
5741
|
+
shrink = true
|
|
5776
5742
|
}) => {
|
|
5777
|
-
const elementReference = React.useRef();
|
|
5743
|
+
const elementReference = React.useRef(null);
|
|
5778
5744
|
const [hasIntersected] = useHasIntersected({
|
|
5779
5745
|
elRef: elementReference,
|
|
5780
5746
|
loading
|
|
@@ -5783,7 +5749,7 @@ const Image = ({
|
|
|
5783
5749
|
let imageOnLoad = onLoad;
|
|
5784
5750
|
if (loading === 'lazy' && !hasIntersected) {
|
|
5785
5751
|
imageSource = EmptyTransparentImage;
|
|
5786
|
-
imageOnLoad =
|
|
5752
|
+
imageOnLoad = undefined;
|
|
5787
5753
|
}
|
|
5788
5754
|
return /*#__PURE__*/jsxRuntime.jsx("img", {
|
|
5789
5755
|
ref: elementReference,
|
|
@@ -5799,28 +5765,6 @@ const Image = ({
|
|
|
5799
5765
|
onError: onError
|
|
5800
5766
|
});
|
|
5801
5767
|
};
|
|
5802
|
-
Image.propTypes = {
|
|
5803
|
-
id: PropTypes__default.default.string,
|
|
5804
|
-
src: PropTypes__default.default.string.isRequired,
|
|
5805
|
-
alt: PropTypes__default.default.string.isRequired,
|
|
5806
|
-
onLoad: PropTypes__default.default.func,
|
|
5807
|
-
onError: PropTypes__default.default.func,
|
|
5808
|
-
className: PropTypes__default.default.string,
|
|
5809
|
-
loading: PropTypes__default.default.oneOf(['lazy', 'eager']),
|
|
5810
|
-
stretch: PropTypes__default.default.bool,
|
|
5811
|
-
shrink: PropTypes__default.default.bool,
|
|
5812
|
-
role: PropTypes__default.default.string
|
|
5813
|
-
};
|
|
5814
|
-
Image.defaultProps = {
|
|
5815
|
-
id: null,
|
|
5816
|
-
className: '',
|
|
5817
|
-
onLoad: () => {},
|
|
5818
|
-
onError: () => {},
|
|
5819
|
-
loading: 'eager',
|
|
5820
|
-
stretch: true,
|
|
5821
|
-
shrink: true
|
|
5822
|
-
};
|
|
5823
|
-
var Image$1 = Image;
|
|
5824
5768
|
|
|
5825
5769
|
// TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum
|
|
5826
5770
|
exports.InfoPresentation = void 0;
|
|
@@ -6056,18 +6000,23 @@ const typeClassMap = {
|
|
|
6056
6000
|
[exports.Sentiment.ERROR]: 'danger',
|
|
6057
6001
|
[exports.Sentiment.NEGATIVE]: 'danger'
|
|
6058
6002
|
};
|
|
6059
|
-
const InlineAlert =
|
|
6003
|
+
const InlineAlert = ({
|
|
6004
|
+
id,
|
|
6005
|
+
type = exports.Sentiment.NEUTRAL,
|
|
6006
|
+
className,
|
|
6007
|
+
children
|
|
6008
|
+
}) => {
|
|
6060
6009
|
const {
|
|
6061
6010
|
isModern
|
|
6062
6011
|
} = componentsTheming.useTheme();
|
|
6063
|
-
const typeClass = `alert-${typeClassMap[
|
|
6012
|
+
const typeClass = `alert-${typeClassMap[type] || type}`;
|
|
6064
6013
|
if (isModern) {
|
|
6065
6014
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
6066
6015
|
role: "alert",
|
|
6067
|
-
id:
|
|
6068
|
-
className: classNames__default.default('alert alert-detach', typeClass,
|
|
6069
|
-
children: [(
|
|
6070
|
-
children:
|
|
6016
|
+
id: id,
|
|
6017
|
+
className: classNames__default.default('alert alert-detach', typeClass, className),
|
|
6018
|
+
children: [(type === 'error' || type === 'negative') && /*#__PURE__*/jsxRuntime.jsx(icons.AlertCircle, {}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6019
|
+
children: children
|
|
6071
6020
|
})]
|
|
6072
6021
|
});
|
|
6073
6022
|
}
|
|
@@ -6077,28 +6026,137 @@ const InlineAlert = props => {
|
|
|
6077
6026
|
}) => {
|
|
6078
6027
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
6079
6028
|
role: "alert",
|
|
6080
|
-
id:
|
|
6029
|
+
id: id,
|
|
6081
6030
|
className: classNames__default.default('alert alert-detach p-x-2 p-y-1', typeClass, className),
|
|
6082
6031
|
children: children
|
|
6083
6032
|
});
|
|
6084
6033
|
};
|
|
6085
6034
|
const AlertWithArrow = withArrow(getAlertContents, exports.AlertArrowPosition.TOP_LEFT);
|
|
6086
6035
|
return /*#__PURE__*/jsxRuntime.jsx(AlertWithArrow, {
|
|
6087
|
-
|
|
6036
|
+
id,
|
|
6037
|
+
type,
|
|
6038
|
+
className,
|
|
6039
|
+
children
|
|
6088
6040
|
});
|
|
6089
6041
|
};
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
};
|
|
6101
|
-
|
|
6042
|
+
|
|
6043
|
+
/*
|
|
6044
|
+
* Inspired by:
|
|
6045
|
+
*
|
|
6046
|
+
* - https://react.dev/learn/separating-events-from-effects#declaring-an-effect-event
|
|
6047
|
+
* - https://legacy.reactjs.org/docs/hooks-faq.html#how-to-read-an-often-changing-value-from-usecallback
|
|
6048
|
+
*/
|
|
6049
|
+
function useEffectEvent(callback) {
|
|
6050
|
+
const ref = React.useRef(() => {
|
|
6051
|
+
throw new Error('Cannot call an event handler while rendering.');
|
|
6052
|
+
});
|
|
6053
|
+
React.useEffect(() => {
|
|
6054
|
+
ref.current = callback;
|
|
6055
|
+
});
|
|
6056
|
+
return React.useCallback((...args) => ref.current(...args), []);
|
|
6057
|
+
}
|
|
6058
|
+
|
|
6059
|
+
function useResizeObserver(ref, callback) {
|
|
6060
|
+
const handleCallback = useEffectEvent(callback);
|
|
6061
|
+
React.useEffect(() => {
|
|
6062
|
+
if (ref.current != null) {
|
|
6063
|
+
const resizeObserver = new ResizeObserver(([entry]) => {
|
|
6064
|
+
handleCallback(entry);
|
|
6065
|
+
});
|
|
6066
|
+
resizeObserver.observe(ref.current, {
|
|
6067
|
+
box: 'border-box'
|
|
6068
|
+
});
|
|
6069
|
+
return () => {
|
|
6070
|
+
resizeObserver.disconnect();
|
|
6071
|
+
};
|
|
6072
|
+
}
|
|
6073
|
+
return () => {};
|
|
6074
|
+
}, [handleCallback, ref]);
|
|
6075
|
+
}
|
|
6076
|
+
|
|
6077
|
+
function cssValueWithUnit(value) {
|
|
6078
|
+
return typeof value === 'number' ? `${value}px` : value;
|
|
6079
|
+
}
|
|
6080
|
+
|
|
6081
|
+
const InputPaddingStartContext = /*#__PURE__*/React.createContext([undefined, () => {}]);
|
|
6082
|
+
const InputPaddingEndContext = /*#__PURE__*/React.createContext([undefined, () => {}]);
|
|
6083
|
+
function useInputPaddings() {
|
|
6084
|
+
const [paddingStart] = React.useContext(InputPaddingStartContext);
|
|
6085
|
+
const [paddingEnd] = React.useContext(InputPaddingEndContext);
|
|
6086
|
+
return {
|
|
6087
|
+
paddingInlineStart: paddingStart,
|
|
6088
|
+
paddingInlineEnd: paddingEnd
|
|
6089
|
+
};
|
|
6090
|
+
}
|
|
6091
|
+
function inputPaddingInitialState({
|
|
6092
|
+
initialContentWidth,
|
|
6093
|
+
padding = inputAddonDefaultPadding
|
|
6094
|
+
} = {}) {
|
|
6095
|
+
return () => initialContentWidth != null ? `calc(${cssValueWithUnit(initialContentWidth)} + ${cssValueWithUnit(inputAddonContentWidthAddendByPadding[padding])})` : undefined;
|
|
6096
|
+
}
|
|
6097
|
+
function InputGroup({
|
|
6098
|
+
addonStart,
|
|
6099
|
+
addonEnd,
|
|
6100
|
+
disabled,
|
|
6101
|
+
className,
|
|
6102
|
+
children
|
|
6103
|
+
}) {
|
|
6104
|
+
const [paddingStart, setPaddingStart] = React.useState(inputPaddingInitialState(addonStart));
|
|
6105
|
+
const [paddingEnd, setPaddingEnd] = React.useState(inputPaddingInitialState(addonEnd));
|
|
6106
|
+
return /*#__PURE__*/jsxRuntime.jsx(InputPaddingStartContext.Provider, {
|
|
6107
|
+
value: React.useMemo(() => [paddingStart, setPaddingStart], [paddingStart]),
|
|
6108
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputPaddingEndContext.Provider, {
|
|
6109
|
+
value: React.useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd]),
|
|
6110
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("fieldset", {
|
|
6111
|
+
disabled: disabled,
|
|
6112
|
+
className: classNames__default.default(className, 'np-input-group'),
|
|
6113
|
+
children: [addonStart != null ? /*#__PURE__*/jsxRuntime.jsx(InputAddon, {
|
|
6114
|
+
placement: "start",
|
|
6115
|
+
...addonStart
|
|
6116
|
+
}) : null, children, addonEnd != null ? /*#__PURE__*/jsxRuntime.jsx(InputAddon, {
|
|
6117
|
+
placement: "end",
|
|
6118
|
+
...addonEnd
|
|
6119
|
+
}) : null]
|
|
6120
|
+
})
|
|
6121
|
+
})
|
|
6122
|
+
});
|
|
6123
|
+
}
|
|
6124
|
+
const inputAddonContentWidthAddendByPadding = {
|
|
6125
|
+
none: 0,
|
|
6126
|
+
sm: '1rem',
|
|
6127
|
+
md: '1.5rem'
|
|
6128
|
+
};
|
|
6129
|
+
const inputAddonDefaultPadding = 'md';
|
|
6130
|
+
function InputAddon({
|
|
6131
|
+
placement,
|
|
6132
|
+
content,
|
|
6133
|
+
interactive,
|
|
6134
|
+
padding = inputAddonDefaultPadding
|
|
6135
|
+
}) {
|
|
6136
|
+
const [, setInputPadding] = React.useContext(placement === 'start' ? InputPaddingStartContext : InputPaddingEndContext);
|
|
6137
|
+
const ref = React.useRef(null);
|
|
6138
|
+
useResizeObserver(ref, entry => {
|
|
6139
|
+
// TODO: Remove fallback once most browsers support `borderBoxSize`
|
|
6140
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
6141
|
+
if (entry.borderBoxSize != null) {
|
|
6142
|
+
setInputPadding(entry.borderBoxSize[0].inlineSize);
|
|
6143
|
+
} else {
|
|
6144
|
+
const targetStyle = getComputedStyle(entry.target);
|
|
6145
|
+
setInputPadding(entry.contentRect.width + Number.parseFloat(targetStyle.paddingInlineStart) + Number.parseFloat(targetStyle.paddingInlineEnd));
|
|
6146
|
+
}
|
|
6147
|
+
});
|
|
6148
|
+
return /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
6149
|
+
ref: ref,
|
|
6150
|
+
className: classNames__default.default('np-input-addon', {
|
|
6151
|
+
'np-input-addon--placement-start': placement === 'start',
|
|
6152
|
+
'np-input-addon--placement-end': placement === 'end'
|
|
6153
|
+
}, interactive && 'np-input-addon--interactive', {
|
|
6154
|
+
'np-input-addon--padding-sm': padding === 'sm',
|
|
6155
|
+
'np-input-addon--padding-md': padding === 'md'
|
|
6156
|
+
}),
|
|
6157
|
+
children: content
|
|
6158
|
+
});
|
|
6159
|
+
}
|
|
6102
6160
|
|
|
6103
6161
|
function formControlClassNameBase({
|
|
6104
6162
|
size = 'auto'
|
|
@@ -6118,11 +6176,15 @@ const Input = /*#__PURE__*/React.forwardRef(function Input({
|
|
|
6118
6176
|
className,
|
|
6119
6177
|
...restProps
|
|
6120
6178
|
}, reference) {
|
|
6179
|
+
const inputPaddings = useInputPaddings();
|
|
6121
6180
|
return /*#__PURE__*/jsxRuntime.jsx("input", {
|
|
6122
6181
|
ref: reference,
|
|
6123
6182
|
className: classNames__default.default(className, formControlClassNameBase({
|
|
6124
6183
|
size
|
|
6125
|
-
}))
|
|
6184
|
+
}))
|
|
6185
|
+
// eslint-disable-next-line react/forbid-dom-props
|
|
6186
|
+
,
|
|
6187
|
+
style: inputPaddings,
|
|
6126
6188
|
...restProps
|
|
6127
6189
|
});
|
|
6128
6190
|
});
|
|
@@ -9867,10 +9929,9 @@ const PromoCard = /*#__PURE__*/React.forwardRef(({
|
|
|
9867
9929
|
className: classNames__default.default('np-Card-image', {
|
|
9868
9930
|
imageClass
|
|
9869
9931
|
}),
|
|
9870
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Image
|
|
9932
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Image, {
|
|
9871
9933
|
src: imageSource,
|
|
9872
|
-
alt: imageAlt,
|
|
9873
|
-
role: !imageAlt ? 'presentation' : null,
|
|
9934
|
+
alt: imageAlt || '',
|
|
9874
9935
|
loading: "lazy"
|
|
9875
9936
|
})
|
|
9876
9937
|
}), /*#__PURE__*/jsxRuntime.jsx(PromoCardIndicator, {
|
|
@@ -11975,7 +12036,7 @@ class Typeahead extends React.Component {
|
|
|
11975
12036
|
children: /*#__PURE__*/jsxRuntime.jsx(icons.Cross, {})
|
|
11976
12037
|
})
|
|
11977
12038
|
})]
|
|
11978
|
-
}), displayAlert && /*#__PURE__*/jsxRuntime.jsx(InlineAlert
|
|
12039
|
+
}), displayAlert && /*#__PURE__*/jsxRuntime.jsx(InlineAlert, {
|
|
11979
12040
|
type: alert.type,
|
|
11980
12041
|
children: alert.message
|
|
11981
12042
|
}), menu]
|
|
@@ -14362,8 +14423,8 @@ exports.ActionButton = ActionButton;
|
|
|
14362
14423
|
exports.ActionOption = ActionOption;
|
|
14363
14424
|
exports.Alert = Alert$1;
|
|
14364
14425
|
exports.Avatar = Avatar;
|
|
14365
|
-
exports.AvatarWrapper = AvatarWrapper
|
|
14366
|
-
exports.Badge = Badge
|
|
14426
|
+
exports.AvatarWrapper = AvatarWrapper;
|
|
14427
|
+
exports.Badge = Badge;
|
|
14367
14428
|
exports.BaseCard = Card;
|
|
14368
14429
|
exports.Body = Body;
|
|
14369
14430
|
exports.BottomSheet = BottomSheet$1;
|
|
@@ -14392,10 +14453,11 @@ exports.DynamicFieldDefinitionList = DynamicFieldDefinitionList$1;
|
|
|
14392
14453
|
exports.Emphasis = Emphasis;
|
|
14393
14454
|
exports.FlowNavigation = FlowNavigation;
|
|
14394
14455
|
exports.Header = Header;
|
|
14395
|
-
exports.Image = Image
|
|
14456
|
+
exports.Image = Image;
|
|
14396
14457
|
exports.Info = Info;
|
|
14397
|
-
exports.InlineAlert = InlineAlert
|
|
14458
|
+
exports.InlineAlert = InlineAlert;
|
|
14398
14459
|
exports.Input = Input;
|
|
14460
|
+
exports.InputGroup = InputGroup;
|
|
14399
14461
|
exports.InputWithDisplayFormat = InputWithDisplayFormat$1;
|
|
14400
14462
|
exports.InstructionsList = InstructionsList$1;
|
|
14401
14463
|
exports.LanguageProvider = LanguageProvider;
|