@pagopa/io-app-design-system 5.5.0 → 5.5.1

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.
@@ -4,30 +4,31 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.ContentWrapper = void 0;
7
- var _react = _interopRequireDefault(require("react"));
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _IOStyles = require("../../core/IOStyles");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
13
  /**
13
14
  `ContentWrapper` is the main wrapper of the application. It automatically sets side margins,
14
15
  depending on the size value
15
16
  @param {IOContentWrapper} margin
16
17
  */
17
- const ContentWrapper = ({
18
+ const ContentWrapper = exports.ContentWrapper = /*#__PURE__*/(0, _react.forwardRef)(({
18
19
  margin = _IOStyles.IOVisualCostants.appMarginDefault,
19
20
  style,
20
21
  children,
21
22
  testID,
22
23
  ...rest
23
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
24
+ }, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
24
25
  testID: testID,
25
26
  style: {
26
27
  paddingHorizontal: margin,
27
28
  ...style
28
29
  },
30
+ ref: ref,
29
31
  ...rest,
30
32
  children: children
31
- });
32
- exports.ContentWrapper = ContentWrapper;
33
+ }));
33
34
  //# sourceMappingURL=ContentWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_IOStyles","_jsxRuntime","e","__esModule","default","ContentWrapper","margin","IOVisualCostants","appMarginDefault","style","children","testID","rest","jsx","View","paddingHorizontal","exports"],"sourceRoot":"../../../../src","sources":["components/contentWrapper/ContentWrapper.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AAAuD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAavD;AACA;AACA;AACA;AACA;AACO,MAAMG,cAAc,GAAGA,CAAC;EAC7BC,MAAM,GAAGC,0BAAgB,CAACC,gBAAgB;EAC1CC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACN,GAAGC;AACkB,CAAC,kBACtB,IAAAX,WAAA,CAAAY,GAAA,EAACd,YAAA,CAAAe,IAAI;EACHH,MAAM,EAAEA,MAAO;EACfF,KAAK,EAAE;IACLM,iBAAiB,EAAET,MAAM;IACzB,GAAGG;EACL,CAAE;EAAA,GACEG,IAAI;EAAAF,QAAA,EAEPA;AAAQ,CACL,CACP;AAACM,OAAA,CAAAX,cAAA,GAAAA,cAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_IOStyles","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ContentWrapper","exports","forwardRef","margin","IOVisualCostants","appMarginDefault","style","children","testID","rest","ref","jsx","View","paddingHorizontal"],"sourceRoot":"../../../../src","sources":["components/contentWrapper/ContentWrapper.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,SAAA,GAAAF,OAAA;AAAuD,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAI,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAavD;AACA;AACA;AACA;AACA;AACO,MAAMW,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,iBAAU,EACtC,CACE;EACEC,MAAM,GAAGC,0BAAgB,CAACC,gBAAgB;EAC1CC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACN,GAAGC;AACkB,CAAC,EACxBC,GAAG,kBAEH,IAAA/B,WAAA,CAAAgC,GAAA,EAAClC,YAAA,CAAAmC,IAAI;EACHJ,MAAM,EAAEA,MAAO;EACfF,KAAK,EAAE;IACLO,iBAAiB,EAAEV,MAAM;IACzB,GAAGG;EACL,CAAE;EACFI,GAAG,EAAEA,GAAI;EAAA,GACLD,IAAI;EAAAF,QAAA,EAEPA;AAAQ,CACL,CAEV,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import React from "react";
3
+ import React, { forwardRef } from "react";
4
4
  import { View } from "react-native";
5
5
  import { IOVisualCostants } from "../../core/IOStyles";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -9,19 +9,20 @@ import { jsx as _jsx } from "react/jsx-runtime";
9
9
  depending on the size value
10
10
  @param {IOContentWrapper} margin
11
11
  */
12
- export const ContentWrapper = ({
12
+ export const ContentWrapper = /*#__PURE__*/forwardRef(({
13
13
  margin = IOVisualCostants.appMarginDefault,
14
14
  style,
15
15
  children,
16
16
  testID,
17
17
  ...rest
18
- }) => /*#__PURE__*/_jsx(View, {
18
+ }, ref) => /*#__PURE__*/_jsx(View, {
19
19
  testID: testID,
20
20
  style: {
21
21
  paddingHorizontal: margin,
22
22
  ...style
23
23
  },
24
+ ref: ref,
24
25
  ...rest,
25
26
  children: children
26
- });
27
+ }));
27
28
  //# sourceMappingURL=ContentWrapper.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","IOVisualCostants","jsx","_jsx","ContentWrapper","margin","appMarginDefault","style","children","testID","rest","paddingHorizontal"],"sourceRoot":"../../../../src","sources":["components/contentWrapper/ContentWrapper.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAqB,OAAO;AACxC,SAASC,IAAI,QAA8B,cAAc;AAGzD,SAASC,gBAAgB,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAavD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAAC;EAC7BC,MAAM,GAAGJ,gBAAgB,CAACK,gBAAgB;EAC1CC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACN,GAAGC;AACkB,CAAC,kBACtBP,IAAA,CAACH,IAAI;EACHS,MAAM,EAAEA,MAAO;EACfF,KAAK,EAAE;IACLI,iBAAiB,EAAEN,MAAM;IACzB,GAAGE;EACL,CAAE;EAAA,GACEG,IAAI;EAAAF,QAAA,EAEPA;AAAQ,CACL,CACP","ignoreList":[]}
