@pagopa/io-app-design-system 5.0.0-0 → 5.0.0-2
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/lib/commonjs/components/alert/Alert.js +3 -8
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/badge/Badge.js +26 -71
- package/lib/commonjs/components/badge/Badge.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +4 -4
- package/lib/commonjs/components/banner/Banner.js +6 -11
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -4
- package/lib/commonjs/components/banner/__test__/banner.test.js +0 -2
- package/lib/commonjs/components/banner/__test__/banner.test.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js +8 -3
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonSolid.js +12 -2
- package/lib/commonjs/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +18 -10
- package/lib/commonjs/components/icons/Icon.js +5 -1
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/svg/IconTheme.js +28 -0
- package/lib/commonjs/components/icons/svg/IconTheme.js.map +1 -0
- package/lib/commonjs/components/icons/svg/IconTypeface.js +29 -0
- package/lib/commonjs/components/icons/svg/IconTypeface.js.map +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconTheme.svg +1 -0
- package/lib/commonjs/components/icons/svg/originals/IconTypeface.svg +1 -0
- package/lib/commonjs/components/modules/ModulePaymentNotice.js +1 -1
- package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/commonjs/components/typography/ButtonText.js +8 -4
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/core/IOSpacing.js +2 -6
- package/lib/commonjs/core/IOSpacing.js.map +1 -1
- package/lib/module/components/alert/Alert.js +3 -8
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/badge/Badge.js +28 -72
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +4 -4
- package/lib/module/components/banner/Banner.js +7 -12
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -4
- package/lib/module/components/banner/__test__/banner.test.js +0 -2
- package/lib/module/components/banner/__test__/banner.test.js.map +1 -1
- package/lib/module/components/buttons/ButtonLink.js +9 -4
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonSolid.js +13 -3
- package/lib/module/components/buttons/ButtonSolid.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +18 -10
- package/lib/module/components/icons/Icon.js +5 -1
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/svg/IconTheme.js +20 -0
- package/lib/module/components/icons/svg/IconTheme.js.map +1 -0
- package/lib/module/components/icons/svg/IconTypeface.js +21 -0
- package/lib/module/components/icons/svg/IconTypeface.js.map +1 -0
- package/lib/module/components/icons/svg/originals/IconTheme.svg +1 -0
- package/lib/module/components/icons/svg/originals/IconTypeface.svg +1 -0
- package/lib/module/components/modules/ModulePaymentNotice.js +1 -1
- package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/module/components/typography/ButtonText.js +5 -2
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/core/IOSpacing.js +0 -2
- package/lib/module/core/IOSpacing.js.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts +0 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/badge/Badge.d.ts +1 -1
- package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts +1 -2
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts +6 -2
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonOutline.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts +1 -1
- package/lib/typescript/components/buttons/ButtonSolid.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +2 -0
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconTheme.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconTheme.d.ts.map +1 -0
- package/lib/typescript/components/icons/svg/IconTypeface.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconTypeface.d.ts.map +1 -0
- package/lib/typescript/components/typography/ButtonText.d.ts +1 -0
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/core/IOSpacing.d.ts +0 -2
- package/lib/typescript/core/IOSpacing.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/alert/Alert.tsx +4 -8
- package/src/components/badge/Badge.tsx +27 -83
- package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +4 -4
- package/src/components/banner/Banner.tsx +6 -17
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -4
- package/src/components/banner/__test__/banner.test.tsx +0 -2
- package/src/components/buttons/ButtonLink.tsx +21 -6
- package/src/components/buttons/ButtonSolid.tsx +18 -3
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +18 -10
- package/src/components/icons/Icon.tsx +5 -1
- package/src/components/icons/svg/IconTheme.tsx +16 -0
- package/src/components/icons/svg/IconTypeface.tsx +18 -0
- package/src/components/icons/svg/originals/IconTheme.svg +1 -0
- package/src/components/icons/svg/originals/IconTypeface.svg +1 -0
- package/src/components/modules/ModulePaymentNotice.tsx +1 -1
- package/src/components/typography/ButtonText.tsx +6 -3
- package/src/core/IOSpacing.ts +0 -2
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { useIONewTypeface } from "../../core";
|
|
3
|
+
import { IOColors, useIONewTypeface } from "../../core";
|
|
4
4
|
import { IOFontFamily, IOFontSize } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
7
7
|
export const buttonTextFontSize: IOFontSize = 16;
|
|
8
|
+
export const buttonTextLineHeight = 20;
|
|
9
|
+
|
|
8
10
|
/* Needed to render `ButtonOutline` and`ButtonLink` because they use
|
|
9
11
|
`AnimatedText` for color transition through Reanimated */
|
|
12
|
+
const defaultColor: IOColors = "white";
|
|
10
13
|
const fontName: IOFontFamily = "Titillio";
|
|
11
14
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
12
15
|
|
|
@@ -22,10 +25,10 @@ export const ButtonText = forwardRef<View, TypographicStyleProps>(
|
|
|
22
25
|
font: newTypefaceEnabled ? fontName : legacyFontName,
|
|
23
26
|
weight: "Semibold",
|
|
24
27
|
size: buttonTextFontSize,
|
|
25
|
-
lineHeight:
|
|
28
|
+
lineHeight: buttonTextLineHeight,
|
|
26
29
|
/* Needed to render `ButtonOutline` and`ButtonLink` because they use
|
|
27
30
|
`AnimatedText` for color transition through Reanimated */
|
|
28
|
-
color: customColor ??
|
|
31
|
+
color: customColor ?? defaultColor
|
|
29
32
|
};
|
|
30
33
|
|
|
31
34
|
return (
|
package/src/core/IOSpacing.ts
CHANGED
|
@@ -30,8 +30,6 @@ export type IOAlertSpacing = (typeof IOAlertSpacing)[number];
|
|
|
30
30
|
// Values used in the `<Banner>` component
|
|
31
31
|
export type IOBannerSpacing = Extract<IOSpacingScale, 12 | 16>;
|
|
32
32
|
export const IOBannerBigSpacing: IOBannerSpacing = 16;
|
|
33
|
-
export const IOBannerSmallHSpacing: IOBannerSpacing = 16;
|
|
34
|
-
export const IOBannerSmallVSpacing: IOBannerSpacing = 12;
|
|
35
33
|
|
|
36
34
|
// Values used in the `<Tag>` component
|
|
37
35
|
export type IOTagSpacing = Extract<IOSpacingScale, 6 | 8>;
|