@pagopa/io-app-design-system 7.0.2 → 7.1.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/lib/commonjs/components/alert/Alert.js +6 -5
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/banner/Banner.js +7 -6
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/buttons/IOButton/IOButton.js +10 -8
- package/lib/commonjs/components/buttons/IOButton/IOButton.js.map +1 -1
- package/lib/commonjs/components/layout/ContentWrapper.js +5 -4
- package/lib/commonjs/components/layout/ContentWrapper.js.map +1 -1
- package/lib/commonjs/components/otpInput/OTPInput.js +6 -4
- package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -1
- package/lib/commonjs/components/searchInput/SearchInput.js +8 -6
- package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +6 -4
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputValidation.js +5 -3
- package/lib/commonjs/components/textInput/TextInputValidation.js.map +1 -1
- package/lib/commonjs/components/typography/Body.js +8 -5
- package/lib/commonjs/components/typography/Body.js.map +1 -1
- package/lib/commonjs/components/typography/BodyMonospace.js +4 -5
- package/lib/commonjs/components/typography/BodyMonospace.js.map +1 -1
- package/lib/commonjs/components/typography/BodySmall.js +8 -5
- package/lib/commonjs/components/typography/BodySmall.js.map +1 -1
- package/lib/commonjs/components/typography/ButtonText.js +4 -5
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/components/typography/Caption.js +4 -5
- package/lib/commonjs/components/typography/Caption.js.map +1 -1
- package/lib/commonjs/components/typography/H1.js +4 -5
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +4 -5
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +4 -5
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +4 -5
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H5.js +4 -5
- package/lib/commonjs/components/typography/H5.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +4 -5
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +4 -5
- package/lib/commonjs/components/typography/Hero.js.map +1 -1
- package/lib/commonjs/components/typography/IOText.js +16 -14
- package/lib/commonjs/components/typography/IOText.js.map +1 -1
- package/lib/commonjs/components/typography/LabelMini.js +8 -5
- package/lib/commonjs/components/typography/LabelMini.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH1.js +4 -5
- package/lib/commonjs/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH2.js +4 -5
- package/lib/commonjs/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH3.js +4 -5
- package/lib/commonjs/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/commonjs/context/IOThemeContextProvider.js +3 -4
- package/lib/commonjs/context/IOThemeContextProvider.js.map +1 -1
- package/lib/module/components/alert/Alert.js +5 -5
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/banner/Banner.js +6 -6
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/buttons/IOButton/IOButton.js +10 -9
- package/lib/module/components/buttons/IOButton/IOButton.js.map +1 -1
- package/lib/module/components/layout/ContentWrapper.js +4 -4
- package/lib/module/components/layout/ContentWrapper.js.map +1 -1
- package/lib/module/components/otpInput/OTPInput.js +6 -5
- package/lib/module/components/otpInput/OTPInput.js.map +1 -1
- package/lib/module/components/searchInput/SearchInput.js +8 -7
- package/lib/module/components/searchInput/SearchInput.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +6 -5
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/textInput/TextInputValidation.js +5 -4
- package/lib/module/components/textInput/TextInputValidation.js.map +1 -1
- package/lib/module/components/typography/Body.js +7 -5
- package/lib/module/components/typography/Body.js.map +1 -1
- package/lib/module/components/typography/BodyMonospace.js +3 -5
- package/lib/module/components/typography/BodyMonospace.js.map +1 -1
- package/lib/module/components/typography/BodySmall.js +7 -5
- package/lib/module/components/typography/BodySmall.js.map +1 -1
- package/lib/module/components/typography/ButtonText.js +3 -5
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/components/typography/Caption.js +3 -5
- package/lib/module/components/typography/Caption.js.map +1 -1
- package/lib/module/components/typography/H1.js +3 -5
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +3 -5
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +3 -5
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +3 -5
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H5.js +3 -5
- package/lib/module/components/typography/H5.js.map +1 -1
- package/lib/module/components/typography/H6.js +3 -5
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +3 -5
- package/lib/module/components/typography/Hero.js.map +1 -1
- package/lib/module/components/typography/IOText.js +16 -15
- package/lib/module/components/typography/IOText.js.map +1 -1
- package/lib/module/components/typography/LabelMini.js +7 -5
- package/lib/module/components/typography/LabelMini.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH1.js +3 -5
- package/lib/module/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH2.js +3 -5
- package/lib/module/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH3.js +3 -5
- package/lib/module/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/module/context/IOThemeContextProvider.js +3 -4
- package/lib/module/context/IOThemeContextProvider.js.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts +3 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts +3 -1
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IOButton/IOButton.d.ts +3 -2
- package/lib/typescript/components/buttons/IOButton/IOButton.d.ts.map +1 -1
- package/lib/typescript/components/layout/ContentWrapper.d.ts +10 -6
- package/lib/typescript/components/layout/ContentWrapper.d.ts.map +1 -1
- package/lib/typescript/components/otpInput/OTPInput.d.ts +3 -1
- package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -1
- package/lib/typescript/components/searchInput/SearchInput.d.ts +3 -1
- package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
- package/lib/typescript/components/tabs/TabItem.d.ts +3 -11
- package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInputValidation.d.ts +7 -24
- package/lib/typescript/components/textInput/TextInputValidation.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts +4 -2
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodyMonospace.d.ts +2 -8
- package/lib/typescript/components/typography/BodyMonospace.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodySmall.d.ts +4 -2
- package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/ButtonText.d.ts +2 -8
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/components/typography/Caption.d.ts +2 -8
- package/lib/typescript/components/typography/Caption.d.ts.map +1 -1
- package/lib/typescript/components/typography/H1.d.ts +2 -8
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H2.d.ts +6 -10
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +2 -8
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H4.d.ts +2 -8
- package/lib/typescript/components/typography/H4.d.ts.map +1 -1
- package/lib/typescript/components/typography/H5.d.ts +2 -8
- package/lib/typescript/components/typography/H5.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts +2 -8
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/Hero.d.ts +2 -8
- package/lib/typescript/components/typography/Hero.d.ts.map +1 -1
- package/lib/typescript/components/typography/IOText.d.ts +5 -5
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts +4 -2
- package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH1.d.ts +2 -8
- package/lib/typescript/components/typography/markdown/MdH1.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH2.d.ts +2 -8
- package/lib/typescript/components/typography/markdown/MdH2.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH3.d.ts +2 -8
- package/lib/typescript/components/typography/markdown/MdH3.d.ts.map +1 -1
- package/lib/typescript/context/IOThemeContextProvider.d.ts.map +1 -1
- package/package.json +6 -7
- package/src/components/alert/Alert.tsx +108 -112
- package/src/components/banner/Banner.tsx +121 -125
- package/src/components/buttons/IOButton/IOButton.tsx +204 -216
- package/src/components/layout/ContentWrapper.tsx +21 -24
- package/src/components/otpInput/OTPInput.tsx +156 -167
- package/src/components/searchInput/SearchInput.tsx +208 -217
- package/src/components/tabs/TabItem.tsx +143 -146
- package/src/components/textInput/TextInputValidation.tsx +116 -122
- package/src/components/typography/Body.tsx +51 -52
- package/src/components/typography/BodyMonospace.tsx +19 -24
- package/src/components/typography/BodySmall.tsx +51 -52
- package/src/components/typography/ButtonText.tsx +14 -20
- package/src/components/typography/Caption.tsx +18 -23
- package/src/components/typography/H1.tsx +12 -20
- package/src/components/typography/H2.tsx +16 -23
- package/src/components/typography/H3.tsx +12 -20
- package/src/components/typography/H4.tsx +12 -20
- package/src/components/typography/H5.tsx +16 -24
- package/src/components/typography/H6.tsx +13 -21
- package/src/components/typography/Hero.tsx +14 -19
- package/src/components/typography/IOText.tsx +54 -59
- package/src/components/typography/LabelMini.tsx +45 -49
- package/src/components/typography/markdown/MdH1.tsx +14 -19
- package/src/components/typography/markdown/MdH2.tsx +14 -19
- package/src/components/typography/markdown/MdH3.tsx +14 -19
- package/src/context/IOThemeContextProvider.tsx +4 -12
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IOTextProps } from "../IOText";
|
|
1
|
+
import { TypographicStyleProps } from "../IOText";
|
|
3
2
|
/**
|
|
4
3
|
* `MdH1` typographic style
|
|
5
4
|
*/
|
|
6
|
-
export declare const MdH1:
|
|
7
|
-
textStyle?: import("../IOText").IOTextStyle;
|
|
8
|
-
style?: import("../IOText").IOTextStyle;
|
|
9
|
-
} & {
|
|
10
|
-
color?: "white" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-450" | "grey-650" | "grey-700" | "grey-850" | "grey-900" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-400" | "blueIO-300" | "blueIO-200" | "blueIO-150" | "blueIO-100" | "blueIO-50" | "hanPurple-850" | "hanPurple-500" | "hanPurple-250" | "hanPurple-100" | "hanPurple-50" | "turquoise-850" | "turquoise-500" | "turquoise-450" | "turquoise-300" | "turquoise-150" | "turquoise-100" | "turquoise-50" | "error-850" | "error-600" | "error-500" | "error-400" | "error-100" | "warning-850" | "warning-700" | "warning-500" | "warning-400" | "warning-100" | "success-850" | "success-700" | "success-500" | "success-400" | "success-100" | "info-850" | "info-700" | "info-500" | "info-400" | "info-100" | "blueItalia-850" | "blueItalia-600" | "blueItalia-500" | "blueItalia-300" | "blueItalia-100" | "blueItalia-50" | undefined;
|
|
11
|
-
} & import("react").RefAttributes<View>>;
|
|
5
|
+
export declare const MdH1: ({ color: customColor, ...props }: TypographicStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
6
|
//# sourceMappingURL=MdH1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MdH1.d.ts","sourceRoot":"","sources":["../../../../../src/components/typography/markdown/MdH1.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"MdH1.d.ts","sourceRoot":"","sources":["../../../../../src/components/typography/markdown/MdH1.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuB,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,kCAGlB,qBAAqB,4CAYvB,CAAC"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IOTextProps } from "../IOText";
|
|
1
|
+
import { TypographicStyleProps } from "../IOText";
|
|
3
2
|
/**
|
|
4
3
|
* `MdH2` typographic style
|
|
5
4
|
*/
|
|
6
|
-
export declare const MdH2:
|
|
7
|
-
textStyle?: import("../IOText").IOTextStyle;
|
|
8
|
-
style?: import("../IOText").IOTextStyle;
|
|
9
|
-
} & {
|
|
10
|
-
color?: "white" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-450" | "grey-650" | "grey-700" | "grey-850" | "grey-900" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-400" | "blueIO-300" | "blueIO-200" | "blueIO-150" | "blueIO-100" | "blueIO-50" | "hanPurple-850" | "hanPurple-500" | "hanPurple-250" | "hanPurple-100" | "hanPurple-50" | "turquoise-850" | "turquoise-500" | "turquoise-450" | "turquoise-300" | "turquoise-150" | "turquoise-100" | "turquoise-50" | "error-850" | "error-600" | "error-500" | "error-400" | "error-100" | "warning-850" | "warning-700" | "warning-500" | "warning-400" | "warning-100" | "success-850" | "success-700" | "success-500" | "success-400" | "success-100" | "info-850" | "info-700" | "info-500" | "info-400" | "info-100" | "blueItalia-850" | "blueItalia-600" | "blueItalia-500" | "blueItalia-300" | "blueItalia-100" | "blueItalia-50" | undefined;
|
|
11
|
-
} & import("react").RefAttributes<View>>;
|
|
5
|
+
export declare const MdH2: ({ color: customColor, ...props }: TypographicStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
6
|
//# sourceMappingURL=MdH2.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MdH2.d.ts","sourceRoot":"","sources":["../../../../../src/components/typography/markdown/MdH2.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"MdH2.d.ts","sourceRoot":"","sources":["../../../../../src/components/typography/markdown/MdH2.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuB,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,kCAGlB,qBAAqB,4CAYvB,CAAC"}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IOTextProps } from "../IOText";
|
|
1
|
+
import { TypographicStyleProps } from "../IOText";
|
|
3
2
|
/**
|
|
4
3
|
* `MdH3` typographic style
|
|
5
4
|
*/
|
|
6
|
-
export declare const MdH3:
|
|
7
|
-
textStyle?: import("../IOText").IOTextStyle;
|
|
8
|
-
style?: import("../IOText").IOTextStyle;
|
|
9
|
-
} & {
|
|
10
|
-
color?: "white" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-450" | "grey-650" | "grey-700" | "grey-850" | "grey-900" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-400" | "blueIO-300" | "blueIO-200" | "blueIO-150" | "blueIO-100" | "blueIO-50" | "hanPurple-850" | "hanPurple-500" | "hanPurple-250" | "hanPurple-100" | "hanPurple-50" | "turquoise-850" | "turquoise-500" | "turquoise-450" | "turquoise-300" | "turquoise-150" | "turquoise-100" | "turquoise-50" | "error-850" | "error-600" | "error-500" | "error-400" | "error-100" | "warning-850" | "warning-700" | "warning-500" | "warning-400" | "warning-100" | "success-850" | "success-700" | "success-500" | "success-400" | "success-100" | "info-850" | "info-700" | "info-500" | "info-400" | "info-100" | "blueItalia-850" | "blueItalia-600" | "blueItalia-500" | "blueItalia-300" | "blueItalia-100" | "blueItalia-50" | undefined;
|
|
11
|
-
} & import("react").RefAttributes<View>>;
|
|
5
|
+
export declare const MdH3: ({ color: customColor, ...props }: TypographicStyleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
6
|
//# sourceMappingURL=MdH3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MdH3.d.ts","sourceRoot":"","sources":["../../../../../src/components/typography/markdown/MdH3.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"MdH3.d.ts","sourceRoot":"","sources":["../../../../../src/components/typography/markdown/MdH3.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuB,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,kCAGlB,qBAAqB,4CAYvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IOThemeContextProvider.d.ts","sourceRoot":"","sources":["../../../src/context/IOThemeContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,iBAAiB,EAIlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,OAAO,EAA6B,MAAM,kBAAkB,CAAC;AAEtE,eAAO,MAAM,QAAQ;;;
|
|
1
|
+
{"version":3,"file":"IOThemeContextProvider.d.ts","sourceRoot":"","sources":["../../../src/context/IOThemeContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAEP,iBAAiB,EAIlB,MAAM,OAAO,CAAC;AACf,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,OAAO,EAA6B,MAAM,kBAAkB,CAAC;AAEtE,eAAO,MAAM,QAAQ;;;CAA6C,CAAC;AAEnE,KAAK,kBAAkB,GAAG;IACxB,SAAS,EAAE,eAAe,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,OAAO,CAAC,kBAAkB,CAMnD,CAAC;AAEL,eAAO,MAAM,iBAAiB,0BAAmC,CAAC;AAElE,eAAO,MAAM,UAAU,eAAkC,CAAC;AAE1D,KAAK,2BAA2B,GAAG;IACjC,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,qBAGpC,iBAAiB,CAAC,2BAA2B,CAAC,4CAoBhD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/io-app-design-system",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "The library defining the core components of the design system of @pagopa/io-app",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -63,14 +63,13 @@
|
|
|
63
63
|
"@react-native-community/eslint-config": "^3.0.2",
|
|
64
64
|
"@react-native/babel-preset": "^0.82.1",
|
|
65
65
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
66
|
-
"@stylistic/eslint-plugin": "^2.12.1",
|
|
67
66
|
"@svgr/core": "^8.1.0",
|
|
68
67
|
"@svgr/plugin-jsx": "^8.1.0",
|
|
69
68
|
"@svgr/plugin-svgo": "^8.1.0",
|
|
70
69
|
"@testing-library/react-native": "^13.2.0",
|
|
71
70
|
"@types/jest": "^29.5.14",
|
|
72
71
|
"@types/markdown-it": "^14.1.2",
|
|
73
|
-
"@types/react": "^19.
|
|
72
|
+
"@types/react": "^19.1.0",
|
|
74
73
|
"@types/react-test-renderer": "19.1.0",
|
|
75
74
|
"babel-jest": "^29.7.0",
|
|
76
75
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
@@ -87,16 +86,16 @@
|
|
|
87
86
|
"jest": "^29.6.3",
|
|
88
87
|
"pod-install": "^0.1.0",
|
|
89
88
|
"prettier": "^2.0.5",
|
|
90
|
-
"react": "19.
|
|
91
|
-
"react-native": "0.
|
|
89
|
+
"react": "19.1.0",
|
|
90
|
+
"react-native": "0.81.5",
|
|
92
91
|
"react-native-builder-bob": "^0.38.0",
|
|
93
|
-
"react-test-renderer": "19.
|
|
92
|
+
"react-test-renderer": "19.1.0",
|
|
94
93
|
"release-it": "^15.0.0",
|
|
95
94
|
"svgo": "^3.0.2",
|
|
96
95
|
"typescript": "^5.8.3"
|
|
97
96
|
},
|
|
98
97
|
"peerDependencies": {
|
|
99
|
-
"react": "
|
|
98
|
+
"react": "^19.0.0",
|
|
100
99
|
"react-native": "*",
|
|
101
100
|
"react-native-easing-gradient": "*",
|
|
102
101
|
"react-native-gesture-handler": "*",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JSX,
|
|
1
|
+
import { JSX, Ref } from "react";
|
|
2
2
|
import {
|
|
3
3
|
ColorValue,
|
|
4
4
|
GestureResponderEvent,
|
|
@@ -24,6 +24,7 @@ const ICON_SIZE: IOIconSizeScale = 24;
|
|
|
24
24
|
const [padding, paddingFullWidth] = IOAlertSpacing;
|
|
25
25
|
|
|
26
26
|
type AlertProps = WithTestID<{
|
|
27
|
+
ref?: Ref<View>;
|
|
27
28
|
variant: "error" | "warning" | "info" | "success";
|
|
28
29
|
content: string;
|
|
29
30
|
fullWidth?: boolean;
|
|
@@ -105,123 +106,118 @@ const mapVariantStatesDarkMode: Record<
|
|
|
105
106
|
}
|
|
106
107
|
};
|
|
107
108
|
|
|
108
|
-
export const Alert =
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
size={ICON_SIZE}
|
|
148
|
-
color={mapVariantStates[variant].foreground}
|
|
149
|
-
/>
|
|
150
|
-
{/* Sadly we don't have specific alignments style for text
|
|
109
|
+
export const Alert = ({
|
|
110
|
+
variant,
|
|
111
|
+
content,
|
|
112
|
+
action,
|
|
113
|
+
onPress,
|
|
114
|
+
fullWidth = false,
|
|
115
|
+
accessibilityHint,
|
|
116
|
+
ref: viewRef,
|
|
117
|
+
testID
|
|
118
|
+
}: AlertType): JSX.Element => {
|
|
119
|
+
const { onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
120
|
+
useScaleAnimation("medium");
|
|
121
|
+
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
122
|
+
const { themeType } = useIOThemeContext();
|
|
123
|
+
|
|
124
|
+
const paddingDefaultVariant: ViewStyle = {
|
|
125
|
+
padding,
|
|
126
|
+
borderRadius: IOAlertRadius * dynamicFontScale * spacingScaleMultiplier,
|
|
127
|
+
borderCurve: "continuous"
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
const mapVariantStates =
|
|
131
|
+
themeType === "light"
|
|
132
|
+
? mapVariantStatesLightMode
|
|
133
|
+
: mapVariantStatesDarkMode;
|
|
134
|
+
|
|
135
|
+
const renderMainBlock = () => (
|
|
136
|
+
<HStack
|
|
137
|
+
space={IOVisualCostants.iconMargin as IOSpacer}
|
|
138
|
+
allowScaleSpacing
|
|
139
|
+
style={{ alignItems: "center" }}
|
|
140
|
+
>
|
|
141
|
+
<Icon
|
|
142
|
+
allowFontScaling
|
|
143
|
+
name={mapVariantStates[variant].icon}
|
|
144
|
+
size={ICON_SIZE}
|
|
145
|
+
color={mapVariantStates[variant].foreground}
|
|
146
|
+
/>
|
|
147
|
+
{/* Sadly we don't have specific alignments style for text
|
|
151
148
|
in React Native, like `text-box-trim` for CSS. So we
|
|
152
149
|
have to put these magic numbers after manual adjustments.
|
|
153
150
|
Tested on both Android and iOS. */}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
151
|
+
<View
|
|
152
|
+
style={{
|
|
153
|
+
marginTop: -4 * dynamicFontScale,
|
|
154
|
+
marginBottom: -4 * dynamicFontScale,
|
|
155
|
+
flex: 1
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
<VStack space={8} allowScaleSpacing>
|
|
159
|
+
<Body
|
|
160
|
+
color={mapVariantStates[variant].foreground}
|
|
161
|
+
weight={"Regular"}
|
|
162
|
+
accessibilityRole="text"
|
|
163
|
+
>
|
|
164
|
+
{content}
|
|
165
|
+
</Body>
|
|
166
|
+
{action && (
|
|
167
|
+
<ButtonText
|
|
163
168
|
color={mapVariantStates[variant].foreground}
|
|
164
|
-
|
|
165
|
-
|
|
169
|
+
numberOfLines={1}
|
|
170
|
+
ellipsizeMode="tail"
|
|
166
171
|
>
|
|
167
|
-
{
|
|
168
|
-
</
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
172
|
+
{action}
|
|
173
|
+
</ButtonText>
|
|
174
|
+
)}
|
|
175
|
+
</VStack>
|
|
176
|
+
</View>
|
|
177
|
+
</HStack>
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
const StaticComponent = () => (
|
|
181
|
+
<View
|
|
182
|
+
ref={viewRef}
|
|
183
|
+
style={[
|
|
184
|
+
fullWidth ? { padding: paddingFullWidth } : paddingDefaultVariant,
|
|
185
|
+
{ backgroundColor: mapVariantStates[variant].background }
|
|
186
|
+
]}
|
|
187
|
+
testID={testID}
|
|
188
|
+
accessible={false}
|
|
189
|
+
accessibilityRole="alert"
|
|
190
|
+
accessibilityHint={accessibilityHint}
|
|
191
|
+
>
|
|
192
|
+
{renderMainBlock()}
|
|
193
|
+
</View>
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
const PressableButton = () => (
|
|
197
|
+
<Pressable
|
|
198
|
+
ref={viewRef}
|
|
199
|
+
testID={testID}
|
|
200
|
+
onPress={onPress}
|
|
201
|
+
onPressIn={onPressIn}
|
|
202
|
+
onPressOut={onPressOut}
|
|
203
|
+
onTouchEnd={onPressOut}
|
|
204
|
+
// A11y related props
|
|
205
|
+
accessible={true}
|
|
206
|
+
accessibilityHint={accessibilityHint}
|
|
207
|
+
accessibilityRole={"button"}
|
|
208
|
+
>
|
|
209
|
+
<Animated.View
|
|
186
210
|
style={[
|
|
187
|
-
fullWidth ? { padding } : paddingDefaultVariant,
|
|
188
|
-
{ backgroundColor: mapVariantStates[variant].background }
|
|
211
|
+
fullWidth ? { padding: paddingFullWidth } : paddingDefaultVariant,
|
|
212
|
+
{ backgroundColor: mapVariantStates[variant].background },
|
|
213
|
+
// Disable pressed animation when component is full width
|
|
214
|
+
!fullWidth && scaleAnimatedStyle
|
|
189
215
|
]}
|
|
190
|
-
testID={testID}
|
|
191
|
-
accessible={false}
|
|
192
|
-
accessibilityRole="alert"
|
|
193
|
-
accessibilityHint={accessibilityHint}
|
|
194
216
|
>
|
|
195
217
|
{renderMainBlock()}
|
|
196
|
-
</View>
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
testID={testID}
|
|
203
|
-
onPress={onPress}
|
|
204
|
-
onPressIn={onPressIn}
|
|
205
|
-
onPressOut={onPressOut}
|
|
206
|
-
onTouchEnd={onPressOut}
|
|
207
|
-
// A11y related props
|
|
208
|
-
accessible={true}
|
|
209
|
-
accessibilityHint={accessibilityHint}
|
|
210
|
-
accessibilityRole={"button"}
|
|
211
|
-
>
|
|
212
|
-
<Animated.View
|
|
213
|
-
style={[
|
|
214
|
-
fullWidth ? { padding: paddingFullWidth } : paddingDefaultVariant,
|
|
215
|
-
{ backgroundColor: mapVariantStates[variant].background },
|
|
216
|
-
// Disable pressed animation when component is full width
|
|
217
|
-
!fullWidth && scaleAnimatedStyle
|
|
218
|
-
]}
|
|
219
|
-
>
|
|
220
|
-
{renderMainBlock()}
|
|
221
|
-
</Animated.View>
|
|
222
|
-
</Pressable>
|
|
223
|
-
);
|
|
224
|
-
|
|
225
|
-
return action ? <PressableButton /> : <StaticComponent />;
|
|
226
|
-
}
|
|
227
|
-
);
|
|
218
|
+
</Animated.View>
|
|
219
|
+
</Pressable>
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
return action ? <PressableButton /> : <StaticComponent />;
|
|
223
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from "react";
|
|
2
2
|
import {
|
|
3
3
|
AccessibilityRole,
|
|
4
4
|
GestureResponderEvent,
|
|
@@ -51,6 +51,7 @@ const styles = StyleSheet.create({
|
|
|
51
51
|
/* Component Types */
|
|
52
52
|
|
|
53
53
|
type BaseBannerProps = WithTestID<{
|
|
54
|
+
ref?: Ref<View>;
|
|
54
55
|
color: "neutral" | "turquoise";
|
|
55
56
|
pictogramName: IOPictogramsBleed;
|
|
56
57
|
// A11y related props
|
|
@@ -123,140 +124,135 @@ const mapBackgroundColorDarkMode: Record<
|
|
|
123
124
|
turquoise: "turquoise-300"
|
|
124
125
|
};
|
|
125
126
|
|
|
126
|
-
export const Banner =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
useScaleAnimation("medium");
|
|
146
|
-
const { themeType } = useIOThemeContext();
|
|
147
|
-
const theme = useIOTheme();
|
|
127
|
+
export const Banner = ({
|
|
128
|
+
color,
|
|
129
|
+
pictogramName,
|
|
130
|
+
title,
|
|
131
|
+
content,
|
|
132
|
+
action,
|
|
133
|
+
labelClose,
|
|
134
|
+
onPress,
|
|
135
|
+
onClose,
|
|
136
|
+
accessibilityHint,
|
|
137
|
+
accessibilityLabel,
|
|
138
|
+
accessibilityRole = "button",
|
|
139
|
+
ref: viewRef,
|
|
140
|
+
testID
|
|
141
|
+
}: Banner) => {
|
|
142
|
+
const { onPressIn, onPressOut, scaleAnimatedStyle } =
|
|
143
|
+
useScaleAnimation("medium");
|
|
144
|
+
const { themeType } = useIOThemeContext();
|
|
145
|
+
const theme = useIOTheme();
|
|
148
146
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
themeType === "dark" ? "blueIO-200" : theme["interactiveElem-default"];
|
|
147
|
+
// Dynamic colors
|
|
148
|
+
const colorTitle: IOColors = themeType === "dark" ? "grey-50" : "blueIO-850";
|
|
149
|
+
const colorCloseButton: IconButton["color"] =
|
|
150
|
+
themeType === "dark" ? "contrast" : "neutral";
|
|
151
|
+
const colorMainButton =
|
|
152
|
+
themeType === "dark" ? "blueIO-200" : theme["interactiveElem-default"];
|
|
156
153
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
154
|
+
const dynamicContainerStyles: ViewStyle = {
|
|
155
|
+
backgroundColor:
|
|
156
|
+
themeType === "dark"
|
|
157
|
+
? hexToRgba(IOColors[mapBackgroundColorDarkMode[color]], 0.1)
|
|
158
|
+
: IOColors[mapBackgroundColorLightMode[color]]
|
|
159
|
+
};
|
|
163
160
|
|
|
164
|
-
|
|
161
|
+
/* Generates a complete fallbackAccessibilityLabel by concatenating the title, content, and action
|
|
165
162
|
if they are present. */
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
const fallbackAccessibilityLabel = [title, content, action]
|
|
164
|
+
.filter(Boolean)
|
|
165
|
+
.join(" ");
|
|
169
166
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
167
|
+
const renderMainBlock = () => (
|
|
168
|
+
<>
|
|
169
|
+
<View
|
|
170
|
+
style={{ flex: 1, alignSelf: "center", gap: 4 }}
|
|
171
|
+
accessible={true}
|
|
172
|
+
// A11y related props
|
|
173
|
+
accessibilityLabel={accessibilityLabel ?? fallbackAccessibilityLabel}
|
|
174
|
+
accessibilityHint={accessibilityHint}
|
|
175
|
+
accessibilityRole={action !== undefined ? accessibilityRole : "text"}
|
|
176
|
+
>
|
|
177
|
+
{title && <H6 color={colorTitle}>{title}</H6>}
|
|
178
|
+
{content && (
|
|
179
|
+
<BodySmall color={theme["textBody-tertiary"]} weight={"Regular"}>
|
|
180
|
+
{content}
|
|
181
|
+
</BodySmall>
|
|
182
|
+
)}
|
|
183
|
+
{action && (
|
|
184
|
+
/* Disable pointer events to avoid
|
|
188
185
|
pressed state on the button */
|
|
189
|
-
|
|
190
|
-
|
|
186
|
+
<Pressable
|
|
187
|
+
pointerEvents="none"
|
|
188
|
+
importantForAccessibility="no-hide-descendants"
|
|
189
|
+
accessible={true}
|
|
190
|
+
accessibilityElementsHidden
|
|
191
|
+
accessibilityLabel={action}
|
|
192
|
+
accessibilityRole="button"
|
|
193
|
+
onPress={onPress}
|
|
194
|
+
>
|
|
195
|
+
<VSpacer size={8} />
|
|
196
|
+
<IOText
|
|
197
|
+
weight="Semibold"
|
|
198
|
+
color={colorMainButton}
|
|
199
|
+
size={buttonTextFontSize}
|
|
200
|
+
numberOfLines={1}
|
|
201
|
+
ellipsizeMode="tail"
|
|
202
|
+
// A11y
|
|
203
|
+
accessible={false}
|
|
191
204
|
importantForAccessibility="no-hide-descendants"
|
|
192
|
-
|
|
193
|
-
accessibilityElementsHidden
|
|
194
|
-
accessibilityLabel={action}
|
|
195
|
-
accessibilityRole="button"
|
|
196
|
-
onPress={onPress}
|
|
205
|
+
accessibilityElementsHidden={true}
|
|
197
206
|
>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
color={colorMainButton}
|
|
202
|
-
size={buttonTextFontSize}
|
|
203
|
-
numberOfLines={1}
|
|
204
|
-
ellipsizeMode="tail"
|
|
205
|
-
// A11y
|
|
206
|
-
accessible={false}
|
|
207
|
-
importantForAccessibility="no-hide-descendants"
|
|
208
|
-
accessibilityElementsHidden={true}
|
|
209
|
-
>
|
|
210
|
-
{action}
|
|
211
|
-
</IOText>
|
|
212
|
-
</Pressable>
|
|
213
|
-
)}
|
|
214
|
-
</View>
|
|
215
|
-
<View style={[styles.bleedPictogram, { alignSelf: "center" }]}>
|
|
216
|
-
<PictogramBleed name={pictogramName} size={sizePictogram} />
|
|
217
|
-
</View>
|
|
218
|
-
{onClose && labelClose && (
|
|
219
|
-
<View style={styles.closeIconButton}>
|
|
220
|
-
<IconButton
|
|
221
|
-
icon="closeSmall"
|
|
222
|
-
color={colorCloseButton}
|
|
223
|
-
onPress={onClose}
|
|
224
|
-
accessibilityLabel={labelClose}
|
|
225
|
-
/>
|
|
226
|
-
</View>
|
|
207
|
+
{action}
|
|
208
|
+
</IOText>
|
|
209
|
+
</Pressable>
|
|
227
210
|
)}
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
</Animated.View>
|
|
245
|
-
</Pressable>
|
|
246
|
-
);
|
|
211
|
+
</View>
|
|
212
|
+
<View style={[styles.bleedPictogram, { alignSelf: "center" }]}>
|
|
213
|
+
<PictogramBleed name={pictogramName} size={sizePictogram} />
|
|
214
|
+
</View>
|
|
215
|
+
{onClose && labelClose && (
|
|
216
|
+
<View style={styles.closeIconButton}>
|
|
217
|
+
<IconButton
|
|
218
|
+
icon="closeSmall"
|
|
219
|
+
color={colorCloseButton}
|
|
220
|
+
onPress={onClose}
|
|
221
|
+
accessibilityLabel={labelClose}
|
|
222
|
+
/>
|
|
223
|
+
</View>
|
|
224
|
+
)}
|
|
225
|
+
</>
|
|
226
|
+
);
|
|
247
227
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
228
|
+
const PressableButton = () => (
|
|
229
|
+
<Pressable
|
|
230
|
+
ref={viewRef}
|
|
231
|
+
testID={testID}
|
|
232
|
+
onPress={onPress}
|
|
233
|
+
onPressIn={onPressIn}
|
|
234
|
+
onPressOut={onPressOut}
|
|
235
|
+
accessible={false}
|
|
236
|
+
>
|
|
237
|
+
<Animated.View
|
|
238
|
+
style={[styles.container, dynamicContainerStyles, scaleAnimatedStyle]}
|
|
255
239
|
>
|
|
256
240
|
{renderMainBlock()}
|
|
257
|
-
</View>
|
|
258
|
-
|
|
241
|
+
</Animated.View>
|
|
242
|
+
</Pressable>
|
|
243
|
+
);
|
|
259
244
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
245
|
+
const StaticComponent = () => (
|
|
246
|
+
<View
|
|
247
|
+
ref={viewRef}
|
|
248
|
+
testID={testID}
|
|
249
|
+
style={[styles.container, dynamicContainerStyles]}
|
|
250
|
+
// A11y related props
|
|
251
|
+
accessible={false}
|
|
252
|
+
>
|
|
253
|
+
{renderMainBlock()}
|
|
254
|
+
</View>
|
|
255
|
+
);
|
|
256
|
+
|
|
257
|
+
return action ? <PressableButton /> : <StaticComponent />;
|
|
258
|
+
};
|