@pagopa/io-app-design-system 1.0.0-9 → 1.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/README.md +39 -4
- package/lib/commonjs/components/Advice/Advice.js +5 -7
- package/lib/commonjs/components/Advice/Advice.js.map +1 -1
- package/lib/commonjs/components/Advice/__test__/advice.test.js +2 -2
- package/lib/commonjs/components/Advice/__test__/advice.test.js.map +1 -1
- package/lib/commonjs/components/accordion/RawAccordion.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/badge.test.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js +4 -5
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButton.js +0 -2
- package/lib/commonjs/components/buttons/IconButton.js.map +1 -1
- package/lib/commonjs/components/buttons/IconButtonContained.js +131 -0
- package/lib/commonjs/components/buttons/IconButtonContained.js.map +1 -0
- package/lib/commonjs/components/buttons/IconButtonSolid.js +109 -0
- package/lib/commonjs/components/buttons/IconButtonSolid.js.map +1 -0
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +370 -0
- package/lib/commonjs/components/buttons/__test__/button.test.js +27 -0
- package/lib/commonjs/components/buttons/__test__/button.test.js.map +1 -1
- package/lib/commonjs/components/buttons/index.js +30 -8
- package/lib/commonjs/components/buttons/index.js.map +1 -1
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js +1 -1
- package/lib/commonjs/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/commonjs/components/icons/index.js +0 -18
- package/lib/commonjs/components/icons/index.js.map +1 -1
- package/lib/commonjs/components/index.js +72 -72
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/layout/GradientBottomActions.js +90 -0
- package/lib/commonjs/components/layout/GradientBottomActions.js.map +1 -0
- package/lib/commonjs/components/layout/GradientScrollView.js +111 -0
- package/lib/commonjs/components/layout/GradientScrollView.js.map +1 -0
- package/lib/commonjs/components/layout/HeaderFirstLevel.js +62 -0
- package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -0
- package/lib/commonjs/components/layout/index.js +17 -0
- package/lib/commonjs/components/layout/index.js.map +1 -0
- package/lib/commonjs/components/listitems/ListItemCheckbox.js +135 -0
- package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -0
- package/lib/commonjs/components/listitems/ListItemInfo.js +3 -6
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -4
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +136 -0
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -0
- package/lib/commonjs/components/listitems/ListItemSwitch.js +82 -0
- package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -0
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -14
- package/lib/commonjs/components/listitems/index.js +33 -0
- package/lib/commonjs/components/listitems/index.js.map +1 -1
- package/lib/commonjs/components/logos/svg/LogoPaymentExtMaestro.js +3 -19
- package/lib/commonjs/components/logos/svg/LogoPaymentExtMaestro.js.map +1 -1
- package/lib/commonjs/components/logos/svg/LogoPaymentExtMastercard.js +5 -21
- package/lib/commonjs/components/logos/svg/LogoPaymentExtMastercard.js.map +1 -1
- package/lib/commonjs/components/logos/svg/LogoPaymentExtPayPal.js +9 -28
- package/lib/commonjs/components/logos/svg/LogoPaymentExtPayPal.js.map +1 -1
- package/lib/commonjs/components/logos/svg/LogoPaymentMaestro.js +8 -18
- package/lib/commonjs/components/logos/svg/LogoPaymentMaestro.js.map +1 -1
- package/lib/commonjs/components/logos/svg/LogoPaymentMastercard.js +7 -17
- package/lib/commonjs/components/logos/svg/LogoPaymentMastercard.js.map +1 -1
- package/lib/commonjs/components/logos/svg/LogoPaymentPayPal.js +5 -5
- package/lib/commonjs/components/logos/svg/LogoPaymentPayPal.js.map +1 -1
- package/lib/commonjs/components/radio/AnimatedRadio.js +1 -1
- package/lib/commonjs/components/radio/AnimatedRadio.js.map +1 -1
- package/lib/commonjs/components/radio/RadioGroup.js +36 -0
- package/lib/commonjs/components/radio/RadioGroup.js.map +1 -0
- package/lib/commonjs/components/radio/index.js +11 -0
- package/lib/commonjs/components/radio/index.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +20 -49
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/Link.js +17 -23
- package/lib/commonjs/components/typography/Link.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -45
- package/lib/commonjs/core/IOColors.js +1 -1
- package/lib/commonjs/core/IOColors.js.map +1 -1
- package/lib/commonjs/core/IOSpacing.js +1 -1
- package/lib/commonjs/core/IOSpacing.js.map +1 -1
- package/lib/commonjs/core/IOStyles.js +7 -1
- package/lib/commonjs/core/IOStyles.js.map +1 -1
- package/lib/commonjs/index.js +11 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/json-import.d.js +2 -0
- package/lib/commonjs/json-import.d.js.map +1 -0
- package/lib/module/components/Advice/Advice.js +4 -6
- package/lib/module/components/Advice/Advice.js.map +1 -1
- package/lib/module/components/Advice/__test__/advice.test.js +1 -1
- package/lib/module/components/Advice/__test__/advice.test.js.map +1 -1
- package/lib/module/components/accordion/RawAccordion.js +1 -1
- package/lib/module/components/accordion/RawAccordion.js.map +1 -1
- package/lib/module/components/badge/__test__/badge.test.js.map +1 -1
- package/lib/module/components/buttons/ButtonLink.js +4 -5
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/IconButton.js +0 -2
- package/lib/module/components/buttons/IconButton.js.map +1 -1
- package/lib/module/components/buttons/IconButtonContained.js +122 -0
- package/lib/module/components/buttons/IconButtonContained.js.map +1 -0
- package/lib/module/components/buttons/IconButtonSolid.js +100 -0
- package/lib/module/components/buttons/IconButtonSolid.js.map +1 -0
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +370 -0
- package/lib/module/components/buttons/__test__/button.test.js +27 -0
- package/lib/module/components/buttons/__test__/button.test.js.map +1 -1
- package/lib/module/components/buttons/index.js +4 -2
- package/lib/module/components/buttons/index.js.map +1 -1
- package/lib/module/components/checkbox/AnimatedCheckbox.js +3 -3
- package/lib/module/components/checkbox/AnimatedCheckbox.js.map +1 -1
- package/lib/module/components/icons/index.js +0 -1
- package/lib/module/components/icons/index.js.map +1 -1
- package/lib/module/components/index.js +13 -13
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/layout/GradientBottomActions.js +79 -0
- package/lib/module/components/layout/GradientBottomActions.js.map +1 -0
- package/lib/module/components/layout/GradientScrollView.js +100 -0
- package/lib/module/components/layout/GradientScrollView.js.map +1 -0
- package/lib/module/components/layout/HeaderFirstLevel.js +52 -0
- package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -0
- package/lib/module/components/layout/index.js +2 -0
- package/lib/module/components/layout/index.js.map +1 -0
- package/lib/module/components/listitems/ListItemCheckbox.js +126 -0
- package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -0
- package/lib/module/components/listitems/ListItemInfo.js +3 -6
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +1 -4
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +127 -0
- package/lib/module/components/listitems/ListItemRadio.js.map +1 -0
- package/lib/module/components/listitems/ListItemSwitch.js +74 -0
- package/lib/module/components/listitems/ListItemSwitch.js.map +1 -0
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -14
- package/lib/module/components/listitems/index.js +3 -0
- package/lib/module/components/listitems/index.js.map +1 -1
- package/lib/module/components/logos/svg/LogoPaymentExtMaestro.js +3 -19
- package/lib/module/components/logos/svg/LogoPaymentExtMaestro.js.map +1 -1
- package/lib/module/components/logos/svg/LogoPaymentExtMastercard.js +5 -21
- package/lib/module/components/logos/svg/LogoPaymentExtMastercard.js.map +1 -1
- package/lib/module/components/logos/svg/LogoPaymentExtPayPal.js +10 -29
- package/lib/module/components/logos/svg/LogoPaymentExtPayPal.js.map +1 -1
- package/lib/module/components/logos/svg/LogoPaymentMaestro.js +9 -19
- package/lib/module/components/logos/svg/LogoPaymentMaestro.js.map +1 -1
- package/lib/module/components/logos/svg/LogoPaymentMastercard.js +8 -18
- package/lib/module/components/logos/svg/LogoPaymentMastercard.js.map +1 -1
- package/lib/module/components/logos/svg/LogoPaymentPayPal.js +5 -5
- package/lib/module/components/logos/svg/LogoPaymentPayPal.js.map +1 -1
- package/lib/module/components/radio/AnimatedRadio.js +3 -3
- package/lib/module/components/radio/AnimatedRadio.js.map +1 -1
- package/lib/module/components/radio/RadioGroup.js +28 -0
- package/lib/module/components/radio/RadioGroup.js.map +1 -0
- package/lib/module/components/radio/index.js +1 -0
- package/lib/module/components/radio/index.js.map +1 -1
- package/lib/module/components/typography/H3.js +19 -47
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/Link.js +17 -23
- package/lib/module/components/typography/Link.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -45
- package/lib/module/core/IOColors.js +1 -1
- package/lib/module/core/IOColors.js.map +1 -1
- package/lib/module/core/IOSpacing.js +1 -1
- package/lib/module/core/IOSpacing.js.map +1 -1
- package/lib/module/core/IOStyles.js +5 -0
- package/lib/module/core/IOStyles.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/json-import.d.js +2 -0
- package/lib/module/json-import.d.js.map +1 -0
- package/lib/typescript/components/Advice/Advice.d.ts +7 -3
- package/lib/typescript/components/Advice/Advice.d.ts.map +1 -1
- package/lib/typescript/components/accordion/RawAccordion.d.ts +2 -2
- package/lib/typescript/components/accordion/RawAccordion.d.ts.map +1 -1
- package/lib/typescript/components/buttons/ButtonLink.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButton.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IconButtonContained.d.ts +15 -0
- package/lib/typescript/components/buttons/IconButtonContained.d.ts.map +1 -0
- package/lib/typescript/components/buttons/IconButtonSolid.d.ts +15 -0
- package/lib/typescript/components/buttons/IconButtonSolid.d.ts.map +1 -0
- package/lib/typescript/components/buttons/index.d.ts +4 -2
- package/lib/typescript/components/buttons/index.d.ts.map +1 -1
- package/lib/typescript/components/checkbox/AnimatedCheckbox.d.ts.map +1 -1
- package/lib/typescript/components/icons/index.d.ts +0 -1
- package/lib/typescript/components/icons/index.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +13 -13
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/layout/GradientBottomActions.d.ts +22 -0
- package/lib/typescript/components/layout/GradientBottomActions.d.ts.map +1 -0
- package/lib/typescript/components/layout/GradientScrollView.d.ts +14 -0
- package/lib/typescript/components/layout/GradientScrollView.d.ts.map +1 -0
- package/lib/typescript/components/layout/HeaderFirstLevel.d.ts +11 -0
- package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -0
- package/lib/typescript/components/layout/index.d.ts +2 -0
- package/lib/typescript/components/layout/index.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemCheckbox.d.ts +21 -0
- package/lib/typescript/components/listitems/ListItemCheckbox.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfoCopy.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadio.d.ts +22 -0
- package/lib/typescript/components/listitems/ListItemRadio.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts +18 -0
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -0
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/listitems/index.d.ts +3 -0
- package/lib/typescript/components/listitems/index.d.ts.map +1 -1
- package/lib/typescript/components/logos/svg/LogoPaymentExtMaestro.d.ts.map +1 -1
- package/lib/typescript/components/logos/svg/LogoPaymentExtMastercard.d.ts +2 -2
- package/lib/typescript/components/logos/svg/LogoPaymentExtMastercard.d.ts.map +1 -1
- package/lib/typescript/components/logos/svg/LogoPaymentExtPayPal.d.ts.map +1 -1
- package/lib/typescript/components/logos/svg/LogoPaymentMaestro.d.ts.map +1 -1
- package/lib/typescript/components/logos/svg/LogoPaymentMastercard.d.ts.map +1 -1
- package/lib/typescript/components/radio/AnimatedRadio.d.ts.map +1 -1
- package/lib/typescript/components/radio/RadioGroup.d.ts +22 -0
- package/lib/typescript/components/radio/RadioGroup.d.ts.map +1 -0
- package/lib/typescript/components/radio/index.d.ts +1 -0
- package/lib/typescript/components/radio/index.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +11 -30
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/Link.d.ts +4 -4
- package/lib/typescript/components/typography/Link.d.ts.map +1 -1
- package/lib/typescript/core/IOColors.d.ts +2 -1
- package/lib/typescript/core/IOColors.d.ts.map +1 -1
- package/lib/typescript/core/IOSpacing.d.ts +1 -1
- package/lib/typescript/core/IOSpacing.d.ts.map +1 -1
- package/lib/typescript/core/IOStyles.d.ts +6 -2
- package/lib/typescript/core/IOStyles.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +9 -5
- package/src/components/Advice/Advice.tsx +19 -23
- package/src/components/Advice/__test__/advice.test.tsx +4 -2
- package/src/components/accordion/RawAccordion.tsx +6 -6
- package/src/components/badge/__test__/badge.test.tsx +4 -2
- package/src/components/buttons/ButtonLink.tsx +177 -177
- package/src/components/buttons/IconButton.tsx +9 -6
- package/src/components/buttons/IconButtonContained.tsx +201 -0
- package/src/components/buttons/IconButtonSolid.tsx +168 -0
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +370 -0
- package/src/components/buttons/__test__/button.test.tsx +59 -4
- package/src/components/buttons/index.tsx +5 -3
- package/src/components/checkbox/AnimatedCheckbox.tsx +6 -8
- package/src/components/icons/index.tsx +1 -2
- package/src/components/index.tsx +13 -13
- package/src/components/layout/GradientBottomActions.tsx +119 -0
- package/src/components/layout/GradientScrollView.tsx +167 -0
- package/src/components/layout/HeaderFirstLevel.tsx +76 -0
- package/src/components/layout/index.tsx +1 -0
- package/src/components/listitems/ListItemCheckbox.tsx +182 -0
- package/src/components/listitems/ListItemInfo.tsx +53 -58
- package/src/components/listitems/ListItemInfoCopy.tsx +122 -127
- package/src/components/listitems/ListItemRadio.tsx +185 -0
- package/src/components/listitems/ListItemSwitch.tsx +109 -0
- package/src/components/listitems/ListItemTransaction.tsx +154 -150
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +0 -14
- package/src/components/listitems/index.tsx +3 -0
- package/src/components/logos/svg/LogoPaymentExtMaestro.tsx +3 -20
- package/src/components/logos/svg/LogoPaymentExtMastercard.tsx +5 -22
- package/src/components/logos/svg/LogoPaymentExtPayPal.tsx +9 -31
- package/src/components/logos/svg/LogoPaymentMaestro.tsx +8 -6
- package/src/components/logos/svg/LogoPaymentMastercard.tsx +8 -6
- package/src/components/logos/svg/LogoPaymentPayPal.tsx +5 -5
- package/src/components/radio/AnimatedRadio.tsx +6 -8
- package/src/components/radio/RadioGroup.tsx +43 -0
- package/src/components/radio/index.tsx +1 -0
- package/src/components/typography/H3.tsx +25 -91
- package/src/components/typography/Link.tsx +23 -30
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +50 -45
- package/src/core/IOColors.ts +2 -2
- package/src/core/IOSpacing.ts +2 -2
- package/src/core/IOStyles.ts +9 -0
- package/src/index.tsx +1 -0
- package/src/json-import.d.ts +13 -0
|
@@ -461,3 +461,373 @@ exports[`Test Buttons Components ButtonSolid Snapshot 1`] = `
|
|
|
461
461
|
</View>
|
|
462
462
|
</View>
|
|
463
463
|
`;
|
|
464
|
+
|
|
465
|
+
exports[`Test Buttons Components IconButton Snapshot 1`] = `
|
|
466
|
+
<View
|
|
467
|
+
accessibilityLabel="accessibilityLabel"
|
|
468
|
+
accessibilityRole="button"
|
|
469
|
+
accessibilityState={
|
|
470
|
+
{
|
|
471
|
+
"busy": undefined,
|
|
472
|
+
"checked": undefined,
|
|
473
|
+
"disabled": false,
|
|
474
|
+
"expanded": undefined,
|
|
475
|
+
"selected": undefined,
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
accessibilityValue={
|
|
479
|
+
{
|
|
480
|
+
"max": undefined,
|
|
481
|
+
"min": undefined,
|
|
482
|
+
"now": undefined,
|
|
483
|
+
"text": undefined,
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
accessible={true}
|
|
487
|
+
collapsable={false}
|
|
488
|
+
focusable={true}
|
|
489
|
+
hitSlop={8}
|
|
490
|
+
onBlur={[Function]}
|
|
491
|
+
onClick={[Function]}
|
|
492
|
+
onFocus={[Function]}
|
|
493
|
+
onResponderGrant={[Function]}
|
|
494
|
+
onResponderMove={[Function]}
|
|
495
|
+
onResponderRelease={[Function]}
|
|
496
|
+
onResponderTerminate={[Function]}
|
|
497
|
+
onResponderTerminationRequest={[Function]}
|
|
498
|
+
onStartShouldSetResponder={[Function]}
|
|
499
|
+
style={
|
|
500
|
+
{
|
|
501
|
+
"alignSelf": "flex-start",
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
>
|
|
505
|
+
<View
|
|
506
|
+
style={
|
|
507
|
+
[
|
|
508
|
+
{
|
|
509
|
+
"height": 24,
|
|
510
|
+
"width": 24,
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"transform": [
|
|
514
|
+
{
|
|
515
|
+
"scale": undefined,
|
|
516
|
+
},
|
|
517
|
+
],
|
|
518
|
+
},
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
>
|
|
522
|
+
<RNSVGSvgView
|
|
523
|
+
accessibilityElementsHidden={true}
|
|
524
|
+
accessibilityLabel=""
|
|
525
|
+
accessible={false}
|
|
526
|
+
align="xMidYMid"
|
|
527
|
+
animatedProps={
|
|
528
|
+
{
|
|
529
|
+
"color": undefined,
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
bbHeight={24}
|
|
533
|
+
bbWidth={24}
|
|
534
|
+
color={4278927075}
|
|
535
|
+
focusable={false}
|
|
536
|
+
height={24}
|
|
537
|
+
importantForAccessibility="no-hide-descendants"
|
|
538
|
+
meetOrSlice={0}
|
|
539
|
+
minX={0}
|
|
540
|
+
minY={0}
|
|
541
|
+
style={
|
|
542
|
+
[
|
|
543
|
+
{
|
|
544
|
+
"backgroundColor": "transparent",
|
|
545
|
+
"borderWidth": 0,
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"color": "#0B3EE3",
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"flex": 0,
|
|
552
|
+
"height": 24,
|
|
553
|
+
"width": 24,
|
|
554
|
+
},
|
|
555
|
+
]
|
|
556
|
+
}
|
|
557
|
+
tintColor={4278927075}
|
|
558
|
+
vbHeight={24}
|
|
559
|
+
vbWidth={24}
|
|
560
|
+
width={24}
|
|
561
|
+
>
|
|
562
|
+
<RNSVGGroup>
|
|
563
|
+
<RNSVGPath
|
|
564
|
+
clipRule={0}
|
|
565
|
+
d="M12 24c6.629 0 12-5.371 12-12S18.629 0 12 0C5.375 0 0 5.371 0 12s5.375 12 12 12Zm.033-10.97c-.997 0-1.818-.336-2.463-1.014-.646-.674-.968-1.51-.968-2.507 0-1.001.322-1.83.964-2.492.64-.662 1.458-.992 2.458-.992.997 0 1.81.334 2.435 1.017.625.678.94 1.51.94 2.511 0 .993-.315 1.822-.94 2.484-.625.657-1.43.992-2.426.992Zm-3.431 4.905c0-1.001.322-1.83.96-2.492.64-.662 1.458-.992 2.467-.992.996 0 1.809.335 2.43 1.017.625.682.94 1.515.94 2.512l-6.797-.045Z"
|
|
566
|
+
fill={
|
|
567
|
+
[
|
|
568
|
+
2,
|
|
569
|
+
]
|
|
570
|
+
}
|
|
571
|
+
fillRule={0}
|
|
572
|
+
propList={
|
|
573
|
+
[
|
|
574
|
+
"fill",
|
|
575
|
+
"fillRule",
|
|
576
|
+
]
|
|
577
|
+
}
|
|
578
|
+
/>
|
|
579
|
+
</RNSVGGroup>
|
|
580
|
+
</RNSVGSvgView>
|
|
581
|
+
</View>
|
|
582
|
+
</View>
|
|
583
|
+
`;
|
|
584
|
+
|
|
585
|
+
exports[`Test Buttons Components IconButtonContained Snapshot 1`] = `
|
|
586
|
+
<View
|
|
587
|
+
accessibilityLabel="accessibilityLabel"
|
|
588
|
+
accessibilityRole="button"
|
|
589
|
+
accessibilityState={
|
|
590
|
+
{
|
|
591
|
+
"busy": undefined,
|
|
592
|
+
"checked": undefined,
|
|
593
|
+
"disabled": false,
|
|
594
|
+
"expanded": undefined,
|
|
595
|
+
"selected": undefined,
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
accessibilityValue={
|
|
599
|
+
{
|
|
600
|
+
"max": undefined,
|
|
601
|
+
"min": undefined,
|
|
602
|
+
"now": undefined,
|
|
603
|
+
"text": undefined,
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
accessible={true}
|
|
607
|
+
collapsable={false}
|
|
608
|
+
focusable={true}
|
|
609
|
+
onBlur={[Function]}
|
|
610
|
+
onClick={[Function]}
|
|
611
|
+
onFocus={[Function]}
|
|
612
|
+
onResponderGrant={[Function]}
|
|
613
|
+
onResponderMove={[Function]}
|
|
614
|
+
onResponderRelease={[Function]}
|
|
615
|
+
onResponderTerminate={[Function]}
|
|
616
|
+
onResponderTerminationRequest={[Function]}
|
|
617
|
+
onStartShouldSetResponder={[Function]}
|
|
618
|
+
style={
|
|
619
|
+
{
|
|
620
|
+
"alignSelf": "flex-start",
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
>
|
|
624
|
+
<View
|
|
625
|
+
style={
|
|
626
|
+
[
|
|
627
|
+
{
|
|
628
|
+
"alignItems": "center",
|
|
629
|
+
"elevation": 0,
|
|
630
|
+
"justifyContent": "center",
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
"borderRadius": 48,
|
|
634
|
+
"height": 48,
|
|
635
|
+
"width": 48,
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
"backgroundColor": undefined,
|
|
639
|
+
"transform": [
|
|
640
|
+
{
|
|
641
|
+
"scale": undefined,
|
|
642
|
+
},
|
|
643
|
+
],
|
|
644
|
+
},
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
>
|
|
648
|
+
<RNSVGSvgView
|
|
649
|
+
accessibilityElementsHidden={true}
|
|
650
|
+
accessibilityLabel=""
|
|
651
|
+
accessible={false}
|
|
652
|
+
align="xMidYMid"
|
|
653
|
+
animatedProps={
|
|
654
|
+
{
|
|
655
|
+
"color": undefined,
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
bbHeight={24}
|
|
659
|
+
bbWidth={24}
|
|
660
|
+
color={4278927075}
|
|
661
|
+
focusable={false}
|
|
662
|
+
height={24}
|
|
663
|
+
importantForAccessibility="no-hide-descendants"
|
|
664
|
+
meetOrSlice={0}
|
|
665
|
+
minX={0}
|
|
666
|
+
minY={0}
|
|
667
|
+
style={
|
|
668
|
+
[
|
|
669
|
+
{
|
|
670
|
+
"backgroundColor": "transparent",
|
|
671
|
+
"borderWidth": 0,
|
|
672
|
+
},
|
|
673
|
+
{
|
|
674
|
+
"color": "#0B3EE3",
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"flex": 0,
|
|
678
|
+
"height": 24,
|
|
679
|
+
"width": 24,
|
|
680
|
+
},
|
|
681
|
+
]
|
|
682
|
+
}
|
|
683
|
+
tintColor={4278927075}
|
|
684
|
+
vbHeight={24}
|
|
685
|
+
vbWidth={24}
|
|
686
|
+
width={24}
|
|
687
|
+
>
|
|
688
|
+
<RNSVGGroup>
|
|
689
|
+
<RNSVGPath
|
|
690
|
+
clipRule={0}
|
|
691
|
+
d="M12 24c6.629 0 12-5.371 12-12S18.629 0 12 0C5.375 0 0 5.371 0 12s5.375 12 12 12Zm.033-10.97c-.997 0-1.818-.336-2.463-1.014-.646-.674-.968-1.51-.968-2.507 0-1.001.322-1.83.964-2.492.64-.662 1.458-.992 2.458-.992.997 0 1.81.334 2.435 1.017.625.678.94 1.51.94 2.511 0 .993-.315 1.822-.94 2.484-.625.657-1.43.992-2.426.992Zm-3.431 4.905c0-1.001.322-1.83.96-2.492.64-.662 1.458-.992 2.467-.992.996 0 1.809.335 2.43 1.017.625.682.94 1.515.94 2.512l-6.797-.045Z"
|
|
692
|
+
fill={
|
|
693
|
+
[
|
|
694
|
+
2,
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
fillRule={0}
|
|
698
|
+
propList={
|
|
699
|
+
[
|
|
700
|
+
"fill",
|
|
701
|
+
"fillRule",
|
|
702
|
+
]
|
|
703
|
+
}
|
|
704
|
+
/>
|
|
705
|
+
</RNSVGGroup>
|
|
706
|
+
</RNSVGSvgView>
|
|
707
|
+
</View>
|
|
708
|
+
</View>
|
|
709
|
+
`;
|
|
710
|
+
|
|
711
|
+
exports[`Test Buttons Components IconButtonSolid Snapshot 1`] = `
|
|
712
|
+
<View
|
|
713
|
+
accessibilityLabel="accessibilityLabel"
|
|
714
|
+
accessibilityRole="button"
|
|
715
|
+
accessibilityState={
|
|
716
|
+
{
|
|
717
|
+
"busy": undefined,
|
|
718
|
+
"checked": undefined,
|
|
719
|
+
"disabled": false,
|
|
720
|
+
"expanded": undefined,
|
|
721
|
+
"selected": undefined,
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
accessibilityValue={
|
|
725
|
+
{
|
|
726
|
+
"max": undefined,
|
|
727
|
+
"min": undefined,
|
|
728
|
+
"now": undefined,
|
|
729
|
+
"text": undefined,
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
accessible={true}
|
|
733
|
+
collapsable={false}
|
|
734
|
+
focusable={true}
|
|
735
|
+
onBlur={[Function]}
|
|
736
|
+
onClick={[Function]}
|
|
737
|
+
onFocus={[Function]}
|
|
738
|
+
onResponderGrant={[Function]}
|
|
739
|
+
onResponderMove={[Function]}
|
|
740
|
+
onResponderRelease={[Function]}
|
|
741
|
+
onResponderTerminate={[Function]}
|
|
742
|
+
onResponderTerminationRequest={[Function]}
|
|
743
|
+
onStartShouldSetResponder={[Function]}
|
|
744
|
+
style={
|
|
745
|
+
{
|
|
746
|
+
"alignSelf": "flex-start",
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
>
|
|
750
|
+
<View
|
|
751
|
+
style={
|
|
752
|
+
[
|
|
753
|
+
{
|
|
754
|
+
"alignItems": "center",
|
|
755
|
+
"elevation": 0,
|
|
756
|
+
"justifyContent": "center",
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"borderRadius": 56,
|
|
760
|
+
"height": 56,
|
|
761
|
+
"width": 56,
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"backgroundColor": undefined,
|
|
765
|
+
"transform": [
|
|
766
|
+
{
|
|
767
|
+
"scale": undefined,
|
|
768
|
+
},
|
|
769
|
+
],
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"backgroundColor": "#0B3EE3",
|
|
773
|
+
},
|
|
774
|
+
]
|
|
775
|
+
}
|
|
776
|
+
>
|
|
777
|
+
<RNSVGSvgView
|
|
778
|
+
accessibilityElementsHidden={true}
|
|
779
|
+
accessibilityLabel=""
|
|
780
|
+
accessible={false}
|
|
781
|
+
align="xMidYMid"
|
|
782
|
+
bbHeight={24}
|
|
783
|
+
bbWidth={24}
|
|
784
|
+
color={4294967295}
|
|
785
|
+
focusable={false}
|
|
786
|
+
height={24}
|
|
787
|
+
importantForAccessibility="no-hide-descendants"
|
|
788
|
+
meetOrSlice={0}
|
|
789
|
+
minX={0}
|
|
790
|
+
minY={0}
|
|
791
|
+
style={
|
|
792
|
+
[
|
|
793
|
+
{
|
|
794
|
+
"backgroundColor": "transparent",
|
|
795
|
+
"borderWidth": 0,
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"color": "#FFFFFF",
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"flex": 0,
|
|
802
|
+
"height": 24,
|
|
803
|
+
"width": 24,
|
|
804
|
+
},
|
|
805
|
+
]
|
|
806
|
+
}
|
|
807
|
+
tintColor={4294967295}
|
|
808
|
+
vbHeight={24}
|
|
809
|
+
vbWidth={24}
|
|
810
|
+
width={24}
|
|
811
|
+
>
|
|
812
|
+
<RNSVGGroup>
|
|
813
|
+
<RNSVGPath
|
|
814
|
+
clipRule={0}
|
|
815
|
+
d="M12 24c6.629 0 12-5.371 12-12S18.629 0 12 0C5.375 0 0 5.371 0 12s5.375 12 12 12Zm.033-10.97c-.997 0-1.818-.336-2.463-1.014-.646-.674-.968-1.51-.968-2.507 0-1.001.322-1.83.964-2.492.64-.662 1.458-.992 2.458-.992.997 0 1.81.334 2.435 1.017.625.678.94 1.51.94 2.511 0 .993-.315 1.822-.94 2.484-.625.657-1.43.992-2.426.992Zm-3.431 4.905c0-1.001.322-1.83.96-2.492.64-.662 1.458-.992 2.467-.992.996 0 1.809.335 2.43 1.017.625.682.94 1.515.94 2.512l-6.797-.045Z"
|
|
816
|
+
fill={
|
|
817
|
+
[
|
|
818
|
+
2,
|
|
819
|
+
]
|
|
820
|
+
}
|
|
821
|
+
fillRule={0}
|
|
822
|
+
propList={
|
|
823
|
+
[
|
|
824
|
+
"fill",
|
|
825
|
+
"fillRule",
|
|
826
|
+
]
|
|
827
|
+
}
|
|
828
|
+
/>
|
|
829
|
+
</RNSVGGroup>
|
|
830
|
+
</RNSVGSvgView>
|
|
831
|
+
</View>
|
|
832
|
+
</View>
|
|
833
|
+
`;
|
|
@@ -5,6 +5,9 @@ import ButtonExtendedOutline from "../ButtonExtendedOutline";
|
|
|
5
5
|
import ButtonLink from "../ButtonLink";
|
|
6
6
|
import ButtonOutline from "../ButtonOutline";
|
|
7
7
|
import ButtonSolid from "../ButtonSolid";
|
|
8
|
+
import IconButton from "../IconButton";
|
|
9
|
+
import IconButtonContained from "../IconButtonContained";
|
|
10
|
+
import IconButtonSolid from "../IconButtonSolid";
|
|
8
11
|
|
|
9
12
|
const onButtonPress = () => {
|
|
10
13
|
Alert.alert("Alert", "Action triggered");
|
|
@@ -12,22 +15,74 @@ const onButtonPress = () => {
|
|
|
12
15
|
|
|
13
16
|
describe("Test Buttons Components", () => {
|
|
14
17
|
it("ButtonSolid Snapshot", () => {
|
|
15
|
-
const buttonSolid = TestRenderer.create(
|
|
18
|
+
const buttonSolid = TestRenderer.create(
|
|
19
|
+
<ButtonSolid
|
|
20
|
+
label={"label"}
|
|
21
|
+
accessibilityLabel={"accessibilityLabel"}
|
|
22
|
+
onPress={onButtonPress}
|
|
23
|
+
></ButtonSolid>
|
|
24
|
+
).toJSON();
|
|
16
25
|
expect(buttonSolid).toMatchSnapshot();
|
|
17
26
|
});
|
|
18
27
|
|
|
19
28
|
it("ButtonLink Snapshot", () => {
|
|
20
|
-
const buttonLink = TestRenderer.create(
|
|
29
|
+
const buttonLink = TestRenderer.create(
|
|
30
|
+
<ButtonLink label={"label"} onPress={onButtonPress}></ButtonLink>
|
|
31
|
+
).toJSON();
|
|
21
32
|
expect(buttonLink).toMatchSnapshot();
|
|
22
33
|
});
|
|
23
34
|
|
|
24
35
|
it("ButtonOutline Snapshot", () => {
|
|
25
|
-
const buttonOutline = TestRenderer.create(
|
|
36
|
+
const buttonOutline = TestRenderer.create(
|
|
37
|
+
<ButtonOutline
|
|
38
|
+
label={"label"}
|
|
39
|
+
accessibilityLabel={"accessibilityLabel"}
|
|
40
|
+
onPress={onButtonPress}
|
|
41
|
+
></ButtonOutline>
|
|
42
|
+
).toJSON();
|
|
26
43
|
expect(buttonOutline).toMatchSnapshot();
|
|
27
44
|
});
|
|
28
45
|
|
|
29
46
|
it("ButtonExtendedOutline Snapshot", () => {
|
|
30
|
-
const buttonExtendedOutline = TestRenderer.create(
|
|
47
|
+
const buttonExtendedOutline = TestRenderer.create(
|
|
48
|
+
<ButtonExtendedOutline
|
|
49
|
+
label={"label"}
|
|
50
|
+
onPress={onButtonPress}
|
|
51
|
+
></ButtonExtendedOutline>
|
|
52
|
+
).toJSON();
|
|
31
53
|
expect(buttonExtendedOutline).toMatchSnapshot();
|
|
32
54
|
});
|
|
55
|
+
|
|
56
|
+
it("IconButtonSolid Snapshot", () => {
|
|
57
|
+
const iconButtonSolid = TestRenderer.create(
|
|
58
|
+
<IconButtonSolid
|
|
59
|
+
onPress={onButtonPress}
|
|
60
|
+
icon={"spid"}
|
|
61
|
+
accessibilityLabel={"accessibilityLabel"}
|
|
62
|
+
></IconButtonSolid>
|
|
63
|
+
).toJSON();
|
|
64
|
+
expect(iconButtonSolid).toMatchSnapshot();
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("IconButton Snapshot", () => {
|
|
68
|
+
const iconButton = TestRenderer.create(
|
|
69
|
+
<IconButton
|
|
70
|
+
onPress={onButtonPress}
|
|
71
|
+
icon={"spid"}
|
|
72
|
+
accessibilityLabel={"accessibilityLabel"}
|
|
73
|
+
></IconButton>
|
|
74
|
+
).toJSON();
|
|
75
|
+
expect(iconButton).toMatchSnapshot();
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
it("IconButtonContained Snapshot", () => {
|
|
79
|
+
const iconButtonContained = TestRenderer.create(
|
|
80
|
+
<IconButtonContained
|
|
81
|
+
onPress={onButtonPress}
|
|
82
|
+
icon={"spid"}
|
|
83
|
+
accessibilityLabel={"accessibilityLabel"}
|
|
84
|
+
></IconButtonContained>
|
|
85
|
+
).toJSON();
|
|
86
|
+
expect(iconButtonContained).toMatchSnapshot();
|
|
87
|
+
});
|
|
33
88
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./ButtonExtendedOutline";
|
|
2
2
|
export * from "./ButtonLink";
|
|
3
3
|
export * from "./ButtonOutline";
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
4
|
+
export * from "./ButtonSolid";
|
|
5
|
+
export * from "./IconButtonContained";
|
|
6
|
+
export * from "./IconButtonSolid";
|
|
7
|
+
export * from "./IconButton";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { Pressable, PressableProps, StyleSheet, View } from "react-native";
|
|
3
3
|
import Animated, {
|
|
4
|
-
|
|
5
|
-
useAnimatedStyle,
|
|
4
|
+
Easing,
|
|
6
5
|
interpolate,
|
|
6
|
+
useAnimatedStyle,
|
|
7
|
+
useSharedValue,
|
|
7
8
|
withSpring,
|
|
8
|
-
withTiming
|
|
9
|
-
Easing
|
|
9
|
+
withTiming
|
|
10
10
|
} from "react-native-reanimated";
|
|
11
|
-
import { IOSelectionTickVisualParams } from "../../core/IOStyles";
|
|
12
11
|
import { IOSpringValues } from "../../core/IOAnimations";
|
|
13
12
|
import { IOColors } from "../../core/IOColors";
|
|
13
|
+
import { IOSelectionTickVisualParams } from "../../core/IOStyles";
|
|
14
14
|
import { AnimatedTick } from "../common/AnimatedTick";
|
|
15
15
|
|
|
16
16
|
type Props = {
|
|
@@ -85,7 +85,6 @@ export const AnimatedCheckbox = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
85
85
|
onPress={onPress}
|
|
86
86
|
style={styles.checkBoxWrapper}
|
|
87
87
|
>
|
|
88
|
-
{/* ◀ REMOVE_LEGACY_COMPONENT: Remove the following conditions */}
|
|
89
88
|
<View
|
|
90
89
|
style={[
|
|
91
90
|
styles.checkboxBorder,
|
|
@@ -105,7 +104,6 @@ export const AnimatedCheckbox = ({ checked, onPress, disabled }: OwnProps) => {
|
|
|
105
104
|
animatedCheckboxSquare
|
|
106
105
|
]}
|
|
107
106
|
/>
|
|
108
|
-
{/* REMOVE_LEGACY_COMPONENT: End ▶ */}
|
|
109
107
|
{isChecked && (
|
|
110
108
|
<AnimatedTick
|
|
111
109
|
progress={tickAnimationProgress}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from "./Icon";
|
|
2
|
-
export { Icon, AnimatedIcon } from "../icons/Icon";
|
|
1
|
+
export * from "./Icon";
|
package/src/components/index.tsx
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export * from "./pictograms";
|
|
2
|
-
export * from "./icons";
|
|
3
|
-
export * from "./checkbox";
|
|
4
|
-
export * from "./radio";
|
|
5
|
-
export * from "./switch";
|
|
6
|
-
export * from "./spacer/Spacer";
|
|
7
|
-
export * from "./divider/Divider";
|
|
8
|
-
export * from "./contentWrapper/ContentWrapper";
|
|
9
|
-
export * from "./typography";
|
|
10
|
-
export * from "./spacer";
|
|
11
|
-
export * from "./avatar";
|
|
12
1
|
export * from "./accordion";
|
|
2
|
+
export * from "./alert";
|
|
3
|
+
export * from "./avatar";
|
|
13
4
|
export * from "./badge";
|
|
5
|
+
export * from "./banner";
|
|
14
6
|
export * from "./buttons";
|
|
7
|
+
export * from "./checkbox";
|
|
8
|
+
export * from "./contentWrapper";
|
|
9
|
+
export * from "./divider";
|
|
10
|
+
export * from "./icons";
|
|
15
11
|
export * from "./listitems";
|
|
12
|
+
export * from "./logos";
|
|
13
|
+
export * from "./pictograms";
|
|
14
|
+
export * from "./radio";
|
|
15
|
+
export * from "./spacer";
|
|
16
|
+
export * from "./switch";
|
|
16
17
|
export * from "./tag";
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./logos";
|
|
18
|
+
export * from "./typography";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { View, StyleSheet, ViewStyle, StyleProp } from "react-native";
|
|
3
|
+
import LinearGradient from "react-native-linear-gradient";
|
|
4
|
+
import Animated from "react-native-reanimated";
|
|
5
|
+
import { WithTestID } from "../../utils/types";
|
|
6
|
+
import { IOColors, hexToRgba, IOSpacer, IOVisualCostants } from "../../core";
|
|
7
|
+
import { VSpacer } from "../spacer";
|
|
8
|
+
|
|
9
|
+
export type GradientBottomActions = WithTestID<{
|
|
10
|
+
transitionAnimStyle: Animated.AnimateStyle<StyleProp<ViewStyle>>;
|
|
11
|
+
dimensions: GradientBottomActionsDimensions;
|
|
12
|
+
// Accepted components: ButtonSolid, ButtonLink
|
|
13
|
+
// Don't use any components other than this, please.
|
|
14
|
+
primaryAction?: React.ReactNode;
|
|
15
|
+
secondaryAction?: React.ReactNode;
|
|
16
|
+
// Debug mode
|
|
17
|
+
debugMode?: boolean;
|
|
18
|
+
}>;
|
|
19
|
+
|
|
20
|
+
type GradientBottomActionsDimensions = {
|
|
21
|
+
bottomMargin: number;
|
|
22
|
+
extraBottomMargin: number;
|
|
23
|
+
gradientAreaHeight: number;
|
|
24
|
+
spaceBetweenActions: IOSpacer;
|
|
25
|
+
safeBackgroundHeight: number;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Background color should be app main background (both light and dark themes)
|
|
29
|
+
const HEADER_BG_COLOR: IOColors = "white";
|
|
30
|
+
|
|
31
|
+
const styles = StyleSheet.create({
|
|
32
|
+
buttonContainer: {
|
|
33
|
+
paddingHorizontal: IOVisualCostants.appMarginDefault,
|
|
34
|
+
width: "100%",
|
|
35
|
+
flex: 1,
|
|
36
|
+
flexShrink: 0,
|
|
37
|
+
justifyContent: "flex-end"
|
|
38
|
+
},
|
|
39
|
+
gradientContainer: {
|
|
40
|
+
...StyleSheet.absoluteFillObject
|
|
41
|
+
},
|
|
42
|
+
safeBackgroundBlock: {
|
|
43
|
+
position: "absolute",
|
|
44
|
+
bottom: 0,
|
|
45
|
+
left: 0,
|
|
46
|
+
right: 0,
|
|
47
|
+
backgroundColor: IOColors[HEADER_BG_COLOR]
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const GradientBottomActions = ({
|
|
52
|
+
primaryAction,
|
|
53
|
+
secondaryAction,
|
|
54
|
+
dimensions,
|
|
55
|
+
transitionAnimStyle,
|
|
56
|
+
debugMode,
|
|
57
|
+
testID
|
|
58
|
+
}: GradientBottomActions) => (
|
|
59
|
+
<View
|
|
60
|
+
style={{
|
|
61
|
+
width: "100%",
|
|
62
|
+
position: "absolute",
|
|
63
|
+
bottom: 0,
|
|
64
|
+
height: dimensions.gradientAreaHeight,
|
|
65
|
+
paddingBottom: dimensions.bottomMargin
|
|
66
|
+
}}
|
|
67
|
+
testID={testID}
|
|
68
|
+
pointerEvents="box-none"
|
|
69
|
+
>
|
|
70
|
+
<Animated.View
|
|
71
|
+
style={[
|
|
72
|
+
styles.gradientContainer,
|
|
73
|
+
debugMode && {
|
|
74
|
+
borderTopColor: IOColors["error-500"],
|
|
75
|
+
borderTopWidth: 1,
|
|
76
|
+
backgroundColor: hexToRgba(IOColors["error-500"], 0.5)
|
|
77
|
+
},
|
|
78
|
+
transitionAnimStyle
|
|
79
|
+
]}
|
|
80
|
+
pointerEvents="none"
|
|
81
|
+
>
|
|
82
|
+
<LinearGradient
|
|
83
|
+
style={{ height: dimensions.gradientAreaHeight }}
|
|
84
|
+
// 100% opacity bg color fills at least 50% of the area
|
|
85
|
+
locations={[0, 0.5]}
|
|
86
|
+
colors={[
|
|
87
|
+
hexToRgba(IOColors[HEADER_BG_COLOR], 0),
|
|
88
|
+
IOColors[HEADER_BG_COLOR]
|
|
89
|
+
]}
|
|
90
|
+
/>
|
|
91
|
+
</Animated.View>
|
|
92
|
+
|
|
93
|
+
<View
|
|
94
|
+
style={[
|
|
95
|
+
styles.safeBackgroundBlock,
|
|
96
|
+
{
|
|
97
|
+
height: dimensions.safeBackgroundHeight
|
|
98
|
+
}
|
|
99
|
+
]}
|
|
100
|
+
/>
|
|
101
|
+
<View style={styles.buttonContainer} pointerEvents="box-none">
|
|
102
|
+
{primaryAction}
|
|
103
|
+
|
|
104
|
+
{secondaryAction && (
|
|
105
|
+
<View
|
|
106
|
+
style={{
|
|
107
|
+
alignSelf: "center",
|
|
108
|
+
marginBottom: dimensions.extraBottomMargin
|
|
109
|
+
}}
|
|
110
|
+
>
|
|
111
|
+
<VSpacer size={dimensions.spaceBetweenActions} />
|
|
112
|
+
{secondaryAction}
|
|
113
|
+
</View>
|
|
114
|
+
)}
|
|
115
|
+
</View>
|
|
116
|
+
</View>
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
export default GradientBottomActions;
|