@getsoren/react-native-design-system 1.38.0 → 1.38.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.
@@ -19,10 +19,11 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
19
19
  const RIPPLE_ALPHA = 0.32;
20
20
 
21
21
  /**
22
- * Since React Native 0.80, when the Android ripple (`nativeBackgroundAndroid`) and the background color change
23
- * in the same update, the old background color stays on screen (facebook/react-native#54298).
24
- * RNEUI's Button derives the ripple from the title color, which changes with `disabled`, so a button going from
25
- * disabled to enabled kept its grey background on Android. We give it a ripple that does not depend on `disabled`.
22
+ * Since React Native 0.80, setting an Android ripple as a background (`nativeBackgroundAndroid`) breaks later
23
+ * background color updates: the native side builds a throwaway drawable that steals the invalidation callback
24
+ * of the real background, so a button going from disabled to enabled kept its grey background
25
+ * (facebook/react-native#54298, #54372). We draw the ripple as a foreground instead (`useForeground`), which
26
+ * never touches the background pipeline, and keep the ripple color independent of `disabled`.
26
27
  */
27
28
  const Button = ({
28
29
  background,
@@ -51,6 +52,7 @@ const Button = ({
51
52
  }, [isError, isSolid, theme.colors.errorDark, theme.colors.primary]);
52
53
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_themed.Button, {
53
54
  background: background ?? androidBackground,
55
+ useForeground: _reactNative.Platform.OS === "android",
54
56
  ...props
55
57
  });
56
58
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_themed","require","_react","_reactNative","_hexToRgba","_interopRequireDefault","_jsxRuntime","e","__esModule","default","RIPPLE_ALPHA","Button","background","props","theme","useTheme","variant","color","isSolid","isError","androidBackground","useMemo","Platform","OS","Version","undefined","TouchableNativeFeedback","Ripple","hexToRGBA","colors","errorDark","primary","jsx","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/Inputs/Button/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,I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C,SAAS,EAAEhB,KAAK,CAACe,MAAM,CAACE,OAAO,CAAC,CAAC;EAEpE,oBAAO,IAAAzB,WAAA,CAAA0B,GAAA,EAAChC,OAAA,CAAAW,MAAS;IAACC,UAAU,EAAEA,UAAU,IAAIQ,iBAAkB;IAAA,GAAKP;EAAK,CAAG,CAAC;AAC9E,CAAC;AAAC,IAAAoB,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEaE,MAAM","ignoreList":[]}
1
+ {"version":3,"names":["_themed","require","_react","_reactNative","_hexToRgba","_interopRequireDefault","_jsxRuntime","e","__esModule","default","RIPPLE_ALPHA","Button","background","props","theme","useTheme","variant","color","isSolid","isError","androidBackground","useMemo","Platform","OS","Version","undefined","TouchableNativeFeedback","Ripple","hexToRGBA","colors","errorDark","primary","jsx","useForeground","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/Inputs/Button/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAAiD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAI,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEjD,MAAMG,YAAY,GAAG,IAAI;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,MAAM,GAAGA,CAAC;EAAEC,UAAU;EAAE,GAAGC;AAAmB,CAAC,KAAK;EACxD,MAAM;IAAEC;EAAM,CAAC,GAAG,IAAAC,gBAAQ,EAAC,CAAC;EAC5B,MAAM;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGJ,KAAK;EAChC,MAAMK,OAAO,GAAG,CAACF,OAAO,IAAIA,OAAO,KAAK,WAAW;EACnD,MAAMG,OAAO,GAAGF,KAAK,KAAK,OAAO;EAEjC,MAAMG,iBAAiB,GAAG,IAAAC,cAAO,EAAC,MAAM;IACtC,IAAIC,qBAAQ,CAACC,EAAE,KAAK,SAAS,IAAID,qBAAQ,CAACE,OAAO,GAAG,EAAE,EAAE;MACtD,OAAOC,SAAS;IAClB;IAEA,IAAIN,OAAO,EAAE;MACX,OAAOO,oCAAuB,CAACC,MAAM,CAAC,IAAAC,kBAAS,EAACd,KAAK,CAACe,MAAM,CAACC,SAAS,EAAEpB,YAAY,CAAC,EAAE,KAAK,CAAC;IAC/F;IAEA,IAAIQ,OAAO,EAAE;MACX,OAAOQ,oCAAuB,CAACC,MAAM,CAAC,uBAAuBjB,YAAY,GAAG,EAAE,KAAK,CAAC;IACtF;IAEA,OAAOgB,oCAAuB,CAACC,MAAM,CAAC,IAAAC,kBAAS,EAACd,KAAK,CAACe,MAAM,CAACE,OAAO,EAAErB,YAAY,CAAC,EAAE,KAAK,CAAC;EAC7F,CAAC,EAAE,CAACS,OAAO,EAAED,OAAO,EAAEJ,KAAK,CAACe,MAAM,CAACC,SAAS,EAAEhB,KAAK,CAACe,MAAM,CAACE,OAAO,CAAC,CAAC;EAEpE,oBAAO,IAAAzB,WAAA,CAAA0B,GAAA,EAAChC,OAAA,CAAAW,MAAS;IAACC,UAAU,EAAEA,UAAU,IAAIQ,iBAAkB;IAACa,aAAa,EAAEX,qBAAQ,CAACC,EAAE,KAAK,SAAU;IAAA,GAAKV;EAAK,CAAG,CAAC;AACxH,CAAC;AAAC,IAAAqB,QAAA,GAAAC,OAAA,CAAA1B,OAAA,GAEaE,MAAM","ignoreList":[]}
@@ -8,10 +8,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const RIPPLE_ALPHA = 0.32;
9
9
 
10
10
  /**
11
- * Since React Native 0.80, when the Android ripple (`nativeBackgroundAndroid`) and the background color change
12
- * in the same update, the old background color stays on screen (facebook/react-native#54298).
13
- * RNEUI's Button derives the ripple from the title color, which changes with `disabled`, so a button going from
14
- * disabled to enabled kept its grey background on Android. We give it a ripple that does not depend on `disabled`.
11
+ * Since React Native 0.80, setting an Android ripple as a background (`nativeBackgroundAndroid`) breaks later
12
+ * background color updates: the native side builds a throwaway drawable that steals the invalidation callback
13
+ * of the real background, so a button going from disabled to enabled kept its grey background
14
+ * (facebook/react-native#54298, #54372). We draw the ripple as a foreground instead (`useForeground`), which
15
+ * never touches the background pipeline, and keep the ripple color independent of `disabled`.
15
16
  */
16
17
  const Button = ({
17
18
  background,
@@ -40,6 +41,7 @@ const Button = ({
40
41
  }, [isError, isSolid, theme.colors.errorDark, theme.colors.primary]);
41
42
  return /*#__PURE__*/_jsx(RNEButton, {
42
43
  background: background ?? androidBackground,
44
+ useForeground: Platform.OS === "android",
43
45
  ...props
44
46
  });
45
47
  };
@@ -1 +1 @@
1
- {"version":3,"names":["ButtonProps","Button","RNEButton","useTheme","useMemo","Platform","TouchableNativeFeedback","hexToRGBA","jsx","_jsx","RIPPLE_ALPHA","background","props","theme","variant","color","isSolid","isError","androidBackground","OS","Version","undefined","Ripple","colors","errorDark","primary"],"sourceRoot":"../../../../../src","sources":["components/Inputs/Button/index.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,MAAM,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,eAAe;AAC1E,SAASC,OAAO,QAAQ,OAAO;AAC/B,SAASC,QAAQ,EAAEC,uBAAuB,QAAQ,cAAc;AAChE,OAAOC,SAAS,MAAM,0BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjD,MAAMC,YAAY,GAAG,IAAI;;AAEzB;AACA;AACA;AACA;AACA;AACA;AACA,MAAMT,MAAM,GAAGA,CAAC;EAAEU,UAAU;EAAE,GAAGC;AAAmB,CAAC,KAAK;EACxD,MAAM;IAAEC;EAAM,CAAC,GAAGV,QAAQ,CAAC,CAAC;EAC5B,MAAM;IAAEW,OAAO;IAAEC;EAAM,CAAC,GAAGH,KAAK;EAChC,MAAMI,OAAO,GAAG,CAACF,OAAO,IAAIA,OAAO,KAAK,WAAW;EACnD,MAAMG,OAAO,GAAGF,KAAK,KAAK,OAAO;EAEjC,MAAMG,iBAAiB,GAAGd,OAAO,CAAC,MAAM;IACtC,IAAIC,QAAQ,CAACc,EAAE,KAAK,SAAS,IAAId,QAAQ,CAACe,OAAO,GAAG,EAAE,EAAE;MACtD,OAAOC,SAAS;IAClB;IAEA,IAAIJ,OAAO,EAAE;MACX,OAAOX,uBAAuB,CAACgB,MAAM,CAACf,SAAS,CAACM,KAAK,CAACU,MAAM,CAACC,SAAS,EAAEd,YAAY,CAAC,EAAE,KAAK,CAAC;IAC/F;IAEA,IAAIM,OAAO,EAAE;MACX,OAAOV,uBAAuB,CAACgB,MAAM,CAAC,uBAAuBZ,YAAY,GAAG,EAAE,KAAK,CAAC;IACtF;IAEA,OAAOJ,uBAAuB,CAACgB,MAAM,CAACf,SAAS,CAACM,KAAK,CAACU,MAAM,CAACE,OAAO,EAAEf,YAAY,CAAC,EAAE,KAAK,CAAC;EAC7F,CAAC,EAAE,CAACO,OAAO,EAAED,OAAO,EAAEH,KAAK,CAACU,MAAM,CAACC,SAAS,EAAEX,KAAK,CAACU,MAAM,CAACE,OAAO,CAAC,CAAC;EAEpE,oBAAOhB,IAAA,CAACP,SAAS;IAACS,UAAU,EAAEA,UAAU,IAAIO,iBAAkB;IAAA,GAAKN;EAAK,CAAG,CAAC;AAC9E,CAAC;AAED,eAAeX,MAAM;AACrB,SAASD,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["ButtonProps","Button","RNEButton","useTheme","useMemo","Platform","TouchableNativeFeedback","hexToRGBA","jsx","_jsx","RIPPLE_ALPHA","background","props","theme","variant","color","isSolid","isError","androidBackground","OS","Version","undefined","Ripple","colors","errorDark","primary","useForeground"],"sourceRoot":"../../../../../src","sources":["components/Inputs/Button/index.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,MAAM,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,eAAe;AAC1E,SAASC,OAAO,QAAQ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IAAIO,iBAAkB;IAACQ,aAAa,EAAErB,QAAQ,CAACc,EAAE,KAAK,SAAU;IAAA,GAAKP;EAAK,CAAG,CAAC;AACxH,CAAC;AAED,eAAeX,MAAM;AACrB,SAASD,WAAW","ignoreList":[]}
@@ -1,9 +1,10 @@
1
1
  import { ButtonProps } from "@rneui/themed";
2
2
  /**
3
- * Since React Native 0.80, when the Android ripple (`nativeBackgroundAndroid`) and the background color change
4
- * in the same update, the old background color stays on screen (facebook/react-native#54298).
5
- * RNEUI's Button derives the ripple from the title color, which changes with `disabled`, so a button going from
6
- * disabled to enabled kept its grey background on Android. We give it a ripple that does not depend on `disabled`.
3
+ * Since React Native 0.80, setting an Android ripple as a background (`nativeBackgroundAndroid`) breaks later
4
+ * background color updates: the native side builds a throwaway drawable that steals the invalidation callback
5
+ * of the real background, so a button going from disabled to enabled kept its grey background
6
+ * (facebook/react-native#54298, #54372). We draw the ripple as a foreground instead (`useForeground`), which
7
+ * never touches the background pipeline, and keep the ripple color independent of `disabled`.
7
8
  */
8
9
  declare const Button: ({ background, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
9
10
  export default Button;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Inputs/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiC,MAAM,eAAe,CAAC;AAO3E;;;;;GAKG;AACH,QAAA,MAAM,MAAM,GAAI,0BAA0B,WAAW,4CAuBpD,CAAC;AAEF,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Inputs/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAiC,MAAM,eAAe,CAAC;AAO3E;;;;;;GAMG;AACH,QAAA,MAAM,MAAM,GAAI,0BAA0B,WAAW,4CAuBpD,CAAC;AAEF,eAAe,MAAM,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getsoren/react-native-design-system",
3
- "version": "1.38.0",
3
+ "version": "1.38.1",
4
4
  "description": "Design System mobile",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",