sapo-components-ui-rn 1.1.16 → 1.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { useWindowDimensions, Platform, StyleSheet, Dimensions, useColorScheme, TouchableOpacity, View as View$1, Text as Text$2, Animated as Animated$1, Pressable, I18nManager, TextInput as TextInput$1, Modal, Keyboard, ActivityIndicator, ImageBackground, Image as Image$2 } from 'react-native';
1
+ import { Dimensions, Platform, StyleSheet, useColorScheme, TouchableOpacity, View as View$1, Text as Text$2, Animated as Animated$1, Pressable, I18nManager, useWindowDimensions, TextInput as TextInput$1, Modal, Keyboard, ActivityIndicator, ImageBackground, Image as Image$2 } from 'react-native';
2
2
  import * as React$3 from 'react';
3
3
  import React__default, { memo, useCallback, forwardRef as forwardRef$1, useMemo, useState, useEffect, useRef, useImperativeHandle } from 'react';
4
4
  import require$$1 from 'deepmerge';
@@ -215,7 +215,8 @@ var yellow = {
215
215
  YELLOW_STATUS: YELLOW_STATUS,
216
216
  };
217
217
 
218
- var _a$1 = useWindowDimensions(), height = _a$1.height, width = _a$1.width;
218
+ var DEVICE_HEIGHT = Dimensions.get("window").height;
219
+ var DEVICE_WIDTH = Dimensions.get("window").width;
219
220
  var ref = {
220
221
  palette: {
221
222
  dark: {
@@ -572,8 +573,8 @@ var typescale = {
572
573
  };
573
574
  var ThemeColors = ref.palette;
574
575
  var CONSTANTS = {
575
- DEVICE_HEIGHT: height,
576
- DEVICE_WIDTH: width,
576
+ DEVICE_HEIGHT: DEVICE_HEIGHT,
577
+ DEVICE_WIDTH: DEVICE_WIDTH,
577
578
  HEADER_HEIGHT: 50,
578
579
  BUTTON_HEIGHT: 48,
579
580
  BUTTON_HEIGHT_SMALL: 36,
@@ -5031,11 +5032,13 @@ var IconCheckbox = function (props) { return (React$3.createElement(Svg, __assig
5031
5032
  React$3.createElement(Rect, { x: 2.75, y: 2.75, width: 18.5, height: 18.5, rx: 5.25, fill: "currentColor", stroke: "#A1A5AB", strokeWidth: 1.5 }))); };
5032
5033
 
5033
5034
  var IconRadio = function (props) { return (React$3.createElement(Svg, __assign({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none" }, props),
5034
- React$3.createElement(Circle, { cx: 12, cy: 12, r: 9.25, stroke: "#A1A5AB", strokeWidth: 1.5 }))); };
5035
+ React$3.createElement(Path, { d: "M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z", fill: "#9F9FA9" }),
5036
+ React$3.createElement(Path, { d: "M6 12C6 8.68629 8.68629 6 12 6C15.3137 6 18 8.68629 18 12C18 15.3137 15.3137 18 12 18C8.68629 18 6 15.3137 6 12Z", fill: "white" }))); };
5035
5037
 
5036
5038
  var IconRadioActive = function (props) { return (React$3.createElement(Svg, __assign({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none" }, props),
5037
- React$3.createElement(Circle, { cx: 12, cy: 12, r: 9.25, stroke: "currentColor", strokeWidth: 1.5 }),
5038
- React$3.createElement(Circle, { cx: 12, cy: 12, r: 6, fill: "currentColor" }))); };
5039
+ React$3.createElement(Path, { d: "M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12Z", fill: "#0071ED" }),
5040
+ React$3.createElement(Circle, { cx: "12", cy: "12", r: "6", fill: "white" }),
5041
+ React$3.createElement(Circle, { cx: "12", cy: "12", r: "4", fill: "#0071ED" }))); };
5039
5042
 
5040
5043
  var IconRadioDisable = function (props) { return (React$3.createElement(Svg, __assign({ width: 24, height: 24, viewBox: "0 0 24 24", fill: "none" }, props),
5041
5044
  React$3.createElement(Circle, { cx: 12, cy: 12, r: 9.25, stroke: "#E5E7EB", strokeWidth: 1.5 }),
@@ -5758,6 +5761,7 @@ var TextInputNumber = function (_a) {
5758
5761
  }
5759
5762
  setIsFirstInput(false);
5760
5763
  }
5764
+ // Nếu type là float, không cho phép nhập "000" ở đầu
5761
5765
  }
5762
5766
  else if (key === ".") {
5763
5767
  if (!inputValue.includes(".")) {
@@ -5773,6 +5777,10 @@ var TextInputNumber = function (_a) {
5773
5777
  }
5774
5778
  else {
5775
5779
  if (isFirstInput) {
5780
+ // Nếu type là float và key là "0", không cho phép nhập số 0 đầu tiên
5781
+ if (type === "float" && (key === "0" || key === "000")) {
5782
+ return;
5783
+ }
5776
5784
  setInputValue(key);
5777
5785
  setIsFirstInput(false);
5778
5786
  }