@pagopa/io-app-design-system 3.0.1 → 4.0.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 +1 -2
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/alert/AlertEdgeToEdge.js +2 -2
- package/lib/commonjs/components/alert/AlertEdgeToEdge.js.map +1 -1
- package/lib/commonjs/components/banner/Banner.js +1 -1
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
- package/lib/commonjs/components/buttons/ButtonLink.js +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
- package/lib/commonjs/components/featureInfo/FeatureInfo.js +3 -2
- package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderFirstLevel.js +1 -0
- package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +2 -2
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +2 -2
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
- package/lib/commonjs/components/modules/ModuleAttachment.js +1 -1
- package/lib/commonjs/components/modules/ModuleAttachment.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCheckout.js +1 -1
- package/lib/commonjs/components/modules/ModuleCheckout.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCredential.js +1 -1
- package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleNavigation.js +3 -2
- package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/commonjs/components/modules/ModulePaymentNotice.js +2 -2
- package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleSummary.js +1 -1
- package/lib/commonjs/components/modules/ModuleSummary.js.map +1 -1
- package/lib/commonjs/components/otpInput/BoxedInput.js +4 -6
- package/lib/commonjs/components/otpInput/BoxedInput.js.map +1 -1
- package/lib/commonjs/components/otpInput/OTPInput.js +5 -4
- package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +1 -1
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +2 -2
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/components/tooltip/Arrows.js +49 -0
- package/lib/commonjs/components/tooltip/Arrows.js.map +1 -0
- package/lib/commonjs/components/tooltip/Tooltip.js +174 -0
- package/lib/commonjs/components/tooltip/Tooltip.js.map +1 -0
- package/lib/commonjs/components/tooltip/index.js +17 -0
- package/lib/commonjs/components/tooltip/index.js.map +1 -0
- package/lib/commonjs/components/tooltip/styles.js +50 -0
- package/lib/commonjs/components/tooltip/styles.js.map +1 -0
- package/lib/commonjs/components/tooltip/utils/index.js +180 -0
- package/lib/commonjs/components/tooltip/utils/index.js.map +1 -0
- package/lib/commonjs/components/tooltip/utils/types.js +2 -0
- package/lib/commonjs/components/tooltip/utils/types.js.map +1 -0
- package/lib/commonjs/components/typography/{LabelSmall.js → BodySmall.js} +8 -10
- package/lib/commonjs/components/typography/BodySmall.js.map +1 -0
- package/lib/commonjs/components/typography/ButtonText.js +1 -3
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +3 -6
- package/lib/commonjs/components/typography/H3.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/__test__/__snapshots__/typography.test.tsx.snap +118 -161
- package/lib/commonjs/components/typography/__test__/typography.test.js +6 -18
- package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +28 -72
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/module/components/alert/Alert.js +2 -3
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/alert/AlertEdgeToEdge.js +2 -2
- package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
- package/lib/module/components/banner/Banner.js +2 -2
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
- package/lib/module/components/buttons/ButtonLink.js +1 -1
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +1 -1
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
- package/lib/module/components/featureInfo/FeatureInfo.js +4 -3
- package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/HeaderFirstLevel.js +1 -0
- package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemCheckbox.js +2 -2
- package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfo.js +2 -2
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +2 -2
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +2 -2
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +2 -2
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +2 -2
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js +3 -3
- package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/module/components/listitems/ListItemSwitch.js +2 -2
- package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +3 -3
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
- package/lib/module/components/modules/ModuleAttachment.js +2 -2
- package/lib/module/components/modules/ModuleAttachment.js.map +1 -1
- package/lib/module/components/modules/ModuleCheckout.js +2 -2
- package/lib/module/components/modules/ModuleCheckout.js.map +1 -1
- package/lib/module/components/modules/ModuleCredential.js +2 -2
- package/lib/module/components/modules/ModuleCredential.js.map +1 -1
- package/lib/module/components/modules/ModuleNavigation.js +4 -3
- package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/module/components/modules/ModulePaymentNotice.js +3 -3
- package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/module/components/modules/ModuleSummary.js +2 -2
- package/lib/module/components/modules/ModuleSummary.js.map +1 -1
- package/lib/module/components/otpInput/BoxedInput.js +5 -7
- package/lib/module/components/otpInput/BoxedInput.js.map +1 -1
- package/lib/module/components/otpInput/OTPInput.js +5 -4
- package/lib/module/components/otpInput/OTPInput.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +2 -2
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +3 -3
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/components/tooltip/Arrows.js +36 -0
- package/lib/module/components/tooltip/Arrows.js.map +1 -0
- package/lib/module/components/tooltip/Tooltip.js +165 -0
- package/lib/module/components/tooltip/Tooltip.js.map +1 -0
- package/lib/module/components/tooltip/index.js +2 -0
- package/lib/module/components/tooltip/index.js.map +1 -0
- package/lib/module/components/tooltip/styles.js +43 -0
- package/lib/module/components/tooltip/styles.js.map +1 -0
- package/lib/module/components/tooltip/utils/index.js +163 -0
- package/lib/module/components/tooltip/utils/index.js.map +1 -0
- package/lib/module/components/tooltip/utils/types.js +2 -0
- package/lib/module/components/tooltip/utils/types.js.map +1 -0
- package/lib/module/components/typography/{LabelSmall.js → BodySmall.js} +6 -8
- package/lib/module/components/typography/BodySmall.js.map +1 -0
- package/lib/module/components/typography/ButtonText.js +1 -3
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/components/typography/H3.js +3 -6
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H6.js +4 -5
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
- package/lib/module/components/typography/__test__/typography.test.js +6 -18
- package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/module/components/typography/index.js +6 -10
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts +1 -1
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
- package/lib/typescript/components/otpInput/BoxedInput.d.ts.map +1 -1
- package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -1
- package/lib/typescript/components/tooltip/Arrows.d.ts +14 -0
- package/lib/typescript/components/tooltip/Arrows.d.ts.map +1 -0
- package/lib/typescript/components/tooltip/Tooltip.d.ts +64 -0
- package/lib/typescript/components/tooltip/Tooltip.d.ts.map +1 -0
- package/lib/typescript/components/tooltip/index.d.ts +2 -0
- package/lib/typescript/components/tooltip/index.d.ts.map +1 -0
- package/lib/typescript/components/tooltip/styles.d.ts +41 -0
- package/lib/typescript/components/tooltip/styles.d.ts.map +1 -0
- package/lib/typescript/components/tooltip/utils/index.d.ts +89 -0
- package/lib/typescript/components/tooltip/utils/index.d.ts.map +1 -0
- package/lib/typescript/components/tooltip/utils/types.d.ts +10 -0
- package/lib/typescript/components/tooltip/utils/types.d.ts.map +1 -0
- package/lib/typescript/components/typography/Body.d.ts +1 -1
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodySmall.d.ts +13 -0
- package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -0
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +2 -0
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
- package/lib/typescript/components/typography/index.d.ts +6 -10
- package/lib/typescript/components/typography/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/alert/Alert.tsx +3 -4
- package/src/components/alert/AlertEdgeToEdge.tsx +3 -3
- package/src/components/banner/Banner.tsx +7 -5
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
- package/src/components/buttons/ButtonLink.tsx +1 -1
- package/src/components/buttons/ButtonOutline.tsx +1 -1
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
- package/src/components/featureInfo/FeatureInfo.tsx +6 -6
- package/src/components/index.tsx +1 -0
- package/src/components/layout/HeaderFirstLevel.tsx +1 -0
- package/src/components/listitems/ListItemCheckbox.tsx +3 -3
- package/src/components/listitems/ListItemInfo.tsx +3 -3
- package/src/components/listitems/ListItemInfoCopy.tsx +3 -3
- package/src/components/listitems/ListItemNav.tsx +3 -3
- package/src/components/listitems/ListItemNavAlert.tsx +3 -3
- package/src/components/listitems/ListItemRadio.tsx +3 -3
- package/src/components/listitems/ListItemRadioWithAmount.tsx +5 -5
- package/src/components/listitems/ListItemSwitch.tsx +4 -4
- package/src/components/listitems/ListItemTransaction.tsx +5 -5
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
- package/src/components/modules/ModuleAttachment.tsx +3 -3
- package/src/components/modules/ModuleCheckout.tsx +3 -3
- package/src/components/modules/ModuleCredential.tsx +3 -3
- package/src/components/modules/ModuleNavigation.tsx +6 -4
- package/src/components/modules/ModulePaymentNotice.tsx +5 -5
- package/src/components/modules/ModuleSummary.tsx +3 -3
- package/src/components/otpInput/BoxedInput.tsx +6 -5
- package/src/components/otpInput/OTPInput.tsx +23 -8
- package/src/components/tabs/TabItem.tsx +3 -3
- package/src/components/textInput/TextInputBase.tsx +5 -5
- package/src/components/tooltip/Arrows.tsx +36 -0
- package/src/components/tooltip/Tooltip.tsx +313 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip/styles.ts +44 -0
- package/src/components/tooltip/utils/index.ts +179 -0
- package/src/components/tooltip/utils/types.ts +9 -0
- package/src/components/typography/Body.tsx +1 -1
- package/src/components/typography/{LabelSmall.tsx → BodySmall.tsx} +7 -14
- package/src/components/typography/ButtonText.tsx +2 -4
- package/src/components/typography/H3.tsx +11 -8
- package/src/components/typography/H6.tsx +5 -6
- package/src/components/typography/LabelMini.tsx +1 -1
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
- package/src/components/typography/__test__/typography.test.tsx +8 -24
- package/src/components/typography/index.tsx +6 -10
- package/lib/commonjs/components/typography/BaseTypography.js +0 -52
- package/lib/commonjs/components/typography/BaseTypography.js.map +0 -1
- package/lib/commonjs/components/typography/Chip.js +0 -41
- package/lib/commonjs/components/typography/Chip.js.map +0 -1
- package/lib/commonjs/components/typography/Factory.js +0 -62
- package/lib/commonjs/components/typography/Factory.js.map +0 -1
- package/lib/commonjs/components/typography/Label.js +0 -51
- package/lib/commonjs/components/typography/Label.js.map +0 -1
- package/lib/commonjs/components/typography/LabelSmall.js.map +0 -1
- package/lib/module/components/typography/BaseTypography.js +0 -44
- package/lib/module/components/typography/BaseTypography.js.map +0 -1
- package/lib/module/components/typography/Chip.js +0 -32
- package/lib/module/components/typography/Chip.js.map +0 -1
- package/lib/module/components/typography/Factory.js +0 -55
- package/lib/module/components/typography/Factory.js.map +0 -1
- package/lib/module/components/typography/Label.js +0 -42
- package/lib/module/components/typography/Label.js.map +0 -1
- package/lib/module/components/typography/LabelSmall.js.map +0 -1
- package/lib/typescript/components/typography/BaseTypography.d.ts +0 -29
- package/lib/typescript/components/typography/BaseTypography.d.ts.map +0 -1
- package/lib/typescript/components/typography/Chip.d.ts +0 -13
- package/lib/typescript/components/typography/Chip.d.ts.map +0 -1
- package/lib/typescript/components/typography/Factory.d.ts +0 -43
- package/lib/typescript/components/typography/Factory.d.ts.map +0 -1
- package/lib/typescript/components/typography/Label.d.ts +0 -13
- package/lib/typescript/components/typography/Label.d.ts.map +0 -1
- package/lib/typescript/components/typography/LabelSmall.d.ts +0 -13
- package/lib/typescript/components/typography/LabelSmall.d.ts.map +0 -1
- package/src/components/typography/BaseTypography.tsx +0 -71
- package/src/components/typography/Chip.tsx +0 -33
- package/src/components/typography/Factory.tsx +0 -98
- package/src/components/typography/Label.tsx +0 -62
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChildrenCoords } from './utils/types';
|
|
2
|
+
export declare const tooltipStyles: {
|
|
3
|
+
overlay: {
|
|
4
|
+
position: "absolute";
|
|
5
|
+
width: string;
|
|
6
|
+
height: string;
|
|
7
|
+
backgroundColor: string;
|
|
8
|
+
opacity: number;
|
|
9
|
+
zIndex: number;
|
|
10
|
+
};
|
|
11
|
+
childrenContainer: {
|
|
12
|
+
position: "absolute";
|
|
13
|
+
zIndex: number;
|
|
14
|
+
};
|
|
15
|
+
tooltipContainer: {
|
|
16
|
+
position: "absolute";
|
|
17
|
+
paddingHorizontal: number;
|
|
18
|
+
paddingVertical: number;
|
|
19
|
+
backgroundColor: string;
|
|
20
|
+
borderRadius: number;
|
|
21
|
+
zIndex: number;
|
|
22
|
+
overflow: "visible";
|
|
23
|
+
};
|
|
24
|
+
arrowContainer: {
|
|
25
|
+
position: "absolute";
|
|
26
|
+
display: "flex";
|
|
27
|
+
zIndex: number;
|
|
28
|
+
};
|
|
29
|
+
closeIcon: {
|
|
30
|
+
position: "absolute";
|
|
31
|
+
right: number;
|
|
32
|
+
top: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const getChildrenPosition: (childrenCoords: ChildrenCoords) => {
|
|
36
|
+
top: number;
|
|
37
|
+
left: number;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/tooltip/styles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCxB,CAAC;AAEH,eAAO,MAAM,mBAAmB,mBAAoB,cAAc;;;;;CAKhE,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { ScaledSize } from 'react-native';
|
|
2
|
+
import { ChildrenCoords, DisplayInsets, Placement } from './types';
|
|
3
|
+
export declare const ARROW_WIDTH = 24;
|
|
4
|
+
export declare const ARROW_HEIGHT = 14;
|
|
5
|
+
export declare const EMPTY_SPACE = 8;
|
|
6
|
+
/**
|
|
7
|
+
* @param displayInsets custom display insets
|
|
8
|
+
* @returns An `object` based on `DEFAULT_INSETS` and `displayInsets`
|
|
9
|
+
*/
|
|
10
|
+
export declare const getDisplayInsets: (displayInsets: Partial<DisplayInsets>) => DisplayInsets;
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* @param placement The `Tooltip` placement
|
|
14
|
+
* @returns The `Arrow` box `width` and `height` based on `placement` value
|
|
15
|
+
*/
|
|
16
|
+
export declare const getArrowBoxByPlacement: (placement: Placement) => {
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* A utility function to calculate the `Tooltip` coordinates and dimensions
|
|
22
|
+
* @param placement The `Tooltip` placement in relation of its children
|
|
23
|
+
* @param childrenCoords The measures in screen of the `Tooltip` children
|
|
24
|
+
* @param displayInsets The active display insets
|
|
25
|
+
* @param screenDimensions The dimensions of the device screen
|
|
26
|
+
* @returns The `Tooltip` coordinates
|
|
27
|
+
*/
|
|
28
|
+
export declare const getTooltipCoords: (placement: Placement, childrenCoords: ChildrenCoords, displayInsets: DisplayInsets, screenDimensions: ScaledSize) => {
|
|
29
|
+
bottom: number;
|
|
30
|
+
left: number;
|
|
31
|
+
width: number;
|
|
32
|
+
top?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
top: number;
|
|
35
|
+
left: number;
|
|
36
|
+
width: number;
|
|
37
|
+
bottom?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
bottom?: undefined;
|
|
40
|
+
left?: undefined;
|
|
41
|
+
width?: undefined;
|
|
42
|
+
top?: undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A utility function to calculate the `Tooltip`'s `Arrow` coordinates
|
|
46
|
+
* @param placement The `Arrow` placement in relation of the `Tooltip` children
|
|
47
|
+
* @param childrenCoords The measures in screen of the `Tooltip` children
|
|
48
|
+
* @param screenDimensions The active display insets
|
|
49
|
+
* @returns The `Tooltip`'s Arrow coordinates
|
|
50
|
+
*/
|
|
51
|
+
export declare const getArrowCoords: (placement: Placement, childrenCoords: ChildrenCoords, screenDimensions: ScaledSize) => {
|
|
52
|
+
bottom: number;
|
|
53
|
+
left: number;
|
|
54
|
+
top?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
top: number;
|
|
57
|
+
left: number;
|
|
58
|
+
bottom?: undefined;
|
|
59
|
+
} | {
|
|
60
|
+
bottom?: undefined;
|
|
61
|
+
left?: undefined;
|
|
62
|
+
top?: undefined;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* A utility function to calculate the `Tooltip` vertical alignment
|
|
66
|
+
* @param placement The `Tooltip` placement in relation of its children
|
|
67
|
+
* @param childrenHeight The `Tooltip`'s children height
|
|
68
|
+
* @param tooltipHeight The `Tooltip`'s height
|
|
69
|
+
* @returns If placement is `left` or `right` it returns the vertical tranlsation to align the `Tooltip` center with its `children` center,
|
|
70
|
+
* otherwise `null` is returned
|
|
71
|
+
*/
|
|
72
|
+
export declare const getTooltipVerticalAlignment: (placement: Placement, childrenHeight: number, tooltipHeight?: number) => {
|
|
73
|
+
transform: {
|
|
74
|
+
translateY: number;
|
|
75
|
+
}[];
|
|
76
|
+
} | null;
|
|
77
|
+
/**
|
|
78
|
+
* A utility function to calculate the `Arrow` vertical alignment
|
|
79
|
+
* @param placement The `Tooltip` placement in relation of its children
|
|
80
|
+
* @param childrenHeight The `Tooltip`'s children height
|
|
81
|
+
*/
|
|
82
|
+
export declare const getArrowVerticalAlignment: (placement: Placement, childrenHeight: number) => {
|
|
83
|
+
transform: {
|
|
84
|
+
translateY: number;
|
|
85
|
+
}[];
|
|
86
|
+
} | null;
|
|
87
|
+
export declare const isDefined: <T>(v: T) => boolean;
|
|
88
|
+
export declare const isNotZero: (v: number) => boolean;
|
|
89
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/tooltip/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnE,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAQ7B;;;GAGG;AACH,eAAO,MAAM,gBAAgB,kBACZ,QAAQ,aAAa,CAAC,KACpC,aAA0D,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,cAAe,SAAS;;;CAc1D,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,cAChB,SAAS,kBACJ,cAAc,iBACf,aAAa,oBACV,UAAU;;;;;;;;;;;;;;;CAsC7B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,cACd,SAAS,kBACJ,cAAc,oBACZ,UAAU;;;;;;;;;;;;CA6B7B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,cAAe,SAAS,kBAAkB,MAAM,kBAAkB,MAAM;;;;QAY/G,CAAC;AAEF;;;;EAIE;AACF,eAAO,MAAM,yBAAyB,cAAe,SAAS,kBAAkB,MAAM;;;;QAYrF,CAAC;AAEF,eAAO,MAAM,SAAS,SAAU,CAAC,YAAoB,CAAC;AACtD,eAAO,MAAM,SAAS,MAAO,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type DisplayInsets = Record<Placement, number>;
|
|
2
|
+
export type Placement = "top" | "bottom" | "left" | "right";
|
|
3
|
+
export type ChildrenCoords = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
export type TooltipLayout = ChildrenCoords;
|
|
10
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/tooltip/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACtD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAC5D,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { View } from "react-native";
|
|
|
3
3
|
import { IOFontWeight } from "../../utils/fonts";
|
|
4
4
|
import { TypographicStyleAsLinkProps, TypographicStyleProps } from "./IOText";
|
|
5
5
|
type BodyStyleProps = TypographicStyleProps & {
|
|
6
|
-
weight?: Extract<IOFontWeight, "Regular" | "Semibold"
|
|
6
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
|
|
7
7
|
} & TypographicStyleAsLinkProps;
|
|
8
8
|
export declare const bodyFontSize = 16;
|
|
9
9
|
export declare const bodyLineHeight = 24;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"Body.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/Body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;CACxD,GAAG,2BAA2B,CAAC;AAEhC,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,cAAc,KAAK,CAAC;AAQjC;;GAEG;AACH,eAAO,MAAM,IAAI,6EAsChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import { IOFontWeight } from "../../utils/fonts";
|
|
4
|
+
import { TypographicStyleAsLinkProps, TypographicStyleProps } from "./IOText";
|
|
5
|
+
type BodySmallProps = TypographicStyleProps & {
|
|
6
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
|
|
7
|
+
} & TypographicStyleAsLinkProps;
|
|
8
|
+
/**
|
|
9
|
+
* `BodySmall` typographic style
|
|
10
|
+
*/
|
|
11
|
+
export declare const BodySmall: React.ForwardRefExoticComponent<BodySmallProps & React.RefAttributes<View>>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=BodySmall.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BodySmall.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/BodySmall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;CACxD,GAAG,2BAA2B,CAAC;AAKhC;;GAEG;AACH,eAAO,MAAM,SAAS,6EAkCrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/ButtonText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"ButtonText.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/ButtonText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAgB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAEtE,eAAO,MAAM,kBAAkB,EAAE,UAAe,CAAC;AASjD;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;8BAmBtB,CAAC"}
|
|
@@ -12,5 +12,7 @@ export declare const H3: React.ForwardRefExoticComponent<Omit<IOTextProps, "styl
|
|
|
12
12
|
style?: import("./IOText").IOTextStyle | undefined;
|
|
13
13
|
} & {
|
|
14
14
|
color?: "white" | "grey-50" | "grey-100" | "grey-200" | "grey-300" | "grey-450" | "grey-650" | "grey-700" | "grey-850" | "black" | "blueIO-850" | "blueIO-600" | "blueIO-500" | "blueIO-400" | "blueIO-450" | "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-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-100" | "blueItalia-50" | "blue-600" | "blue-50" | "greyUltraLight" | "greyLight" | "bluegreyLight" | "grey" | "bluegrey" | "bluegreyDark" | "blue" | "blueUltraLight" | "aqua" | "aquaUltraLight" | "antiqueFuchsia" | "orange" | "red" | "green" | "greenLight" | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
weight?: "Semibold" | "Bold" | undefined;
|
|
15
17
|
} & React.RefAttributes<View>>;
|
|
16
18
|
//# sourceMappingURL=H3.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"H3.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H3.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"H3.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H3.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAOtE,eAAO,MAAM,UAAU,EAAE,UAAe,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAM/B;;GAEG;AACH,eAAO,MAAM,EAAE;;;;;;;8BAwBd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"H6.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H6.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,
|
|
1
|
+
{"version":3,"file":"H6.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/H6.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAU,WAAW,EAAyB,MAAM,UAAU,CAAC;AAItE,eAAO,MAAM,UAAU,EAAE,UAAe,CAAC;AACzC,eAAO,MAAM,YAAY,KAAK,CAAC;AAO/B;;GAEG;AACH,eAAO,MAAM,EAAE;;;;;8BAqBd,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { View } from "react-native";
|
|
|
3
3
|
import { IOFontWeight } from "../../utils/fonts";
|
|
4
4
|
import { TypographicStyleAsLinkProps, TypographicStyleProps } from "./IOText";
|
|
5
5
|
type LabelMiniProps = TypographicStyleProps & {
|
|
6
|
-
weight?: Extract<IOFontWeight, "Regular" | "Semibold"
|
|
6
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
|
|
7
7
|
} & TypographicStyleAsLinkProps;
|
|
8
8
|
/**
|
|
9
9
|
* `LabelMini` typographic style
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelMini.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/LabelMini.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,
|
|
1
|
+
{"version":3,"file":"LabelMini.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/LabelMini.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,EAAgB,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAGL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,KAAK,cAAc,GAAG,qBAAqB,GAAG;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC;CACxD,GAAG,2BAA2B,CAAC;AAQhC;;GAEG;AACH,eAAO,MAAM,SAAS,6EAsCrB,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
export * from "./BaseTypography";
|
|
2
|
-
export * from "./IOText";
|
|
3
1
|
export * from "./Body";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./Chip";
|
|
2
|
+
export * from "./BodyMonospace";
|
|
3
|
+
export * from "./BodySmall";
|
|
7
4
|
export * from "./ButtonText";
|
|
8
|
-
export * from "./
|
|
5
|
+
export * from "./Caption";
|
|
6
|
+
export * from "./common";
|
|
7
|
+
export * from "./ComposedBodyFromArray";
|
|
9
8
|
export * from "./H1";
|
|
10
9
|
export * from "./H2";
|
|
11
10
|
export * from "./H3";
|
|
@@ -13,11 +12,8 @@ export * from "./H4";
|
|
|
13
12
|
export * from "./H5";
|
|
14
13
|
export * from "./H6";
|
|
15
14
|
export * from "./Hero";
|
|
16
|
-
export * from "./
|
|
17
|
-
export * from "./LabelSmall";
|
|
15
|
+
export * from "./IOText";
|
|
18
16
|
export * from "./LabelMini";
|
|
19
|
-
export * from "./BodyMonospace";
|
|
20
|
-
export * from "./common";
|
|
21
17
|
export * from "./markdown/MdH1";
|
|
22
18
|
export * from "./markdown/MdH2";
|
|
23
19
|
export * from "./markdown/MdH3";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/index.tsx"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -29,9 +29,8 @@ import { IOAlertSpacing } from "../../core/IOSpacing";
|
|
|
29
29
|
import { WithTestID } from "../../utils/types";
|
|
30
30
|
import { IOIconSizeScale, IOIcons, Icon } from "../icons";
|
|
31
31
|
import { VSpacer } from "../spacer";
|
|
32
|
-
import { ButtonText } from "../typography";
|
|
32
|
+
import { Body, ButtonText } from "../typography";
|
|
33
33
|
import { H4 } from "../typography/H4";
|
|
34
|
-
import { Label } from "../typography/Label";
|
|
35
34
|
|
|
36
35
|
const iconSize: IOIconSizeScale = 24;
|
|
37
36
|
|
|
@@ -197,14 +196,14 @@ export const Alert = React.forwardRef<View, AlertType>(
|
|
|
197
196
|
<VSpacer size={8} />
|
|
198
197
|
</>
|
|
199
198
|
)}
|
|
200
|
-
<
|
|
199
|
+
<Body
|
|
201
200
|
color={mapVariantStates[variant].foreground}
|
|
202
201
|
weight={"Regular"}
|
|
203
202
|
accessibilityRole="text"
|
|
204
203
|
onTextLayout={onTextLayout}
|
|
205
204
|
>
|
|
206
205
|
{content}
|
|
207
|
-
</
|
|
206
|
+
</Body>
|
|
208
207
|
{action && (
|
|
209
208
|
<>
|
|
210
209
|
<VSpacer size={8} />
|
|
@@ -33,7 +33,7 @@ import { IOStyles } from "../../core/IOStyles";
|
|
|
33
33
|
import { makeFontStyleObject } from "../../utils/fonts";
|
|
34
34
|
import { WithTestID } from "../../utils/types";
|
|
35
35
|
import { IOIconSizeScale, IOIcons, Icon } from "../icons";
|
|
36
|
-
import {
|
|
36
|
+
import { Body } from "../typography";
|
|
37
37
|
|
|
38
38
|
const iconSize: IOIconSizeScale = 24;
|
|
39
39
|
|
|
@@ -161,7 +161,7 @@ export const AlertEdgeToEdge = ({
|
|
|
161
161
|
/>
|
|
162
162
|
</View>
|
|
163
163
|
<View style={IOStyles.flex}>
|
|
164
|
-
<
|
|
164
|
+
<Body
|
|
165
165
|
color={mapVariantStates[variant].foreground}
|
|
166
166
|
weight={"Regular"}
|
|
167
167
|
accessibilityRole="text"
|
|
@@ -182,7 +182,7 @@ export const AlertEdgeToEdge = ({
|
|
|
182
182
|
{` ${action}`}
|
|
183
183
|
</Text>
|
|
184
184
|
)}
|
|
185
|
-
</
|
|
185
|
+
</Body>
|
|
186
186
|
</View>
|
|
187
187
|
</>
|
|
188
188
|
);
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
PictogramBleed
|
|
34
34
|
} from "../pictograms";
|
|
35
35
|
import { VSpacer } from "../spacer";
|
|
36
|
-
import { H6,
|
|
36
|
+
import { H6, BodySmall } from "../typography";
|
|
37
37
|
|
|
38
38
|
/* Styles */
|
|
39
39
|
const colorTitle: IOColors = "blueIO-850";
|
|
@@ -157,7 +157,7 @@ export const Banner = ({
|
|
|
157
157
|
onClose,
|
|
158
158
|
accessibilityHint,
|
|
159
159
|
accessibilityLabel,
|
|
160
|
-
testID
|
|
160
|
+
testID
|
|
161
161
|
}: Banner) => {
|
|
162
162
|
const isPressed: Animated.SharedValue<number> = useSharedValue(0);
|
|
163
163
|
|
|
@@ -197,7 +197,9 @@ export const Banner = ({
|
|
|
197
197
|
|
|
198
198
|
/* Generates a complete fallbackAccessibilityLabel by concatenating the title, content, and action
|
|
199
199
|
if they are present. */
|
|
200
|
-
const fallbackAccessibilityLabel = [title, content, action]
|
|
200
|
+
const fallbackAccessibilityLabel = [title, content, action]
|
|
201
|
+
.filter(Boolean)
|
|
202
|
+
.join(" ");
|
|
201
203
|
|
|
202
204
|
const renderMainBlock = () => (
|
|
203
205
|
<>
|
|
@@ -219,9 +221,9 @@ export const Banner = ({
|
|
|
219
221
|
)}
|
|
220
222
|
{content && (
|
|
221
223
|
<>
|
|
222
|
-
<
|
|
224
|
+
<BodySmall color={colorContent} weight={"Regular"}>
|
|
223
225
|
{content}
|
|
224
|
-
</
|
|
226
|
+
</BodySmall>
|
|
225
227
|
{action && <VSpacer size={8} />}
|
|
226
228
|
</>
|
|
227
229
|
)}
|
|
@@ -82,7 +82,7 @@ exports[`Test Banner Components - Experimental Enabled Banner Snapshot 1`] = `
|
|
|
82
82
|
{
|
|
83
83
|
"color": "#031344",
|
|
84
84
|
"fontFamily": "Titillio",
|
|
85
|
-
"fontSize":
|
|
85
|
+
"fontSize": 16,
|
|
86
86
|
"fontStyle": "normal",
|
|
87
87
|
"fontWeight": "600",
|
|
88
88
|
"lineHeight": 24,
|
|
@@ -546,7 +546,7 @@ exports[`Test Banner Components Banner Snapshot 1`] = `
|
|
|
546
546
|
"fontFamily": "Titillium Sans Pro",
|
|
547
547
|
"fontSize": 16,
|
|
548
548
|
"fontStyle": "normal",
|
|
549
|
-
"fontWeight": "
|
|
549
|
+
"fontWeight": "600",
|
|
550
550
|
"lineHeight": undefined,
|
|
551
551
|
},
|
|
552
552
|
{
|
|
@@ -238,7 +238,7 @@ export const ButtonLink = React.forwardRef<View, ButtonLinkProps>(
|
|
|
238
238
|
accessibilityElementsHidden
|
|
239
239
|
importantForAccessibility="no-hide-descendants"
|
|
240
240
|
font={isExperimental ? "Titillio" : "TitilliumSansPro"}
|
|
241
|
-
weight={
|
|
241
|
+
weight={"Semibold"}
|
|
242
242
|
size={buttonTextFontSize}
|
|
243
243
|
style={
|
|
244
244
|
disabled
|
|
@@ -375,7 +375,7 @@ export const ButtonOutline = React.forwardRef<View, ButtonOutline>(
|
|
|
375
375
|
)}
|
|
376
376
|
<AnimatedIOText
|
|
377
377
|
font={isExperimental ? "Titillio" : "TitilliumSansPro"}
|
|
378
|
-
weight={
|
|
378
|
+
weight={"Semibold"}
|
|
379
379
|
size={buttonTextFontSize}
|
|
380
380
|
accessible={false}
|
|
381
381
|
accessibilityElementsHidden
|
|
@@ -805,7 +805,7 @@ exports[`Test Buttons Components ButtonLink Snapshot 1`] = `
|
|
|
805
805
|
"fontFamily": "Titillium Sans Pro",
|
|
806
806
|
"fontSize": 16,
|
|
807
807
|
"fontStyle": "normal",
|
|
808
|
-
"fontWeight": "
|
|
808
|
+
"fontWeight": "600",
|
|
809
809
|
"lineHeight": undefined,
|
|
810
810
|
},
|
|
811
811
|
{
|
|
@@ -911,7 +911,7 @@ exports[`Test Buttons Components ButtonOutline Snapshot 1`] = `
|
|
|
911
911
|
"fontFamily": "Titillium Sans Pro",
|
|
912
912
|
"fontSize": 16,
|
|
913
913
|
"fontStyle": "normal",
|
|
914
|
-
"fontWeight": "
|
|
914
|
+
"fontWeight": "600",
|
|
915
915
|
"lineHeight": undefined,
|
|
916
916
|
},
|
|
917
917
|
[
|
|
@@ -1031,7 +1031,7 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
1031
1031
|
"fontFamily": "Titillium Sans Pro",
|
|
1032
1032
|
"fontSize": 16,
|
|
1033
1033
|
"fontStyle": "normal",
|
|
1034
|
-
"fontWeight": "
|
|
1034
|
+
"fontWeight": "600",
|
|
1035
1035
|
"lineHeight": 20,
|
|
1036
1036
|
},
|
|
1037
1037
|
{
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from "react";
|
|
2
2
|
import { GestureResponderEvent, View } from "react-native";
|
|
3
3
|
import {
|
|
4
|
-
|
|
4
|
+
BodySmall,
|
|
5
5
|
HSpacer,
|
|
6
6
|
IOIconSizeScale,
|
|
7
7
|
IOIcons,
|
|
8
8
|
IOPictogramSizeScale,
|
|
9
9
|
IOPictograms,
|
|
10
10
|
Icon,
|
|
11
|
-
Label,
|
|
12
11
|
Pictogram,
|
|
13
12
|
VSpacer
|
|
14
13
|
} from "../../components";
|
|
@@ -44,9 +43,9 @@ const DEFAULT_PICTOGRAM_SIZE: IOPictogramSizeScale = 48;
|
|
|
44
43
|
const renderNode = (body: FeatureInfoProps["body"]) => {
|
|
45
44
|
if (typeof body === "string") {
|
|
46
45
|
return (
|
|
47
|
-
<
|
|
46
|
+
<BodySmall color="grey-700" testID="infoScreenBody">
|
|
48
47
|
{body}
|
|
49
|
-
</
|
|
48
|
+
</BodySmall>
|
|
50
49
|
);
|
|
51
50
|
}
|
|
52
51
|
|
|
@@ -75,7 +74,8 @@ export const FeatureInfo = ({
|
|
|
75
74
|
This verbose code could be deleted once we got "gap"
|
|
76
75
|
property support */}
|
|
77
76
|
{body && <VSpacer size={4} />}
|
|
78
|
-
<
|
|
77
|
+
<BodySmall
|
|
78
|
+
weight="Semibold"
|
|
79
79
|
asLink
|
|
80
80
|
onPress={action.onPress}
|
|
81
81
|
accessible
|
|
@@ -83,7 +83,7 @@ export const FeatureInfo = ({
|
|
|
83
83
|
accessibilityElementsHidden={false}
|
|
84
84
|
>
|
|
85
85
|
{action.label}
|
|
86
|
-
</
|
|
86
|
+
</BodySmall>
|
|
87
87
|
</>
|
|
88
88
|
)}
|
|
89
89
|
</View>
|
package/src/components/index.tsx
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import { AnimatedCheckbox } from "../checkbox/AnimatedCheckbox";
|
|
25
25
|
import { IOIcons, Icon } from "../icons";
|
|
26
26
|
import { HSpacer, VSpacer } from "../spacer";
|
|
27
|
-
import { H6,
|
|
27
|
+
import { H6, BodySmall } from "../typography";
|
|
28
28
|
|
|
29
29
|
type Props = {
|
|
30
30
|
value: string;
|
|
@@ -188,9 +188,9 @@ export const ListItemCheckbox = ({
|
|
|
188
188
|
<VSpacer
|
|
189
189
|
size={IOSelectionListItemVisualParams.descriptionMargin}
|
|
190
190
|
/>
|
|
191
|
-
<
|
|
191
|
+
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
192
192
|
{description}
|
|
193
|
-
</
|
|
193
|
+
</BodySmall>
|
|
194
194
|
</View>
|
|
195
195
|
)}
|
|
196
196
|
</Animated.View>
|
|
@@ -12,7 +12,7 @@ import { ButtonLink, IconButton } from "../buttons";
|
|
|
12
12
|
import { LogoPaymentWithFallback } from "../common/LogoPaymentWithFallback";
|
|
13
13
|
import { IOIconSizeScale, IOIcons, Icon } from "../icons";
|
|
14
14
|
import { IOLogoPaymentType } from "../logos";
|
|
15
|
-
import { H6,
|
|
15
|
+
import { H6, BodySmall } from "../typography";
|
|
16
16
|
|
|
17
17
|
type ButtonLinkActionProps = {
|
|
18
18
|
type: "buttonLink";
|
|
@@ -84,9 +84,9 @@ export const ListItemInfo = ({
|
|
|
84
84
|
const itemInfoTextComponent = useMemo(
|
|
85
85
|
() => (
|
|
86
86
|
<View accessible={Platform.OS === "ios"}>
|
|
87
|
-
<
|
|
87
|
+
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
88
88
|
{label}
|
|
89
|
-
</
|
|
89
|
+
</BodySmall>
|
|
90
90
|
{typeof value === "string" ? (
|
|
91
91
|
<H6 color={theme["textBody-default"]} numberOfLines={numberOfLines}>
|
|
92
92
|
{value}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "../../core";
|
|
23
23
|
import { WithTestID } from "../../utils/types";
|
|
24
24
|
import { IOIcons, Icon } from "../icons";
|
|
25
|
-
import {
|
|
25
|
+
import { BodySmall, H6 } from "../typography";
|
|
26
26
|
|
|
27
27
|
export type ListItemInfoCopy = WithTestID<{
|
|
28
28
|
label: string;
|
|
@@ -69,9 +69,9 @@ export const ListItemInfoCopy = ({
|
|
|
69
69
|
|
|
70
70
|
const listItemInfoCopyContent = (
|
|
71
71
|
<>
|
|
72
|
-
<
|
|
72
|
+
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
73
73
|
{label}
|
|
74
|
-
</
|
|
74
|
+
</BodySmall>
|
|
75
75
|
{/* Let developer using a custom component (e.g: skeleton) */}
|
|
76
76
|
{typeof value === "string" ? (
|
|
77
77
|
<H6 color={foregroundColor} numberOfLines={numberOfLines}>
|
|
@@ -33,7 +33,7 @@ import { Badge } from "../badge";
|
|
|
33
33
|
import { IOIcons, Icon } from "../icons";
|
|
34
34
|
import { LoadingSpinner } from "../loadingSpinner";
|
|
35
35
|
import { HSpacer, VSpacer } from "../spacer";
|
|
36
|
-
import { Caption, H6,
|
|
36
|
+
import { Caption, H6, BodySmall } from "../typography";
|
|
37
37
|
|
|
38
38
|
type ListItemTopElementProps =
|
|
39
39
|
| {
|
|
@@ -161,9 +161,9 @@ export const ListItemNav = ({
|
|
|
161
161
|
{description && (
|
|
162
162
|
<>
|
|
163
163
|
{typeof description === "string" ? (
|
|
164
|
-
<
|
|
164
|
+
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
165
165
|
{description}
|
|
166
|
-
</
|
|
166
|
+
</BodySmall>
|
|
167
167
|
) : (
|
|
168
168
|
description
|
|
169
169
|
)}
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "../../core";
|
|
23
23
|
import { WithTestID } from "../../utils/types";
|
|
24
24
|
import { Icon } from "../icons";
|
|
25
|
-
import { H6,
|
|
25
|
+
import { H6, BodySmall } from "../typography";
|
|
26
26
|
|
|
27
27
|
export type ListItemNavAlert = WithTestID<{
|
|
28
28
|
value: string | React.ReactNode;
|
|
@@ -82,9 +82,9 @@ export const ListItemNavAlert = ({
|
|
|
82
82
|
{description && (
|
|
83
83
|
<>
|
|
84
84
|
{typeof description === "string" ? (
|
|
85
|
-
<
|
|
85
|
+
<BodySmall weight="Semibold" color={theme.errorText}>
|
|
86
86
|
{description}
|
|
87
|
-
</
|
|
87
|
+
</BodySmall>
|
|
88
88
|
) : (
|
|
89
89
|
description
|
|
90
90
|
)}
|
|
@@ -27,7 +27,7 @@ import { IOIcons, Icon } from "../icons";
|
|
|
27
27
|
import { IOLogoPaymentType, LogoPayment } from "../logos";
|
|
28
28
|
import { AnimatedRadio } from "../radio/AnimatedRadio";
|
|
29
29
|
import { HSpacer, VSpacer } from "../spacer";
|
|
30
|
-
import { H6,
|
|
30
|
+
import { H6, BodySmall } from "../typography";
|
|
31
31
|
|
|
32
32
|
type ListItemRadioGraphicProps =
|
|
33
33
|
| { icon?: never; paymentLogo: IOLogoPaymentType; uri?: never }
|
|
@@ -287,9 +287,9 @@ export const ListItemRadio = ({
|
|
|
287
287
|
<VSpacer
|
|
288
288
|
size={IOSelectionListItemVisualParams.descriptionMargin}
|
|
289
289
|
/>
|
|
290
|
-
<
|
|
290
|
+
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
291
291
|
{description}
|
|
292
|
-
</
|
|
292
|
+
</BodySmall>
|
|
293
293
|
</View>
|
|
294
294
|
)}
|
|
295
295
|
</Animated.View>
|