@pagopa/io-app-design-system 1.3.2 → 1.4.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.
Files changed (123) hide show
  1. package/README.md +1 -0
  2. package/lib/commonjs/components/accordion/AccordionItem.js +137 -0
  3. package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -0
  4. package/lib/commonjs/components/accordion/index.js +4 -4
  5. package/lib/commonjs/components/accordion/index.js.map +1 -1
  6. package/lib/commonjs/components/common/LogoPaymentWithFallback.js +49 -0
  7. package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -0
  8. package/lib/commonjs/components/index.js +11 -0
  9. package/lib/commonjs/components/index.js.map +1 -1
  10. package/lib/commonjs/components/listitems/ListItemTransaction.js +47 -29
  11. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  12. package/lib/commonjs/components/{accordion/IOAccordion.js → textInput/TextInput.js} +5 -27
  13. package/lib/commonjs/components/textInput/TextInput.js.map +1 -0
  14. package/lib/commonjs/components/textInput/TextInputBase.js +233 -0
  15. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -0
  16. package/lib/commonjs/components/textInput/TextInputPassword.js +36 -0
  17. package/lib/commonjs/components/textInput/TextInputPassword.js.map +1 -0
  18. package/lib/commonjs/components/textInput/TextInputValidation.js +57 -0
  19. package/lib/commonjs/components/textInput/TextInputValidation.js.map +1 -0
  20. package/lib/commonjs/components/textInput/index.js +39 -0
  21. package/lib/commonjs/components/textInput/index.js.map +1 -0
  22. package/lib/commonjs/core/IOAnimations.js +5 -0
  23. package/lib/commonjs/core/IOAnimations.js.map +1 -1
  24. package/lib/commonjs/core/IOShapes.js +3 -1
  25. package/lib/commonjs/core/IOShapes.js.map +1 -1
  26. package/lib/commonjs/utils/accessibility.js +19 -0
  27. package/lib/commonjs/utils/accessibility.js.map +1 -0
  28. package/lib/commonjs/utils/object.js +16 -0
  29. package/lib/commonjs/utils/object.js.map +1 -0
  30. package/lib/commonjs/utils/textInput/index.js +24 -0
  31. package/lib/commonjs/utils/textInput/index.js.map +1 -0
  32. package/lib/commonjs/utils/url.js +14 -0
  33. package/lib/commonjs/utils/url.js.map +1 -0
  34. package/lib/module/components/accordion/AccordionItem.js +126 -0
  35. package/lib/module/components/accordion/AccordionItem.js.map +1 -0
  36. package/lib/module/components/accordion/index.js +1 -1
  37. package/lib/module/components/accordion/index.js.map +1 -1
  38. package/lib/module/components/common/LogoPaymentWithFallback.js +40 -0
  39. package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -0
  40. package/lib/module/components/index.js +1 -0
  41. package/lib/module/components/index.js.map +1 -1
  42. package/lib/module/components/listitems/ListItemTransaction.js +48 -30
  43. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  44. package/lib/module/components/textInput/TextInput.js +4 -0
  45. package/lib/module/components/textInput/TextInput.js.map +1 -0
  46. package/lib/module/components/textInput/TextInputBase.js +225 -0
  47. package/lib/module/components/textInput/TextInputBase.js.map +1 -0
  48. package/lib/module/components/textInput/TextInputPassword.js +27 -0
  49. package/lib/module/components/textInput/TextInputPassword.js.map +1 -0
  50. package/lib/module/components/textInput/TextInputValidation.js +47 -0
  51. package/lib/module/components/textInput/TextInputValidation.js.map +1 -0
  52. package/lib/module/components/textInput/index.js +4 -0
  53. package/lib/module/components/textInput/index.js.map +1 -0
  54. package/lib/module/core/IOAnimations.js +5 -0
  55. package/lib/module/core/IOAnimations.js.map +1 -1
  56. package/lib/module/core/IOShapes.js +1 -0
  57. package/lib/module/core/IOShapes.js.map +1 -1
  58. package/lib/module/utils/accessibility.js +10 -0
  59. package/lib/module/utils/accessibility.js.map +1 -0
  60. package/lib/module/utils/object.js +7 -0
  61. package/lib/module/utils/object.js.map +1 -0
  62. package/lib/module/utils/textInput/index.js +17 -0
  63. package/lib/module/utils/textInput/index.js.map +1 -0
  64. package/lib/module/utils/url.js +7 -0
  65. package/lib/module/utils/url.js.map +1 -0
  66. package/lib/typescript/components/accordion/AccordionItem.d.ts +14 -0
  67. package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -0
  68. package/lib/typescript/components/accordion/index.d.ts +1 -1
  69. package/lib/typescript/components/accordion/index.d.ts.map +1 -1
  70. package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts +27 -0
  71. package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -0
  72. package/lib/typescript/components/index.d.ts +1 -0
  73. package/lib/typescript/components/index.d.ts.map +1 -1
  74. package/lib/typescript/components/listitems/ListItemTransaction.d.ts +13 -5
  75. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  76. package/lib/typescript/components/textInput/TextInput.d.ts +6 -0
  77. package/lib/typescript/components/textInput/TextInput.d.ts.map +1 -0
  78. package/lib/typescript/components/textInput/TextInputBase.d.ts +28 -0
  79. package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -0
  80. package/lib/typescript/components/textInput/TextInputPassword.d.ts +6 -0
  81. package/lib/typescript/components/textInput/TextInputPassword.d.ts.map +1 -0
  82. package/lib/typescript/components/textInput/TextInputValidation.d.ts +9 -0
  83. package/lib/typescript/components/textInput/TextInputValidation.d.ts.map +1 -0
  84. package/lib/typescript/components/textInput/index.d.ts +4 -0
  85. package/lib/typescript/components/textInput/index.d.ts.map +1 -0
  86. package/lib/typescript/core/IOAnimations.d.ts +5 -0
  87. package/lib/typescript/core/IOAnimations.d.ts.map +1 -1
  88. package/lib/typescript/core/IOShapes.d.ts +1 -0
  89. package/lib/typescript/core/IOShapes.d.ts.map +1 -1
  90. package/lib/typescript/utils/accessibility.d.ts +6 -0
  91. package/lib/typescript/utils/accessibility.d.ts.map +1 -0
  92. package/lib/typescript/utils/object.d.ts +5 -0
  93. package/lib/typescript/utils/object.d.ts.map +1 -0
  94. package/lib/typescript/utils/textInput/index.d.ts +9 -0
  95. package/lib/typescript/utils/textInput/index.d.ts.map +1 -0
  96. package/lib/typescript/utils/types.d.ts +1 -0
  97. package/lib/typescript/utils/types.d.ts.map +1 -1
  98. package/lib/typescript/utils/url.d.ts +8 -0
  99. package/lib/typescript/utils/url.d.ts.map +1 -0
  100. package/package.json +1 -1
  101. package/src/components/accordion/AccordionItem.tsx +165 -0
  102. package/src/components/accordion/index.tsx +1 -1
  103. package/src/components/common/LogoPaymentWithFallback.tsx +60 -0
  104. package/src/components/index.tsx +1 -0
  105. package/src/components/listitems/ListItemTransaction.tsx +86 -39
  106. package/src/components/textInput/TextInput.tsx +15 -0
  107. package/src/components/textInput/TextInputBase.tsx +327 -0
  108. package/src/components/textInput/TextInputPassword.tsx +36 -0
  109. package/src/components/textInput/TextInputValidation.tsx +71 -0
  110. package/src/components/textInput/index.tsx +3 -0
  111. package/src/core/IOAnimations.ts +5 -0
  112. package/src/core/IOShapes.ts +1 -0
  113. package/src/utils/accessibility.ts +17 -0
  114. package/src/utils/object.ts +12 -0
  115. package/src/utils/textInput/index.ts +29 -0
  116. package/src/utils/types.ts +2 -0
  117. package/src/utils/url.ts +9 -0
  118. package/lib/commonjs/components/accordion/IOAccordion.js.map +0 -1
  119. package/lib/module/components/accordion/IOAccordion.js +0 -26
  120. package/lib/module/components/accordion/IOAccordion.js.map +0 -1
  121. package/lib/typescript/components/accordion/IOAccordion.d.ts +0 -13
  122. package/lib/typescript/components/accordion/IOAccordion.d.ts.map +0 -1
  123. package/src/components/accordion/IOAccordion.tsx +0 -35
