@transferwise/components 45.13.0 → 45.14.1
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/closeButton/CloseButton.d.ts +1 -1
- 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/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +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 +4 -4
- 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.esm.js
CHANGED
|
@@ -1336,7 +1336,6 @@ const Badge = ({
|
|
|
1336
1336
|
})]
|
|
1337
1337
|
});
|
|
1338
1338
|
};
|
|
1339
|
-
var Badge$1 = Badge;
|
|
1340
1339
|
|
|
1341
1340
|
const OptionalBadge = ({
|
|
1342
1341
|
url,
|
|
@@ -1346,7 +1345,7 @@ const OptionalBadge = ({
|
|
|
1346
1345
|
...rest
|
|
1347
1346
|
}) => {
|
|
1348
1347
|
if (url) {
|
|
1349
|
-
return /*#__PURE__*/jsx(Badge
|
|
1348
|
+
return /*#__PURE__*/jsx(Badge, {
|
|
1350
1349
|
badge: /*#__PURE__*/jsx("img", {
|
|
1351
1350
|
src: url,
|
|
1352
1351
|
alt: altText
|
|
@@ -1356,7 +1355,7 @@ const OptionalBadge = ({
|
|
|
1356
1355
|
});
|
|
1357
1356
|
}
|
|
1358
1357
|
if (statusIcon) {
|
|
1359
|
-
return /*#__PURE__*/jsx(Badge
|
|
1358
|
+
return /*#__PURE__*/jsx(Badge, {
|
|
1360
1359
|
badge: /*#__PURE__*/jsx(StatusIcon, {
|
|
1361
1360
|
sentiment: statusIcon,
|
|
1362
1361
|
size: Size.SMALL
|
|
@@ -1365,18 +1364,9 @@ const OptionalBadge = ({
|
|
|
1365
1364
|
children: children
|
|
1366
1365
|
});
|
|
1367
1366
|
}
|
|
1368
|
-
return
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
url: PropTypes.string,
|
|
1372
|
-
altText: PropTypes.string,
|
|
1373
|
-
statusIcon: PropTypes.oneOf([Sentiment.POSITIVE, Sentiment.NEGATIVE, Sentiment.NEUTRAL, Sentiment.WARNING, Sentiment.PENDING]),
|
|
1374
|
-
children: PropTypes.node.isRequired
|
|
1375
|
-
};
|
|
1376
|
-
OptionalBadge.defaultProps = {
|
|
1377
|
-
url: undefined,
|
|
1378
|
-
altText: undefined,
|
|
1379
|
-
statusIcon: undefined
|
|
1367
|
+
return /*#__PURE__*/jsx(Fragment, {
|
|
1368
|
+
children: children
|
|
1369
|
+
});
|
|
1380
1370
|
};
|
|
1381
1371
|
const AvatarWrapper = ({
|
|
1382
1372
|
url,
|
|
@@ -1391,7 +1381,6 @@ const AvatarWrapper = ({
|
|
|
1391
1381
|
}) => {
|
|
1392
1382
|
const [hasImageLoadError, setImageLoadError] = useState(false);
|
|
1393
1383
|
const isBusinessProfile = profileType === ProfileType.BUSINESS;
|
|
1394
|
-
|
|
1395
1384
|
// Reset the errored state when url changes
|
|
1396
1385
|
useEffect(() => setImageLoadError(false), [url]);
|
|
1397
1386
|
const getAvatarProps = () => {
|
|
@@ -1453,29 +1442,6 @@ function getInitials(name) {
|
|
|
1453
1442
|
}
|
|
1454
1443
|
return allInitials[0] + allInitials.slice(-1);
|
|
1455
1444
|
}
|
|
1456
|
-
AvatarWrapper.defaultProps = {
|
|
1457
|
-
url: undefined,
|
|
1458
|
-
profileType: undefined,
|
|
1459
|
-
profileId: undefined,
|
|
1460
|
-
badgeUrl: undefined,
|
|
1461
|
-
badgeAltText: undefined,
|
|
1462
|
-
badgeStatusIcon: undefined,
|
|
1463
|
-
name: undefined,
|
|
1464
|
-
avatarProps: {},
|
|
1465
|
-
badgeProps: {}
|
|
1466
|
-
};
|
|
1467
|
-
AvatarWrapper.propTypes = {
|
|
1468
|
-
url: PropTypes.string,
|
|
1469
|
-
profileType: PropTypes.oneOf([ProfileType.PERSONAL, ProfileType.BUSINESS]),
|
|
1470
|
-
profileId: PropTypes.number,
|
|
1471
|
-
badgeUrl: PropTypes.string,
|
|
1472
|
-
badgeAltText: PropTypes.string,
|
|
1473
|
-
badgeStatusIcon: PropTypes.oneOf([Sentiment.POSITIVE, Sentiment.NEGATIVE, Sentiment.NEUTRAL, Sentiment.WARNING, Sentiment.PENDING]),
|
|
1474
|
-
name: PropTypes.string,
|
|
1475
|
-
avatarProps: PropTypes.shape({}),
|
|
1476
|
-
badgeProps: PropTypes.shape({})
|
|
1477
|
-
};
|
|
1478
|
-
var AvatarWrapper$1 = AvatarWrapper;
|
|
1479
1445
|
|
|
1480
1446
|
const THROTTLE_MS = 100;
|
|
1481
1447
|
const useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
@@ -5737,11 +5703,11 @@ const Image = ({
|
|
|
5737
5703
|
onError,
|
|
5738
5704
|
className,
|
|
5739
5705
|
loading,
|
|
5740
|
-
stretch,
|
|
5706
|
+
stretch = true,
|
|
5741
5707
|
role,
|
|
5742
|
-
shrink
|
|
5708
|
+
shrink = true
|
|
5743
5709
|
}) => {
|
|
5744
|
-
const elementReference = useRef();
|
|
5710
|
+
const elementReference = useRef(null);
|
|
5745
5711
|
const [hasIntersected] = useHasIntersected({
|
|
5746
5712
|
elRef: elementReference,
|
|
5747
5713
|
loading
|
|
@@ -5750,7 +5716,7 @@ const Image = ({
|
|
|
5750
5716
|
let imageOnLoad = onLoad;
|
|
5751
5717
|
if (loading === 'lazy' && !hasIntersected) {
|
|
5752
5718
|
imageSource = EmptyTransparentImage;
|
|
5753
|
-
imageOnLoad =
|
|
5719
|
+
imageOnLoad = undefined;
|
|
5754
5720
|
}
|
|
5755
5721
|
return /*#__PURE__*/jsx("img", {
|
|
5756
5722
|
ref: elementReference,
|
|
@@ -5766,28 +5732,6 @@ const Image = ({
|
|
|
5766
5732
|
onError: onError
|
|
5767
5733
|
});
|
|
5768
5734
|
};
|
|
5769
|
-
Image.propTypes = {
|
|
5770
|
-
id: PropTypes.string,
|
|
5771
|
-
src: PropTypes.string.isRequired,
|
|
5772
|
-
alt: PropTypes.string.isRequired,
|
|
5773
|
-
onLoad: PropTypes.func,
|
|
5774
|
-
onError: PropTypes.func,
|
|
5775
|
-
className: PropTypes.string,
|
|
5776
|
-
loading: PropTypes.oneOf(['lazy', 'eager']),
|
|
5777
|
-
stretch: PropTypes.bool,
|
|
5778
|
-
shrink: PropTypes.bool,
|
|
5779
|
-
role: PropTypes.string
|
|
5780
|
-
};
|
|
5781
|
-
Image.defaultProps = {
|
|
5782
|
-
id: null,
|
|
5783
|
-
className: '',
|
|
5784
|
-
onLoad: () => {},
|
|
5785
|
-
onError: () => {},
|
|
5786
|
-
loading: 'eager',
|
|
5787
|
-
stretch: true,
|
|
5788
|
-
shrink: true
|
|
5789
|
-
};
|
|
5790
|
-
var Image$1 = Image;
|
|
5791
5735
|
|
|
5792
5736
|
// TODO: consider to move this enum into component file once we migrate it on TypeScript or replace with some common enum
|
|
5793
5737
|
var InfoPresentation;
|
|
@@ -6023,18 +5967,23 @@ const typeClassMap = {
|
|
|
6023
5967
|
[Sentiment.ERROR]: 'danger',
|
|
6024
5968
|
[Sentiment.NEGATIVE]: 'danger'
|
|
6025
5969
|
};
|
|
6026
|
-
const InlineAlert =
|
|
5970
|
+
const InlineAlert = ({
|
|
5971
|
+
id,
|
|
5972
|
+
type = Sentiment.NEUTRAL,
|
|
5973
|
+
className,
|
|
5974
|
+
children
|
|
5975
|
+
}) => {
|
|
6027
5976
|
const {
|
|
6028
5977
|
isModern
|
|
6029
5978
|
} = useTheme();
|
|
6030
|
-
const typeClass = `alert-${typeClassMap[
|
|
5979
|
+
const typeClass = `alert-${typeClassMap[type] || type}`;
|
|
6031
5980
|
if (isModern) {
|
|
6032
5981
|
return /*#__PURE__*/jsxs("div", {
|
|
6033
5982
|
role: "alert",
|
|
6034
|
-
id:
|
|
6035
|
-
className: classNames('alert alert-detach', typeClass,
|
|
6036
|
-
children: [(
|
|
6037
|
-
children:
|
|
5983
|
+
id: id,
|
|
5984
|
+
className: classNames('alert alert-detach', typeClass, className),
|
|
5985
|
+
children: [(type === 'error' || type === 'negative') && /*#__PURE__*/jsx(AlertCircle, {}), /*#__PURE__*/jsx("div", {
|
|
5986
|
+
children: children
|
|
6038
5987
|
})]
|
|
6039
5988
|
});
|
|
6040
5989
|
}
|
|
@@ -6044,28 +5993,137 @@ const InlineAlert = props => {
|
|
|
6044
5993
|
}) => {
|
|
6045
5994
|
return /*#__PURE__*/jsx("div", {
|
|
6046
5995
|
role: "alert",
|
|
6047
|
-
id:
|
|
5996
|
+
id: id,
|
|
6048
5997
|
className: classNames('alert alert-detach p-x-2 p-y-1', typeClass, className),
|
|
6049
5998
|
children: children
|
|
6050
5999
|
});
|
|
6051
6000
|
};
|
|
6052
6001
|
const AlertWithArrow = withArrow(getAlertContents, ArrowPosition.TOP_LEFT);
|
|
6053
6002
|
return /*#__PURE__*/jsx(AlertWithArrow, {
|
|
6054
|
-
|
|
6003
|
+
id,
|
|
6004
|
+
type,
|
|
6005
|
+
className,
|
|
6006
|
+
children
|
|
6055
6007
|
});
|
|
6056
6008
|
};
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
};
|
|
6068
|
-
|
|
6009
|
+
|
|
6010
|
+
/*
|
|
6011
|
+
* Inspired by:
|
|
6012
|
+
*
|
|
6013
|
+
* - https://react.dev/learn/separating-events-from-effects#declaring-an-effect-event
|
|
6014
|
+
* - https://legacy.reactjs.org/docs/hooks-faq.html#how-to-read-an-often-changing-value-from-usecallback
|
|
6015
|
+
*/
|
|
6016
|
+
function useEffectEvent(callback) {
|
|
6017
|
+
const ref = useRef(() => {
|
|
6018
|
+
throw new Error('Cannot call an event handler while rendering.');
|
|
6019
|
+
});
|
|
6020
|
+
useEffect(() => {
|
|
6021
|
+
ref.current = callback;
|
|
6022
|
+
});
|
|
6023
|
+
return useCallback((...args) => ref.current(...args), []);
|
|
6024
|
+
}
|
|
6025
|
+
|
|
6026
|
+
function useResizeObserver(ref, callback) {
|
|
6027
|
+
const handleCallback = useEffectEvent(callback);
|
|
6028
|
+
useEffect(() => {
|
|
6029
|
+
if (ref.current != null) {
|
|
6030
|
+
const resizeObserver = new ResizeObserver(([entry]) => {
|
|
6031
|
+
handleCallback(entry);
|
|
6032
|
+
});
|
|
6033
|
+
resizeObserver.observe(ref.current, {
|
|
6034
|
+
box: 'border-box'
|
|
6035
|
+
});
|
|
6036
|
+
return () => {
|
|
6037
|
+
resizeObserver.disconnect();
|
|
6038
|
+
};
|
|
6039
|
+
}
|
|
6040
|
+
return () => {};
|
|
6041
|
+
}, [handleCallback, ref]);
|
|
6042
|
+
}
|
|
6043
|
+
|
|
6044
|
+
function cssValueWithUnit(value) {
|
|
6045
|
+
return typeof value === 'number' ? `${value}px` : value;
|
|
6046
|
+
}
|
|
6047
|
+
|
|
6048
|
+
const InputPaddingStartContext = /*#__PURE__*/createContext([undefined, () => {}]);
|
|
6049
|
+
const InputPaddingEndContext = /*#__PURE__*/createContext([undefined, () => {}]);
|
|
6050
|
+
function useInputPaddings() {
|
|
6051
|
+
const [paddingStart] = useContext(InputPaddingStartContext);
|
|
6052
|
+
const [paddingEnd] = useContext(InputPaddingEndContext);
|
|
6053
|
+
return {
|
|
6054
|
+
paddingInlineStart: paddingStart,
|
|
6055
|
+
paddingInlineEnd: paddingEnd
|
|
6056
|
+
};
|
|
6057
|
+
}
|
|
6058
|
+
function inputPaddingInitialState({
|
|
6059
|
+
initialContentWidth,
|
|
6060
|
+
padding = inputAddonDefaultPadding
|
|
6061
|
+
} = {}) {
|
|
6062
|
+
return () => initialContentWidth != null ? `calc(${cssValueWithUnit(initialContentWidth)} + ${cssValueWithUnit(inputAddonContentWidthAddendByPadding[padding])})` : undefined;
|
|
6063
|
+
}
|
|
6064
|
+
function InputGroup({
|
|
6065
|
+
addonStart,
|
|
6066
|
+
addonEnd,
|
|
6067
|
+
disabled,
|
|
6068
|
+
className,
|
|
6069
|
+
children
|
|
6070
|
+
}) {
|
|
6071
|
+
const [paddingStart, setPaddingStart] = useState(inputPaddingInitialState(addonStart));
|
|
6072
|
+
const [paddingEnd, setPaddingEnd] = useState(inputPaddingInitialState(addonEnd));
|
|
6073
|
+
return /*#__PURE__*/jsx(InputPaddingStartContext.Provider, {
|
|
6074
|
+
value: useMemo(() => [paddingStart, setPaddingStart], [paddingStart]),
|
|
6075
|
+
children: /*#__PURE__*/jsx(InputPaddingEndContext.Provider, {
|
|
6076
|
+
value: useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd]),
|
|
6077
|
+
children: /*#__PURE__*/jsxs("fieldset", {
|
|
6078
|
+
disabled: disabled,
|
|
6079
|
+
className: classNames(className, 'np-input-group'),
|
|
6080
|
+
children: [addonStart != null ? /*#__PURE__*/jsx(InputAddon, {
|
|
6081
|
+
placement: "start",
|
|
6082
|
+
...addonStart
|
|
6083
|
+
}) : null, children, addonEnd != null ? /*#__PURE__*/jsx(InputAddon, {
|
|
6084
|
+
placement: "end",
|
|
6085
|
+
...addonEnd
|
|
6086
|
+
}) : null]
|
|
6087
|
+
})
|
|
6088
|
+
})
|
|
6089
|
+
});
|
|
6090
|
+
}
|
|
6091
|
+
const inputAddonContentWidthAddendByPadding = {
|
|
6092
|
+
none: 0,
|
|
6093
|
+
sm: '1rem',
|
|
6094
|
+
md: '1.5rem'
|
|
6095
|
+
};
|
|
6096
|
+
const inputAddonDefaultPadding = 'md';
|
|
6097
|
+
function InputAddon({
|
|
6098
|
+
placement,
|
|
6099
|
+
content,
|
|
6100
|
+
interactive,
|
|
6101
|
+
padding = inputAddonDefaultPadding
|
|
6102
|
+
}) {
|
|
6103
|
+
const [, setInputPadding] = useContext(placement === 'start' ? InputPaddingStartContext : InputPaddingEndContext);
|
|
6104
|
+
const ref = useRef(null);
|
|
6105
|
+
useResizeObserver(ref, entry => {
|
|
6106
|
+
// TODO: Remove fallback once most browsers support `borderBoxSize`
|
|
6107
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
6108
|
+
if (entry.borderBoxSize != null) {
|
|
6109
|
+
setInputPadding(entry.borderBoxSize[0].inlineSize);
|
|
6110
|
+
} else {
|
|
6111
|
+
const targetStyle = getComputedStyle(entry.target);
|
|
6112
|
+
setInputPadding(entry.contentRect.width + Number.parseFloat(targetStyle.paddingInlineStart) + Number.parseFloat(targetStyle.paddingInlineEnd));
|
|
6113
|
+
}
|
|
6114
|
+
});
|
|
6115
|
+
return /*#__PURE__*/jsx("span", {
|
|
6116
|
+
ref: ref,
|
|
6117
|
+
className: classNames('np-input-addon', {
|
|
6118
|
+
'np-input-addon--placement-start': placement === 'start',
|
|
6119
|
+
'np-input-addon--placement-end': placement === 'end'
|
|
6120
|
+
}, interactive && 'np-input-addon--interactive', {
|
|
6121
|
+
'np-input-addon--padding-sm': padding === 'sm',
|
|
6122
|
+
'np-input-addon--padding-md': padding === 'md'
|
|
6123
|
+
}),
|
|
6124
|
+
children: content
|
|
6125
|
+
});
|
|
6126
|
+
}
|
|
6069
6127
|
|
|
6070
6128
|
function formControlClassNameBase({
|
|
6071
6129
|
size = 'auto'
|
|
@@ -6085,11 +6143,15 @@ const Input = /*#__PURE__*/forwardRef(function Input({
|
|
|
6085
6143
|
className,
|
|
6086
6144
|
...restProps
|
|
6087
6145
|
}, reference) {
|
|
6146
|
+
const inputPaddings = useInputPaddings();
|
|
6088
6147
|
return /*#__PURE__*/jsx("input", {
|
|
6089
6148
|
ref: reference,
|
|
6090
6149
|
className: classNames(className, formControlClassNameBase({
|
|
6091
6150
|
size
|
|
6092
|
-
}))
|
|
6151
|
+
}))
|
|
6152
|
+
// eslint-disable-next-line react/forbid-dom-props
|
|
6153
|
+
,
|
|
6154
|
+
style: inputPaddings,
|
|
6093
6155
|
...restProps
|
|
6094
6156
|
});
|
|
6095
6157
|
});
|
|
@@ -9834,10 +9896,9 @@ const PromoCard = /*#__PURE__*/forwardRef(({
|
|
|
9834
9896
|
className: classNames('np-Card-image', {
|
|
9835
9897
|
imageClass
|
|
9836
9898
|
}),
|
|
9837
|
-
children: /*#__PURE__*/jsx(Image
|
|
9899
|
+
children: /*#__PURE__*/jsx(Image, {
|
|
9838
9900
|
src: imageSource,
|
|
9839
|
-
alt: imageAlt,
|
|
9840
|
-
role: !imageAlt ? 'presentation' : null,
|
|
9901
|
+
alt: imageAlt || '',
|
|
9841
9902
|
loading: "lazy"
|
|
9842
9903
|
})
|
|
9843
9904
|
}), /*#__PURE__*/jsx(PromoCardIndicator, {
|
|
@@ -11942,7 +12003,7 @@ class Typeahead extends Component {
|
|
|
11942
12003
|
children: /*#__PURE__*/jsx(Cross, {})
|
|
11943
12004
|
})
|
|
11944
12005
|
})]
|
|
11945
|
-
}), displayAlert && /*#__PURE__*/jsx(InlineAlert
|
|
12006
|
+
}), displayAlert && /*#__PURE__*/jsx(InlineAlert, {
|
|
11946
12007
|
type: alert.type,
|
|
11947
12008
|
children: alert.message
|
|
11948
12009
|
}), menu]
|
|
@@ -14324,5 +14385,5 @@ const translations = {
|
|
|
14324
14385
|
zh
|
|
14325
14386
|
};
|
|
14326
14387
|
|
|
14327
|
-
export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper
|
|
14388
|
+
export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card as BaseCard, Body, BottomSheet$1 as BottomSheet, Breakpoint, Button, Card$2 as Card, Checkbox$1 as Checkbox, CheckboxButton$1 as CheckboxButton, CheckboxOption, Chevron$1 as Chevron, Chip, Chips, CircularButton$1 as CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput$1 as DateInput, DateLookup$1 as DateLookup, DateMode, Decision$1 as Decision, Presentation as DecisionPresentation, Type as DecisionType, DefinitionList$1 as DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, DynamicFieldDefinitionList$1 as DynamicFieldDefinitionList, Emphasis, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat$1 as InputWithDisplayFormat, InstructionsList$1 as InstructionsList, LanguageProvider, Layout$1 as Layout, Link, ListItem$1 as ListItem, Loader$1 as Loader, Logo$1 as Logo, LogoType, Markdown$1 as Markdown, MarkdownNodeType, Modal, Money$1 as Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList$1 as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput$1 as PhoneNumberInput, Popover$1 as Popover, Position, Priority, ProcessIndicator$1 as ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCard$1 as PromoCardGroup, Provider$1 as Provider, RTL_LANGUAGES, Radio$1 as Radio, RadioGroup$1 as RadioGroup, RadioOption$1 as RadioOption, SUPPORTED_LANGUAGES, Scroll, Section, Select, Sentiment, Size, SlidingPanel$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider$1 as SnackbarProvider, Status, StatusIcon, Stepper, Sticky$1 as Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat$1 as TextareaWithDisplayFormat, Theme, Title, Tooltip$1 as Tooltip, Type$1 as Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useSnackbar };
|
|
14328
14389
|
//# sourceMappingURL=index.esm.js.map
|