@transferwise/components 46.20.0 → 46.20.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 +2 -16
- package/build/index.esm.js.map +1 -1
- package/build/index.js +2 -16
- package/build/index.js.map +1 -1
- package/build/types/common/index.d.ts +0 -1
- package/build/types/promoCard/PromoCard.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/index.js +0 -1
- package/src/promoCard/PromoCard.tsx +5 -3
- package/build/types/common/randomId.d.ts +0 -13
- package/build/types/common/randomId.d.ts.map +0 -1
- package/src/common/randomId.ts +0 -14
package/build/index.esm.js
CHANGED
|
@@ -404,21 +404,6 @@ function getDirectionFromLocale(locale) {
|
|
|
404
404
|
return adjustedLocale != null && RTL_LANGUAGES.includes(new Intl.Locale(adjustedLocale).language) ? Direction.RTL : Direction.LTR;
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
-
/**
|
|
408
|
-
* generateRandomId() function
|
|
409
|
-
*
|
|
410
|
-
* This function generates a random string of characters that can be used as
|
|
411
|
-
* an ID.
|
|
412
|
-
*
|
|
413
|
-
* @returns {string} A random string of characters.
|
|
414
|
-
* @example
|
|
415
|
-
* const id = generateRandomId();
|
|
416
|
-
* // id will be a random string of characters, such as "id-4711".
|
|
417
|
-
*/
|
|
418
|
-
const generateRandomId = () => {
|
|
419
|
-
return `id-${Math.random().toString(36).slice(7)}`;
|
|
420
|
-
};
|
|
421
|
-
|
|
422
407
|
const DEFAULT_TYPE$1 = Typography.TITLE_GROUP;
|
|
423
408
|
const titleTypeMapping = {
|
|
424
409
|
[Typography.TITLE_SCREEN]: 'h1',
|
|
@@ -9635,7 +9620,8 @@ const PromoCard = /*#__PURE__*/forwardRef(({
|
|
|
9635
9620
|
setChecked(!checked); // Update local state for checkbox
|
|
9636
9621
|
}
|
|
9637
9622
|
};
|
|
9638
|
-
const
|
|
9623
|
+
const fallbackId = useId();
|
|
9624
|
+
const componentId = id || fallbackId;
|
|
9639
9625
|
// Set the icon to `'arrow'` if `href` is truthy and `type` is falsy, or
|
|
9640
9626
|
// `'download'` if `download` is truthy. If neither condition is true, set
|
|
9641
9627
|
// `icon` to `undefined`.
|