@pagopa/io-app-design-system 5.11.1 → 5.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/lib/commonjs/components/layout/index.js +0 -22
  2. package/lib/commonjs/components/layout/index.js.map +1 -1
  3. package/lib/commonjs/components/typography/BodySmall.js +3 -1
  4. package/lib/commonjs/components/typography/BodySmall.js.map +1 -1
  5. package/lib/module/components/layout/index.js +0 -2
  6. package/lib/module/components/layout/index.js.map +1 -1
  7. package/lib/module/components/typography/BodySmall.js +3 -1
  8. package/lib/module/components/typography/BodySmall.js.map +1 -1
  9. package/lib/typescript/components/layout/index.d.ts +0 -2
  10. package/lib/typescript/components/layout/index.d.ts.map +1 -1
  11. package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -1
  12. package/package.json +1 -1
  13. package/src/components/layout/index.tsx +0 -2
  14. package/src/components/typography/BodySmall.tsx +7 -2
  15. package/lib/commonjs/components/layout/GradientBottomActions.js +0 -121
  16. package/lib/commonjs/components/layout/GradientBottomActions.js.map +0 -1
  17. package/lib/commonjs/components/layout/GradientScrollView.js +0 -116
  18. package/lib/commonjs/components/layout/GradientScrollView.js.map +0 -1
  19. package/lib/module/components/layout/GradientBottomActions.js +0 -114
  20. package/lib/module/components/layout/GradientBottomActions.js.map +0 -1
  21. package/lib/module/components/layout/GradientScrollView.js +0 -109
  22. package/lib/module/components/layout/GradientScrollView.js.map +0 -1
  23. package/lib/typescript/components/layout/GradientBottomActions.d.ts +0 -33
  24. package/lib/typescript/components/layout/GradientBottomActions.d.ts.map +0 -1
  25. package/lib/typescript/components/layout/GradientScrollView.d.ts +0 -19
  26. package/lib/typescript/components/layout/GradientScrollView.d.ts.map +0 -1
  27. package/src/components/layout/GradientBottomActions.tsx +0 -143
  28. package/src/components/layout/GradientScrollView.tsx +0 -173
@@ -47,28 +47,6 @@ Object.keys(_FooterActionsInline).forEach(function (key) {
47
47
  }
48
48
  });
49
49
  });
50
- var _GradientBottomActions = require("./GradientBottomActions");
51
- Object.keys(_GradientBottomActions).forEach(function (key) {
52
- if (key === "default" || key === "__esModule") return;
53
- if (key in exports && exports[key] === _GradientBottomActions[key]) return;
54
- Object.defineProperty(exports, key, {
55
- enumerable: true,
56
- get: function () {
57
- return _GradientBottomActions[key];
58
- }
59
- });
60
- });
61
- var _GradientScrollView = require("./GradientScrollView");
62
- Object.keys(_GradientScrollView).forEach(function (key) {
63
- if (key === "default" || key === "__esModule") return;
64
- if (key in exports && exports[key] === _GradientScrollView[key]) return;
65
- Object.defineProperty(exports, key, {
66
- enumerable: true,
67
- get: function () {
68
- return _GradientScrollView[key];
69
- }
70
- });
71
- });
72
50
  var _hooks = require("./hooks");
