react-native-better-html 1.0.25 → 1.0.26
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.d.mts +17 -6
- package/dist/index.d.ts +17 -6
- package/dist/index.js +173 -136
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +121 -85
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ __export(index_exports, {
|
|
|
37
37
|
Icon: () => Icon_default,
|
|
38
38
|
Image: () => Image_default,
|
|
39
39
|
InputField: () => InputField_default,
|
|
40
|
+
Label: () => Label_default,
|
|
40
41
|
ListItem: () => ListItem_default,
|
|
41
42
|
Loader: () => Loader_default,
|
|
42
43
|
ScreenHolder: () => ScreenHolder_default,
|
|
@@ -47,38 +48,38 @@ __export(index_exports, {
|
|
|
47
48
|
alertControls: () => alertControls,
|
|
48
49
|
alertsPlugin: () => alertsPlugin,
|
|
49
50
|
asyncStoragePlugin: () => asyncStoragePlugin,
|
|
50
|
-
colorThemeControls: () =>
|
|
51
|
-
countries: () =>
|
|
52
|
-
darkenColor: () =>
|
|
51
|
+
colorThemeControls: () => import_react_better_core19.colorThemeControls,
|
|
52
|
+
countries: () => import_react_better_core19.countries,
|
|
53
|
+
darkenColor: () => import_react_better_core19.darkenColor,
|
|
53
54
|
defaultAlertsPluginOptions: () => defaultAlertsPluginOptions,
|
|
54
55
|
defaultAsyncStoragePluginOptions: () => defaultAsyncStoragePluginOptions,
|
|
55
|
-
desaturateColor: () =>
|
|
56
|
-
eventPreventDefault: () =>
|
|
57
|
-
eventPreventStop: () =>
|
|
58
|
-
eventStopPropagation: () =>
|
|
59
|
-
formatPhoneNumber: () =>
|
|
56
|
+
desaturateColor: () => import_react_better_core19.desaturateColor,
|
|
57
|
+
eventPreventDefault: () => import_react_better_core19.eventPreventDefault,
|
|
58
|
+
eventPreventStop: () => import_react_better_core19.eventPreventStop,
|
|
59
|
+
eventStopPropagation: () => import_react_better_core19.eventStopPropagation,
|
|
60
|
+
formatPhoneNumber: () => import_react_better_core19.formatPhoneNumber,
|
|
60
61
|
generateAsyncStorage: () => generateAsyncStorage,
|
|
61
|
-
generateRandomString: () =>
|
|
62
|
+
generateRandomString: () => import_react_better_core19.generateRandomString,
|
|
62
63
|
getFormErrorObject: () => getFormErrorObject,
|
|
63
|
-
getPluralWord: () =>
|
|
64
|
-
lightenColor: () =>
|
|
65
|
-
loaderControls: () =>
|
|
64
|
+
getPluralWord: () => import_react_better_core19.getPluralWord,
|
|
65
|
+
lightenColor: () => import_react_better_core19.lightenColor,
|
|
66
|
+
loaderControls: () => import_react_better_core19.loaderControls,
|
|
66
67
|
pressStrength: () => pressStrength,
|
|
67
|
-
saturateColor: () =>
|
|
68
|
+
saturateColor: () => import_react_better_core19.saturateColor,
|
|
68
69
|
useAlertControls: () => useAlertControls,
|
|
69
70
|
useBetterComponentsContext: () => useBetterComponentsContext,
|
|
70
|
-
useBooleanState: () =>
|
|
71
|
-
useDebounceState: () =>
|
|
71
|
+
useBooleanState: () => import_react_better_core19.useBooleanState,
|
|
72
|
+
useDebounceState: () => import_react_better_core19.useDebounceState,
|
|
72
73
|
useDevice: () => useDevice,
|
|
73
74
|
useEventEmitter: () => useEventEmitter,
|
|
74
75
|
useForm: () => useForm,
|
|
75
76
|
useKeyboard: () => useKeyboard,
|
|
76
|
-
useLoader: () =>
|
|
77
|
-
useLoaderControls: () =>
|
|
78
|
-
useTheme: () =>
|
|
77
|
+
useLoader: () => import_react_better_core19.useLoader,
|
|
78
|
+
useLoaderControls: () => import_react_better_core19.useLoaderControls,
|
|
79
|
+
useTheme: () => import_react_better_core19.useTheme
|
|
79
80
|
});
|
|
80
81
|
module.exports = __toCommonJS(index_exports);
|
|
81
|
-
var
|
|
82
|
+
var import_react_better_core19 = require("react-better-core");
|
|
82
83
|
|
|
83
84
|
// src/components/BetterComponentsProvider.tsx
|
|
84
85
|
var import_react12 = require("react");
|
|
@@ -1647,11 +1648,24 @@ function generateAsyncStorage() {
|
|
|
1647
1648
|
};
|
|
1648
1649
|
}
|
|
1649
1650
|
|
|
1650
|
-
// src/components/
|
|
1651
|
+
// src/components/Label.tsx
|
|
1651
1652
|
var import_react13 = require("react");
|
|
1652
|
-
var import_react_native8 = require("react-native");
|
|
1653
1653
|
var import_react_better_core12 = require("react-better-core");
|
|
1654
1654
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1655
|
+
function Label({ text, required, isError }) {
|
|
1656
|
+
const theme2 = (0, import_react_better_core12.useTheme)();
|
|
1657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(View_default, { isRow: true, alignItems: "center", gap: 2, children: [
|
|
1658
|
+
text && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { fontSize: 14, color: isError ? theme2.colors.error : theme2.colors.textSecondary, children: text }),
|
|
1659
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { color: theme2.colors.error, children: "*" })
|
|
1660
|
+
] });
|
|
1661
|
+
}
|
|
1662
|
+
var Label_default = (0, import_react13.memo)(Label);
|
|
1663
|
+
|
|
1664
|
+
// src/components/ScreenHolder.tsx
|
|
1665
|
+
var import_react14 = require("react");
|
|
1666
|
+
var import_react_native8 = require("react-native");
|
|
1667
|
+
var import_react_better_core13 = require("react-better-core");
|
|
1668
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1655
1669
|
var ScreenHolderComponent = ({
|
|
1656
1670
|
noScroll,
|
|
1657
1671
|
noSideSpace,
|
|
@@ -1669,17 +1683,17 @@ var ScreenHolderComponent = ({
|
|
|
1669
1683
|
withNoHeader,
|
|
1670
1684
|
children
|
|
1671
1685
|
}) => {
|
|
1672
|
-
const theme2 = (0,
|
|
1686
|
+
const theme2 = (0, import_react_better_core13.useTheme)();
|
|
1673
1687
|
const device = useDevice();
|
|
1674
1688
|
const keyboard = useKeyboard();
|
|
1675
|
-
const [isRefreshing, setIsRefreshing] = (0,
|
|
1676
|
-
const keyboardAvoidingViewStyle = (0,
|
|
1689
|
+
const [isRefreshing, setIsRefreshing] = (0, import_react_better_core13.useBooleanState)();
|
|
1690
|
+
const keyboardAvoidingViewStyle = (0, import_react14.useMemo)(
|
|
1677
1691
|
() => ({
|
|
1678
1692
|
flex: 1
|
|
1679
1693
|
}),
|
|
1680
1694
|
[]
|
|
1681
1695
|
);
|
|
1682
|
-
const onRefreshElement = (0,
|
|
1696
|
+
const onRefreshElement = (0, import_react14.useCallback)(() => {
|
|
1683
1697
|
setIsRefreshing.setTrue();
|
|
1684
1698
|
onRefresh?.();
|
|
1685
1699
|
setTimeout(() => {
|
|
@@ -1687,7 +1701,7 @@ var ScreenHolderComponent = ({
|
|
|
1687
1701
|
onRefreshEnd?.();
|
|
1688
1702
|
}, refreshTimeout * 1e3);
|
|
1689
1703
|
}, [onRefresh, onRefreshEnd, refreshTimeout]);
|
|
1690
|
-
const content = /* @__PURE__ */ (0,
|
|
1704
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1691
1705
|
View_default,
|
|
1692
1706
|
{
|
|
1693
1707
|
flex: 1,
|
|
@@ -1698,21 +1712,21 @@ var ScreenHolderComponent = ({
|
|
|
1698
1712
|
}
|
|
1699
1713
|
);
|
|
1700
1714
|
const withRefresh = onRefresh || onRefreshEnd;
|
|
1701
|
-
return /* @__PURE__ */ (0,
|
|
1715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(View_default, { flex: 1, backgroundColor: backgroundColor ?? theme2.colors.backgroundBase, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1702
1716
|
import_react_native8.KeyboardAvoidingView,
|
|
1703
1717
|
{
|
|
1704
1718
|
style: keyboardAvoidingViewStyle,
|
|
1705
1719
|
keyboardVerticalOffset: keyboardVerticalOffset ?? (withNoHeader ? import_react_native8.Platform.OS === "ios" ? 0 : theme2.styles.gap : keepFooterOnKeyboardOpened ? import_react_native8.Platform.OS === "ios" ? device.safeArea.afterCalculations.bottom : theme2.styles.gap : void 0),
|
|
1706
1720
|
behavior: import_react_native8.Platform.OS === "ios" ? "padding" : "height",
|
|
1707
1721
|
children: [
|
|
1708
|
-
/* @__PURE__ */ (0,
|
|
1722
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(View_default, { flex: 1, children: noScroll ? content : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1709
1723
|
import_react_native8.ScrollView,
|
|
1710
1724
|
{
|
|
1711
|
-
refreshControl: withRefresh ? /* @__PURE__ */ (0,
|
|
1725
|
+
refreshControl: withRefresh ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native8.RefreshControl, { refreshing: isRefreshing, onRefresh: onRefreshElement }) : void 0,
|
|
1712
1726
|
children: content
|
|
1713
1727
|
}
|
|
1714
1728
|
) }),
|
|
1715
|
-
keepFooterOnKeyboardOpened || (import_react_native8.Platform.OS === "ios" ? !keyboard.willOpen : !keyboard.isOpened) ? footer && /* @__PURE__ */ (0,
|
|
1729
|
+
keepFooterOnKeyboardOpened || (import_react_native8.Platform.OS === "ios" ? !keyboard.willOpen : !keyboard.isOpened) ? footer && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(View_default, { children: footer }) : !withNoHeader && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1716
1730
|
View_default,
|
|
1717
1731
|
{
|
|
1718
1732
|
width: "100%",
|
|
@@ -1730,10 +1744,10 @@ ScreenHolderComponent.footer = function Footer({
|
|
|
1730
1744
|
withNoHeader,
|
|
1731
1745
|
children
|
|
1732
1746
|
}) {
|
|
1733
|
-
const theme2 = (0,
|
|
1747
|
+
const theme2 = (0, import_react_better_core13.useTheme)();
|
|
1734
1748
|
const device = useDevice();
|
|
1735
1749
|
const keyboard = useKeyboard();
|
|
1736
|
-
return /* @__PURE__ */ (0,
|
|
1750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1737
1751
|
View_default,
|
|
1738
1752
|
{
|
|
1739
1753
|
backgroundColor: backgroundColor ?? theme2.colors.backgroundBase,
|
|
@@ -1744,17 +1758,17 @@ ScreenHolderComponent.footer = function Footer({
|
|
|
1744
1758
|
}
|
|
1745
1759
|
);
|
|
1746
1760
|
};
|
|
1747
|
-
var ScreenHolder = (0,
|
|
1761
|
+
var ScreenHolder = (0, import_react14.memo)(ScreenHolderComponent);
|
|
1748
1762
|
ScreenHolder.footer = ScreenHolderComponent.footer;
|
|
1749
1763
|
var ScreenHolder_default = ScreenHolder;
|
|
1750
1764
|
|
|
1751
1765
|
// src/components/InputField.tsx
|
|
1752
|
-
var
|
|
1766
|
+
var import_react15 = require("react");
|
|
1753
1767
|
var import_react_native9 = require("react-native");
|
|
1754
1768
|
var import_datetimepicker = __toESM(require("@react-native-community/datetimepicker"));
|
|
1755
|
-
var
|
|
1756
|
-
var
|
|
1757
|
-
var InputFieldComponent = (0,
|
|
1769
|
+
var import_react_better_core14 = require("react-better-core");
|
|
1770
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1771
|
+
var InputFieldComponent = (0, import_react15.forwardRef)(
|
|
1758
1772
|
({
|
|
1759
1773
|
flex,
|
|
1760
1774
|
placeholder,
|
|
@@ -1805,12 +1819,12 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1805
1819
|
onPressEnter,
|
|
1806
1820
|
...props
|
|
1807
1821
|
}, ref) => {
|
|
1808
|
-
const theme2 = (0,
|
|
1809
|
-
const { colorTheme } = (0,
|
|
1810
|
-
const textInputRef = (0,
|
|
1811
|
-
const [internalValue, setInternalValue] = (0,
|
|
1812
|
-
const [internalDateValue, setInternalDateValue] = (0,
|
|
1813
|
-
const [isFocused, setIsFocused] = (0,
|
|
1822
|
+
const theme2 = (0, import_react_better_core14.useTheme)();
|
|
1823
|
+
const { colorTheme } = (0, import_react_better_core14.useBetterCoreContext)();
|
|
1824
|
+
const textInputRef = (0, import_react15.useRef)(null);
|
|
1825
|
+
const [internalValue, setInternalValue] = (0, import_react15.useState)(value?.toString() || defaultValue || "");
|
|
1826
|
+
const [internalDateValue, setInternalDateValue] = (0, import_react15.useState)();
|
|
1827
|
+
const [isFocused, setIsFocused] = (0, import_react_better_core14.useBooleanState)();
|
|
1814
1828
|
const isIOSDateTime = import_react_native9.Platform.OS === "ios" && (type === "date" || type === "time");
|
|
1815
1829
|
const iconSize = 16;
|
|
1816
1830
|
const iconPadding = onPressRightIcon ? theme2.styles.gap : 0;
|
|
@@ -1819,14 +1833,14 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1819
1833
|
const readyPaddingHorizontal = paddingHorizontal ?? theme2.styles.space;
|
|
1820
1834
|
const readyPaddingVertical = paddingVertical ? parseFloat(paddingVertical.toString()) : (theme2.styles.space + theme2.styles.gap) / 2;
|
|
1821
1835
|
const readyHeight = height ?? isIOSDateTime ? void 0 : borderWidth + readyPaddingVertical + lineHeight + readyPaddingVertical + borderWidth + (import_react_native9.Platform.OS === "android" ? 2 : 0);
|
|
1822
|
-
const onValueChangeRNDateTimePicker = (0,
|
|
1836
|
+
const onValueChangeRNDateTimePicker = (0, import_react15.useCallback)(
|
|
1823
1837
|
(event, data) => {
|
|
1824
1838
|
setInternalDateValue(data);
|
|
1825
1839
|
onChange?.(data?.toISOString() ?? "");
|
|
1826
1840
|
},
|
|
1827
1841
|
[onChange]
|
|
1828
1842
|
);
|
|
1829
|
-
const onPressInputField = (0,
|
|
1843
|
+
const onPressInputField = (0, import_react15.useCallback)(
|
|
1830
1844
|
(event) => {
|
|
1831
1845
|
onPress?.(event);
|
|
1832
1846
|
if (type === "date" || type === "time") {
|
|
@@ -1854,22 +1868,22 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1854
1868
|
},
|
|
1855
1869
|
[onPress, type, internalDateValue, onValueChangeRNDateTimePicker]
|
|
1856
1870
|
);
|
|
1857
|
-
const onFocusElement = (0,
|
|
1871
|
+
const onFocusElement = (0, import_react15.useCallback)((event) => {
|
|
1858
1872
|
setIsFocused.setTrue();
|
|
1859
1873
|
onFocus?.(event);
|
|
1860
1874
|
}, []);
|
|
1861
|
-
const onBlurElement = (0,
|
|
1875
|
+
const onBlurElement = (0, import_react15.useCallback)((event) => {
|
|
1862
1876
|
setIsFocused.setFalse();
|
|
1863
1877
|
onBlur?.(event);
|
|
1864
1878
|
}, []);
|
|
1865
|
-
const onChangeText = (0,
|
|
1879
|
+
const onChangeText = (0, import_react15.useCallback)(
|
|
1866
1880
|
(text) => {
|
|
1867
1881
|
setInternalValue(text);
|
|
1868
1882
|
onChange?.(text);
|
|
1869
1883
|
},
|
|
1870
1884
|
[onChange]
|
|
1871
1885
|
);
|
|
1872
|
-
const textInputStyle = (0,
|
|
1886
|
+
const textInputStyle = (0, import_react15.useMemo)(
|
|
1873
1887
|
() => ({
|
|
1874
1888
|
flex: 1,
|
|
1875
1889
|
fontSize,
|
|
@@ -1894,14 +1908,14 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1894
1908
|
rightIcon
|
|
1895
1909
|
]
|
|
1896
1910
|
);
|
|
1897
|
-
const rnDateTimePickerStyle = (0,
|
|
1911
|
+
const rnDateTimePickerStyle = (0, import_react15.useMemo)(
|
|
1898
1912
|
() => ({
|
|
1899
1913
|
flex: iOSDateTimeFullSize ? 1 : void 0,
|
|
1900
1914
|
marginLeft: -8 + (iOSDateTimeFullSize ? 0 : theme2.styles.space)
|
|
1901
1915
|
}),
|
|
1902
1916
|
[iOSDateTimeFullSize]
|
|
1903
1917
|
);
|
|
1904
|
-
(0,
|
|
1918
|
+
(0, import_react15.useEffect)(() => {
|
|
1905
1919
|
if (value === void 0) return;
|
|
1906
1920
|
setInternalValue(value.toString());
|
|
1907
1921
|
try {
|
|
@@ -1909,7 +1923,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1909
1923
|
} catch (error) {
|
|
1910
1924
|
}
|
|
1911
1925
|
}, [value]);
|
|
1912
|
-
(0,
|
|
1926
|
+
(0, import_react15.useEffect)(() => {
|
|
1913
1927
|
if (type !== "date" && type !== "time") return;
|
|
1914
1928
|
const date = internalDateValue?.toISOString().split("T")[0] ?? "";
|
|
1915
1929
|
const hours = internalDateValue ? internalDateValue.getHours().toString() : "00";
|
|
@@ -1918,17 +1932,14 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1918
1932
|
type === "date" ? date : internalDateValue ? `${hours.length === 1 ? `0${hours}` : hours}:${minutes.length === 1 ? `0${minutes}` : minutes}` : ""
|
|
1919
1933
|
);
|
|
1920
1934
|
}, [internalDateValue]);
|
|
1921
|
-
(0,
|
|
1935
|
+
(0, import_react15.useImperativeHandle)(ref, () => {
|
|
1922
1936
|
return textInputRef.current;
|
|
1923
1937
|
}, []);
|
|
1924
1938
|
const withPressInputField = !!onPress || type === "date" || type === "time";
|
|
1925
|
-
const prefixSuffixBackgroundColor = colorTheme === "light" ? (0,
|
|
1926
|
-
const labelComponent = label
|
|
1927
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { fontSize: 14, color: isError ? theme2.colors.error : theme2.colors.textSecondary, children: label }),
|
|
1928
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Text_default, { color: theme2.colors.error, children: "*" })
|
|
1929
|
-
] });
|
|
1939
|
+
const prefixSuffixBackgroundColor = colorTheme === "light" ? (0, import_react_better_core14.darkenColor)(theme2.colors.backgroundContent, 0.03) : (0, import_react_better_core14.lightenColor)(theme2.colors.backgroundContent, 0.1);
|
|
1940
|
+
const labelComponent = label ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Label_default, { text: label, isError, required }) : void 0;
|
|
1930
1941
|
const borderColor = isFocused ? theme2.colors.primary : isError ? theme2.colors.error : theme2.colors.border;
|
|
1931
|
-
return /* @__PURE__ */ (0,
|
|
1942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1932
1943
|
Animate_default.View,
|
|
1933
1944
|
{
|
|
1934
1945
|
flex,
|
|
@@ -1938,8 +1949,8 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1938
1949
|
...props,
|
|
1939
1950
|
children: [
|
|
1940
1951
|
isIOSDateTime && !iOSDateTimeFullSize ? void 0 : labelComponent,
|
|
1941
|
-
/* @__PURE__ */ (0,
|
|
1942
|
-
prefix && /* @__PURE__ */ (0,
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(View_default, { isRow: true, position: "relative", alignItems: "center", height: readyHeight, children: [
|
|
1953
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1943
1954
|
View_default,
|
|
1944
1955
|
{
|
|
1945
1956
|
isRow: true,
|
|
@@ -1957,8 +1968,8 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1957
1968
|
zIndex: 1,
|
|
1958
1969
|
onPress: onPressPrefix,
|
|
1959
1970
|
children: [
|
|
1960
|
-
typeof prefix === "string" ? /* @__PURE__ */ (0,
|
|
1961
|
-
/* @__PURE__ */ (0,
|
|
1971
|
+
typeof prefix === "string" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text_default, { fontWeight: 700, lineHeight, children: prefix }) : prefix,
|
|
1972
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1962
1973
|
Animate_default.View,
|
|
1963
1974
|
{
|
|
1964
1975
|
position: "absolute",
|
|
@@ -1973,9 +1984,9 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1973
1984
|
]
|
|
1974
1985
|
}
|
|
1975
1986
|
),
|
|
1976
|
-
isIOSDateTime ? /* @__PURE__ */ (0,
|
|
1987
|
+
isIOSDateTime ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1977
1988
|
!iOSDateTimeFullSize ? labelComponent : void 0,
|
|
1978
|
-
/* @__PURE__ */ (0,
|
|
1989
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1979
1990
|
import_datetimepicker.default,
|
|
1980
1991
|
{
|
|
1981
1992
|
value: internalDateValue ?? /* @__PURE__ */ new Date(),
|
|
@@ -1987,7 +1998,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1987
1998
|
onValueChange: onValueChangeRNDateTimePicker
|
|
1988
1999
|
}
|
|
1989
2000
|
)
|
|
1990
|
-
] }) : /* @__PURE__ */ (0,
|
|
2001
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1991
2002
|
View_default,
|
|
1992
2003
|
{
|
|
1993
2004
|
flex: 1,
|
|
@@ -1998,7 +2009,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
1998
2009
|
borderBottomRightRadius: suffix ? 0 : theme2.styles.borderRadius,
|
|
1999
2010
|
pressStrength: 1,
|
|
2000
2011
|
onPress: import_react_native9.Platform.OS === "android" ? editable === false || withPressInputField ? onPressInputField : void 0 : void 0,
|
|
2001
|
-
children: /* @__PURE__ */ (0,
|
|
2012
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2002
2013
|
Animate_default.View,
|
|
2003
2014
|
{
|
|
2004
2015
|
position: "relative",
|
|
@@ -2016,7 +2027,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
2016
2027
|
animateBorderColor: borderColor,
|
|
2017
2028
|
overflow: "hidden",
|
|
2018
2029
|
children: [
|
|
2019
|
-
leftIcon && /* @__PURE__ */ (0,
|
|
2030
|
+
leftIcon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2020
2031
|
Icon_default,
|
|
2021
2032
|
{
|
|
2022
2033
|
position: "absolute",
|
|
@@ -2029,7 +2040,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
2029
2040
|
onPress: onPressLeftIcon
|
|
2030
2041
|
}
|
|
2031
2042
|
),
|
|
2032
|
-
/* @__PURE__ */ (0,
|
|
2043
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2033
2044
|
import_react_native9.TextInput,
|
|
2034
2045
|
{
|
|
2035
2046
|
style: textInputStyle,
|
|
@@ -2062,7 +2073,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
2062
2073
|
ref: textInputRef
|
|
2063
2074
|
}
|
|
2064
2075
|
),
|
|
2065
|
-
rightIcon && /* @__PURE__ */ (0,
|
|
2076
|
+
rightIcon && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2066
2077
|
Icon_default,
|
|
2067
2078
|
{
|
|
2068
2079
|
position: "absolute",
|
|
@@ -2080,7 +2091,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
2080
2091
|
)
|
|
2081
2092
|
}
|
|
2082
2093
|
),
|
|
2083
|
-
suffix && /* @__PURE__ */ (0,
|
|
2094
|
+
suffix && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
2084
2095
|
View_default,
|
|
2085
2096
|
{
|
|
2086
2097
|
isRow: true,
|
|
@@ -2098,8 +2109,8 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
2098
2109
|
zIndex: 1,
|
|
2099
2110
|
onPress: onPressSuffix,
|
|
2100
2111
|
children: [
|
|
2101
|
-
typeof suffix === "string" ? /* @__PURE__ */ (0,
|
|
2102
|
-
/* @__PURE__ */ (0,
|
|
2112
|
+
typeof suffix === "string" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text_default, { fontWeight: 700, lineHeight, children: suffix }) : suffix,
|
|
2113
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2103
2114
|
Animate_default.View,
|
|
2104
2115
|
{
|
|
2105
2116
|
position: "absolute",
|
|
@@ -2115,7 +2126,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
2115
2126
|
}
|
|
2116
2127
|
)
|
|
2117
2128
|
] }),
|
|
2118
|
-
infoMessage && /* @__PURE__ */ (0,
|
|
2129
|
+
infoMessage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2119
2130
|
Animate_default.Text,
|
|
2120
2131
|
{
|
|
2121
2132
|
fontSize: 14,
|
|
@@ -2127,7 +2138,7 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
2127
2138
|
children: infoMessage
|
|
2128
2139
|
}
|
|
2129
2140
|
),
|
|
2130
|
-
errorMessage && /* @__PURE__ */ (0,
|
|
2141
|
+
errorMessage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2131
2142
|
Animate_default.Text,
|
|
2132
2143
|
{
|
|
2133
2144
|
fontSize: 14,
|
|
@@ -2144,8 +2155,8 @@ var InputFieldComponent = (0, import_react14.forwardRef)(
|
|
|
2144
2155
|
);
|
|
2145
2156
|
}
|
|
2146
2157
|
);
|
|
2147
|
-
InputFieldComponent.email = (0,
|
|
2148
|
-
return /* @__PURE__ */ (0,
|
|
2158
|
+
InputFieldComponent.email = (0, import_react15.forwardRef)(function Email(props, ref) {
|
|
2159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2149
2160
|
InputFieldComponent,
|
|
2150
2161
|
{
|
|
2151
2162
|
placeholder: "your@email.here",
|
|
@@ -2158,17 +2169,17 @@ InputFieldComponent.email = (0, import_react14.forwardRef)(function Email(props,
|
|
|
2158
2169
|
}
|
|
2159
2170
|
);
|
|
2160
2171
|
});
|
|
2161
|
-
InputFieldComponent.password = (0,
|
|
2162
|
-
const inputFieldRef = (0,
|
|
2163
|
-
const [showPassword, setShowPassword] = (0,
|
|
2164
|
-
const onPressEye = (0,
|
|
2172
|
+
InputFieldComponent.password = (0, import_react15.forwardRef)(function Password(props, ref) {
|
|
2173
|
+
const inputFieldRef = (0, import_react15.useRef)(null);
|
|
2174
|
+
const [showPassword, setShowPassword] = (0, import_react_better_core14.useBooleanState)();
|
|
2175
|
+
const onPressEye = (0, import_react15.useCallback)(() => {
|
|
2165
2176
|
setShowPassword.toggle();
|
|
2166
2177
|
inputFieldRef.current?.focus();
|
|
2167
2178
|
}, []);
|
|
2168
|
-
(0,
|
|
2179
|
+
(0, import_react15.useImperativeHandle)(ref, () => {
|
|
2169
2180
|
return inputFieldRef.current;
|
|
2170
2181
|
}, []);
|
|
2171
|
-
return /* @__PURE__ */ (0,
|
|
2182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2172
2183
|
InputFieldComponent,
|
|
2173
2184
|
{
|
|
2174
2185
|
secureTextEntry: !showPassword,
|
|
@@ -2183,12 +2194,12 @@ InputFieldComponent.password = (0, import_react14.forwardRef)(function Password(
|
|
|
2183
2194
|
}
|
|
2184
2195
|
);
|
|
2185
2196
|
});
|
|
2186
|
-
InputFieldComponent.search = (0,
|
|
2187
|
-
return /* @__PURE__ */ (0,
|
|
2197
|
+
InputFieldComponent.search = (0, import_react15.forwardRef)(function Search(props, ref) {
|
|
2198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(InputFieldComponent, { placeholder: "Search...", leftIcon: "magnifyingGlass", ...props, ref });
|
|
2188
2199
|
});
|
|
2189
|
-
InputFieldComponent.code = (0,
|
|
2190
|
-
const theme2 = (0,
|
|
2191
|
-
return /* @__PURE__ */ (0,
|
|
2200
|
+
InputFieldComponent.code = (0, import_react15.forwardRef)(function Password2({ isSmall, ...props }, ref) {
|
|
2201
|
+
const theme2 = (0, import_react_better_core14.useTheme)();
|
|
2202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2192
2203
|
InputFieldComponent,
|
|
2193
2204
|
{
|
|
2194
2205
|
flex: 1,
|
|
@@ -2203,7 +2214,7 @@ InputFieldComponent.code = (0, import_react14.forwardRef)(function Password2({ i
|
|
|
2203
2214
|
}
|
|
2204
2215
|
);
|
|
2205
2216
|
});
|
|
2206
|
-
var InputField = (0,
|
|
2217
|
+
var InputField = (0, import_react15.memo)(InputFieldComponent);
|
|
2207
2218
|
InputField.email = InputFieldComponent.email;
|
|
2208
2219
|
InputField.password = InputFieldComponent.password;
|
|
2209
2220
|
InputField.search = InputFieldComponent.search;
|
|
@@ -2211,32 +2222,32 @@ InputField.code = InputFieldComponent.code;
|
|
|
2211
2222
|
var InputField_default = InputField;
|
|
2212
2223
|
|
|
2213
2224
|
// src/components/Switch.tsx
|
|
2214
|
-
var
|
|
2225
|
+
var import_react16 = require("react");
|
|
2215
2226
|
var import_react_native10 = require("react-native");
|
|
2216
|
-
var
|
|
2217
|
-
var
|
|
2227
|
+
var import_react_better_core15 = require("react-better-core");
|
|
2228
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
2218
2229
|
function Switch({ isEnabled, defaultIsEnabled, disabled, onChange }) {
|
|
2219
|
-
const theme2 = (0,
|
|
2220
|
-
const [enabled, setEnabled] = (0,
|
|
2221
|
-
const onPressElement = (0,
|
|
2230
|
+
const theme2 = (0, import_react_better_core15.useTheme)();
|
|
2231
|
+
const [enabled, setEnabled] = (0, import_react_better_core15.useBooleanState)(isEnabled ?? defaultIsEnabled);
|
|
2232
|
+
const onPressElement = (0, import_react16.useCallback)(() => {
|
|
2222
2233
|
onChange?.(!enabled);
|
|
2223
2234
|
setEnabled.toggle();
|
|
2224
2235
|
}, [onChange, enabled]);
|
|
2225
|
-
const trackColor = (0,
|
|
2236
|
+
const trackColor = (0, import_react16.useMemo)(
|
|
2226
2237
|
() => ({
|
|
2227
2238
|
false: theme2.colors.border,
|
|
2228
2239
|
true: theme2.colors.primary
|
|
2229
2240
|
}),
|
|
2230
2241
|
[theme2.colors]
|
|
2231
2242
|
);
|
|
2232
|
-
(0,
|
|
2243
|
+
(0, import_react16.useEffect)(() => {
|
|
2233
2244
|
if (isEnabled === void 0) return;
|
|
2234
2245
|
setEnabled.setState(isEnabled);
|
|
2235
2246
|
}, [isEnabled]);
|
|
2236
2247
|
const ballSize = 26;
|
|
2237
2248
|
const ballGap = 3;
|
|
2238
2249
|
const holderWidth = ballSize * 2.1;
|
|
2239
|
-
return import_react_native10.Platform.OS === "ios" ? /* @__PURE__ */ (0,
|
|
2250
|
+
return import_react_native10.Platform.OS === "ios" ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2240
2251
|
import_react_native10.Switch,
|
|
2241
2252
|
{
|
|
2242
2253
|
trackColor,
|
|
@@ -2245,7 +2256,7 @@ function Switch({ isEnabled, defaultIsEnabled, disabled, onChange }) {
|
|
|
2245
2256
|
value: enabled,
|
|
2246
2257
|
disabled
|
|
2247
2258
|
}
|
|
2248
|
-
) : /* @__PURE__ */ (0,
|
|
2259
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2249
2260
|
View_default,
|
|
2250
2261
|
{
|
|
2251
2262
|
width: holderWidth,
|
|
@@ -2253,7 +2264,7 @@ function Switch({ isEnabled, defaultIsEnabled, disabled, onChange }) {
|
|
|
2253
2264
|
pressStrength: pressStrength().p05,
|
|
2254
2265
|
disabled,
|
|
2255
2266
|
onPress: !disabled ? onPressElement : void 0,
|
|
2256
|
-
children: /* @__PURE__ */ (0,
|
|
2267
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2257
2268
|
Animate_default.View,
|
|
2258
2269
|
{
|
|
2259
2270
|
width: "100%",
|
|
@@ -2263,7 +2274,7 @@ function Switch({ isEnabled, defaultIsEnabled, disabled, onChange }) {
|
|
|
2263
2274
|
animateBackgroundColor: enabled ? theme2.colors.primary : theme2.colors.border,
|
|
2264
2275
|
initialOpacity: 1,
|
|
2265
2276
|
animateOpacity: disabled ? 0.6 : 1,
|
|
2266
|
-
children: /* @__PURE__ */ (0,
|
|
2277
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2267
2278
|
Animate_default.View,
|
|
2268
2279
|
{
|
|
2269
2280
|
width: ballSize,
|
|
@@ -2283,25 +2294,33 @@ function Switch({ isEnabled, defaultIsEnabled, disabled, onChange }) {
|
|
|
2283
2294
|
}
|
|
2284
2295
|
);
|
|
2285
2296
|
}
|
|
2286
|
-
var Switch_default = (0,
|
|
2297
|
+
var Switch_default = (0, import_react16.memo)(Switch);
|
|
2287
2298
|
|
|
2288
2299
|
// src/components/CheckBox.tsx
|
|
2289
|
-
var
|
|
2300
|
+
var import_react17 = require("react");
|
|
2290
2301
|
var import_react_native11 = require("react-native");
|
|
2291
|
-
var
|
|
2292
|
-
var
|
|
2293
|
-
function CheckBox({
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2302
|
+
var import_react_better_core16 = require("react-better-core");
|
|
2303
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2304
|
+
function CheckBox({
|
|
2305
|
+
isChecked,
|
|
2306
|
+
defaultIsChecked,
|
|
2307
|
+
size = 36,
|
|
2308
|
+
text,
|
|
2309
|
+
required,
|
|
2310
|
+
disabled,
|
|
2311
|
+
onChange
|
|
2312
|
+
}) {
|
|
2313
|
+
const theme2 = (0, import_react_better_core16.useTheme)();
|
|
2314
|
+
const [checked, setChecked] = (0, import_react_better_core16.useBooleanState)(isChecked ?? defaultIsChecked);
|
|
2315
|
+
const onPressElement = (0, import_react17.useCallback)(() => {
|
|
2297
2316
|
onChange?.(!checked);
|
|
2298
2317
|
setChecked.toggle();
|
|
2299
2318
|
}, [onChange, checked]);
|
|
2300
|
-
(0,
|
|
2319
|
+
(0, import_react17.useEffect)(() => {
|
|
2301
2320
|
if (isChecked === void 0) return;
|
|
2302
2321
|
setChecked.setState(isChecked);
|
|
2303
2322
|
}, [isChecked]);
|
|
2304
|
-
|
|
2323
|
+
const checkBox = /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2305
2324
|
View_default,
|
|
2306
2325
|
{
|
|
2307
2326
|
width: size,
|
|
@@ -2309,7 +2328,7 @@ function CheckBox({ isChecked, defaultIsChecked, size = 36, disabled, onChange }
|
|
|
2309
2328
|
pressStrength: pressStrength().p05,
|
|
2310
2329
|
disabled,
|
|
2311
2330
|
onPress: !disabled ? onPressElement : void 0,
|
|
2312
|
-
children: /* @__PURE__ */ (0,
|
|
2331
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2313
2332
|
Animate_default.View,
|
|
2314
2333
|
{
|
|
2315
2334
|
width: "100%",
|
|
@@ -2322,7 +2341,7 @@ function CheckBox({ isChecked, defaultIsChecked, size = 36, disabled, onChange }
|
|
|
2322
2341
|
animateBorderColor: checked ? theme2.colors.primary : theme2.colors.border,
|
|
2323
2342
|
initialOpacity: 1,
|
|
2324
2343
|
animateOpacity: disabled ? 0.6 : 1,
|
|
2325
|
-
children: /* @__PURE__ */ (0,
|
|
2344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2326
2345
|
Animate_default.View,
|
|
2327
2346
|
{
|
|
2328
2347
|
width: "100%",
|
|
@@ -2334,7 +2353,7 @@ function CheckBox({ isChecked, defaultIsChecked, size = 36, disabled, onChange }
|
|
|
2334
2353
|
transitionStiffness: 230,
|
|
2335
2354
|
initialScale: 0,
|
|
2336
2355
|
animateScale: checked ? 1 : 0,
|
|
2337
|
-
children: /* @__PURE__ */ (0,
|
|
2356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2338
2357
|
Icon_default,
|
|
2339
2358
|
{
|
|
2340
2359
|
name: "check",
|
|
@@ -2349,17 +2368,34 @@ function CheckBox({ isChecked, defaultIsChecked, size = 36, disabled, onChange }
|
|
|
2349
2368
|
)
|
|
2350
2369
|
}
|
|
2351
2370
|
);
|
|
2371
|
+
return text ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(View_default, { isRow: true, alignItems: "center", gap: theme2.styles.gap, children: [
|
|
2372
|
+
checkBox,
|
|
2373
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2374
|
+
View_default,
|
|
2375
|
+
{
|
|
2376
|
+
width: "100%",
|
|
2377
|
+
flexShrink: 1,
|
|
2378
|
+
pressType: "opacity",
|
|
2379
|
+
pressStrength: pressStrength().p3,
|
|
2380
|
+
onPress: onPressElement,
|
|
2381
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(View_default, { isRow: true, alignItems: "flex-start", gap: 2, children: [
|
|
2382
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(View_default, { flexShrink: 1, children: typeof text === "string" ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text_default, { children: text }) : text }),
|
|
2383
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Label_default, { required: true })
|
|
2384
|
+
] })
|
|
2385
|
+
}
|
|
2386
|
+
)
|
|
2387
|
+
] }) }) : checkBox;
|
|
2352
2388
|
}
|
|
2353
|
-
var CheckBox_default = (0,
|
|
2389
|
+
var CheckBox_default = (0, import_react17.memo)(CheckBox);
|
|
2354
2390
|
|
|
2355
2391
|
// src/components/StatusBar.tsx
|
|
2356
|
-
var
|
|
2357
|
-
var
|
|
2392
|
+
var import_react18 = require("react");
|
|
2393
|
+
var import_react_better_core17 = require("react-better-core");
|
|
2358
2394
|
var import_react_native12 = require("react-native");
|
|
2359
|
-
var
|
|
2395
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2360
2396
|
function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarStyle }) {
|
|
2361
|
-
const theme2 = (0,
|
|
2362
|
-
return /* @__PURE__ */ (0,
|
|
2397
|
+
const theme2 = (0, import_react_better_core17.useTheme)();
|
|
2398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2363
2399
|
import_react_native12.StatusBar,
|
|
2364
2400
|
{
|
|
2365
2401
|
backgroundColor: darkStatusBar ? theme2.colors.backgroundSecondary : void 0,
|
|
@@ -2368,12 +2404,12 @@ function StatusBar({ darkStatusBar, hidden, barStyle, androidBarStyle, iOSBarSty
|
|
|
2368
2404
|
}
|
|
2369
2405
|
);
|
|
2370
2406
|
}
|
|
2371
|
-
var StatusBar_default = (0,
|
|
2407
|
+
var StatusBar_default = (0, import_react18.memo)(StatusBar);
|
|
2372
2408
|
|
|
2373
2409
|
// src/components/ListItem.tsx
|
|
2374
|
-
var
|
|
2375
|
-
var
|
|
2376
|
-
var
|
|
2410
|
+
var import_react19 = require("react");
|
|
2411
|
+
var import_react_better_core18 = require("react-better-core");
|
|
2412
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
2377
2413
|
function ListItem({
|
|
2378
2414
|
icon,
|
|
2379
2415
|
iconIOS,
|
|
@@ -2391,10 +2427,10 @@ function ListItem({
|
|
|
2391
2427
|
checkBoxIsChecked,
|
|
2392
2428
|
checkBoxOnChange
|
|
2393
2429
|
}) {
|
|
2394
|
-
const theme2 = (0,
|
|
2430
|
+
const theme2 = (0, import_react_better_core18.useTheme)();
|
|
2395
2431
|
const device = useDevice();
|
|
2396
2432
|
const sideSpace = theme2.styles.space;
|
|
2397
|
-
return /* @__PURE__ */ (0,
|
|
2433
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2398
2434
|
View_default,
|
|
2399
2435
|
{
|
|
2400
2436
|
width: insideScreenHolder ? device.windowDimensions.width : "100%",
|
|
@@ -2404,15 +2440,15 @@ function ListItem({
|
|
|
2404
2440
|
paddingHorizontal: sideSpace,
|
|
2405
2441
|
pressStrength: pressStrength().p05,
|
|
2406
2442
|
onPress,
|
|
2407
|
-
children: /* @__PURE__ */ (0,
|
|
2408
|
-
icon && /* @__PURE__ */ (0,
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2410
|
-
title && /* @__PURE__ */ (0,
|
|
2411
|
-
description && /* @__PURE__ */ (0,
|
|
2443
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(View_default, { isRow: true, alignItems: "center", gap: theme2.styles.space, children: [
|
|
2444
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Icon_default, { name: icon, nameIOS: iconIOS, size: 22, color: theme2.colors.primary }),
|
|
2445
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(View_default, { flex: 1, flexDirection: "row", alignItems: "center", gap: theme2.styles.gap, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(View_default, { flex: 1, children: [
|
|
2446
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text_default, { fontSize: 20, fontWeight: 700, children: title }),
|
|
2447
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text_default.body, { selectable: descriptionSelectable, children: description })
|
|
2412
2448
|
] }) }),
|
|
2413
|
-
rightElement ? /* @__PURE__ */ (0,
|
|
2414
|
-
rightValue !== void 0 && /* @__PURE__ */ (0,
|
|
2415
|
-
rightElement === "arrow" && /* @__PURE__ */ (0,
|
|
2449
|
+
rightElement ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, { children: rightValue !== void 0 || rightElement === "arrow" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(View_default, { isRow: true, alignItems: "center", gap: theme2.styles.gap / 2, children: [
|
|
2450
|
+
rightValue !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Text_default, { fontSize: 14, fontWeight: 700, selectable: rightValueSelectable, children: rightValue }),
|
|
2451
|
+
rightElement === "arrow" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2416
2452
|
Icon_default,
|
|
2417
2453
|
{
|
|
2418
2454
|
name: "chevronRight",
|
|
@@ -2420,12 +2456,12 @@ function ListItem({
|
|
|
2420
2456
|
color: rightValue !== void 0 ? theme2.colors.textPrimary : theme2.colors.textSecondary
|
|
2421
2457
|
}
|
|
2422
2458
|
)
|
|
2423
|
-
] }) : rightElement === "switch" ? /* @__PURE__ */ (0,
|
|
2459
|
+
] }) : rightElement === "switch" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Switch_default, { isEnabled: switchIsEnabled, onChange: switchOnChange }) : rightElement === "checkBox" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CheckBox_default, { isChecked: checkBoxIsChecked, onChange: checkBoxOnChange }) : void 0 }) : void 0
|
|
2424
2460
|
] })
|
|
2425
2461
|
}
|
|
2426
2462
|
);
|
|
2427
2463
|
}
|
|
2428
|
-
var ListItem_default = (0,
|
|
2464
|
+
var ListItem_default = (0, import_react19.memo)(ListItem);
|
|
2429
2465
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2430
2466
|
0 && (module.exports = {
|
|
2431
2467
|
Animate,
|
|
@@ -2435,6 +2471,7 @@ var ListItem_default = (0, import_react18.memo)(ListItem);
|
|
|
2435
2471
|
Icon,
|
|
2436
2472
|
Image,
|
|
2437
2473
|
InputField,
|
|
2474
|
+
Label,
|
|
2438
2475
|
ListItem,
|
|
2439
2476
|
Loader,
|
|
2440
2477
|
ScreenHolder,
|