@@ -0,0 +1,27 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import * as React from "react";
3
+ import { IconButton } from "../buttons";
4
+ import { TextInputBase } from "./TextInputBase";
5
+ export const TextInputPassword = props => {
6
+ const {
7
+ onBlur,
8
+ disabled
9
+ } = props;
10
+ const [showPassword, setShowPassword] = React.useState(false);
11
+ const rightElement = /*#__PURE__*/React.createElement(IconButton, {
12
+ icon: showPassword ? "eyeShow" : "eyeHide",
13
+ disabled: disabled,
14
+ onPress: () => setShowPassword(v => !v),
15
+ accessibilityLabel: "Toggle secret input"
16
+ });
17
+ const onBlurHandler = React.useCallback(() => {
18
+ setShowPassword(false);
19
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur();
20
+ }, [onBlur]);
21
+ return /*#__PURE__*/React.createElement(TextInputBase, _extends({}, props, {
22
+ onBlur: onBlurHandler,
23
+ rightElement: rightElement,
24
+ isPassword: !showPassword
25
+ }));
26
+ };
27
+ //# sourceMappingURL=TextInputPassword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","IconButton","TextInputBase","TextInputPassword","props","onBlur","disabled","showPassword","setShowPassword","useState","rightElement","createElement","icon","onPress","v","accessibilityLabel","onBlurHandler","useCallback","_extends","isPassword"],"sourceRoot":"../../../../src","sources":["components/textInput/TextInputPassword.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,YAAY;AACvC,SAASC,aAAa,QAAQ,iBAAiB;AAO/C,OAAO,MAAMC,iBAAiB,GAAIC,KAA6B,IAAK;EAClE,MAAM;IAAEC,MAAM;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAClC,MAAM,CAACG,YAAY,EAAEC,eAAe,CAAC,GAAGR,KAAK,CAACS,QAAQ,CAAU,KAAK,CAAC;EAEtE,MAAMC,YAAY,gBAChBV,KAAA,CAAAW,aAAA,CAACV,UAAU;IACTW,IAAI,EAAEL,YAAY,GAAG,SAAS,GAAG,SAAU;IAC3CD,QAAQ,EAAEA,QAAS;IACnBO,OAAO,EAAEA,CAAA,KAAML,eAAe,CAACM,CAAC,IAAI,CAACA,CAAC,CAAE;IACxCC,kBAAkB,EAAC;EAAqB,CACzC,CACF;EAED,MAAMC,aAAa,GAAGhB,KAAK,CAACiB,WAAW,CAAC,MAAM;IAC5CT,eAAe,CAAC,KAAK,CAAC;IACtBH,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAG,CAAC;EACZ,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,oBACEL,KAAA,CAAAW,aAAA,CAACT,aAAa,EAAAgB,QAAA,KACRd,KAAK;IACTC,MAAM,EAAEW,aAAc;IACtBN,YAAY,EAAEA,YAAa;IAC3BS,UAAU,EAAE,CAACZ;EAAa,EAC3B,CAAC;AAEN,CAAC"}
@@ -0,0 +1,47 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import * as React from "react";
3
+ import { Icon } from "../icons";
4
+ import { triggerHaptic } from "../../functions";
5
+ import { TextInputBase } from "./TextInputBase";
6
+ export const TextInputValidation = props => {
7
+ const {
8
+ onValidate,
9
+ errorMessage,
10
+ value,
11
+ bottomMessage,
12
+ onBlur,
13
+ onFocus
14
+ } = props;
15
+ const [isValid, setIsValid] = React.useState(undefined);
16
+ const onBlurHandler = React.useCallback(() => {
17
+ const validation = onValidate(value);
18
+ setIsValid(validation);
19
+ if (!validation) {
20
+ triggerHaptic("notificationError");
21
+ } else {
22
+ triggerHaptic("notificationSuccess");
23
+ }
24
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur();
25
+ }, [onValidate, value, onBlur]);
26
+ const onFocusHandler = React.useCallback(() => {
27
+ setIsValid(undefined);
28
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus();
29
+ }, [onFocus]);
30
+ const labelError = React.useMemo(() => isValid === false && errorMessage ? errorMessage : bottomMessage, [isValid, errorMessage, bottomMessage]);
31
+ const labelErrorColor = React.useMemo(() => isValid === false && errorMessage ? "error-600" : undefined, [isValid, errorMessage]);
32
+ const rightIcon = React.useMemo(() => isValid !== undefined && /*#__PURE__*/React.createElement(Icon, {
33
+ name: isValid ? "success" : "errorFilled",
34
+ color: isValid ? "green" : "error-600",
35
+ size: 24
36
+ }), [isValid]);
37
+ return /*#__PURE__*/React.createElement(TextInputBase, _extends({}, props, {
38
+ status: isValid === false ? "error" : undefined,
39
+ bottomMessage: labelError,
40
+ bottomMessageColor: labelErrorColor,
41
+ rightElement: rightIcon,
42
+ onBlur: onBlurHandler,
43
+ onFocus: onFocusHandler
44
+ }));
45
+ };
46
+ export default TextInputValidation;
47
+ //# sourceMappingURL=TextInputValidation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Icon","triggerHaptic","TextInputBase","TextInputValidation","props","onValidate","errorMessage","value","bottomMessage","onBlur","onFocus","isValid","setIsValid","useState","undefined","onBlurHandler","useCallback","validation","onFocusHandler","labelError","useMemo","labelErrorColor","rightIcon","createElement","name","color","size","_extends","status","bottomMessageColor","rightElement"],"sourceRoot":"../../../../src","sources":["components/textInput/TextInputValidation.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAAkBC,IAAI,QAAQ,UAAU;AAExC,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,aAAa,QAAQ,iBAAiB;AAU/C,OAAO,MAAMC,mBAAmB,GAAIC,KAA+B,IAAK;EACtE,MAAM;IAAEC,UAAU;IAAEC,YAAY;IAAEC,KAAK;IAAEC,aAAa;IAAEC,MAAM;IAAEC;EAAQ,CAAC,GACvEN,KAAK;EACP,MAAM,CAACO,OAAO,EAAEC,UAAU,CAAC,GAAGb,KAAK,CAACc,QAAQ,CAAsBC,SAAS,CAAC;EAE5E,MAAMC,aAAa,GAAGhB,KAAK,CAACiB,WAAW,CAAC,MAAM;IAC5C,MAAMC,UAAU,GAAGZ,UAAU,CAACE,KAAK,CAAC;IACpCK,UAAU,CAACK,UAAU,CAAC;IACtB,IAAI,CAACA,UAAU,EAAE;MACfhB,aAAa,CAAC,mBAAmB,CAAC;IACpC,CAAC,MAAM;MACLA,aAAa,CAAC,qBAAqB,CAAC;IACtC;IACAQ,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAG,CAAC;EACZ,CAAC,EAAE,CAACJ,UAAU,EAAEE,KAAK,EAAEE,MAAM,CAAC,CAAC;EAE/B,MAAMS,cAAc,GAAGnB,KAAK,CAACiB,WAAW,CAAC,MAAM;IAC7CJ,UAAU,CAACE,SAAS,CAAC;IACrBJ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAG,CAAC;EACb,CAAC,EAAE,CAACA,OAAO,CAAC,CAAC;EAEb,MAAMS,UAAU,GAAGpB,KAAK,CAACqB,OAAO,CAC9B,MAAOT,OAAO,KAAK,KAAK,IAAIL,YAAY,GAAGA,YAAY,GAAGE,aAAc,EACxE,CAACG,OAAO,EAAEL,YAAY,EAAEE,aAAa,CACvC,CAAC;EAED,MAAMa,eAAqC,GAAGtB,KAAK,CAACqB,OAAO,CACzD,MAAOT,OAAO,KAAK,KAAK,IAAIL,YAAY,GAAG,WAAW,GAAGQ,SAAU,EACnE,CAACH,OAAO,EAAEL,YAAY,CACxB,CAAC;EAED,MAAMgB,SAAS,GAAGvB,KAAK,CAACqB,OAAO,CAC7B,MACET,OAAO,KAAKG,SAAS,iBACnBf,KAAA,CAAAwB,aAAA,CAACvB,IAAI;IACHwB,IAAI,EAAGb,OAAO,GAAG,SAAS,GAAG,aAA0B;IACvDc,KAAK,EAAGd,OAAO,GAAG,OAAO,GAAG,WAAyB;IACrDe,IAAI,EAAE;EAAG,CACV,CACF,EACH,CAACf,OAAO,CACV,CAAC;EAED,oBACEZ,KAAA,CAAAwB,aAAA,CAACrB,aAAa,EAAAyB,QAAA,KACRvB,KAAK;IACTwB,MAAM,EAAEjB,OAAO,KAAK,KAAK,GAAG,OAAO,GAAGG,SAAU;IAChDN,aAAa,EAAEW,UAAW;IAC1BU,kBAAkB,EAAER,eAAgB;IACpCS,YAAY,EAAER,SAAU;IACxBb,MAAM,EAAEM,aAAc;IACtBL,OAAO,EAAEQ;EAAe,EACzB,CAAC;AAEN,CAAC;AAED,eAAef,mBAAmB"}
@@ -0,0 +1,4 @@
1
+ export * from "./TextInput";
2
+ export * from "./TextInputPassword";
3
+ export * from "./TextInputValidation";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/textInput/index.tsx"],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,qBAAqB;AACnC,cAAc,uBAAuB"}
@@ -9,6 +9,11 @@ export const IOSpringValues = {
9
9
  mass: 0.5,
10
10
  stiffness: 300
11
11
  },
