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