73
51
  Object.keys(_hooks).forEach(function (key) {
74
52
  if (key === "default" || key === "__esModule") return;
@@ -1 +1 @@
1
- {"version":3,"names":["_ContentWrapper","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Divider","_FooterActions","_FooterActionsInline","_GradientBottomActions","_GradientScrollView","_hooks","_Spacer","_Stack"],"sourceRoot":"../../../../src","sources":["components/layout/index.tsx"],"mappings":";;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,eAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,QAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,QAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,O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,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAY,MAAA,CAAAZ,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,MAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_ContentWrapper","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Divider","_FooterActions","_FooterActionsInline","_hooks","_Spacer","_Stack"],"sourceRoot":"../../../../src","sources":["components/layout/index.tsx"],"mappings":";;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,eAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,QAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,QAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,QAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,QAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,cAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,C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,CAAAT,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,OAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,MAAA,GAAAd,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAY,MAAA,EAAAX,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAU,MAAA,CAAAV,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAM,MAAA,CAAAV,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -20,6 +20,7 @@ const BodySmall = exports.BodySmall = /*#__PURE__*/(0, _react.forwardRef)(({
20
20
  weight: customWeight,
21
21
  color: customColor,
22
22
  asLink,
23
+ avoidPressable,
23
24
  accessibilityRole = "link",
24
25
  textStyle: customTextStyle,
25
26
  onPress,
@@ -45,7 +46,7 @@ const BodySmall = exports.BodySmall = /*#__PURE__*/(0, _react.forwardRef)(({
45
46
  }
46
47
  } : {})
47
48
  };
48
- if (asLink) {
49
+ if (asLink && !avoidPressable) {
49
50
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
50
51
  onPress: onPress,
51
52
  ref: ref,
@@ -59,6 +60,7 @@ const BodySmall = exports.BodySmall = /*#__PURE__*/(0, _react.forwardRef)(({
59
60
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_IOText.IOText, {
60
61
  ref: ref,
61
62
  ...BodySmallProps,
63
+ onPress: asLink && avoidPressable ? onPress : undefined,
62
64
  children: props.children
63
65
  });
64
66
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_context","_IOText","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","fontName","legacyFontName","BodySmall","exports","forwardRef","weight","customWeight","color","customColor","asLink","accessibilityRole","textStyle","customTextStyle","onPress","props","ref","theme","useIOTheme","newTypefaceEnabled","useIONewTypeface","defaultColor","BodySmallProps","dynamicTypeRamp","font","size","lineHeight","textDecorationLine","jsx","Pressable","children","IOText"],"sourceRoot":"../../../../src","sources":["components/typography/BodySmall.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAKkB,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA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7B,WAAA,CAAA+C,GAAA,EAAClD,YAAA,CAAAmD,SAAS;MACRf,OAAO,EAAEA,OAAQ;MACjBE,GAAG,EAAEA,GAAI;MACTL,iBAAiB,EAAEA,iBAAkB;MAAAmB,QAAA,eAErC,IAAAjD,WAAA,CAAA+C,GAAA,EAAChD,OAAA,CAAAmD,MAAM;QAAA,GAAKT,cAAc;QAAAQ,QAAA,EAAGf,KAAK,CAACe;MAAQ,CAAS;IAAC,CAC5C,CAAC;EAEhB;EAEA,oBACE,IAAAjD,WAAA,CAAA+C,GAAA,EAAChD,OAAA,CAAAmD,MAAM;IAACf,GAAG,EAAEA,GAAI;IAAA,GAAKM,cAAc;IAAAQ,QAAA,EACjCf,KAAK,CAACe;EAAQ,CACT,CAAC;AAEb,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_context","_IOText","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","fontName","legacyFontName","BodySmall","exports","forwardRef","weight","customWeight","color","customColor","asLink","avoidPressable","accessibilityRole","textStyle","customTextStyle","onPress","props","ref","theme","useIOTheme","newTypefaceEnabled","useIONewTypeface","defaultColor","BodySmallProps","dynamicTypeRamp","font","size","lineHeight","textDecorationLine","jsx","Pressable","children","IOText","undefined"],"sourceRoot":"../../../../src","sources":["components/typography/BodySmall.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAKkB,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,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
5
5
  export * from "./FooterActions";
6
6
  export * from "./FooterActionsInline";
7
- export * from "./GradientBottomActions";
8
- export * from "./GradientScrollView";
9
7
  export * from "./hooks";
10
8
  export * from "./Spacer";
11
9
  export * from "./Stack";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/layout/index.tsx"],"mappings":";;AAAA,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/layout/index.tsx"],"mappings":";;AAAA,cAAc,kBAAkB;AAChC,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,uBAAuB;AACrC,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS","ignoreList":[]}
@@ -15,6 +15,7 @@ export const BodySmall = /*#__PURE__*/forwardRef(({
15
15
  weight: customWeight,
16
16
  color: customColor,
17
17
  asLink,
18
+ avoidPressable,
18
19
  accessibilityRole = "link",
19
20
  textStyle: customTextStyle,
20
21
  onPress,
@@ -40,7 +41,7 @@ export const BodySmall = /*#__PURE__*/forwardRef(({
40
41
  }
41
42
  } : {})
42
43
  };
43
- if (asLink) {
44
+ if (asLink && !avoidPressable) {
44
45
  return /*#__PURE__*/_jsx(Pressable, {
45
46
  onPress: onPress,
46
47
  ref: ref,
@@ -54,6 +55,7 @@ export const BodySmall = /*#__PURE__*/forwardRef(({
54
55
  return /*#__PURE__*/_jsx(IOText, {
55
56
  ref: ref,
56
57
  ...BodySmallProps,
58
+ onPress: asLink && avoidPressable ? onPress : undefined,
57
59
  children: props.children
58
60
  });
59
61
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","forwardRef","Pressable","useIONewTypeface","useIOTheme","IOText","jsx","_jsx","fontName","legacyFontName","BodySmall","weight","customWeight","color","customColor","asLink","accessibilityRole","textStyle","customTextStyle","onPress","props","ref","theme","newTypefaceEnabled","defaultColor","BodySmallProps","dynamicTypeRamp","font","size","lineHeight","textDecorationLine","children"],"sourceRoot":"../../../../src","sources":["components/typography/BodySmall.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO;AACvD,SAAeC,SAAS,QAAQ,cAAc;AAC9C,SAASC,gBAAgB,EAAEC,UAAU,QAAQ,eAAe;AAE5D,SACEC,MAAM,QAID,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMlB,MAAMC,QAAsB,GAAG,UAAU;AACzC,MAAMC,cAA4B,GAAG,kBAAkB;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,SAAS,gBAAGT,UAAU,CACjC,CACE;EACEU,MAAM,EAAEC,YAAY;EACpBC,KAAK,EAAEC,WAAW;EAClBC,MAAM;EACNC,iBAAiB,GAAG,MAAM;EAC1BC,SAAS,EAAEC,eAAe;EAC1BC,OAAO;EACP,GAAGC;AACL,CAAC,EACDC,GAAwB,KACrB;EACH,MAAMC,KAAK,GAAGlB,UAAU,CAAC,CAAC;EAC1B,MAAM;IAAEmB;EAAmB,CAAC,GAAGpB,gBAAgB,CAAC,CAAC;EAEjD,MAAMqB,YAAY,GAAGT,MAAM,GACvBO,KAAK,CAAC,yBAAyB,CAAC,GAChCA,KAAK,CAAC,mBAAmB,CAAC;EAE9B,MAAMG,cAA2B,GAAG;IAClC,GAAGL,KAAK;IACRM,eAAe,EAAE,UAAU,CAAC;IAC5BC,IAAI,EAAEJ,kBAAkB,GAAGf,QAAQ,GAAGC,cAAc;IACpDE,MAAM,EAAEC,YAAY,IAAI,SAAS;IACjCgB,IAAI,EAAE,EAAE;IACRC,UAAU,EAAE,EAAE;IACdhB,KAAK,EAAEC,WAAW,IAAIU,YAAY;IAClC,IAAIT,MAAM,GACN;MACEC,iBAAiB;MACjBC,SAAS,EAAEC,eAAe,IAAI;QAAEY,kBAAkB,EAAE;MAAY;IAClE,CAAC,GACD,CAAC,CAAC;EACR,CAAC;EAED,IAAIf,MAAM,EAAE;IACV,oBACER,IAAA,CAACL,SAAS;MACRiB,OAAO,EAAEA,OAAQ;MACjBE,GAAG,EAAEA,GAAI;MACTL,iBAAiB,EAAEA,iBAAkB;MAAAe,QAAA,eAErCxB,IAAA,CAACF,MAAM;QAAA,GAAKoB,cAAc;QAAAM,QAAA,EAAGX,KAAK,CAACW;MAAQ,CAAS;IAAC,CAC5C,CAAC;EAEhB;EAEA,oBACExB,IAAA,CAACF,MAAM;IAACgB,GAAG,EAAEA,GAAI;IAAA,GAAKI,cAAc;IAAAM,QAAA,EACjCX,KAAK,CAACW;EAAQ,CACT,CAAC;AAEb,CACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","forwardRef","Pressable","useIONewTypeface","useIOTheme","IOText","jsx","_jsx","fontName","legacyFontName","BodySmall","weight","customWeight","color","customColor","asLink","avoidPressable","accessibilityRole","textStyle","customTextStyle","onPress","props","ref","theme","newTypefaceEnabled","defaultColor","BodySmallProps","dynamicTypeRamp","font","size","lineHeight","textDecorationLine","children","undefined"],"sourceRoot":"../../../../src","sources":["components/typography/BodySmall.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAkBC,UAAU,QAAQ,OAAO;AACvD,SAAeC,SAAS,QAAQ,cAAc;AAC9C,SAASC,gBAAgB,EAAEC,UAAU,QAAQ,eAAe;AAE5D,SACEC,MAAM,QAID,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMlB,MAAMC,QAAsB,GAAG,UAAU;AACzC,MAAMC,cAA4B,GAAG,kBAAkB;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,SAAS,gBAAGT,UAAU,CACjC,CACE;EACEU,MAAM,EAAEC,YAAY;EACpBC,KAAK,EAAEC,WAAW;EAClBC,MAAM;EACNC,cAAc;EACdC,iBAAiB,GAAG,MAAM;EAC1BC,SAAS,EAAEC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
2
  export * from "./Divider";
3
3
  export * from "./FooterActions";
4
4
  export * from "./FooterActionsInline";
5
- export * from "./GradientBottomActions";
6
- export * from "./GradientScrollView";
7
5
  export * from "./hooks";
8
6
  export * from "./Spacer";
9
7
  export * from "./Stack";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/index.tsx"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -1 +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,EAAa,MAAM,cAAc,CAAC;AAE/C,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,6EAsDrB,CAAC"}
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,EAAa,MAAM,cAAc,CAAC;AAE/C,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,6EA2DrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-app-design-system",
3
- "version": "5.11.1",
3
+ "version": "5.11.2",
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",
@@ -2,8 +2,6 @@ export * from "./ContentWrapper";
2
2
  export * from "./Divider";
3
3
  export * from "./FooterActions";
4
4
  export * from "./FooterActionsInline";
5
- export * from "./GradientBottomActions";
6
- export * from "./GradientScrollView";
7
5
  export * from "./hooks";
8
6
  export * from "./Spacer";
9
7
  export * from "./Stack";
@@ -25,6 +25,7 @@ export const BodySmall = forwardRef<View, BodySmallProps>(
25
25
  weight: customWeight,
26
26
  color: customColor,
27
27
  asLink,
28
+ avoidPressable,
28
29
  accessibilityRole = "link",
29
30
  textStyle: customTextStyle,
30
31
  onPress,
@@ -55,7 +56,7 @@ export const BodySmall = forwardRef<View, BodySmallProps>(
55
56
  : {})
56
57
  };
57
58
 
58
- if (asLink) {
59
+ if (asLink && !avoidPressable) {
59
60
  return (
60
61
  <Pressable
61
62
  onPress={onPress}
@@ -68,7 +69,11 @@ export const BodySmall = forwardRef<View, BodySmallProps>(
68
69
  }
69
70
 
70
71
  return (
71
- <IOText ref={ref} {...BodySmallProps}>
72
+ <IOText
73
+ ref={ref}
74
+ {...BodySmallProps}
75
+ onPress={asLink && avoidPressable ? onPress : undefined}
76
+ >
72
77
  {props.children}
73
78
  </IOText>
74
79
  );
@@ -1,121 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.GradientBottomActions = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _reactNativeEasingGradient = require("react-native-easing-gradient");
10
- var _reactNativeLinearGradient = _interopRequireDefault(require("react-native-linear-gradient"));
11
- var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
12
- var _core = require("../../core");
13
- var _buttons = require("../buttons");
14
- var _Spacer = require("./Spacer");
15
- var _jsxRuntime = require("react/jsx-runtime");
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
- // Background color should be app main background (both light and dark themes)
19
- const HEADER_BG_COLOR = "white";
20
- const {
21
- colors,
22
- locations
23
- } = (0, _reactNativeEasingGradient.easeGradient)({
24
- colorStops: {
25
- 0: {
26
- color: (0, _core.hexToRgba)(_core.IOColors[HEADER_BG_COLOR], 0)
27
- },
28
- 1: {
29
- color: _core.IOColors[HEADER_BG_COLOR]
30
- }
31
- },
32
- easing: _reactNative.Easing.ease,
33
- extraColorStopsPerTransition: 20
34
- });
35
- const styles = _reactNative.StyleSheet.create({
36
- buttonContainer: {
37
- paddingHorizontal: _core.IOVisualCostants.appMarginDefault,
38
- width: "100%",
39
- flex: 1,
40
- flexShrink: 0,
41
- justifyContent: "flex-end"
42
- },
43
- gradientContainer: {
44
- ..._reactNative.StyleSheet.absoluteFillObject
45
- },
46
- safeBackgroundBlock: {
47
- position: "absolute",
48
- bottom: 0,
49
- left: 0,
50
- right: 0,
51
- backgroundColor: _core.IOColors[HEADER_BG_COLOR]
52
- }
53
- });
54
-
55
- /**
56
- * @deprecated This component has been included in the new `IOScrollView` after a proper refactor. It will be removed in a future release.
57
- * @see IOScrollView
58
- */
59
- const GradientBottomActions = ({
60
- primaryActionProps,
61
- secondaryActionProps,
62
- dimensions,
63
- transitionAnimStyle,
64
- debugMode,
65
- testID
66
- }) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
67
- style: {
68
- width: "100%",
69
- position: "absolute",
70
- bottom: 0,
71
- height: dimensions.gradientAreaHeight,
72
- paddingBottom: dimensions.bottomMargin
73
- },
74
- testID: testID,
75
- pointerEvents: "box-none",
76
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
77
- style: [styles.gradientContainer, debugMode && {
78
- borderTopColor: _core.IOColors["error-500"],
79
- borderTopWidth: 1,
80
- backgroundColor: (0, _core.hexToRgba)(_core.IOColors["error-500"], 0.5)
81
- }, transitionAnimStyle],
82
- pointerEvents: "none",
83
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeLinearGradient.default, {
84
- style: {
85
- height: dimensions.gradientAreaHeight * 0.55
86
- },
87
- locations: locations,
88
- colors: colors
89
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
90
- style: {
91
- bottom: 0,
92
- height: dimensions.gradientAreaHeight * 0.45,
93
- backgroundColor: _core.IOColors[HEADER_BG_COLOR]
94
- }
95
- })]
96
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
97
- style: [styles.safeBackgroundBlock, {
98
- height: dimensions.safeBackgroundHeight
99
- }]
100
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
101
- style: styles.buttonContainer,
102
- pointerEvents: "box-none",
103
- children: [primaryActionProps && /*#__PURE__*/(0, _jsxRuntime.jsx)(_buttons.IOButton, {
104
- ...primaryActionProps,
105
- fullWidth: true
106
- }), secondaryActionProps && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
107
- style: {
108
- alignSelf: "center",
109
- marginBottom: dimensions.extraBottomMargin
110
- },
111
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Spacer.VSpacer, {
112
- size: dimensions.spaceBetweenActions
113
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_buttons.IOButton, {
114
- ...secondaryActionProps
115
- })]
116
- })]
117
- })]
118
- });
119
- exports.GradientBottomActions = GradientBottomActions;
120
- var _default = exports.default = GradientBottomActions;
121
- //# sourceMappingURL=GradientBottomActions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeEasingGradient","_reactNativeLinearGradient","_interopRequireDefault","_reactNativeReanimated","_core","_buttons","_Spacer","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","HEADER_BG_COLOR","colors","locations","easeGradient","colorStops","color","hexToRgba","IOColors","easing","Easing","ease","extraColorStopsPerTransition","styles","StyleSheet","create","buttonContainer","paddingHorizontal","IOVisualCostants","appMarginDefault","width","flex","flexShrink","justifyContent","gradientContainer","absoluteFillObject","safeBackgroundBlock","position","bottom","left","right","backgroundColor","GradientBottomActions","primaryActionProps","secondaryActionProps","dimensions","transitionAnimStyle","debugMode","testID","jsxs","View","style","height","gradientAreaHeight","paddingBottom","bottomMargin","pointerEvents","children","borderTopColor","borderTopWidth","jsx","safeBackgroundHeight","IOButton","fullWidth","alignSelf","marginBottom","extraBottomMargin","VSpacer","size","spaceBetweenActions","exports","_default"],"sourceRoot":"../../../../src","sources":["components/layout/GradientBottomActions.tsx"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,0BAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAD,sBAAA,CAAAJ,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAEA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AAAmC,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAI,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAf,uBAAA,YAAAA,CAAAW,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAA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CAAAqE,GAAA,EAAC7E,YAAA,CAAAmE,IAAI;IACHC,KAAK,EAAE,CACL5B,MAAM,CAACa,mBAAmB,EAC1B;MACEgB,MAAM,EAAEP,UAAU,CAACgB;IACrB,CAAC;EACD,CACH,CAAC,eACF,IAAAtE,WAAA,CAAA0D,IAAA,EAAClE,YAAA,CAAAmE,IAAI;IAACC,KAAK,EAAE5B,MAAM,CAACG,eAAgB;IAAC8B,aAAa,EAAC,UAAU;IAAAC,QAAA,GAC1Dd,kBAAkB,iBAAI,IAAApD,WAAA,CAAAqE,GAAA,EAACvE,QAAA,CAAAyE,QAAQ;MAAA,GAAKnB,kBAAkB;MAAEoB,SAAS;IAAA,CAAE,CAAC,EAEpEnB,oBAAoB,iBACnB,IAAArD,WAAA,CAAA0D,IAAA,EAAClE,YAAA,CAAAmE,IAAI;MACHC,KAAK,EAAE;QACLa,SAAS,EAAE,QAAQ;QACnBC,YAAY,EAAEpB,UAAU,CAACqB;MAC3B,CAAE;MAAAT,QAAA,gBAEF,IAAAlE,WAAA,CAAAqE,GAAA,EAACtE,OAAA,CAAA6E,OAAO;QAACC,IAAI,EAAEvB,UAAU,CAACwB;MAAoB,CAAE,CAAC,eACjD,IAAA9E,WAAA,CAAAqE,GAAA,EAACvE,QAAA,CAAAyE,QAAQ;QAAA,GAAKlB;MAAoB,CAAG,CAAC;IAAA,CAClC,CACP;EAAA,CACG,CAAC;AAAA,CACH,CACP;AAAC0B,OAAA,CAAA5B,qBAAA,GAAAA,qBAAA;AAAA,IAAA6B,QAAA,GAAAD,OAAA,CAAA5E,OAAA,GAEagD,qBAAqB","ignoreList":[]}
@@ -1,116 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.gradientSafeArea = exports.default = exports.GradientScrollView = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var React = _react;
9
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
10
- var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
11
- var _core = require("../../core");
12
- var _GradientBottomActions = _interopRequireDefault(require("./GradientBottomActions"));
13
- var _jsxRuntime = require("react/jsx-runtime");
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
- // Extended gradient area above the actions
17
- const gradientSafeArea = exports.gradientSafeArea = 96;
18
- // End content margin before the actions
19
- const contentEndMargin = 32;
20
- // Margin between primary action and secondary one
21
- const spaceBetweenActions = 24;
22
- // Estimated height of the secondary action
23
- const secondaryActionEstHeight = 20;
24
- // Extra bottom margin for iPhone bottom handle
25
- const extraSafeAreaMargin = 8;
26
-
27
- /**
28
- * @deprecated This component has been deprecated. It will be removed in a future release.
29
- * @see IOScrollView
30
- */
31
- const GradientScrollView = ({
32
- children,
33
- primaryActionProps: primaryActionProps,
34
- secondaryActionProps: secondaryActionProps,
35
- // Don't include safe area insets
36
- excludeSafeAreaMargins = false,
37
- debugMode = false,
38
- testID
39
- }) => {
40
- const gradientOpacity = (0, _reactNativeReanimated.useSharedValue)(1);
41
- const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
42
-
43
- /* Check if the iPhone bottom handle is present.
44
- If not, or if you don't need safe area insets,
45
- add a default margin to prevent the button
46
- from sticking to the bottom. */
47
- const bottomMargin = (0, _react.useMemo)(() => insets.bottom === 0 || excludeSafeAreaMargins ? _core.IOVisualCostants.appMarginDefault : insets.bottom, [insets, excludeSafeAreaMargins]);
48
-
49
- /* When the secondary action is visible, add extra margin
50
- to avoid little space from iPhone bottom handle */
51
- const extraBottomMargin = (0, _react.useMemo)(() => secondaryActionProps && insets.bottom !== 0 ? extraSafeAreaMargin : 0, [insets.bottom, secondaryActionProps]);
52
-
53
- /* Total height of actions */
54
- const actionsArea = (0, _react.useMemo)(() => primaryActionProps && secondaryActionProps ? _core.buttonSolidHeight + spaceBetweenActions + secondaryActionEstHeight + extraBottomMargin : _core.buttonSolidHeight, [extraBottomMargin, primaryActionProps, secondaryActionProps]);
55
-
56
- /* Total height of "Actions + Gradient" area */
57
- const gradientAreaHeight = (0, _react.useMemo)(() => bottomMargin + actionsArea + gradientSafeArea, [actionsArea, bottomMargin]);
58
-
59
- /* Height of the safe bottom area, applied to the ScrollView:
60
- Actions + Content end margin */
61
- const safeBottomAreaHeight = (0, _react.useMemo)(() => bottomMargin + actionsArea + contentEndMargin, [actionsArea, bottomMargin]);
62
- {
63
- /* Safe background block. It's added because when
64
- you swipe up quickly, the content below is visible
65
- for about 100ms. Without this block, the content
66
- appears glitchy. */
67
- }
68
- const safeBackgroundHeight = (0, _react.useMemo)(() => secondaryActionProps ? spaceBetweenActions + secondaryActionEstHeight + extraBottomMargin + bottomMargin : bottomMargin, [bottomMargin, extraBottomMargin, secondaryActionProps]);
69
- const handleScroll = (0, _reactNativeReanimated.useAnimatedScrollHandler)(({
70
- contentOffset,
71
- layoutMeasurement,
72
- contentSize
73
- }) => {
74
- /* We use Math.floor because decimals used on Android
75
- devices never change the `isEndReached` boolean value.
76
- We have more consistent behavior across platforms
77
- if we round these calculations ¯\_(ツ)_/¯ */
78
- const isEndReached = Math.floor(layoutMeasurement.height + contentOffset.y) >= Math.floor(contentSize.height);
79
-
80
- // eslint-disable-next-line functional/immutable-data
81
- gradientOpacity.value = isEndReached ? 0 : 1;
82
- });
83
- const opacityTransition = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
84
- opacity: (0, _reactNativeReanimated.withTiming)(gradientOpacity.value, {
85
- duration: 200,
86
- easing: _reactNativeReanimated.Easing.ease
87
- })
88
- }));
89
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
90
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.ScrollView, {
91
- testID: testID,
92
- onScroll: handleScroll,
93
- scrollEventThrottle: 16,
94
- contentContainerStyle: {
95
- paddingHorizontal: _core.IOVisualCostants.appMarginDefault,
96
- paddingBottom: safeBottomAreaHeight
97
- },
98
- children: children
99
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GradientBottomActions.default, {
100
- debugMode: debugMode,
101
- primaryActionProps: primaryActionProps,
102
- secondaryActionProps: secondaryActionProps,
103
- transitionAnimStyle: opacityTransition,
104
- dimensions: {
105
- bottomMargin,
106
- extraBottomMargin,
107
- gradientAreaHeight,
108
- spaceBetweenActions,
109
- safeBackgroundHeight
110
- }
111
- })]
112
- });
113
- };
114
- exports.GradientScrollView = GradientScrollView;
115
- var _default = exports.default = GradientScrollView;
116
- //# sourceMappingURL=GradientScrollView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","React","_reactNativeReanimated","_reactNativeSafeAreaContext","_core","_GradientBottomActions","_interopRequireDefault","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","gradientSafeArea","exports","contentEndMargin","spaceBetweenActions","secondaryActionEstHeight","extraSafeAreaMargin","GradientScrollView","children","primaryActionProps","secondaryActionProps","excludeSafeAreaMargins","debugMode","testID","gradientOpacity","useSharedValue","insets","useSafeAreaInsets","bottomMargin","useMemo","bottom","IOVisualCostants","appMarginDefault","extraBottomMargin","actionsArea","buttonSolidHeight","gradientAreaHeight","safeBottomAreaHeight","safeBackgroundHeight","handleScroll","useAnimatedScrollHandler","contentOffset","layoutMeasurement","contentSize","isEndReached","Math","floor","height","y","value","opacityTransition","useAnimatedStyle","opacity","withTiming","duration","easing","Easing","ease","jsxs","Fragment","jsx","ScrollView","onScroll","scrollEventThrottle","contentContainerStyle","paddingHorizontal","paddingBottom","transitionAnimStyle","dimensions","_default"],"sourceRoot":"../../../../src","sources":["components/layout/GradientScrollView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,IAAAC,KAAA,GAAAH,MAAA;AAE/B,IAAAI,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAOA,IAAAG,2BAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAOA,IAAAK,sBAAA,GAAAC,sBAAA,CAAAN,OAAA;AAA4D,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAM,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAS,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK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C,iCAAU,EAAC7B,eAAe,CAACyB,KAAK,EAAE;MACzCK,QAAQ,EAAE,GAAG;MACbC,MAAM,EAAEC,6BAAM,CAACC;IACjB,CAAC;EACH,CAAC,CAAC,CAAC;EAEH,oBACE,IAAAlE,WAAA,CAAAmE,IAAA,EAAAnE,WAAA,CAAAoE,QAAA;IAAAzC,QAAA,gBACE,IAAA3B,WAAA,CAAAqE,GAAA,EAAC1E,sBAAA,CAAAQ,OAAQ,CAACmE,UAAU;MAClBtC,MAAM,EAAEA,MAAO;MACfuC,QAAQ,EAAEvB,YAAa;MACvBwB,mBAAmB,EAAE,EAAG;MACxBC,qBAAqB,EAAE;QACrBC,iBAAiB,EAAElC,sBAAgB,CAACC,gBAAgB;QACpDkC,aAAa,EAAE7B;MACjB,CAAE;MAAAnB,QAAA,EAEDA;IAAQ,CACU,CAAC,eACtB,IAAA3B,WAAA,CAAAqE,GAAA,EAACvE,sBAAA,CAAAK,OAAqB;MACpB4B,SAAS,EAAEA,SAAU;MACrBH,kBAAkB,EAAEA,kBAAmB;MACvCC,oBAAoB,EAAEA,oBAAqB;MAC3C+C,mBAAmB,EAAEjB,iBAAkB;MACvCkB,UAAU,EAAE;QACVxC,YAAY;QACZK,iBAAiB;QACjBG,kBAAkB;QAClBtB,mBAAmB;QACnBwB;MACF;IAAE,CACH,CAAC;EAAA,CACF,CAAC;AAEP,CAAC;AAAC1B,OAAA,CAAAK,kBAAA,GAAAA,kBAAA;AAAA,IAAAoD,QAAA,GAAAzD,OAAA,CAAAlB,OAAA,GAEauB,kBAAkB","ignoreList":[]}
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- import * as React from "react";
4
- import { Easing, StyleSheet, View } from "react-native";
5
- import { easeGradient } from "react-native-easing-gradient";
6
- import LinearGradient from "react-native-linear-gradient";
7
- import Animated from "react-native-reanimated";
8
- import { IOColors, IOVisualCostants, hexToRgba } from "../../core";
9
- import { IOButton } from "../buttons";
10
- import { VSpacer } from "./Spacer";
11
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- // Background color should be app main background (both light and dark themes)
13
- const HEADER_BG_COLOR = "white";
14
- const {
15
- colors,
16
- locations
17
- } = easeGradient({
18
- colorStops: {
19
- 0: {
20
- color: hexToRgba(IOColors[HEADER_BG_COLOR], 0)
21
- },
22
- 1: {
23
- color: IOColors[HEADER_BG_COLOR]
24
- }
25
- },
26
- easing: Easing.ease,
27
- extraColorStopsPerTransition: 20
28
- });
29
- const styles = StyleSheet.create({
30
- buttonContainer: {
31
- paddingHorizontal: IOVisualCostants.appMarginDefault,
32
- width: "100%",
33
- flex: 1,
34
- flexShrink: 0,
35
- justifyContent: "flex-end"
36
- },
37
- gradientContainer: {
38
- ...StyleSheet.absoluteFillObject
39
- },
40
- safeBackgroundBlock: {
41
- position: "absolute",
42
- bottom: 0,
43
- left: 0,
44
- right: 0,
45
- backgroundColor: IOColors[HEADER_BG_COLOR]
46
- }
47
- });
48
-
49
- /**
50
- * @deprecated This component has been included in the new `IOScrollView` after a proper refactor. It will be removed in a future release.
51
- * @see IOScrollView
52
- */
53
- export const GradientBottomActions = ({
54
- primaryActionProps,
55
- secondaryActionProps,
56
- dimensions,
57
- transitionAnimStyle,
58
- debugMode,
59
- testID
60
- }) => /*#__PURE__*/_jsxs(View, {
61
- style: {
62
- width: "100%",
63
- position: "absolute",
64
- bottom: 0,
65
- height: dimensions.gradientAreaHeight,
66
- paddingBottom: dimensions.bottomMargin
67
- },
68
- testID: testID,
69
- pointerEvents: "box-none",
70
- children: [/*#__PURE__*/_jsxs(Animated.View, {
71
- style: [styles.gradientContainer, debugMode && {
72
- borderTopColor: IOColors["error-500"],
73
- borderTopWidth: 1,
74
- backgroundColor: hexToRgba(IOColors["error-500"], 0.5)
75
- }, transitionAnimStyle],
76
- pointerEvents: "none",
77
- children: [/*#__PURE__*/_jsx(LinearGradient, {
78
- style: {
79
- height: dimensions.gradientAreaHeight * 0.55
80
- },
81
- locations: locations,
82
- colors: colors
83
- }), /*#__PURE__*/_jsx(View, {
84
- style: {
85
- bottom: 0,
86
- height: dimensions.gradientAreaHeight * 0.45,
87
- backgroundColor: IOColors[HEADER_BG_COLOR]
88
- }
89
- })]
90
- }), /*#__PURE__*/_jsx(View, {
91
- style: [styles.safeBackgroundBlock, {
92
- height: dimensions.safeBackgroundHeight
93
- }]
94
- }), /*#__PURE__*/_jsxs(View, {
95
- style: styles.buttonContainer,
96
- pointerEvents: "box-none",
97
- children: [primaryActionProps && /*#__PURE__*/_jsx(IOButton, {
98
- ...primaryActionProps,
99
- fullWidth: true
100
- }), secondaryActionProps && /*#__PURE__*/_jsxs(View, {
101
- style: {
102
- alignSelf: "center",
103
- marginBottom: dimensions.extraBottomMargin
104
- },
105
- children: [/*#__PURE__*/_jsx(VSpacer, {
106
- size: dimensions.spaceBetweenActions
107
- }), /*#__PURE__*/_jsx(IOButton, {
108
- ...secondaryActionProps
109
- })]
110
- })]
111
- })]
112
- });
113
- export default GradientBottomActions;
114
- //# sourceMappingURL=GradientBottomActions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Easing","StyleSheet","View","easeGradient","LinearGradient","Animated","IOColors","IOVisualCostants","hexToRgba","IOButton","VSpacer","jsx","_jsx","jsxs","_jsxs","HEADER_BG_COLOR","colors","locations","colorStops","color","easing","ease","extraColorStopsPerTransition","styles","create","buttonContainer","paddingHorizontal","appMarginDefault","width","flex","flexShrink","justifyContent","gradientContainer","absoluteFillObject","safeBackgroundBlock","position","bottom","left","right","backgroundColor","GradientBottomActions","primaryActionProps","secondaryActionProps","dimensions","transitionAnimStyle","debugMode","testID","style","height","gradientAreaHeight","paddingBottom","bottomMargin","pointerEvents","children","borderTopColor","borderTopWidth","safeBackgroundHeight","fullWidth","alignSelf","marginBottom","extraBottomMargin","size","spaceBetweenActions"],"sourceRoot":"../../../../src","sources":["components/layout/GradientBottomActions.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,MAAM,EAAaC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IAAC6C,KAAK,EAAExB,MAAM,CAACE,eAAgB;IAAC2B,aAAa,EAAC,UAAU;IAAAC,QAAA,GAC1DZ,kBAAkB,iBAAI7B,IAAA,CAACH,QAAQ;MAAA,GAAKgC,kBAAkB;MAAEgB,SAAS;IAAA,CAAE,CAAC,EAEpEf,oBAAoB,iBACnB5B,KAAA,CAACZ,IAAI;MACH6C,KAAK,EAAE;QACLW,SAAS,EAAE,QAAQ;QACnBC,YAAY,EAAEhB,UAAU,CAACiB;MAC3B,CAAE;MAAAP,QAAA,gBAEFzC,IAAA,CAACF,OAAO;QAACmD,IAAI,EAAElB,UAAU,CAACmB;MAAoB,CAAE,CAAC,eACjDlD,IAAA,CAACH,QAAQ;QAAA,GAAKiC;MAAoB,CAAG,CAAC;IAAA,CAClC,CACP;EAAA,CACG,CAAC;AAAA,CACH,CACP;AAED,eAAeF,qBAAqB","ignoreList":[]}
@@ -1,109 +0,0 @@
1
- "use strict";
2
-
3
- import * as React from "react";
4
- import { useMemo } from "react";
5
- import Animated, { Easing, useAnimatedScrollHandler, useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
6
- import { useSafeAreaInsets } from "react-native-safe-area-context";
7
- import { IOVisualCostants, buttonSolidHeight } from "../../core";
8
- import GradientBottomActions from "./GradientBottomActions";
9
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
10
- // Extended gradient area above the actions
11
- export const gradientSafeArea = 96;
12
- // End content margin before the actions
13
- const contentEndMargin = 32;
14
- // Margin between primary action and secondary one
15
- const spaceBetweenActions = 24;
16
- // Estimated height of the secondary action
17
- const secondaryActionEstHeight = 20;
18
- // Extra bottom margin for iPhone bottom handle
19
- const extraSafeAreaMargin = 8;
20
-
21
- /**
22
- * @deprecated This component has been deprecated. It will be removed in a future release.
23
- * @see IOScrollView
24
- */
25
- export const GradientScrollView = ({
26
- children,
27
- primaryActionProps: primaryActionProps,
28
- secondaryActionProps: secondaryActionProps,
29
- // Don't include safe area insets
30
- excludeSafeAreaMargins = false,
31
- debugMode = false,
32
- testID
33
- }) => {
34
- const gradientOpacity = useSharedValue(1);
35
- const insets = useSafeAreaInsets();
36
-
37
- /* Check if the iPhone bottom handle is present.
38
- If not, or if you don't need safe area insets,
39
- add a default margin to prevent the button
40
- from sticking to the bottom. */
41
- const bottomMargin = useMemo(() => insets.bottom === 0 || excludeSafeAreaMargins ? IOVisualCostants.appMarginDefault : insets.bottom, [insets, excludeSafeAreaMargins]);
42
-
43
- /* When the secondary action is visible, add extra margin
44
- to avoid little space from iPhone bottom handle */
45
- const extraBottomMargin = useMemo(() => secondaryActionProps && insets.bottom !== 0 ? extraSafeAreaMargin : 0, [insets.bottom, secondaryActionProps]);
46
-
47
- /* Total height of actions */
48
- const actionsArea = useMemo(() => primaryActionProps && secondaryActionProps ? buttonSolidHeight + spaceBetweenActions + secondaryActionEstHeight + extraBottomMargin : buttonSolidHeight, [extraBottomMargin, primaryActionProps, secondaryActionProps]);
49
-
50
- /* Total height of "Actions + Gradient" area */
51
- const gradientAreaHeight = useMemo(() => bottomMargin + actionsArea + gradientSafeArea, [actionsArea, bottomMargin]);
52
-
53
- /* Height of the safe bottom area, applied to the ScrollView:
54
- Actions + Content end margin */
55
- const safeBottomAreaHeight = useMemo(() => bottomMargin + actionsArea + contentEndMargin, [actionsArea, bottomMargin]);
56
- {
57
- /* Safe background block. It's added because when
58
- you swipe up quickly, the content below is visible
59
- for about 100ms. Without this block, the content
60
- appears glitchy. */
61
- }
62
- const safeBackgroundHeight = useMemo(() => secondaryActionProps ? spaceBetweenActions + secondaryActionEstHeight + extraBottomMargin + bottomMargin : bottomMargin, [bottomMargin, extraBottomMargin, secondaryActionProps]);
63
- const handleScroll = useAnimatedScrollHandler(({
64
- contentOffset,
65
- layoutMeasurement,
66
- contentSize
67
- }) => {
68
- /* We use Math.floor because decimals used on Android
69
- devices never change the `isEndReached` boolean value.
70
- We have more consistent behavior across platforms
71
- if we round these calculations ¯\_(ツ)_/¯ */
72
- const isEndReached = Math.floor(layoutMeasurement.height + contentOffset.y) >= Math.floor(contentSize.height);
73
-
74
- // eslint-disable-next-line functional/immutable-data
75
- gradientOpacity.value = isEndReached ? 0 : 1;
76
- });
77
- const opacityTransition = useAnimatedStyle(() => ({
78
- opacity: withTiming(gradientOpacity.value, {
79
- duration: 200,
80
- easing: Easing.ease
81
- })
82
- }));
83
- return /*#__PURE__*/_jsxs(_Fragment, {
84
- children: [/*#__PURE__*/_jsx(Animated.ScrollView, {
85
- testID: testID,
86
- onScroll: handleScroll,
87
- scrollEventThrottle: 16,
88
- contentContainerStyle: {
89
- paddingHorizontal: IOVisualCostants.appMarginDefault,
90
- paddingBottom: safeBottomAreaHeight
91
- },
92
- children: children
93
- }), /*#__PURE__*/_jsx(GradientBottomActions, {
94
- debugMode: debugMode,
95
- primaryActionProps: primaryActionProps,
96
- secondaryActionProps: secondaryActionProps,
97
- transitionAnimStyle: opacityTransition,
98
- dimensions: {
99
- bottomMargin,
100
- extraBottomMargin,
101
- gradientAreaHeight,
102
- spaceBetweenActions,
103
- safeBackgroundHeight
104
- }
105
- })]
106
- });
107
- };
108
- export default GradientScrollView;
109
- //# sourceMappingURL=GradientScrollView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useMemo","Animated","Easing","useAnimatedScrollHandler","useAnimatedStyle","useSharedValue","withTiming","useSafeAreaInsets","IOVisualCostants","buttonSolidHeight","GradientBottomActions","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","gradientSafeArea","contentEndMargin","spaceBetweenActions","secondaryActionEstHeight","extraSafeAreaMargin","GradientScrollView","children","primaryActionProps","secondaryActionProps","excludeSafeAreaMargins","debugMode","testID","gradientOpacity","insets","bottomMargin","bottom","appMarginDefault","extraBottomMargin","actionsArea","gradientAreaHeight","safeBottomAreaHeight","safeBackgroundHeight","handleScroll","contentOffset","layoutMeasurement","contentSize","isEndReached","Math","floor","height","y","value","opacityTransition","opacity","duration","easing","ease","ScrollView","onScroll","scrollEventThrottle","contentContainerStyle","paddingHorizontal","paddingBottom","transitionAnimStyle","dimensions"],"sourceRoot":"../../../../src","sources":["components/layout/GradientScrollView.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,OAAO,QAAQ,OAAO;AAC/B,OAAOC,QAAQ,IACbC,MAAM,EACNC,wBAAwB,EACxBC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAGEC,gBAAgB,EAChBC,iBAAiB,QACZ,YAAY;AAEnB,OAAOC,qBAAqB,MAAM,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAa5D;AACA,OAAO,MAAMC,gBAAgC,GAAG,EAAE;AAClD;AACA,MAAMC,gBAAgC,GAAG,EAAE;AAC3C;AACA,MAAMC,mBAA6B,GAAG,EAAE;AACxC;AACA,MAAMC,wBAAgC,GAAG,EAAE;AAC3C;AACA,MAAMC,mBAAmC,GAAG,CAAC;;AAE7C;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,QAAQ;EACRC,kBAAkB,EAAEA,kBAAkB;EACtCC,oBAAoB,EAAEA,oBAAoB;EAC1C;EACAC,sBAAsB,GAAG,KAAK;EAC9BC,SAAS,GAAG,KAAK;EACjBC;AACkB,CAAC,KAAK;EACxB,MAAMC,eAAe,GAAGxB,cAAc,CAAC,CAAC,CAAC;EACzC,MAAMyB,MAAM,GAAGvB,iBAAiB,CAAC,CAAC;;EAElC;AACF;AACA;AACA;EACE,MAAMwB,YAAoB,GAAG/B,OAAO,CAClC,MACE8B,MAAM,CAACE,MAAM,KAAK,CAAC,IAAIN,sBAAsB,GACzClB,gBAAgB,CAACyB,gBAAgB,GACjCH,MAAM,CAACE,MAAM,EACnB,CAACF,MAAM,EAAEJ,sBAAsB,CACjC,CA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KAAK,GAAGL,YAAY,GAAG,CAAC,GAAG,CAAC;EAC9C,CACF,CAAC;EAED,MAAMM,iBAAiB,GAAG7C,gBAAgB,CAAC,OAAO;IAChD8C,OAAO,EAAE5C,UAAU,CAACuB,eAAe,CAACmB,KAAK,EAAE;MACzCG,QAAQ,EAAE,GAAG;MACbC,MAAM,EAAElD,MAAM,CAACmD;IACjB,CAAC;EACH,CAAC,CAAC,CAAC;EAEH,oBACErC,KAAA,CAAAF,SAAA;IAAAS,QAAA,gBACEX,IAAA,CAACX,QAAQ,CAACqD,UAAU;MAClB1B,MAAM,EAAEA,MAAO;MACf2B,QAAQ,EAAEhB,YAAa;MACvBiB,mBAAmB,EAAE,EAAG;MACxBC,qBAAqB,EAAE;QACrBC,iBAAiB,EAAElD,gBAAgB,CAACyB,gBAAgB;QACpD0B,aAAa,EAAEtB;MACjB,CAAE;MAAAd,QAAA,EAEDA;IAAQ,CACU,CAAC,eACtBX,IAAA,CAACF,qBAAqB;MACpBiB,SAAS,EAAEA,SAAU;MACrBH,kBAAkB,EAAEA,kBAAmB;MACvCC,oBAAoB,EAAEA,oBAAqB;MAC3CmC,mBAAmB,EAAEX,iBAAkB;MACvCY,UAAU,EAAE;QACV9B,YAAY;QACZG,iBAAiB;QACjBE,kBAAkB;QAClBjB,mBAAmB;QACnBmB;MACF;IAAE,CACH,CAAC;EAAA,CACF,CAAC;AAEP,CAAC;AAED,eAAehB,kBAAkB","ignoreList":[]}
@@ -1,33 +0,0 @@
1
- import * as React from "react";
2
- import { StyleProp, ViewStyle } from "react-native";
3
- import { AnimatedStyle } from "react-native-reanimated";
4
- import { IOSpacer } from "../../core";
5
- import { WithTestID } from "../../utils/types";
6
- import { IOButtonProps } from "../buttons";
7
- type PrimaryActionProps = Extract<IOButtonProps, {
8
- variant?: "solid" | "outline";
9
- }>;
10
- type SecondaryActionProps = Extract<IOButtonProps, {
11
- variant?: "link";
12
- }>;
13
- export type GradientBottomActions = WithTestID<{
14
- transitionAnimStyle: AnimatedStyle<StyleProp<ViewStyle>>;
15
- dimensions: GradientBottomActionsDimensions;
16
- primaryActionProps?: PrimaryActionProps;
17
- secondaryActionProps?: SecondaryActionProps;
18
- debugMode?: boolean;
19
- }>;
20
- type GradientBottomActionsDimensions = {
21
- bottomMargin: number;
22
- extraBottomMargin: number;
23
- gradientAreaHeight: number;
24
- spaceBetweenActions: IOSpacer;
25
- safeBackgroundHeight: number;
26
- };
27
- /**
28
- * @deprecated This component has been included in the new `IOScrollView` after a proper refactor. It will be removed in a future release.
29
- * @see IOScrollView
30
- */
31
- export declare const GradientBottomActions: ({ primaryActionProps, secondaryActionProps, dimensions, transitionAnimStyle, debugMode, testID }: GradientBottomActions) => React.JSX.Element;
32
- export default GradientBottomActions;
33
- //# sourceMappingURL=GradientBottomActions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GradientBottomActions.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/GradientBottomActions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAU,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9E,OAAiB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAY,QAAQ,EAA+B,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAY,aAAa,EAAE,MAAM,YAAY,CAAC;AAGrD,KAAK,kBAAkB,GAAG,OAAO,CAC/B,aAAa,EACb;IAAE,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,CAClC,CAAC;AACF,KAAK,oBAAoB,GAAG,OAAO,CAAC,aAAa,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEzE,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC;IAC7C,mBAAmB,EAAE,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,UAAU,EAAE,+BAA+B,CAAC;IAE5C,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAE5C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,KAAK,+BAA+B,GAAG;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,QAAQ,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAkCF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,kGAOnC,qBAAqB,sBA+DvB,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -1,19 +0,0 @@
1
- import * as React from "react";
2
- import { IOSpacingScale } from "../../core";
3
- import { WithTestID } from "../../utils/types";
4
- import GradientBottomActions from "./GradientBottomActions";
5
- export type GradientScrollView = WithTestID<{
6
- children: React.ReactNode;
7
- excludeSafeAreaMargins?: boolean;
8
- debugMode?: boolean;
9
- primaryActionProps: GradientBottomActions["primaryActionProps"];
10
- secondaryActionProps?: GradientBottomActions["secondaryActionProps"];
11
- }>;
12
- export declare const gradientSafeArea: IOSpacingScale;
13
- /**
14
- * @deprecated This component has been deprecated. It will be removed in a future release.
15
- * @see IOScrollView
16
- */
17
- export declare const GradientScrollView: ({ children, primaryActionProps: primaryActionProps, secondaryActionProps: secondaryActionProps, excludeSafeAreaMargins, debugMode, testID }: GradientScrollView) => React.JSX.Element;
18
- export default GradientScrollView;
19
- //# sourceMappingURL=GradientScrollView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GradientScrollView.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/GradientScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAEL,cAAc,EAGf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC1C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IAIpB,kBAAkB,EAAE,qBAAqB,CAAC,oBAAoB,CAAC,CAAC;IAChE,oBAAoB,CAAC,EAAE,qBAAqB,CAAC,sBAAsB,CAAC,CAAC;CACtE,CAAC,CAAC;AAGH,eAAO,MAAM,gBAAgB,EAAE,cAAmB,CAAC;AAUnD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,6IAQhC,kBAAkB,sBAqHpB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,143 +0,0 @@
1
- import * as React from "react";
2
- import { Easing, StyleProp, StyleSheet, View, ViewStyle } from "react-native";
3
- import { easeGradient } from "react-native-easing-gradient";
4
- import LinearGradient from "react-native-linear-gradient";
5
- import Animated, { AnimatedStyle } from "react-native-reanimated";
6
- import { IOColors, IOSpacer, IOVisualCostants, hexToRgba } from "../../core";
7
- import { WithTestID } from "../../utils/types";
8
- import { IOButton, IOButtonProps } from "../buttons";
9
- import { VSpacer } from "./Spacer";
10
-
11
- type PrimaryActionProps = Extract<
12
- IOButtonProps,
13
- { variant?: "solid" | "outline" }
14
- >;
15
- type SecondaryActionProps = Extract<IOButtonProps, { variant?: "link" }>;
16
-
17
- export type GradientBottomActions = WithTestID<{
18
- transitionAnimStyle: AnimatedStyle<StyleProp<ViewStyle>>;
19
- dimensions: GradientBottomActionsDimensions;
20
- // Button actions
21
- primaryActionProps?: PrimaryActionProps;
22
- secondaryActionProps?: SecondaryActionProps;
23
- // Debug mode
24
- debugMode?: boolean;
25
- }>;
26
-
27
- type GradientBottomActionsDimensions = {
28
- bottomMargin: number;
29
- extraBottomMargin: number;
30
- gradientAreaHeight: number;
31
- spaceBetweenActions: IOSpacer;
32
- safeBackgroundHeight: number;
33
- };
34
-
35
- // Background color should be app main background (both light and dark themes)
36
- const HEADER_BG_COLOR: IOColors = "white";
37
-
38
- const { colors, locations } = easeGradient({
39
- colorStops: {
40
- 0: { color: hexToRgba(IOColors[HEADER_BG_COLOR], 0) },
41
- 1: { color: IOColors[HEADER_BG_COLOR] }
42
- },
43
- easing: Easing.ease,
44
- extraColorStopsPerTransition: 20
45
- });
46
-
47
- const styles = StyleSheet.create({
48
- buttonContainer: {
49
- paddingHorizontal: IOVisualCostants.appMarginDefault,
50
- width: "100%",
51
- flex: 1,
52
- flexShrink: 0,
53
- justifyContent: "flex-end"
54
- },
55
- gradientContainer: {
56
- ...StyleSheet.absoluteFillObject
57
- },
58
- safeBackgroundBlock: {
59
- position: "absolute",
60
- bottom: 0,
61
- left: 0,
62
- right: 0,
63
- backgroundColor: IOColors[HEADER_BG_COLOR]
64
- }
65
- });
66
-
67
- /**
68
- * @deprecated This component has been included in the new `IOScrollView` after a proper refactor. It will be removed in a future release.
69
- * @see IOScrollView
70
- */
71
- export const GradientBottomActions = ({
72
- primaryActionProps,
73
- secondaryActionProps,
74
- dimensions,
75
- transitionAnimStyle,
76
- debugMode,
77
- testID
78
- }: GradientBottomActions) => (
79
- <View
80
- style={{
81
- width: "100%",
82
- position: "absolute",
83
- bottom: 0,
84
- height: dimensions.gradientAreaHeight,
85
- paddingBottom: dimensions.bottomMargin
86
- }}
87
- testID={testID}
88
- pointerEvents="box-none"
89
- >
90
- <Animated.View
91
- style={[
92
- styles.gradientContainer,
93
- debugMode && {
94
- borderTopColor: IOColors["error-500"],
95
- borderTopWidth: 1,
96
- backgroundColor: hexToRgba(IOColors["error-500"], 0.5)
97
- },
98
- transitionAnimStyle
99
- ]}
100
- pointerEvents="none"
101
- >
102
- {/* 100% opacity bg color fills at least 45% of the area */}
103
- <LinearGradient
104
- style={{ height: dimensions.gradientAreaHeight * 0.55 }}
105
- locations={locations}
106
- colors={colors}
107
- />
108
- <View
109
- style={{
110
- bottom: 0,
111
- height: dimensions.gradientAreaHeight * 0.45,
112
- backgroundColor: IOColors[HEADER_BG_COLOR]
113
- }}
114
- />
115
- </Animated.View>
116
-
117
- <View
118
- style={[
119
- styles.safeBackgroundBlock,
120
- {
121
- height: dimensions.safeBackgroundHeight
122
- }
123
- ]}
124
- />
125
- <View style={styles.buttonContainer} pointerEvents="box-none">
126
- {primaryActionProps && <IOButton {...primaryActionProps} fullWidth />}
127
-
128
- {secondaryActionProps && (
129
- <View
130
- style={{
131
- alignSelf: "center",
132
- marginBottom: dimensions.extraBottomMargin
133
- }}
134
- >
135
- <VSpacer size={dimensions.spaceBetweenActions} />
136
- <IOButton {...secondaryActionProps} />
137
- </View>
138
- )}
139
- </View>
140
- </View>
141
- );
142
-
143
- export default GradientBottomActions;
@@ -1,173 +0,0 @@
1
- import * as React from "react";
2
- import { useMemo } from "react";
3
- import Animated, {
4
- Easing,
5
- useAnimatedScrollHandler,
6
- useAnimatedStyle,
7
- useSharedValue,
8
- withTiming
9
- } from "react-native-reanimated";
10
- import { useSafeAreaInsets } from "react-native-safe-area-context";
11
- import {
12
- IOSpacer,
13
- IOSpacingScale,
14
- IOVisualCostants,
15
- buttonSolidHeight
16
- } from "../../core";
17
- import { WithTestID } from "../../utils/types";
18
- import GradientBottomActions from "./GradientBottomActions";
19
-
20
- export type GradientScrollView = WithTestID<{
21
- children: React.ReactNode;
22
- excludeSafeAreaMargins?: boolean;
23
- debugMode?: boolean;
24
- // Accepted components: `solid` variant for the primaryAction,
25
- // `link` variant for the secondaryAction.
26
- // Don't use any components other than this, please.
27
- primaryActionProps: GradientBottomActions["primaryActionProps"];
28
- secondaryActionProps?: GradientBottomActions["secondaryActionProps"];
29
- }>;
30
-
31
- // Extended gradient area above the actions
32
- export const gradientSafeArea: IOSpacingScale = 96;
33
- // End content margin before the actions
34
- const contentEndMargin: IOSpacingScale = 32;
35
- // Margin between primary action and secondary one
36
- const spaceBetweenActions: IOSpacer = 24;
37
- // Estimated height of the secondary action
38
- const secondaryActionEstHeight: number = 20;
39
- // Extra bottom margin for iPhone bottom handle
40
- const extraSafeAreaMargin: IOSpacingScale = 8;
41
-
42
- /**
43
- * @deprecated This component has been deprecated. It will be removed in a future release.
44
- * @see IOScrollView
45
- */
46
- export const GradientScrollView = ({
47
- children,
48
- primaryActionProps: primaryActionProps,
49
- secondaryActionProps: secondaryActionProps,
50
- // Don't include safe area insets
51
- excludeSafeAreaMargins = false,
52
- debugMode = false,
53
- testID
54
- }: GradientScrollView) => {
55
- const gradientOpacity = useSharedValue(1);
56
- const insets = useSafeAreaInsets();
57
-
58
- /* Check if the iPhone bottom handle is present.
59
- If not, or if you don't need safe area insets,
60
- add a default margin to prevent the button
61
- from sticking to the bottom. */
62
- const bottomMargin: number = useMemo(
63
- () =>
64
- insets.bottom === 0 || excludeSafeAreaMargins
65
- ? IOVisualCostants.appMarginDefault
66
- : insets.bottom,
67
- [insets, excludeSafeAreaMargins]
68
- );
69
-
70
- /* When the secondary action is visible, add extra margin
71
- to avoid little space from iPhone bottom handle */
72
- const extraBottomMargin: number = useMemo(
73
- () =>
74
- secondaryActionProps && insets.bottom !== 0 ? extraSafeAreaMargin : 0,
75
- [insets.bottom, secondaryActionProps]
76
- );
77
-
78
- /* Total height of actions */
79
- const actionsArea: number = useMemo(
80
- () =>
81
- primaryActionProps && secondaryActionProps
82
- ? (buttonSolidHeight as number) +
83
- spaceBetweenActions +
84
- secondaryActionEstHeight +
85
- extraBottomMargin
86
- : buttonSolidHeight,
87
- [extraBottomMargin, primaryActionProps, secondaryActionProps]
88
- );
89
-
90
- /* Total height of "Actions + Gradient" area */
91
- const gradientAreaHeight: number = useMemo(
92
- () => bottomMargin + actionsArea + gradientSafeArea,
93
- [actionsArea, bottomMargin]
94
- );
95
-
96
- /* Height of the safe bottom area, applied to the ScrollView:
97
- Actions + Content end margin */
98
- const safeBottomAreaHeight: number = useMemo(
99
- () => bottomMargin + actionsArea + contentEndMargin,
100
- [actionsArea, bottomMargin]
101
- );
102
-
103
- {
104
- /* Safe background block. It's added because when
105
- you swipe up quickly, the content below is visible
106
- for about 100ms. Without this block, the content
107
- appears glitchy. */
108
- }
109
-
110
- const safeBackgroundHeight = useMemo(
111
- () =>
112
- secondaryActionProps
113
- ? spaceBetweenActions +
114
- secondaryActionEstHeight +
115
- extraBottomMargin +
116
- bottomMargin
117
- : bottomMargin,
118
- [bottomMargin, extraBottomMargin, secondaryActionProps]
119
- );
120
-
121
- const handleScroll = useAnimatedScrollHandler(
122
- ({ contentOffset, layoutMeasurement, contentSize }) => {
123
- /* We use Math.floor because decimals used on Android
124
- devices never change the `isEndReached` boolean value.
125
- We have more consistent behavior across platforms
126
- if we round these calculations ¯\_(ツ)_/¯ */
127
- const isEndReached =
128
- Math.floor(layoutMeasurement.height + contentOffset.y) >=
129
- Math.floor(contentSize.height);
130
-
131
- // eslint-disable-next-line functional/immutable-data
132
- gradientOpacity.value = isEndReached ? 0 : 1;
133
- }
134
- );
135
-
136
- const opacityTransition = useAnimatedStyle(() => ({
137
- opacity: withTiming(gradientOpacity.value, {
138
- duration: 200,
139
- easing: Easing.ease
140
- })
141
- }));
142
-
143
- return (
144
- <>
145
- <Animated.ScrollView
146
- testID={testID}
147
- onScroll={handleScroll}
148
- scrollEventThrottle={16}
149
- contentContainerStyle={{
150
- paddingHorizontal: IOVisualCostants.appMarginDefault,
151
- paddingBottom: safeBottomAreaHeight
152
- }}
153
- >
154
- {children}
155
- </Animated.ScrollView>
156
- <GradientBottomActions
157
- debugMode={debugMode}
158
- primaryActionProps={primaryActionProps}
159
- secondaryActionProps={secondaryActionProps}
160
- transitionAnimStyle={opacityTransition}
161
- dimensions={{
162
- bottomMargin,
163
- extraBottomMargin,
164
- gradientAreaHeight,
165
- spaceBetweenActions,
166
- safeBackgroundHeight
167
- }}
168
- />
169
- </>
170
- );
171
- };
172
-
173
- export default GradientScrollView;