1
+ {"version":3,"names":["React","forwardRef","View","IOVisualCostants","jsx","_jsx","ContentWrapper","margin","appMarginDefault","style","children","testID","rest","ref","paddingHorizontal"],"sourceRoot":"../../../../src","sources":["components/contentWrapper/ContentWrapper.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAmB,OAAO;AACpD,SAASC,IAAI,QAA8B,cAAc;AAGzD,SAASC,gBAAgB,QAAQ,qBAAqB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAavD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,gBAAGL,UAAU,CACtC,CACE;EACEM,MAAM,GAAGJ,gBAAgB,CAACK,gBAAgB;EAC1CC,KAAK;EACLC,QAAQ;EACRC,MAAM;EACN,GAAGC;AACkB,CAAC,EACxBC,GAAG,kBAEHR,IAAA,CAACH,IAAI;EACHS,MAAM,EAAEA,MAAO;EACfF,KAAK,EAAE;IACLK,iBAAiB,EAAEP,MAAM;IACzB,GAAGE;EACL,CAAE;EACFI,GAAG,EAAEA,GAAI;EAAA,GACLD,IAAI;EAAAF,QAAA,EAEPA;AAAQ,CACL,CAEV,CAAC","ignoreList":[]}
@@ -1,17 +1,14 @@
1
1
  import React, { ReactNode } from "react";
2
- import { ViewProps, ViewStyle } from "react-native";
3
- import { WithTestID } from "src/utils/types";
2
+ import { View, ViewProps, ViewStyle } from "react-native";
4
3
  import type { IOAppMargin } from "../../core";
5
- type IOContentWrapperProps = WithTestID<Omit<ViewProps, "style"> & {
6
- margin?: IOAppMargin;
7
- children: ReactNode;
8
- style?: Omit<ViewStyle, "paddingHorizontal" | "paddingLeft" | "paddingRight">;
9
- }>;
10
4
  /**
11
5
  `ContentWrapper` is the main wrapper of the application. It automatically sets side margins,
12
6
  depending on the size value
13
7
  @param {IOContentWrapper} margin
14
8
  */
15
- export declare const ContentWrapper: ({ margin, style, children, testID, ...rest }: IOContentWrapperProps) => React.JSX.Element;
16
- export {};
9
+ export declare const ContentWrapper: React.ForwardRefExoticComponent<Omit<ViewProps, "style"> & {
10
+ margin?: IOAppMargin;
11
+ children: ReactNode;
12
+ style?: Omit<ViewStyle, "paddingHorizontal" | "paddingLeft" | "paddingRight">;
13
+ } & import("src/utils/types").TestID & React.RefAttributes<View>>;
17
14
  //# sourceMappingURL=ContentWrapper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContentWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/contentWrapper/ContentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAQ,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAG9C,KAAK,qBAAqB,GAAG,UAAU,CACrC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACzB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,IAAI,CACV,SAAS,EACT,mBAAmB,GAAG,aAAa,GAAG,cAAc,CACrD,CAAC;CACH,CACF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,8CAM5B,qBAAqB,sBAWvB,CAAC"}
1
+ {"version":3,"file":"ContentWrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/contentWrapper/ContentWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAc9C;;;;GAIG;AACH,eAAO,MAAM,cAAc;aAdd,WAAW;cACV,SAAS;YACX,IAAI,CACV,SAAS,EACT,mBAAmB,GAAG,aAAa,GAAG,cAAc,CACrD;iEAgCJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pagopa/io-app-design-system",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
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",
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from "react";
1
+ import React, { forwardRef, ReactNode } from "react";
2
2
  import { View, ViewProps, ViewStyle } from "react-native";
3
3
  import { WithTestID } from "src/utils/types";
4
4
  import type { IOAppMargin } from "../../core";
@@ -20,21 +20,27 @@ type IOContentWrapperProps = WithTestID<
20
20
  depending on the size value
21
21
  @param {IOContentWrapper} margin
22
22
  */
23
- export const ContentWrapper = ({
24
- margin = IOVisualCostants.appMarginDefault,
25
- style,
26
- children,
27
- testID,
28
- ...rest
29
- }: IOContentWrapperProps) => (
30
- <View
31
- testID={testID}
32
- style={{
33
- paddingHorizontal: margin,
34
- ...style
35
- }}
36
- {...rest}
37
- >
38
- {children}
39
- </View>
23
+ export const ContentWrapper = forwardRef<View, IOContentWrapperProps>(
24
+ (
25
+ {
26
+ margin = IOVisualCostants.appMarginDefault,
27
+ style,
28
+ children,
29
+ testID,
30
+ ...rest
31
+ }: IOContentWrapperProps,
32
+ ref
33
+ ) => (
34
+ <View
35
+ testID={testID}
36
+ style={{
37
+ paddingHorizontal: margin,
38
+ ...style
39
+ }}
40
+ ref={ref}
41
+ {...rest}
42
+ >
43
+ {children}
44
+ </View>
45
+ )
40
46
  );