12
+ accordion: {
13
+ damping: 30,
14
+ mass: 1,
15
+ stiffness: 325
16
+ },
12
17
  /* Used by selection items (checkbox, radio, etc…) */
13
18
  selection: {
14
19
  damping: 10,
@@ -1 +1 @@
1
- {"version":3,"names":["IOSpringValues","button","damping","mass","stiffness","selection","IOScaleValues","basicButton","pressedState","magnifiedButton","exaggeratedButton"],"sourceRoot":"../../../src","sources":["core/IOAnimations.ts"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAO,MAAMA,cAAc,GAAG;EAC5B;EACAC,MAAM,EAAE;IACNC,OAAO,EAAE,EAAE;IACXC,IAAI,EAAE,GAAG;IACTC,SAAS,EAAE;EACb,CAAC;EACD;EACAC,SAAS,EAAE;IACTH,OAAO,EAAE,EAAE;IACXC,IAAI,EAAE,GAAG;IACTC,SAAS,EAAE;EACb;AACF,CAAC;AAED,OAAO,MAAME,aAAa,GAAG;EAC3B;EACAC,WAAW,EAAE;IACXC,YAAY,EAAE;EAChB,CAAC;EACD;EACAC,eAAe,EAAE;IACfD,YAAY,EAAE;EAChB,CAAC;EACD;EACAE,iBAAiB,EAAE;IACjBF,YAAY,EAAE;EAChB;AACF,CAAC"}
1
+ {"version":3,"names":["IOSpringValues","button","damping","mass","stiffness","accordion","selection","IOScaleValues","basicButton","pressedState","magnifiedButton","exaggeratedButton"],"sourceRoot":"../../../src","sources":["core/IOAnimations.ts"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAO,MAAMA,cAAc,GAAG;EAC5B;EACAC,MAAM,EAAE;IACNC,OAAO,EAAE,EAAE;IACXC,IAAI,EAAE,GAAG;IACTC,SAAS,EAAE;EACb,CAAC;EACDC,SAAS,EAAE;IACTH,OAAO,EAAE,EAAE;IACXC,IAAI,EAAE,CAAC;IACPC,SAAS,EAAE;EACb,CAAC;EACD;EACAE,SAAS,EAAE;IACTJ,OAAO,EAAE,EAAE;IACXC,IAAI,EAAE,GAAG;IACTC,SAAS,EAAE;EACb;AACF,CAAC;AAED,OAAO,MAAMG,aAAa,GAAG;EAC3B;EACAC,WAAW,EAAE;IACXC,YAAY,EAAE;EAChB,CAAC;EACD;EACAC,eAAe,EAAE;IACfD,YAAY,EAAE;EAChB,CAAC;EACD;EACAE,iBAAiB,EAAE;IACjBF,YAAY,EAAE;EAChB;AACF,CAAC"}
@@ -16,4 +16,5 @@ export const IOTagRadius = 6;
16
16
  export const IOBottomSheetHeaderRadius = 24;
17
17
  export const IOListItemIDPRadius = IODefaultRadius;
18
18
  export const IOBadgeRadius = 24;
19
+ export const IOAccordionRadius = IODefaultRadius;
19
20
  //# sourceMappingURL=IOShapes.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["IORadiusScale","IODefaultRadius","IOAlertRadius","IOBannerRadius","IOTagRadius","IOBottomSheetHeaderRadius","IOListItemIDPRadius","IOBadgeRadius"],"sourceRoot":"../../../src","sources":["core/IOShapes.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAU;AAGpD,MAAMC,eAA8B,GAAG,CAAC;;AAExC;AACA;AACA;AACA,OAAO,MAAMC,aAA4B,GAAGD,eAAe;AAC3D,OAAO,MAAME,cAA6B,GAAGF,eAAe;AAC5D,OAAO,MAAMG,WAA0B,GAAG,CAAC;AAC3C,OAAO,MAAMC,yBAAwC,GAAG,EAAE;AAC1D,OAAO,MAAMC,mBAAkC,GAAGL,eAAe;AACjE,OAAO,MAAMM,aAA4B,GAAG,EAAE"}
1
+ {"version":3,"names":["IORadiusScale","IODefaultRadius","IOAlertRadius","IOBannerRadius","IOTagRadius","IOBottomSheetHeaderRadius","IOListItemIDPRadius","IOBadgeRadius","IOAccordionRadius"],"sourceRoot":"../../../src","sources":["core/IOShapes.ts"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMA,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAU;AAGpD,MAAMC,eAA8B,GAAG,CAAC;;AAExC;AACA;AACA;AACA,OAAO,MAAMC,aAA4B,GAAGD,eAAe;AAC3D,OAAO,MAAME,cAA6B,GAAGF,eAAe;AAC5D,OAAO,MAAMG,WAA0B,GAAG,CAAC;AAC3C,OAAO,MAAMC,yBAAwC,GAAG,EAAE;AAC1D,OAAO,MAAMC,mBAAkC,GAAGL,eAAe;AACjE,OAAO,MAAMM,aAA4B,GAAG,EAAE;AAC9C,OAAO,MAAMC,iBAAgC,GAAGP,eAAe"}
@@ -0,0 +1,10 @@
1
+ import { pipe } from "fp-ts/lib/function";
2
+ import * as O from "fp-ts/lib/Option";
3
+ import I18n from "i18n-js";
4
+
5
+ /**
6
+ * This function is used to get the text that will be read by the screen reader
7
+ * with the correct minus symbol pronunciation.
8
+ */
9
+ export const getAccessibleAmountText = amount => pipe(amount, O.fromNullable, O.map(amount => amount.replace("-", I18n.t("global.accessibility.minusSymbol"))), O.getOrElseW(() => undefined));
10
+ //# sourceMappingURL=accessibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["pipe","O","I18n","getAccessibleAmountText","amount","fromNullable","map","replace","t","getOrElseW","undefined"],"sourceRoot":"../../../src","sources":["utils/accessibility.ts"],"mappings":"AAAA,SAASA,IAAI,QAAQ,oBAAoB;AACzC,OAAO,KAAKC,CAAC,MAAM,kBAAkB;AACrC,OAAOC,IAAI,MAAM,SAAS;;AAE1B;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,GAAIC,MAAe,IACrDJ,IAAI,CACFI,MAAM,EACNH,CAAC,CAACI,YAAY,EACdJ,CAAC,CAACK,GAAG,CAACF,MAAM,IACVA,MAAM,CAACG,OAAO,CAAC,GAAG,EAAEL,IAAI,CAACM,CAAC,CAAC,kCAAkC,CAAC,CAChE,CAAC,EACDP,CAAC,CAACQ,UAAU,CAAC,MAAMC,SAAS,CAC9B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import * as A from "fp-ts/Array";
2
+ import { pipe } from "fp-ts/lib/function";
3
+ export const findFirstCaseInsensitive = obj => key => pipe(obj, Object.entries, A.findFirst(_ref => {
4
+ let [k, _] = _ref;
5
+ return k.toLowerCase() === key.toLowerCase();
6
+ }));
7
+ //# sourceMappingURL=object.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["A","pipe","findFirstCaseInsensitive","obj","key","Object","entries","findFirst","_ref","k","_","toLowerCase"],"sourceRoot":"../../../src","sources":["utils/object.ts"],"mappings":"AAAA,OAAO,KAAKA,CAAC,MAAM,aAAa;AAEhC,SAASC,IAAI,QAAQ,oBAAoB;AAEzC,OAAO,MAAMC,wBAAwB,GAC/BC,GAAyB,IAC5BC,GAAW,IACVH,IAAI,CACFE,GAAG,EACHE,MAAM,CAACC,OAAO,EACdN,CAAC,CAACO,SAAS,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAKC,CAAC,CAACE,WAAW,CAAC,CAAC,KAAKP,GAAG,CAACO,WAAW,CAAC,CAAC;AAAA,EAC/D,CAAC"}
@@ -0,0 +1,17 @@
1
+ export const getInputPropsByType = type => {
2
+ switch (type) {
3
+ case "credit-card":
4
+ return {
5
+ valueFormat: v => v.replace(/\D/g, "").replace(/\d{4}?(?=.)/g, "$& "),
6
+ textInputProps: {
7
+ autoComplete: "cc-number",
8
+ keyboardType: "numeric",
9
+ textContentType: "creditCardNumber",
10
+ inputMode: "numeric"
11
+ }
12
+ };
13
+ default:
14
+ return undefined;
15
+ }
16
+ };
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getInputPropsByType","type","valueFormat","v","replace","textInputProps","autoComplete","keyboardType","textContentType","inputMode","undefined"],"sourceRoot":"../../../../src","sources":["utils/textInput/index.ts"],"mappings":"AAWA,OAAO,MAAMA,mBAAmB,GAC9BC,IAAe,IACY;EAC3B,QAAQA,IAAI;IACV,KAAK,aAAa;MAChB,OAAO;QACLC,WAAW,EAAEC,CAAC,IAAIA,CAAC,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC;QACrEC,cAAc,EAAE;UACdC,YAAY,EAAE,WAAW;UACzBC,YAAY,EAAE,SAAS;UACvBC,eAAe,EAAE,kBAAkB;UACnCC,SAAS,EAAE;QACb;MACF,CAAC;IACH;MACE,OAAOC,SAAS;EACpB;AACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * type guard to check if a value is an ImageURISource
3
+ * @argument value the value to check, can be anything
4
+ * @returns boolean
5
+ */
6
+ export const isImageUri = value => typeof value === "object" && value !== null && "uri" in value;
7
+ //# sourceMappingURL=url.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["isImageUri","value"],"sourceRoot":"../../../src","sources":["utils/url.ts"],"mappings":"AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,UAAU,GAAIC,KAAc,IACvC,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI,IAAI,KAAK,IAAIA,KAAK"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export type AccordionItem = {
3
+ id: number;
4
+ title: string;
5
+ body: string | React.ReactNode;
6
+ };
7
+ type AccordionBody = {
8
+ children: React.ReactNode;
9
+ expanded: boolean;
10
+ };
11
+ export declare const AccordionBody: ({ children, expanded }: AccordionBody) => React.JSX.Element;
12
+ export declare const AccordionItem: ({ title, body }: AccordionItem) => React.JSX.Element;
13
+ export {};
14
+ //# sourceMappingURL=AccordionItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AccordionItem.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/AccordionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAoBxC,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAChC,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAUF,eAAO,MAAM,aAAa,2BAA4B,aAAa,sBA6BlE,CAAC;AAEF,eAAO,MAAM,aAAa,oBAAqB,aAAa,sBAgE3D,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export * from "./RawAccordion";
2
- export * from "./IOAccordion";
2
+ export * from "./AccordionItem";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/accordion/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ import { IOColors } from "../../core";
3
+ import { IOIconSizeScale } from "../icons";
4
+ import { IOLogoPaymentExtType } from "../logos";
5
+ export type LogoPaymentWithFallback = {
6
+ brand?: string;
7
+ fallbackIconColor?: IOColors;
8
+ size?: IOIconSizeScale;
9
+ isExtended?: boolean;
10
+ };
11
+ export type LogoPaymentExtOrDefaultIconProps = {
12
+ cardIcon?: IOLogoPaymentExtType;
13
+ fallbackIconColor?: IOColors;
14
+ size?: IOIconSizeScale;
15
+ };
16
+ /**
17
+ * This component renders either
18
+ * - a LogoPayment/LogoPaymentExt component
19
+ * - a default credit card icon
20
+ * @param cardIcon: IOLogoPaymentType icon
21
+ * @param size: the size of the icon (standard is 24/48)
22
+ * @param fallbackIconColor: default icon color (standard is grey-700)
23
+ * @param isExtended: if true, renders a LogoPaymentExt component
24
+ * @returns a LogoPayment/LogopaymentExt component if the cardIcon is supported, a default credit card icon otherwise
25
+ */
26
+ export declare const LogoPaymentWithFallback: ({ brand, fallbackIconColor, isExtended, size }: LogoPaymentWithFallback) => React.JSX.Element;
27
+ //# sourceMappingURL=LogoPaymentWithFallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogoPaymentWithFallback.d.ts","sourceRoot":"","sources":["../../../../src/components/common/LogoPaymentWithFallback.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAQ,MAAM,UAAU,CAAC;AACjD,OAAO,EACL,oBAAoB,EAMrB,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,MAAM,MAAM,gCAAgC,GAAG;IAC7C,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAC7B,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB,CAAC;AACF;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB,mDAKjC,uBAAuB,sBAkBzB,CAAC"}
@@ -17,4 +17,5 @@ export * from "./switch";
17
17
  export * from "./tag";
18
18
  export * from "./tabs";
19
19
  export * from "./typography";
20
+ export * from "./textInput";
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
@@ -3,20 +3,28 @@ import { ImageURISource } from "react-native";
3
3
  import { WithTestID } from "../../utils/types";
4
4
  import { IOLogoPaymentType } from "../logos";
5
5
  import { PressableBaseProps } from "./PressableListItemsBase";
6
- type LogoNameOrUri = IOLogoPaymentType | ImageURISource;
6
+ export type ListItemTransactionStatus = "success" | "failure" | "pending" | "cancelled" | "refunded" | "reversal";
7
+ type PaymentLogoIcon = IOLogoPaymentType | ImageURISource | React.ReactNode;
7
8
  export type ListItemTransaction = WithTestID<PressableBaseProps & {
8
9
  hasChevronRight?: boolean;
9
10
  isLoading?: boolean;
10
- paymentLogoOrUrl?: LogoNameOrUri;
11
+ /**
12
+ * A logo that will be displayed on the left of the list item.
13
+ *
14
+ * Must be a {@link IOLogoPaymentType} or an {@link ImageURISource} or an {@link Icon}.
15
+ */
16
+ paymentLogoIcon?: PaymentLogoIcon;
11
17
  subtitle: string;
12
18
  title: string;
13
19
  } & ({
14
- transactionStatus: "success";
20
+ transactionStatus: "success" | "refunded";
21
+ badgeText?: string;
15
22
  transactionAmount: string;
16
23
  } | {
17
- transactionStatus: "failure" | "pending";
24
+ transactionStatus: "failure" | "pending" | "cancelled" | "reversal";
25
+ badgeText: string;
18
26
  transactionAmount?: string;
19
27
  })>;
20
- export declare const ListItemTransaction: ({ accessibilityLabel, hasChevronRight, isLoading, paymentLogoOrUrl, onPress, subtitle, testID, title, transactionAmount, transactionStatus }: ListItemTransaction) => React.JSX.Element;
28
+ export declare const ListItemTransaction: ({ accessibilityLabel, hasChevronRight, isLoading, paymentLogoIcon, onPress, subtitle, testID, title, transactionAmount, badgeText, transactionStatus }: ListItemTransaction) => React.JSX.Element;
21
29
  export {};
22
30
  //# sourceMappingURL=ListItemTransaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemTransaction.d.ts","sourceRoot":"","sources":["../../../../src/components/listitems/ListItemTransaction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAoB,MAAM,cAAc,CAAC;AAUhE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,OAAO,EAAE,iBAAiB,EAAe,MAAM,UAAU,CAAC;AAG1D,OAAO,EACL,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAElC,KAAK,aAAa,GAAG,iBAAiB,GAAG,cAAc,CAAC;AACxD,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,kBAAkB,GAAG;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,aAAa,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,CACE;IACE,iBAAiB,EAAE,SAAS,CAAC;IAC7B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,iBAAiB,EAAE,SAAS,GAAG,SAAS,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CACJ,CACJ,CAAC;AA8BF,eAAO,MAAM,mBAAmB,iJAW7B,mBAAmB,sBAgFrB,CAAC"}
1
+ {"version":3,"file":"ListItemTransaction.d.ts","sourceRoot":"","sources":["../../../../src/components/listitems/ListItemTransaction.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAoB,MAAM,cAAc,CAAC;AAehE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAG7C,OAAO,EACL,kBAAkB,EAEnB,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,yBAAyB,GACjC,SAAS,GACT,SAAS,GACT,SAAS,GACT,WAAW,GACX,UAAU,GACV,UAAU,CAAC;AAEf,KAAK,eAAe,GAAG,iBAAiB,GAAG,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC;AAE5E,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,kBAAkB,GAAG;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,CACE;IACE,iBAAiB,EAAE,SAAS,GAAG,UAAU,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;CAC3B,GACD;IACE,iBAAiB,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IACpE,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CACJ,CACJ,CAAC;AA2BF,eAAO,MAAM,mBAAmB,2JAY7B,mBAAmB,sBA2GrB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { TextInputBase } from "./TextInputBase";
3
+ type TextInputProps = Omit<React.ComponentProps<typeof TextInputBase>, "rightElement" | "status" | "bottomMessageColor" | "isPassword" | "errorMessage">;
4
+ export declare const TextInput: (props: TextInputProps) => React.JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=TextInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,cAAc,GAAG,IAAI,CACxB,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EACxC,cAAc,GACd,QAAQ,GACR,oBAAoB,GACpB,YAAY,GACZ,cAAc,CACjB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,cAAc,sBAE9C,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { TextInput } from "react-native";
2
+ import React from "react";
3
+ import { IOColors } from "../../core";
4
+ import { IOIcons } from "../icons";
5
+ import { InputType } from "../../utils/types";
6
+ type InputStatus = "initial" | "focused" | "disabled" | "error";
7
+ type RNTextInputProps = Pick<React.ComponentProps<typeof TextInput>, "keyboardType" | "inputMode" | "textContentType" | "autoComplete">;
8
+ type InputTextProps = {
9
+ placeholder: string;
10
+ value: string;
11
+ onChangeText: (value: string) => void;
12
+ accessibilityLabel?: string;
13
+ textInputProps?: RNTextInputProps;
14
+ inputTyoe?: InputType;
15
+ status?: InputStatus;
16
+ icon?: IOIcons;
17
+ rightElement?: React.ReactNode;
18
+ counterLimit?: number;
19
+ bottomMessage?: string;
20
+ bottomMessageColor?: IOColors;
21
+ disabled?: boolean;
22
+ isPassword?: boolean;
23
+ onBlur?: () => void;
24
+ onFocus?: () => void;
25
+ };
26
+ export declare const TextInputBase: ({ disabled, placeholder, value, onChangeText, accessibilityLabel, textInputProps, inputTyoe, status, icon, rightElement, counterLimit, bottomMessage, bottomMessageColor, onBlur, onFocus, isPassword }: InputTextProps) => React.JSX.Element;
27
+ export {};
28
+ //# sourceMappingURL=TextInputBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInputBase.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInputBase.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,SAAS,EAGV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAkD,MAAM,OAAO,CAAC;AAOvE,OAAO,EAAE,QAAQ,EAA4B,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,OAAO,EAAQ,MAAM,UAAU,CAAC;AAGzC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,KAAK,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAEhE,KAAK,gBAAgB,GAAG,IAAI,CAC1B,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EACtC,cAAc,GAAG,WAAW,GAAG,iBAAiB,GAAG,cAAc,CAClE,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,gBAAgB,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kBAAkB,CAAC,EAAE,QAAQ,CAAC;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAwFF,eAAO,MAAM,aAAa,4MAiBvB,cAAc,sBA+KhB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import { TextInputBase } from "./TextInputBase";
3
+ type TextInputPasswordProps = Omit<React.ComponentProps<typeof TextInputBase>, "isPassword">;
4
+ export declare const TextInputPassword: (props: TextInputPasswordProps) => React.JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=TextInputPassword.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInputPassword.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInputPassword.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,sBAAsB,GAAG,IAAI,CAChC,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAC1C,YAAY,CACb,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,sBA0B9D,CAAC"}
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { TextInputBase } from "./TextInputBase";
3
+ type TextInputValidationProps = Omit<React.ComponentProps<typeof TextInputBase>, "rightElement" | "status" | "bottomMessageColor" | "isPassword"> & {
4
+ onValidate: (value: string) => boolean;
5
+ errorMessage?: string;
6
+ };
7
+ export declare const TextInputValidation: (props: TextInputValidationProps) => React.JSX.Element;
8
+ export default TextInputValidation;
9
+ //# sourceMappingURL=TextInputValidation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextInputValidation.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/TextInputValidation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,wBAAwB,GAAG,IAAI,CAClC,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAC1C,cAAc,GAAG,QAAQ,GAAG,oBAAoB,GAAG,YAAY,CAChE,GAAG;IACF,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,UAAW,wBAAwB,sBAsDlE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./TextInput";
2
+ export * from "./TextInputPassword";
3
+ export * from "./TextInputValidation";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/textInput/index.tsx"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC"}
@@ -7,6 +7,11 @@ export declare const IOSpringValues: {
7
7
  mass: number;
8
8
  stiffness: number;
9
9
  };
10
+ accordion: {
11
+ damping: number;
12
+ mass: number;
13
+ stiffness: number;
14
+ };
10
15
  selection: {
11
16
  damping: number;
12
17
  mass: number;
@@ -1 +1 @@
1
- {"version":3,"file":"IOAnimations.d.ts","sourceRoot":"","sources":["../../../src/core/IOAnimations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;CAa1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;CAazB,CAAC"}
1
+ {"version":3,"file":"IOAnimations.d.ts","sourceRoot":"","sources":["../../../src/core/IOAnimations.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;CAkB1B,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;CAazB,CAAC"}
@@ -6,5 +6,6 @@ export declare const IOTagRadius: IORadiusScale;
6
6
  export declare const IOBottomSheetHeaderRadius: IORadiusScale;
7
7
  export declare const IOListItemIDPRadius: IORadiusScale;
8
8
  export declare const IOBadgeRadius: IORadiusScale;
9
+ export declare const IOAccordionRadius: IORadiusScale;
9
10
  export {};
10
11
  //# sourceMappingURL=IOShapes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IOShapes.d.ts","sourceRoot":"","sources":["../../../src/core/IOShapes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,yBAA0B,CAAC;AACrD,KAAK,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAOpD,eAAO,MAAM,aAAa,EAAE,aAA+B,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAE,aAA+B,CAAC;AAC7D,eAAO,MAAM,WAAW,EAAE,aAAiB,CAAC;AAC5C,eAAO,MAAM,yBAAyB,EAAE,aAAkB,CAAC;AAC3D,eAAO,MAAM,mBAAmB,EAAE,aAA+B,CAAC;AAClE,eAAO,MAAM,aAAa,EAAE,aAAkB,CAAC"}
1
+ {"version":3,"file":"IOShapes.d.ts","sourceRoot":"","sources":["../../../src/core/IOShapes.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,yBAA0B,CAAC;AACrD,KAAK,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAOpD,eAAO,MAAM,aAAa,EAAE,aAA+B,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAE,aAA+B,CAAC;AAC7D,eAAO,MAAM,WAAW,EAAE,aAAiB,CAAC;AAC5C,eAAO,MAAM,yBAAyB,EAAE,aAAkB,CAAC;AAC3D,eAAO,MAAM,mBAAmB,EAAE,aAA+B,CAAC;AAClE,eAAO,MAAM,aAAa,EAAE,aAAkB,CAAC;AAC/C,eAAO,MAAM,iBAAiB,EAAE,aAA+B,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This function is used to get the text that will be read by the screen reader
3
+ * with the correct minus symbol pronunciation.
4
+ */
5
+ export declare const getAccessibleAmountText: (amount?: string) => string | undefined;
6
+ //# sourceMappingURL=accessibility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility.d.ts","sourceRoot":"","sources":["../../../src/utils/accessibility.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,uBAAuB,YAAa,MAAM,uBAQpD,CAAC"}
@@ -0,0 +1,5 @@
1
+ import * as O from "fp-ts/Option";
2
+ export declare const findFirstCaseInsensitive: <T>(obj: {
3
+ [key: string]: T;
4
+ }) => (key: string) => O.Option<[string, T]>;
5
+ //# sourceMappingURL=object.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object.d.ts","sourceRoot":"","sources":["../../../src/utils/object.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAGlC,eAAO,MAAM,wBAAwB;;YAE7B,MAAM,0BAKT,CAAC"}
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { TextInputBase } from "../../components/textInput/TextInputBase";
3
+ import { InputType } from "../types";
4
+ type InputProps = Pick<React.ComponentProps<typeof TextInputBase>, "textInputProps"> & {
5
+ valueFormat?: (value: string) => string;
6
+ };
7
+ export declare const getInputPropsByType: (type: InputType) => InputProps | undefined;
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/textInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,KAAK,UAAU,GAAG,IAAI,CACpB,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAC1C,gBAAgB,CACjB,GAAG;IACF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,mBAAmB,SACxB,SAAS,KACd,UAAU,GAAG,SAef,CAAC"}
@@ -25,5 +25,6 @@ type Without<T, U> = {
25
25
  * Ensure that the types T and U are mutually exclusive
26
26
  */
27
27
  export type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
28
+ export type InputType = "credit-card" | "default";
28
29
  export {};
29
30
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAGvC,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,KAAK,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAExD;;GAEG;AACH,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,MAAM,GACxC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GACzC,CAAC,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAGvC,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,KAAK,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAExD;;GAEG;AACH,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,IAAI;KAAG,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK;CAAE,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,MAAM,GACxC,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GACzC,CAAC,GAAG,CAAC,CAAC;AAEV,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ImageURISource } from "react-native";
2
+ /**
3
+ * type guard to check if a value is an ImageURISource
4
+ * @argument value the value to check, can be anything
5
+ * @returns boolean
6
+ */
7
+ export declare const isImageUri: (value: unknown) => value is ImageURISource;
8
+ //# sourceMappingURL=url.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../src/utils/url.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;GAIG;AACH,eAAO,MAAM,UAAU,UAAW,OAAO,4BACsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-app-design-system",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "test",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",