@tecsinapse/react-core 3.4.14 → 3.4.15-beta.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.
- package/dist/cjs/components/atoms/Avatar/Avatar.js +2 -1
- package/dist/cjs/components/atoms/Badge/Badge.js +5 -2
- package/dist/cjs/components/atoms/Badge/styled.js +2 -1
- package/dist/cjs/components/atoms/BoxContent/BoxContent.js +2 -2
- package/dist/cjs/components/atoms/Button/Button.js +10 -8
- package/dist/cjs/components/atoms/Button/States/BaseState.js +5 -2
- package/dist/cjs/components/atoms/Button/States/Error.js +2 -2
- package/dist/cjs/components/atoms/Button/States/Loading.js +11 -8
- package/dist/cjs/components/atoms/Button/States/Success.js +2 -2
- package/dist/cjs/components/atoms/Button/styled.js +2 -1
- package/dist/cjs/components/atoms/Card/Card.js +3 -3
- package/dist/cjs/components/atoms/Card/Footer/Footer.js +2 -2
- package/dist/cjs/components/atoms/Card/Header/Header.js +2 -2
- package/dist/cjs/components/atoms/Checkbox/Checkbox.js +26 -21
- package/dist/cjs/components/atoms/Divider/Divider.js +2 -2
- package/dist/cjs/components/atoms/GroupButton/GroupButton.js +20 -17
- package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js +2 -2
- package/dist/cjs/components/atoms/GroupButton/styled.js +2 -1
- package/dist/cjs/components/atoms/Icon/AntDesign.js +2 -2
- package/dist/cjs/components/atoms/Icon/Entypo.js +2 -2
- package/dist/cjs/components/atoms/Icon/Evil.js +2 -2
- package/dist/cjs/components/atoms/Icon/Feather.js +2 -2
- package/dist/cjs/components/atoms/Icon/FontAwesome.js +2 -2
- package/dist/cjs/components/atoms/Icon/FontAwesomeFive.js +2 -2
- package/dist/cjs/components/atoms/Icon/Fontisto.js +2 -2
- package/dist/cjs/components/atoms/Icon/Foundation.js +2 -2
- package/dist/cjs/components/atoms/Icon/Icon.js +3 -2
- package/dist/cjs/components/atoms/Icon/Ionicon.js +2 -2
- package/dist/cjs/components/atoms/Icon/Material.js +2 -2
- package/dist/cjs/components/atoms/Icon/MaterialCommunity.js +2 -2
- package/dist/cjs/components/atoms/Icon/Octicon.js +2 -2
- package/dist/cjs/components/atoms/Icon/SimpleLine.js +2 -2
- package/dist/cjs/components/atoms/Icon/Zocial.js +2 -2
- package/dist/cjs/components/atoms/Input/Hint.js +13 -10
- package/dist/cjs/components/atoms/Input/InputContainer/InputContainer.js +38 -34
- package/dist/cjs/components/atoms/Input/InputElement/InputElement.js +2 -1
- package/dist/cjs/components/atoms/Input/InputMaskElement/InputMaskElement.js +2 -1
- package/dist/cjs/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +2 -21
- package/dist/cjs/components/atoms/Paper/Paper.js +2 -2
- package/dist/cjs/components/atoms/PressableSurface/PressableSurface.js +3 -2
- package/dist/cjs/components/atoms/ProgressBar/ProgressBar.js +16 -15
- package/dist/cjs/components/atoms/ProgressBar/styled.js +2 -1
- package/dist/cjs/components/atoms/RadioButton/RadioButton.js +27 -22
- package/dist/cjs/components/atoms/Switch/Switch.js +14 -13
- package/dist/cjs/components/atoms/Switch/styled.js +2 -1
- package/dist/cjs/components/atoms/Tag/Tag.js +24 -21
- package/dist/cjs/components/atoms/Text/Text.js +5 -5
- package/dist/cjs/components/molecules/Calendar/Calendar.js +83 -73
- package/dist/cjs/components/molecules/Calendar/components/MemoizedYearCard.js +13 -12
- package/dist/cjs/components/molecules/Calendar/components/MonthWeek.js +7 -6
- package/dist/cjs/components/molecules/Calendar/components/SelectYear.js +3 -2
- package/dist/cjs/components/molecules/Calendar/components/Weekdays.js +6 -5
- package/dist/cjs/components/molecules/ControlledDateTimeSelector/ControlledDateTimeSelector.js +2 -1
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js +24 -17
- package/dist/cjs/components/molecules/DatePicker/styled.js +2 -1
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +25 -37
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js +85 -70
- package/dist/cjs/components/molecules/DateTimeSelector/Selector.js +37 -29
- package/dist/cjs/components/molecules/DateTimeSelector/styled.js +2 -1
- package/dist/cjs/components/molecules/Grid/functions.js +2 -1
- package/dist/cjs/components/molecules/HintInputContainer/HintInputContainer.js +19 -34
- package/dist/cjs/components/molecules/IconTextButton/IconComponent.js +3 -2
- package/dist/cjs/components/molecules/InputPassword/InputPasswordIcon.js +5 -5
- package/dist/cjs/components/molecules/InputPassword/styled.js +1 -0
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +19 -12
- package/dist/cjs/components/molecules/Snackbar/styled.js +2 -1
- package/dist/cjs/components/molecules/TextArea/TextArea.js +41 -35
- package/dist/cjs/components/molecules/TextArea/styled.js +2 -1
- package/dist/cjs/styles/ThemeProvider.js +2 -2
- package/dist/cjs/styles/definitions.js +2 -1
- package/dist/cjs/utils/formatWithMask.js +2 -1
- package/dist/cjs/utils/masks.js +4 -1
- package/dist/esm/components/atoms/Avatar/Avatar.js +2 -1
- package/dist/esm/components/atoms/Badge/Badge.js +5 -2
- package/dist/esm/components/atoms/Badge/styled.js +2 -1
- package/dist/esm/components/atoms/BoxContent/BoxContent.js +2 -2
- package/dist/esm/components/atoms/Button/Button.js +10 -8
- package/dist/esm/components/atoms/Button/States/BaseState.js +5 -2
- package/dist/esm/components/atoms/Button/States/Error.js +2 -2
- package/dist/esm/components/atoms/Button/States/Loading.js +11 -8
- package/dist/esm/components/atoms/Button/States/Success.js +2 -2
- package/dist/esm/components/atoms/Button/styled.js +2 -1
- package/dist/esm/components/atoms/Card/Card.js +3 -3
- package/dist/esm/components/atoms/Card/Footer/Footer.js +2 -2
- package/dist/esm/components/atoms/Card/Header/Header.js +2 -2
- package/dist/esm/components/atoms/Checkbox/Checkbox.js +26 -21
- package/dist/esm/components/atoms/Divider/Divider.js +2 -2
- package/dist/esm/components/atoms/GroupButton/GroupButton.js +20 -17
- package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js +2 -2
- package/dist/esm/components/atoms/GroupButton/styled.js +2 -1
- package/dist/esm/components/atoms/Icon/AntDesign.js +2 -2
- package/dist/esm/components/atoms/Icon/Entypo.js +2 -2
- package/dist/esm/components/atoms/Icon/Evil.js +2 -2
- package/dist/esm/components/atoms/Icon/Feather.js +2 -2
- package/dist/esm/components/atoms/Icon/FontAwesome.js +2 -2
- package/dist/esm/components/atoms/Icon/FontAwesomeFive.js +2 -2
- package/dist/esm/components/atoms/Icon/Fontisto.js +2 -2
- package/dist/esm/components/atoms/Icon/Foundation.js +2 -2
- package/dist/esm/components/atoms/Icon/Icon.js +3 -2
- package/dist/esm/components/atoms/Icon/Ionicon.js +2 -2
- package/dist/esm/components/atoms/Icon/Material.js +2 -2
- package/dist/esm/components/atoms/Icon/MaterialCommunity.js +2 -2
- package/dist/esm/components/atoms/Icon/Octicon.js +2 -2
- package/dist/esm/components/atoms/Icon/SimpleLine.js +2 -2
- package/dist/esm/components/atoms/Icon/Zocial.js +2 -2
- package/dist/esm/components/atoms/Input/Hint.js +13 -10
- package/dist/esm/components/atoms/Input/InputContainer/InputContainer.js +38 -34
- package/dist/esm/components/atoms/Input/InputElement/InputElement.js +2 -1
- package/dist/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +2 -1
- package/dist/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +2 -2
- package/dist/esm/components/atoms/Paper/Paper.js +2 -2
- package/dist/esm/components/atoms/PressableSurface/PressableSurface.js +3 -2
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.js +16 -15
- package/dist/esm/components/atoms/ProgressBar/styled.js +2 -1
- package/dist/esm/components/atoms/RadioButton/RadioButton.js +27 -22
- package/dist/esm/components/atoms/Switch/Switch.js +14 -13
- package/dist/esm/components/atoms/Switch/styled.js +2 -1
- package/dist/esm/components/atoms/Tag/Tag.js +24 -21
- package/dist/esm/components/atoms/Text/Text.js +5 -5
- package/dist/esm/components/molecules/Calendar/Calendar.js +83 -73
- package/dist/esm/components/molecules/Calendar/components/MemoizedYearCard.js +13 -12
- package/dist/esm/components/molecules/Calendar/components/MonthWeek.js +7 -6
- package/dist/esm/components/molecules/Calendar/components/SelectYear.js +3 -2
- package/dist/esm/components/molecules/Calendar/components/Weekdays.js +6 -5
- package/dist/esm/components/molecules/ControlledDateTimeSelector/ControlledDateTimeSelector.js +2 -1
- package/dist/esm/components/molecules/DatePicker/DatePicker.js +24 -17
- package/dist/esm/components/molecules/DatePicker/styled.js +2 -1
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +25 -18
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +85 -70
- package/dist/esm/components/molecules/DateTimeSelector/Selector.js +37 -29
- package/dist/esm/components/molecules/DateTimeSelector/styled.js +2 -1
- package/dist/esm/components/molecules/Grid/functions.js +2 -1
- package/dist/esm/components/molecules/HintInputContainer/HintInputContainer.js +19 -15
- package/dist/esm/components/molecules/IconTextButton/IconComponent.js +3 -2
- package/dist/esm/components/molecules/InputPassword/InputPasswordIcon.js +5 -5
- package/dist/esm/components/molecules/InputPassword/styled.js +1 -0
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +19 -12
- package/dist/esm/components/molecules/Snackbar/styled.js +2 -1
- package/dist/esm/components/molecules/TextArea/TextArea.js +41 -35
- package/dist/esm/components/molecules/TextArea/styled.js +2 -1
- package/dist/esm/styles/ThemeProvider.js +2 -2
- package/dist/esm/styles/definitions.js +2 -1
- package/dist/esm/utils/formatWithMask.js +2 -1
- package/dist/esm/utils/masks.js +4 -1
- package/dist/types/components/atoms/GroupButton/GroupButton.d.ts +1 -2
- package/dist/types/components/atoms/Icon/AntDesign.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Entypo.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Evil.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Feather.d.ts +1 -2
- package/dist/types/components/atoms/Icon/FontAwesome.d.ts +1 -2
- package/dist/types/components/atoms/Icon/FontAwesomeFive.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Fontisto.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Foundation.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Ionicon.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Material.d.ts +1 -2
- package/dist/types/components/atoms/Icon/MaterialCommunity.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Octicon.d.ts +1 -2
- package/dist/types/components/atoms/Icon/SimpleLine.d.ts +1 -2
- package/dist/types/components/atoms/Icon/Zocial.d.ts +1 -2
- package/dist/types/components/molecules/Calendar/components/MonthWeek.d.ts +1 -1
- package/dist/types/components/molecules/Calendar/components/SelectYear.d.ts +1 -1
- package/dist/types/components/molecules/Calendar/components/Weekdays.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { compareAsc, isSameDay } from 'date-fns';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import { Week, Cell, Selected } from '../styled.js';
|
|
@@ -70,7 +71,7 @@ const MonthWeek = ({
|
|
|
70
71
|
},
|
|
71
72
|
[onChange, type]
|
|
72
73
|
);
|
|
73
|
-
return /* @__PURE__ */
|
|
74
|
+
return /* @__PURE__ */ jsx(Week, { children: week.map((date, index) => {
|
|
74
75
|
const isSelected = checkIfIsSelected(date, value);
|
|
75
76
|
const isBetween = checkIfIsBetween(date, value);
|
|
76
77
|
let isRangeStart, isRangeEnd;
|
|
@@ -83,21 +84,21 @@ const MonthWeek = ({
|
|
|
83
84
|
isRangeEnd = false;
|
|
84
85
|
}
|
|
85
86
|
const colorTone = isSelected ? "xlight" : date.getMonth() === referenceDate.getMonth() ? "xdark" : "light";
|
|
86
|
-
return /* @__PURE__ */
|
|
87
|
+
return /* @__PURE__ */ jsx(
|
|
87
88
|
Cell,
|
|
88
89
|
{
|
|
89
|
-
key: date.getDate(),
|
|
90
90
|
selected: isSelected,
|
|
91
91
|
highlighted: isBetween,
|
|
92
92
|
isLineEnd: index === 6,
|
|
93
93
|
isLineStart: index === 0,
|
|
94
94
|
isRangeStart,
|
|
95
95
|
isRangeEnd,
|
|
96
|
-
onPress: handlePressCell(date, value)
|
|
96
|
+
onPress: handlePressCell(date, value),
|
|
97
|
+
children: /* @__PURE__ */ jsx(Selected, { selected: isSelected, pointerEvents: "none", children: /* @__PURE__ */ jsx(TextComponent, { colorVariant: "secondary", colorTone, children: date.getDate() }) })
|
|
97
98
|
},
|
|
98
|
-
|
|
99
|
+
date.getDate()
|
|
99
100
|
);
|
|
100
|
-
}));
|
|
101
|
+
}) });
|
|
101
102
|
};
|
|
102
103
|
var MonthWeek$1 = React__default.memo(MonthWeek);
|
|
103
104
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { FlatList } from 'react-native';
|
|
3
4
|
import Text from '../../../atoms/Text/Text.js';
|
|
@@ -29,7 +30,7 @@ const SelectYear = ({
|
|
|
29
30
|
}, [currentYear, firstYear, numColumns]);
|
|
30
31
|
const yearCardHeight = RFValue(Number(theme.typography.base.fontSize.slice(0, -2))) + 2 * RFValue(Number(theme.spacing.deca.slice(0, -2)));
|
|
31
32
|
const yearCardsBuilder = React__default.useCallback(
|
|
32
|
-
(item) => /* @__PURE__ */
|
|
33
|
+
(item) => /* @__PURE__ */ jsx(
|
|
33
34
|
MemoizedYearCard,
|
|
34
35
|
{
|
|
35
36
|
year: item.item,
|
|
@@ -40,7 +41,7 @@ const SelectYear = ({
|
|
|
40
41
|
),
|
|
41
42
|
[currentYear, onSelectYear]
|
|
42
43
|
);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
44
45
|
FlatList,
|
|
45
46
|
{
|
|
46
47
|
data: years,
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { Week, Cell } from '../styled.js';
|
|
3
4
|
import { format } from 'date-fns';
|
|
4
5
|
|
|
5
6
|
const Weekdays = ({ calendar, locale, Capitalized }) => {
|
|
6
|
-
return /* @__PURE__ */
|
|
7
|
+
return /* @__PURE__ */ jsx(Week, { children: calendar[0].map((date) => /* @__PURE__ */ jsx(
|
|
7
8
|
Cell,
|
|
8
9
|
{
|
|
9
|
-
key: date.getDate(),
|
|
10
10
|
selected: false,
|
|
11
11
|
highlighted: false,
|
|
12
12
|
isLineEnd: false,
|
|
13
13
|
isLineStart: false,
|
|
14
14
|
isRangeStart: false,
|
|
15
15
|
isRangeEnd: false,
|
|
16
|
-
pointerEvents: "none"
|
|
16
|
+
pointerEvents: "none",
|
|
17
|
+
children: /* @__PURE__ */ jsx(Capitalized, { colorVariant: "secondary", colorTone: "medium", children: format(date, "EEE", { locale }).slice(0, 3) })
|
|
17
18
|
},
|
|
18
|
-
|
|
19
|
-
)));
|
|
19
|
+
date.getDate()
|
|
20
|
+
)) });
|
|
20
21
|
};
|
|
21
22
|
var Weekdays$1 = React__default.memo(Weekdays);
|
|
22
23
|
|
package/dist/esm/components/molecules/ControlledDateTimeSelector/ControlledDateTimeSelector.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
|
|
3
4
|
const ControlledDateTimeSelector = ({
|
|
@@ -36,7 +37,7 @@ const ControlledDateTimeSelector = ({
|
|
|
36
37
|
const handlePressBack = () => {
|
|
37
38
|
setCurrentMode(0);
|
|
38
39
|
};
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
40
41
|
SelectorComponent,
|
|
41
42
|
{
|
|
42
43
|
...rest,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { format } from 'date-fns';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { useCallback, useEffect } from 'react';
|
|
@@ -74,7 +75,7 @@ function DatePicker({
|
|
|
74
75
|
if (lowest && highest) setTimeout(handleRequestCloseCalendar, 200);
|
|
75
76
|
}
|
|
76
77
|
}, [value, closeOnPick, type, handleRequestCloseCalendar]);
|
|
77
|
-
const calendar = /* @__PURE__ */
|
|
78
|
+
const calendar = /* @__PURE__ */ jsx(
|
|
78
79
|
CalendarComponent,
|
|
79
80
|
{
|
|
80
81
|
pointerEvents: "box-none",
|
|
@@ -86,22 +87,28 @@ function DatePicker({
|
|
|
86
87
|
locale
|
|
87
88
|
}
|
|
88
89
|
);
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
90
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
91
|
+
controlComponent ? controlComponent(handleShowCalendar, getDisplayValue()) : /* @__PURE__ */ jsx(
|
|
92
|
+
HintInputContainer,
|
|
93
|
+
{
|
|
94
|
+
focused,
|
|
95
|
+
viewStyle: style,
|
|
96
|
+
onPress: handleShowCalendar,
|
|
97
|
+
disabled,
|
|
98
|
+
hintComponent,
|
|
99
|
+
LabelComponent: TextComponent,
|
|
100
|
+
variant,
|
|
101
|
+
hint,
|
|
102
|
+
rightComponent: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
103
|
+
/* @__PURE__ */ jsx(CalendarIcon, { name: "calendar-sharp", type: "ionicon", size: "centi" }),
|
|
104
|
+
rightComponent
|
|
105
|
+
] }),
|
|
106
|
+
...rest,
|
|
107
|
+
children: /* @__PURE__ */ jsx(StyledText, { fontWeight: "bold", disabled, children: getDisplayValue() || " " })
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
renderCalendar(calendar, handleBlur)
|
|
111
|
+
] });
|
|
105
112
|
}
|
|
106
113
|
|
|
107
114
|
export { DatePicker as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import styled, { css } from '@emotion/native';
|
|
2
2
|
import Icon from '../../atoms/Icon/Icon.js';
|
|
3
|
-
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
4
|
import '../../atoms/Text/styled.js';
|
|
5
5
|
import { disabledInputStyles } from '../../atoms/Input/styled.js';
|
|
6
|
+
import 'react';
|
|
6
7
|
import 'currency.js';
|
|
7
8
|
import '../../atoms/Input/InputElement/InputElement.js';
|
|
8
9
|
import '../../atoms/Input/InputMaskElement/InputMaskElement.js';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { format } from 'date-fns';
|
|
2
|
-
import * as React from 'react';
|
|
3
3
|
import Text from '../../atoms/Text/Text.js';
|
|
4
4
|
import '../../atoms/Input/styled.js';
|
|
5
5
|
import { useInputFocus } from '../../atoms/Input/hooks/useInputFocus.js';
|
|
6
6
|
import 'currency.js';
|
|
7
|
+
import 'react';
|
|
7
8
|
import '../../atoms/Input/InputElement/InputElement.js';
|
|
8
9
|
import '../../atoms/Input/InputMaskElement/InputMaskElement.js';
|
|
9
10
|
import '../../atoms/Input/PressableInputContainer/styled.js';
|
|
@@ -67,7 +68,7 @@ const DateTimePicker = ({
|
|
|
67
68
|
const StyledDateTimeSelector = getStyledDateTimeSelector(
|
|
68
69
|
DateTimeSelectorComponent
|
|
69
70
|
);
|
|
70
|
-
const dateTimeSelector = /* @__PURE__ */
|
|
71
|
+
const dateTimeSelector = /* @__PURE__ */ jsx(
|
|
71
72
|
StyledDateTimeSelector,
|
|
72
73
|
{
|
|
73
74
|
value,
|
|
@@ -91,22 +92,28 @@ const DateTimePicker = ({
|
|
|
91
92
|
onChange: handleChoosing
|
|
92
93
|
}
|
|
93
94
|
);
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
95
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
96
|
+
controlComponent ? controlComponent(handleShowSelector, displayValue) : /* @__PURE__ */ jsx(
|
|
97
|
+
HintInputContainer,
|
|
98
|
+
{
|
|
99
|
+
focused,
|
|
100
|
+
viewStyle: style,
|
|
101
|
+
onPress: handleShowSelector,
|
|
102
|
+
disabled,
|
|
103
|
+
LabelComponent: TextComponent,
|
|
104
|
+
variant,
|
|
105
|
+
hint,
|
|
106
|
+
hintComponent,
|
|
107
|
+
rightComponent: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
108
|
+
/* @__PURE__ */ jsx(CalendarIcon, { name: "calendar-sharp", type: "ionicon", size: "centi" }),
|
|
109
|
+
rightComponent
|
|
110
|
+
] }),
|
|
111
|
+
...rest,
|
|
112
|
+
children: /* @__PURE__ */ jsx(StyledText, { fontWeight: "bold", disabled, children: displayValue })
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
renderSelector(dateTimeSelector, handleBlur)
|
|
116
|
+
] });
|
|
110
117
|
};
|
|
111
118
|
|
|
112
119
|
export { DateTimePicker as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { sub, add, isSameDay, isSameMonth, isSameYear, set, getDaysInMonth, compareAsc, format } from 'date-fns';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import Button from '../../atoms/Button/Button.js';
|
|
@@ -89,76 +90,90 @@ const DateTimeSelector = ({
|
|
|
89
90
|
const handlePressBack = () => {
|
|
90
91
|
setCurrentMode(0);
|
|
91
92
|
};
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
TextComponent,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
93
|
+
return /* @__PURE__ */ jsxs(Root, { ...rest, children: [
|
|
94
|
+
/* @__PURE__ */ jsxs(Header, { children: [
|
|
95
|
+
currentMode === 1 && /* @__PURE__ */ jsx(BackButton, { onPress: handlePressBack, children: /* @__PURE__ */ jsx(
|
|
96
|
+
Icon,
|
|
97
|
+
{
|
|
98
|
+
type: "material-community",
|
|
99
|
+
name: "chevron-left",
|
|
100
|
+
size: "mega",
|
|
101
|
+
colorVariant: "secondary"
|
|
102
|
+
}
|
|
103
|
+
) }),
|
|
104
|
+
/* @__PURE__ */ jsx(TextComponent, { typography: "base", colorVariant: "secondary", children: modalTitle })
|
|
105
|
+
] }),
|
|
106
|
+
isDate ? /* @__PURE__ */ jsxs(Content, { children: [
|
|
107
|
+
mode !== "month" && /* @__PURE__ */ jsx(SelectorContainer, { isFirst: true, children: /* @__PURE__ */ jsx(
|
|
108
|
+
Selector,
|
|
109
|
+
{
|
|
110
|
+
TextComponent,
|
|
111
|
+
onChange: handleChange("date"),
|
|
112
|
+
referenceDate: date,
|
|
113
|
+
value: date.getDate(),
|
|
114
|
+
label: dayLabel || "Day",
|
|
115
|
+
granularity: "date",
|
|
116
|
+
getDisplayValue: getDisplayedValue("date"),
|
|
117
|
+
preventUpper: upperDateThreshold ? isSameDay(upperDateThreshold, date) : false,
|
|
118
|
+
preventLower: lowerDateThreshold ? isSameDay(lowerDateThreshold, date) : false
|
|
119
|
+
}
|
|
120
|
+
) }),
|
|
121
|
+
/* @__PURE__ */ jsx(SelectorContainer, { children: /* @__PURE__ */ jsx(
|
|
122
|
+
Selector,
|
|
123
|
+
{
|
|
124
|
+
TextComponent,
|
|
125
|
+
onChange: handleChange("month"),
|
|
126
|
+
referenceDate: date,
|
|
127
|
+
value: date.getMonth(),
|
|
128
|
+
label: monthLabel || "Month",
|
|
129
|
+
granularity: "month",
|
|
130
|
+
getDisplayValue: getDisplayedValue("month"),
|
|
131
|
+
preventUpper: upperDateThreshold ? isSameMonth(upperDateThreshold, date) : false,
|
|
132
|
+
preventLower: lowerDateThreshold ? isSameMonth(lowerDateThreshold, date) : false
|
|
133
|
+
}
|
|
134
|
+
) }),
|
|
135
|
+
/* @__PURE__ */ jsx(SelectorContainer, { isLast: true, children: /* @__PURE__ */ jsx(
|
|
136
|
+
Selector,
|
|
137
|
+
{
|
|
138
|
+
TextComponent,
|
|
139
|
+
onChange: handleChange("year"),
|
|
140
|
+
referenceDate: date,
|
|
141
|
+
value: date.getFullYear(),
|
|
142
|
+
label: yearLabel || "Year",
|
|
143
|
+
granularity: "year",
|
|
144
|
+
getDisplayValue: getDisplayedValue("year"),
|
|
145
|
+
preventUpper: upperDateThreshold ? isSameYear(upperDateThreshold, date) : false,
|
|
146
|
+
preventLower: lowerDateThreshold ? isSameYear(lowerDateThreshold, date) : false
|
|
147
|
+
}
|
|
148
|
+
) })
|
|
149
|
+
] }) : /* @__PURE__ */ jsxs(Content, { children: [
|
|
150
|
+
/* @__PURE__ */ jsx(SelectorContainer, { isFirst: true, children: /* @__PURE__ */ jsx(
|
|
151
|
+
Selector,
|
|
152
|
+
{
|
|
153
|
+
TextComponent,
|
|
154
|
+
onChange: handleChange("hours"),
|
|
155
|
+
referenceDate: date,
|
|
156
|
+
value: date.getHours(),
|
|
157
|
+
label: hourLabel || "Hour",
|
|
158
|
+
granularity: "hours",
|
|
159
|
+
getDisplayValue: getDisplayedValue("hours")
|
|
160
|
+
}
|
|
161
|
+
) }),
|
|
162
|
+
/* @__PURE__ */ jsx(SelectorContainer, { isLast: true, children: /* @__PURE__ */ jsx(
|
|
163
|
+
Selector,
|
|
164
|
+
{
|
|
165
|
+
TextComponent,
|
|
166
|
+
onChange: handleChange("minutes"),
|
|
167
|
+
referenceDate: date,
|
|
168
|
+
value: date.getMinutes(),
|
|
169
|
+
label: minuteLabel || "Minute",
|
|
170
|
+
granularity: "minutes",
|
|
171
|
+
getDisplayValue: getDisplayedValue("minutes")
|
|
172
|
+
}
|
|
173
|
+
) })
|
|
174
|
+
] }),
|
|
175
|
+
/* @__PURE__ */ jsx(Button, { color: "primary", onPress: handlePressConfirm, children: /* @__PURE__ */ jsx(TextComponent, { fontWeight: "bold", fontColor: "light", children: confirmButtonText || "OK" }) })
|
|
176
|
+
] });
|
|
162
177
|
};
|
|
163
178
|
|
|
164
179
|
export { DateTimeSelector as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { getDaysInMonth } from 'date-fns';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import Icon from '../../atoms/Icon/Icon.js';
|
|
@@ -54,40 +55,47 @@ const Selector = ({
|
|
|
54
55
|
const handlePressOut = () => {
|
|
55
56
|
if (pressInTimeoutRef.current) clearTimeout(pressInTimeoutRef.current);
|
|
56
57
|
};
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
onPressIn: () => requestAnimationFrame(() => handlePressInNext()),
|
|
61
|
-
onPressOut: handlePressOut,
|
|
62
|
-
disabled: preventUpper
|
|
63
|
-
},
|
|
64
|
-
/* @__PURE__ */ React.createElement(
|
|
65
|
-
Icon,
|
|
58
|
+
return /* @__PURE__ */ jsxs(SelectorRoot, { ...rest, children: [
|
|
59
|
+
/* @__PURE__ */ jsx(
|
|
60
|
+
Control,
|
|
66
61
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
onPressIn: () => requestAnimationFrame(() => handlePressInNext()),
|
|
63
|
+
onPressOut: handlePressOut,
|
|
64
|
+
disabled: preventUpper,
|
|
65
|
+
children: /* @__PURE__ */ jsx(
|
|
66
|
+
Icon,
|
|
67
|
+
{
|
|
68
|
+
name: "chevron-up",
|
|
69
|
+
type: "material-community",
|
|
70
|
+
size: "mega",
|
|
71
|
+
colorVariant: "primary"
|
|
72
|
+
}
|
|
73
|
+
)
|
|
71
74
|
}
|
|
72
|
-
)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
style: { opacity: preventLower ? 0 : 1 }
|
|
80
|
-
},
|
|
81
|
-
/* @__PURE__ */ React.createElement(
|
|
82
|
-
Icon,
|
|
75
|
+
),
|
|
76
|
+
/* @__PURE__ */ jsxs(SelectorValue, { children: [
|
|
77
|
+
/* @__PURE__ */ jsx(TextComponent, { colorVariant: "secondary", typography: "sub", children: label }),
|
|
78
|
+
/* @__PURE__ */ jsx(TextComponent, { fontWeight: "bold", typography: "h5", children: getDisplayValue(value) })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ jsx(
|
|
81
|
+
Control,
|
|
83
82
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
onPressIn: () => requestAnimationFrame(() => handlePressInPrev()),
|
|
84
|
+
onPressOut: handlePressOut,
|
|
85
|
+
disabled: preventLower,
|
|
86
|
+
style: { opacity: preventLower ? 0 : 1 },
|
|
87
|
+
children: /* @__PURE__ */ jsx(
|
|
88
|
+
Icon,
|
|
89
|
+
{
|
|
90
|
+
name: "chevron-down",
|
|
91
|
+
type: "material-community",
|
|
92
|
+
size: "mega",
|
|
93
|
+
colorVariant: "primary"
|
|
94
|
+
}
|
|
95
|
+
)
|
|
88
96
|
}
|
|
89
97
|
)
|
|
90
|
-
)
|
|
98
|
+
] });
|
|
91
99
|
};
|
|
92
100
|
|
|
93
101
|
export { Selector };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import styled from '@emotion/native';
|
|
2
|
-
import 'react';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
3
|
import '../../atoms/Text/styled.js';
|
|
4
4
|
import '../../atoms/Input/styled.js';
|
|
5
|
+
import 'react';
|
|
5
6
|
import 'currency.js';
|
|
6
7
|
import '../../atoms/Input/InputElement/InputElement.js';
|
|
7
8
|
import '../../atoms/Input/InputMaskElement/InputMaskElement.js';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { extractNumbersFromString } from '../../../utils/extractNumbersFromString.js';
|
|
2
|
-
import 'react';
|
|
2
|
+
import 'react/jsx-runtime';
|
|
3
3
|
import '../../atoms/Text/styled.js';
|
|
4
4
|
import '../../atoms/Input/styled.js';
|
|
5
|
+
import 'react';
|
|
5
6
|
import 'currency.js';
|
|
6
7
|
import '../../atoms/Input/InputElement/InputElement.js';
|
|
7
8
|
import '../../atoms/Input/InputMaskElement/InputMaskElement.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import Hint from '../../atoms/Input/Hint.js';
|
|
4
|
+
import 'react';
|
|
4
5
|
import 'currency.js';
|
|
5
6
|
import '../../atoms/Text/styled.js';
|
|
6
7
|
import '../../atoms/Input/styled.js';
|
|
@@ -21,20 +22,23 @@ const HintInputContainer = ({
|
|
|
21
22
|
hintComponent,
|
|
22
23
|
...rest
|
|
23
24
|
}) => {
|
|
24
|
-
const _hint = hintComponent || /* @__PURE__ */
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
const _hint = hintComponent || /* @__PURE__ */ jsx(Hint, { TextComponent: LabelComponent, text: hint, variant });
|
|
26
|
+
return /* @__PURE__ */ jsxs(View, { style: viewStyle, children: [
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
PressableInputContainer,
|
|
29
|
+
{
|
|
30
|
+
onPress,
|
|
31
|
+
focused,
|
|
32
|
+
disabled,
|
|
33
|
+
LabelComponent,
|
|
34
|
+
variant,
|
|
35
|
+
rightComponent,
|
|
36
|
+
...rest,
|
|
37
|
+
children
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
hint && _hint
|
|
41
|
+
] });
|
|
38
42
|
};
|
|
39
43
|
|
|
40
44
|
export { HintInputContainer as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import Icon from '../../atoms/Icon/Icon.js';
|
|
3
4
|
|
|
@@ -6,14 +7,14 @@ const IconComponent = ({
|
|
|
6
7
|
size = "default",
|
|
7
8
|
defaultFontColor
|
|
8
9
|
}) => {
|
|
9
|
-
return iconProps ? /* @__PURE__ */
|
|
10
|
+
return iconProps ? /* @__PURE__ */ jsx(
|
|
10
11
|
Icon,
|
|
11
12
|
{
|
|
12
13
|
size: iconProps.size ?? size === "small" ? "deca" : "kilo",
|
|
13
14
|
fontColor: iconProps.fontColor ?? defaultFontColor,
|
|
14
15
|
...iconProps
|
|
15
16
|
}
|
|
16
|
-
) : /* @__PURE__ */
|
|
17
|
+
) : /* @__PURE__ */ jsx(Fragment, {});
|
|
17
18
|
};
|
|
18
19
|
var IconComponent$1 = React__default.memo(IconComponent);
|
|
19
20
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import Icon from '../../atoms/Icon/Icon.js';
|
|
3
3
|
import { StyledPasswordButtonIcon } from './styled.js';
|
|
4
4
|
|
|
@@ -8,15 +8,15 @@ const InputPasswordIcon = ({
|
|
|
8
8
|
...rest
|
|
9
9
|
}) => {
|
|
10
10
|
const icon = revealed ? "eye-outline" : "eye-off-outline";
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
12
|
StyledPasswordButtonIcon,
|
|
13
13
|
{
|
|
14
14
|
...rest,
|
|
15
15
|
variant: "text",
|
|
16
16
|
size: "small",
|
|
17
|
-
onPress: () => onChangeState(!revealed)
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
onPress: () => onChangeState(!revealed),
|
|
18
|
+
children: /* @__PURE__ */ jsx(Icon, { name: icon, type: "ionicon", size: "centi" })
|
|
19
|
+
}
|
|
20
20
|
);
|
|
21
21
|
};
|
|
22
22
|
|