@tecsinapse/react-web-kit 3.0.0 → 3.3.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.
Files changed (111) hide show
  1. package/dist/cjs/components/atoms/Button/styled.js +4 -4
  2. package/dist/cjs/components/atoms/Input/styled.js +2 -2
  3. package/dist/cjs/components/atoms/InputMask/styled.js +2 -2
  4. package/dist/cjs/components/atoms/Tooltip/styled.js +4 -1
  5. package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +8 -0
  6. package/dist/cjs/components/molecules/DateTimePickerSelector/DateTimePickerSelector.js +98 -0
  7. package/dist/cjs/components/molecules/DateTimePickerSelector/components/MemoizedTimeCard.js +22 -0
  8. package/dist/cjs/components/molecules/DateTimePickerSelector/components/ScrollableDigit.js +84 -0
  9. package/dist/cjs/components/molecules/DateTimePickerSelector/styled.js +54 -0
  10. package/dist/cjs/components/molecules/IconTextButton/styled.js +2 -2
  11. package/dist/cjs/components/molecules/LabeledSwitch/styled.js +4 -4
  12. package/dist/cjs/components/molecules/Menubar/MostUsed/styled.js +2 -2
  13. package/dist/cjs/components/molecules/Menubar/SearchResultItem/styled.js +2 -2
  14. package/dist/cjs/components/molecules/Menubar/styled.js +3 -3
  15. package/dist/cjs/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js +86 -0
  16. package/dist/cjs/components/molecules/ScrollableMonthYearPicker/styled.js +18 -0
  17. package/dist/cjs/components/molecules/ScrollableTimePicker/ScrollableTimePicker.js +77 -0
  18. package/dist/cjs/components/molecules/ScrollableTimePicker/styled.js +18 -0
  19. package/dist/cjs/components/molecules/Select/Select.js +12 -1
  20. package/dist/cjs/components/molecules/Select/SelectItem/styled.js +1 -1
  21. package/dist/cjs/components/molecules/Snackbar/styled.js +5 -5
  22. package/dist/cjs/components/molecules/TextArea/styled.js +2 -2
  23. package/dist/cjs/components/organisms/DataGrid/Footer/styled.js +4 -4
  24. package/dist/esm/components/atoms/Accordion/Accordion.js +9 -9
  25. package/dist/esm/components/atoms/Badge/Badge.js +3 -3
  26. package/dist/esm/components/atoms/Button/Button.js +2 -2
  27. package/dist/esm/components/atoms/Button/styled.js +2 -2
  28. package/dist/esm/components/atoms/Dropdown/index.js +3 -3
  29. package/dist/esm/components/atoms/Input/Input.js +5 -5
  30. package/dist/esm/components/atoms/Input/styled.js +2 -2
  31. package/dist/esm/components/atoms/InputMask/InputMask.js +5 -5
  32. package/dist/esm/components/atoms/InputMask/styled.js +2 -2
  33. package/dist/esm/components/atoms/Modal/Modal.js +2 -2
  34. package/dist/esm/components/atoms/Overlay/Overlay.js +2 -2
  35. package/dist/esm/components/atoms/Skeleton/Skeleton.js +3 -3
  36. package/dist/esm/components/atoms/Switch/Switch.js +3 -3
  37. package/dist/esm/components/atoms/Table/Body/TBody.js +2 -2
  38. package/dist/esm/components/atoms/Table/Cell/Td.js +2 -2
  39. package/dist/esm/components/atoms/Table/Container/TableContainer.js +2 -2
  40. package/dist/esm/components/atoms/Table/Footer/TFoot.js +2 -2
  41. package/dist/esm/components/atoms/Table/Header/THead.js +2 -2
  42. package/dist/esm/components/atoms/Table/Header/Th.js +2 -2
  43. package/dist/esm/components/atoms/Table/Row/Tr.js +2 -2
  44. package/dist/esm/components/atoms/Table/Table.js +2 -2
  45. package/dist/esm/components/atoms/Table/Toolbar/TableToolbar.js +2 -2
  46. package/dist/esm/components/atoms/Tag/Tag.js +3 -3
  47. package/dist/esm/components/atoms/Tooltip/Tooltip.js +6 -6
  48. package/dist/esm/components/atoms/Tooltip/styled.js +4 -1
  49. package/dist/esm/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +2 -2
  50. package/dist/esm/components/molecules/Breadcrumbs/Breadcrumbs.js +3 -3
  51. package/dist/esm/components/molecules/DatePicker/DatePicker.js +8 -8
  52. package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +12 -4
  53. package/dist/esm/components/molecules/DateTimePickerSelector/DateTimePickerSelector.js +77 -0
  54. package/dist/esm/components/molecules/DateTimePickerSelector/components/MemoizedTimeCard.js +20 -0
  55. package/dist/esm/components/molecules/DateTimePickerSelector/components/ScrollableDigit.js +63 -0
  56. package/dist/esm/components/molecules/DateTimePickerSelector/styled.js +46 -0
  57. package/dist/esm/components/molecules/Drawer/Drawer.js +2 -2
  58. package/dist/esm/components/molecules/Grid/Grid.js +6 -6
  59. package/dist/esm/components/molecules/Grid/Item/Item.js +4 -4
  60. package/dist/esm/components/molecules/IconTextButton/IconTextButton.js +7 -7
  61. package/dist/esm/components/molecules/IconTextButton/TextComponent.js +4 -4
  62. package/dist/esm/components/molecules/IconTextButton/styled.js +2 -2
  63. package/dist/esm/components/molecules/InputPassword/InputPassword.js +4 -4
  64. package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js +3 -3
  65. package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +5 -5
  66. package/dist/esm/components/molecules/LabeledSwitch/styled.js +2 -2
  67. package/dist/esm/components/molecules/Masonry/Masonry.js +6 -6
  68. package/dist/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js +4 -4
  69. package/dist/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +6 -6
  70. package/dist/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +2 -2
  71. package/dist/esm/components/molecules/Menubar/Menubar.js +14 -14
  72. package/dist/esm/components/molecules/Menubar/MostUsed/MostUsed.js +5 -5
  73. package/dist/esm/components/molecules/Menubar/MostUsed/styled.js +2 -2
  74. package/dist/esm/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +2 -2
  75. package/dist/esm/components/molecules/Menubar/SearchResultItem/styled.js +2 -2
  76. package/dist/esm/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
  77. package/dist/esm/components/molecules/Menubar/styled.js +3 -3
  78. package/dist/esm/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js +65 -0
  79. package/dist/esm/components/molecules/ScrollableMonthYearPicker/styled.js +15 -0
  80. package/dist/esm/components/molecules/ScrollableTimePicker/ScrollableTimePicker.js +56 -0
  81. package/dist/esm/components/molecules/ScrollableTimePicker/styled.js +15 -0
  82. package/dist/esm/components/molecules/Select/Dropdown/Dropdown.js +14 -14
  83. package/dist/esm/components/molecules/Select/Dropdown/components/SearchInput.js +4 -4
  84. package/dist/esm/components/molecules/Select/Select.js +22 -11
  85. package/dist/esm/components/molecules/Select/SelectItem/SelectItem.js +7 -7
  86. package/dist/esm/components/molecules/Select/SelectItem/styled.js +1 -1
  87. package/dist/esm/components/molecules/Select/styled.js +2 -2
  88. package/dist/esm/components/molecules/Snackbar/Snackbar.js +2 -2
  89. package/dist/esm/components/molecules/Snackbar/styled.js +2 -2
  90. package/dist/esm/components/molecules/TextArea/TextArea.js +3 -3
  91. package/dist/esm/components/molecules/TextArea/styled.js +2 -2
  92. package/dist/esm/components/organisms/DataGrid/DataGrid.js +9 -9
  93. package/dist/esm/components/organisms/DataGrid/Footer/Footer.js +12 -12
  94. package/dist/esm/components/organisms/DataGrid/Footer/styled.js +4 -4
  95. package/dist/esm/components/organisms/DataGrid/Header/Header.js +5 -5
  96. package/dist/esm/components/organisms/DataGrid/Row/Row.js +4 -4
  97. package/dist/esm/hooks/useClickAwayListener.js +2 -2
  98. package/dist/esm/hooks/useWindowSize.js +3 -3
  99. package/dist/types/components/molecules/DateTimePickerSelector/DateTimePickerSelector.d.ts +5 -0
  100. package/dist/types/components/molecules/DateTimePickerSelector/components/MemoizedTimeCard.d.ts +10 -0
  101. package/dist/types/components/molecules/DateTimePickerSelector/components/ScrollableDigit.d.ts +13 -0
  102. package/dist/types/components/molecules/DateTimePickerSelector/components/index.d.ts +2 -0
  103. package/dist/types/components/molecules/DateTimePickerSelector/index.d.ts +1 -0
  104. package/dist/types/components/molecules/DateTimePickerSelector/styled.d.ts +40 -0
  105. package/dist/types/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.d.ts +10 -0
  106. package/dist/types/components/molecules/ScrollableMonthYearPicker/index.d.ts +1 -0
  107. package/dist/types/components/molecules/ScrollableMonthYearPicker/styled.d.ts +9 -0
  108. package/dist/types/components/molecules/ScrollableTimePicker/ScrollableTimePicker.d.ts +10 -0
  109. package/dist/types/components/molecules/ScrollableTimePicker/index.d.ts +1 -0
  110. package/dist/types/components/molecules/ScrollableTimePicker/styled.d.ts +9 -0
  111. package/package.json +4 -4
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { StyledContainerBreadcrumbs } from './styled.js';
3
3
  import BreadcrumbItem from './BreadcrumbItem/BreadcrumbItem.js';
4
4
 
5
5
  const Breadcrumbs = ({ breadcrumbs, ...rest }) => {
6
- return /* @__PURE__ */ React.createElement(StyledContainerBreadcrumbs, { ...rest }, breadcrumbs.map((item, index) => {
6
+ return /* @__PURE__ */ React__default.createElement(StyledContainerBreadcrumbs, { ...rest }, breadcrumbs.map((item, index) => {
7
7
  const { props, Component = "a", title } = item;
8
- return /* @__PURE__ */ React.createElement(
8
+ return /* @__PURE__ */ React__default.createElement(
9
9
  BreadcrumbItem,
10
10
  {
11
11
  key: index,
@@ -1,5 +1,5 @@
1
1
  import { useTheme, DatePicker as DatePicker$1, Calendar, Masks, PressableSurface, CalendarIcon } from '@tecsinapse/react-core';
2
- import React, { useState, useCallback, useMemo } from 'react';
2
+ import React__default, { useState, useCallback, useMemo } from 'react';
3
3
  import { Dropdown } from '../../atoms/Dropdown/index.js';
4
4
  import InputMask from '../../atoms/InputMask/InputMask.js';
5
5
  import { parse, isValid } from 'date-fns';
@@ -49,7 +49,7 @@ const DatePicker = ({
49
49
  onChange?.(void 0);
50
50
  }, [value]);
51
51
  const controlComponent = (onPress, displayValue) => {
52
- return /* @__PURE__ */ React.createElement(
52
+ return /* @__PURE__ */ React__default.createElement(
53
53
  InputMask,
54
54
  {
55
55
  onBlur: () => {
@@ -88,7 +88,7 @@ const DatePicker = ({
88
88
  placeholder,
89
89
  label,
90
90
  placeholderTextColor: disabled ? theme.color.secondary.light : void 0,
91
- rightComponent: /* @__PURE__ */ React.createElement(
91
+ rightComponent: /* @__PURE__ */ React__default.createElement(
92
92
  PressableSurface,
93
93
  {
94
94
  effect: "none",
@@ -96,13 +96,13 @@ const DatePicker = ({
96
96
  onPress,
97
97
  disabled
98
98
  },
99
- /* @__PURE__ */ React.createElement(CalendarIcon, { name: "calendar-sharp", type: "ionicon", size: "centi" })
99
+ /* @__PURE__ */ React__default.createElement(CalendarIcon, { name: "calendar-sharp", type: "ionicon", size: "centi" })
100
100
  )
101
101
  }
102
102
  );
103
103
  };
104
104
  if (type === "day") {
105
- return /* @__PURE__ */ React.createElement(
105
+ return /* @__PURE__ */ React__default.createElement(
106
106
  DatePicker$1,
107
107
  {
108
108
  ...rest,
@@ -117,12 +117,12 @@ const DatePicker = ({
117
117
  month: getMonth,
118
118
  requestShowCalendar: show,
119
119
  requestCloseCalendar: close,
120
- renderCalendar: (calendar) => /* @__PURE__ */ React.createElement(Dropdown, { visible, setVisible }, calendar),
120
+ renderCalendar: (calendar) => /* @__PURE__ */ React__default.createElement(Dropdown, { visible, setVisible }, calendar),
121
121
  controlComponent
122
122
  }
123
123
  );
124
124
  } else {
125
- return /* @__PURE__ */ React.createElement(
125
+ return /* @__PURE__ */ React__default.createElement(
126
126
  DatePicker$1,
127
127
  {
128
128
  ...rest,
@@ -139,7 +139,7 @@ const DatePicker = ({
139
139
  requestCloseCalendar: close,
140
140
  placeholder,
141
141
  label,
142
- renderCalendar: (calendar, handleBlur) => /* @__PURE__ */ React.createElement(
142
+ renderCalendar: (calendar, handleBlur) => /* @__PURE__ */ React__default.createElement(
143
143
  Dropdown,
144
144
  {
145
145
  visible,
@@ -1,18 +1,26 @@
1
- import { DateTimePicker as DateTimePicker$1 } from '@tecsinapse/react-core';
2
- import React, { useState, useCallback } from 'react';
1
+ import { DateTimePicker as DateTimePicker$1, ControlledDateTimeSelector } from '@tecsinapse/react-core';
2
+ import React__default, { useState, useCallback } from 'react';
3
3
  import { Dropdown } from '../../atoms/Dropdown/index.js';
4
+ import DateTimePickerSelector from '../DateTimePickerSelector/DateTimePickerSelector.js';
4
5
 
5
6
  const DateTimePicker = ({ ...rest }) => {
6
7
  const [visible, setVisible] = useState(false);
7
8
  const show = useCallback(() => setVisible(true), []);
8
9
  const close = useCallback(() => setVisible(false), []);
9
- return /* @__PURE__ */ React.createElement(
10
+ return /* @__PURE__ */ React__default.createElement(
10
11
  DateTimePicker$1,
11
12
  {
12
13
  ...rest,
14
+ DateTimeSelectorComponent: (props) => /* @__PURE__ */ React__default.createElement(
15
+ ControlledDateTimeSelector,
16
+ {
17
+ SelectorComponent: DateTimePickerSelector,
18
+ ...props
19
+ }
20
+ ),
13
21
  requestShowSelector: show,
14
22
  requestCloseSelector: close,
15
- renderSelector: (selector) => /* @__PURE__ */ React.createElement(Dropdown, { visible, setVisible }, selector)
23
+ renderSelector: (selector) => /* @__PURE__ */ React__default.createElement(Dropdown, { visible, setVisible }, selector)
16
24
  }
17
25
  );
18
26
  };
@@ -0,0 +1,77 @@
1
+ import * as React from 'react';
2
+ import Button from '../../atoms/Button/Button.js';
3
+ import { Icon, Calendar, Text } from '@tecsinapse/react-core';
4
+ import { Root, Header, BackButton, Content } from './styled.js';
5
+ import ScrollableTimePicker from '../ScrollableTimePicker/ScrollableTimePicker.js';
6
+ import ScrollableMonthYearPicker from '../ScrollableMonthYearPicker/ScrollableMonthYearPicker.js';
7
+
8
+ const DateTimePickerSelector = ({
9
+ TextComponent = Text,
10
+ currentMode,
11
+ handlePressBack,
12
+ modalTitle,
13
+ isDate,
14
+ date,
15
+ handleCalendarChange,
16
+ isMonth,
17
+ setDate,
18
+ handlePressConfirm,
19
+ confirmButtonText,
20
+ locale,
21
+ yearLabel,
22
+ monthLabel,
23
+ hourLabel,
24
+ minuteLabel,
25
+ ...rest
26
+ }) => {
27
+ return /* @__PURE__ */ React.createElement(Root, { ...rest }, /* @__PURE__ */ React.createElement(Header, null, currentMode === 1 && /* @__PURE__ */ React.createElement(BackButton, { onPress: handlePressBack }, /* @__PURE__ */ React.createElement(
28
+ Icon,
29
+ {
30
+ type: "material-community",
31
+ name: "chevron-left",
32
+ size: "mega",
33
+ colorVariant: "secondary"
34
+ }
35
+ )), /* @__PURE__ */ React.createElement(TextComponent, { typography: "base", colorVariant: "secondary" }, modalTitle)), isDate ? /* @__PURE__ */ React.createElement(
36
+ Calendar,
37
+ {
38
+ type: "day",
39
+ value: date,
40
+ onChange: handleCalendarChange,
41
+ year: date.getFullYear(),
42
+ month: date.getMonth()
43
+ }
44
+ ) : isMonth ? /* @__PURE__ */ React.createElement(Content, { style: { flexDirection: "column" } }, /* @__PURE__ */ React.createElement(
45
+ Content,
46
+ {
47
+ style: { width: "100%", flexDirection: "row", display: "flex" }
48
+ },
49
+ /* @__PURE__ */ React.createElement(
50
+ ScrollableMonthYearPicker,
51
+ {
52
+ setDate,
53
+ date,
54
+ locale,
55
+ yearLabel,
56
+ monthLabel
57
+ }
58
+ )
59
+ )) : /* @__PURE__ */ React.createElement(Content, { style: { flexDirection: "column" } }, /* @__PURE__ */ React.createElement(
60
+ Content,
61
+ {
62
+ style: { width: "100%", flexDirection: "row", display: "flex" }
63
+ },
64
+ /* @__PURE__ */ React.createElement(
65
+ ScrollableTimePicker,
66
+ {
67
+ setDate,
68
+ date,
69
+ locale,
70
+ hourLabel,
71
+ minuteLabel
72
+ }
73
+ )
74
+ )), /* @__PURE__ */ React.createElement(Button, { color: "primary", onPress: handlePressConfirm }, /* @__PURE__ */ React.createElement(TextComponent, { fontWeight: "bold", fontColor: "light" }, confirmButtonText || "OK")));
75
+ };
76
+
77
+ export { DateTimePickerSelector as default };
@@ -0,0 +1,20 @@
1
+ import React__default from 'react';
2
+ import { TimeCard } from '../styled.js';
3
+
4
+ const MemoizedTimeCard = React__default.memo(
5
+ ({
6
+ time,
7
+ isSelected,
8
+ onPress,
9
+ TextComponent
10
+ }) => /* @__PURE__ */ React__default.createElement(TimeCard, { id: time, key: time, isSelected, onPress }, /* @__PURE__ */ React__default.createElement(
11
+ TextComponent,
12
+ {
13
+ colorVariant: isSelected ? "primary" : "secondary",
14
+ colorTone: "xdark"
15
+ },
16
+ time
17
+ ))
18
+ );
19
+
20
+ export { MemoizedTimeCard as default };
@@ -0,0 +1,63 @@
1
+ import * as React from 'react';
2
+ import { Text } from '@tecsinapse/react-core/src/components/atoms/Text';
3
+ import { useTheme } from '@tecsinapse/react-core';
4
+ import { RFValue } from '@tecsinapse/react-core/src/utils/ResponsiveFontSize';
5
+ import { StyledTextLabel, TimeDigitContainer } from '../styled.js';
6
+ import MemoizedTimeCard from './MemoizedTimeCard.js';
7
+
8
+ const ScrollableDigit = ({
9
+ TextComponent = Text,
10
+ data,
11
+ currentTime,
12
+ updateType,
13
+ timeLabel,
14
+ handleTimeChange,
15
+ initialScrollIndex
16
+ }) => {
17
+ const theme = useTheme();
18
+ const digitCardHeight = RFValue(Number(theme.typography.base.fontSize.slice(0, -2))) + 2 * RFValue(Number(theme.spacing.deca.slice(0, -2)));
19
+ const getDisplayedValue = (value) => {
20
+ const isNumericValue = parseInt(value, 10);
21
+ if (!isNaN(isNumericValue)) {
22
+ return value.padStart(2, "0");
23
+ } else {
24
+ return value;
25
+ }
26
+ };
27
+ const timeCardsBuilder = React.useCallback(
28
+ ({ item }) => /* @__PURE__ */ React.createElement(
29
+ MemoizedTimeCard,
30
+ {
31
+ time: getDisplayedValue(item),
32
+ isSelected: currentTime === item,
33
+ onPress: () => {
34
+ handleTimeChange(item, updateType);
35
+ },
36
+ TextComponent
37
+ }
38
+ ),
39
+ [handleTimeChange, TextComponent]
40
+ );
41
+ return /* @__PURE__ */ React.createElement("div", { style: { display: "flex", flexDirection: "column" } }, /* @__PURE__ */ React.createElement(StyledTextLabel, null, timeLabel), /* @__PURE__ */ React.createElement(
42
+ TimeDigitContainer,
43
+ {
44
+ showsHorizontalScrollIndicator: true,
45
+ data,
46
+ renderItem: timeCardsBuilder,
47
+ keyExtractor: (item) => item,
48
+ contentContainerStyle: {
49
+ alignItems: "center"
50
+ },
51
+ numColumns: 1,
52
+ initialScrollIndex,
53
+ getItemLayout: (_, index) => ({
54
+ length: digitCardHeight,
55
+ offset: digitCardHeight * index,
56
+ index
57
+ }),
58
+ fadingEdgeLength: 200
59
+ }
60
+ ));
61
+ };
62
+
63
+ export { ScrollableDigit as default };
@@ -0,0 +1,46 @@
1
+ import styled, { css } from '@emotion/native';
2
+ import { Text, PressableSurface } from '@tecsinapse/react-core';
3
+ import { FlatList } from 'react-native-web';
4
+
5
+ const StyledTextLabel = styled(Text)`
6
+ text-align: center;
7
+ font-size: 12px;
8
+ font-weight: bold;
9
+ `;
10
+ const TimeDigitContainer = styled(FlatList)`
11
+ max-height: 150px;
12
+ overflow-y: scroll;
13
+ `;
14
+ const TimeCard = styled(PressableSurface)(
15
+ (props) => css`
16
+ background-color: ${props.isSelected ? props.theme?.color.primary.light : void 0};
17
+ padding: ${props.theme?.spacing.centi};
18
+ border-radius: ${props.theme?.borderRadius.mili};
19
+ margin: ${props.theme?.spacing.mili};
20
+ padding: ${props.theme?.spacing.mili} ${props.theme?.spacing.deca};
21
+ `
22
+ );
23
+ const Root = styled.View`
24
+ position: relative;
25
+ background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};
26
+ `;
27
+ const Content = styled.View`
28
+ flex-direction: row;
29
+ justify-content: space-between;
30
+ margin-top: ${({ theme }) => theme.spacing.deca};
31
+ margin-bottom: ${({ theme }) => theme.spacing.deca};
32
+ `;
33
+ const BackButton = styled(PressableSurface)`
34
+ border-radius: ${({ theme }) => theme.borderRadius.mili};
35
+ padding: ${({ theme }) => theme.spacing.micro};
36
+ margin-right: ${({ theme }) => theme.spacing.mili};
37
+ aspect-ratio: 1;
38
+ `;
39
+ const Header = styled.View`
40
+ flex-direction: row;
41
+ align-items: center;
42
+ margin-top: ${({ theme }) => theme.spacing.mili};
43
+ margin-bottom: ${({ theme }) => theme.spacing.mili};
44
+ `;
45
+
46
+ export { BackButton, Content, Header, Root, StyledTextLabel, TimeCard, TimeDigitContainer };
@@ -1,4 +1,4 @@
1
- import React, { useRef } from 'react';
1
+ import React__default, { useRef } from 'react';
2
2
  import { StyledContainerDrawer } from './styled.js';
3
3
  import { Transition } from 'react-transition-group';
4
4
  import Overlay from '../../atoms/Overlay/Overlay.js';
@@ -30,7 +30,7 @@ const Drawer = ({
30
30
  };
31
31
  }
32
32
  };
33
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Overlay, { timeout: 300, open, onClose, zIndex: "drawer" }), /* @__PURE__ */ React.createElement(Transition, { in: open, timeout: 300, nodeRef: transitionRef }, (state) => /* @__PURE__ */ React.createElement(
33
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Overlay, { timeout: 300, open, onClose, zIndex: "drawer" }), /* @__PURE__ */ React__default.createElement(Transition, { in: open, timeout: 300, nodeRef: transitionRef }, (state) => /* @__PURE__ */ React__default.createElement(
34
34
  StyledContainerDrawer,
35
35
  {
36
36
  ref: transitionRef,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import GridItem from './Item/Item.js';
3
3
 
4
4
  const Grid = ({
@@ -11,7 +11,7 @@ const Grid = ({
11
11
  }) => {
12
12
  if (layout) {
13
13
  const flatLayout = layout.flat();
14
- return /* @__PURE__ */ React.createElement(
14
+ return /* @__PURE__ */ React__default.createElement(
15
15
  "div",
16
16
  {
17
17
  style: {
@@ -22,7 +22,7 @@ const Grid = ({
22
22
  },
23
23
  ...rest
24
24
  },
25
- React.Children.map(children, (child, index) => /* @__PURE__ */ React.createElement(
25
+ React__default.Children.map(children, (child, index) => /* @__PURE__ */ React__default.createElement(
26
26
  GridItem,
27
27
  {
28
28
  key: `child-${index}`,
@@ -34,7 +34,7 @@ const Grid = ({
34
34
  ))
35
35
  );
36
36
  }
37
- return /* @__PURE__ */ React.createElement(
37
+ return /* @__PURE__ */ React__default.createElement(
38
38
  "div",
39
39
  {
40
40
  style: {
@@ -45,8 +45,8 @@ const Grid = ({
45
45
  },
46
46
  ...rest
47
47
  },
48
- React.Children.map(children, (child, index) => {
49
- return React.cloneElement(child, {
48
+ React__default.Children.map(children, (child, index) => {
49
+ return React__default.cloneElement(child, {
50
50
  ...child?.props,
51
51
  columns,
52
52
  spacing: child?.props.spacing ?? spacing,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { useTheme, getGridItemColumSpan, getGridItemPadding } from '@tecsinapse/react-core';
3
3
  import { useBreakpoints } from '../../../../hooks/useBreakpoints.js';
4
4
  import { getSpan } from './functions.js';
@@ -25,7 +25,7 @@ const GridItem = ({
25
25
  }) => {
26
26
  const { spacing } = useTheme();
27
27
  const { sm, md, lg } = useBreakpoints();
28
- if (!React.Children.only(children)) {
28
+ if (!React__default.Children.only(children)) {
29
29
  throw new Error("The number of children in GridItem should be one");
30
30
  }
31
31
  if (loadingComponent && loading) {
@@ -49,11 +49,11 @@ const GridItem = ({
49
49
  paddingRight: getGridItemPadding("right", _spacing, spacing),
50
50
  paddingLeft: getGridItemPadding("left", _spacing, spacing)
51
51
  };
52
- const clone = React.cloneElement(children, {
52
+ const clone = React__default.cloneElement(children, {
53
53
  ...children?.props,
54
54
  style: wrapper ? children?.props.style : { ..._style, ...children?.props.style }
55
55
  });
56
- return wrapper ? /* @__PURE__ */ React.createElement("div", { ...rest, style: _style }, clone) : clone;
56
+ return wrapper ? /* @__PURE__ */ React__default.createElement("div", { ...rest, style: _style }, clone) : clone;
57
57
  };
58
58
 
59
59
  export { GridItem as default };
@@ -1,5 +1,5 @@
1
1
  import { IconComponent } from '@tecsinapse/react-core';
2
- import React from 'react';
2
+ import React__default from 'react';
3
3
  import useIconTextButton from './hooks/useIconTextButton.js';
4
4
  import { StyledIconTextButton } from './styled.js';
5
5
  import TextComponent from './TextComponent.js';
@@ -14,7 +14,7 @@ const IconTextButton = ({
14
14
  ...rest
15
15
  }) => {
16
16
  const { handleHover, handlePressed, defaultFontColor } = useIconTextButton(variant);
17
- return /* @__PURE__ */ React.createElement(
17
+ return /* @__PURE__ */ React__default.createElement(
18
18
  StyledIconTextButton,
19
19
  {
20
20
  boxed: !label,
@@ -26,15 +26,15 @@ const IconTextButton = ({
26
26
  onPressOut: () => handlePressed(false),
27
27
  ...rest
28
28
  },
29
- iconPosition === "left" ? /* @__PURE__ */ React.createElement(
29
+ iconPosition === "left" ? /* @__PURE__ */ React__default.createElement(
30
30
  IconComponent,
31
31
  {
32
32
  iconProps,
33
33
  size,
34
34
  defaultFontColor
35
35
  }
36
- ) : /* @__PURE__ */ React.createElement(React.Fragment, null),
37
- /* @__PURE__ */ React.createElement(
36
+ ) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null),
37
+ /* @__PURE__ */ React__default.createElement(
38
38
  TextComponent,
39
39
  {
40
40
  label,
@@ -45,14 +45,14 @@ const IconTextButton = ({
45
45
  size
46
46
  }
47
47
  ),
48
- iconPosition === "right" ? /* @__PURE__ */ React.createElement(
48
+ iconPosition === "right" ? /* @__PURE__ */ React__default.createElement(
49
49
  IconComponent,
50
50
  {
51
51
  iconProps,
52
52
  size,
53
53
  defaultFontColor
54
54
  }
55
- ) : /* @__PURE__ */ React.createElement(React.Fragment, null)
55
+ ) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null)
56
56
  );
57
57
  };
58
58
 
@@ -1,5 +1,5 @@
1
1
  import { Text } from '@tecsinapse/react-core';
2
- import React from 'react';
2
+ import React__default from 'react';
3
3
 
4
4
  const TextComponent = ({
5
5
  textProps,
@@ -7,7 +7,7 @@ const TextComponent = ({
7
7
  defaultFontColor,
8
8
  label
9
9
  }) => {
10
- return label ? /* @__PURE__ */ React.createElement(
10
+ return label ? /* @__PURE__ */ React__default.createElement(
11
11
  Text,
12
12
  {
13
13
  typography: textProps?.typography ?? size === "small" ? "sub" : "base",
@@ -16,8 +16,8 @@ const TextComponent = ({
16
16
  ...textProps
17
17
  },
18
18
  label
19
- ) : /* @__PURE__ */ React.createElement(React.Fragment, null);
19
+ ) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
20
20
  };
21
- var TextComponent$1 = React.memo(TextComponent);
21
+ var TextComponent$1 = React__default.memo(TextComponent);
22
22
 
23
23
  export { TextComponent$1 as default };
@@ -1,4 +1,4 @@
1
- import nativeStyled from '@emotion/native';
1
+ import styled from '@emotion/native';
2
2
  import Button from '../../atoms/Button/Button.js';
3
3
  import 'react';
4
4
 
@@ -6,7 +6,7 @@ const boxedStyle = ({ theme }) => `
6
6
  padding: ${theme?.spacing.centi};
7
7
  aspect-ratio: 1;
8
8
  `;
9
- const StyledIconTextButton = nativeStyled(Button)`
9
+ const StyledIconTextButton = styled(Button)`
10
10
  gap: ${({ theme }) => theme?.spacing.mili};
11
11
  ${({ boxed, theme }) => boxed && boxedStyle({ theme })};
12
12
  `;
@@ -1,17 +1,17 @@
1
1
  import { InputPasswordIcon } from '@tecsinapse/react-core';
2
- import React, { useState } from 'react';
2
+ import React__default, { useState } from 'react';
3
3
  import Input from '../../atoms/Input/Input.js';
4
4
 
5
- const InputPassword = React.forwardRef(
5
+ const InputPassword = React__default.forwardRef(
6
6
  ({ rightComponent, ...rest }, ref) => {
7
7
  const [revealed, setRevealed] = useState(false);
8
- return /* @__PURE__ */ React.createElement(
8
+ return /* @__PURE__ */ React__default.createElement(
9
9
  Input,
10
10
  {
11
11
  ...rest,
12
12
  ref,
13
13
  secureTextEntry: !revealed,
14
- rightComponent: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
14
+ rightComponent: /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
15
15
  InputPasswordIcon,
16
16
  {
17
17
  onChangeState: setRevealed,
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Pressable } from 'react-native-web';
3
3
  import { StyledLabel } from './styled.js';
4
4
 
@@ -12,7 +12,7 @@ const LabelComponent = ({
12
12
  }) => {
13
13
  const defaultFontColor = active && !switchDisabled ? "dark" : "medium";
14
14
  const defaultFontWeight = active && !switchDisabled ? "bold" : "regular";
15
- return /* @__PURE__ */ React.createElement(Pressable, { ...rest }, /* @__PURE__ */ React.createElement(
15
+ return /* @__PURE__ */ React__default.createElement(Pressable, { ...rest }, /* @__PURE__ */ React__default.createElement(
16
16
  StyledLabel,
17
17
  {
18
18
  labelPosition,
@@ -23,6 +23,6 @@ const LabelComponent = ({
23
23
  label
24
24
  ));
25
25
  };
26
- var LabelComponent$1 = React.memo(LabelComponent);
26
+ var LabelComponent$1 = React__default.memo(LabelComponent);
27
27
 
28
28
  export { LabelComponent$1 as default };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import LabelComponent from './LabelComponent.js';
3
3
  import { StyledDiv } from './styled.js';
4
4
  import Switch from '../../atoms/Switch/Switch.js';
@@ -13,7 +13,7 @@ const LabeledSwitch = ({
13
13
  rightLabel,
14
14
  ...rest
15
15
  }) => {
16
- return /* @__PURE__ */ React.createElement(StyledDiv, null, leftLabel ? /* @__PURE__ */ React.createElement(
16
+ return /* @__PURE__ */ React__default.createElement(StyledDiv, null, leftLabel ? /* @__PURE__ */ React__default.createElement(
17
17
  LabelComponent,
18
18
  {
19
19
  active,
@@ -24,7 +24,7 @@ const LabeledSwitch = ({
24
24
  switchDisabled: disabled,
25
25
  onPress: () => onChange(!active)
26
26
  }
27
- ) : /* @__PURE__ */ React.createElement(React.Fragment, null), /* @__PURE__ */ React.createElement(
27
+ ) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null), /* @__PURE__ */ React__default.createElement(
28
28
  Switch,
29
29
  {
30
30
  active,
@@ -32,7 +32,7 @@ const LabeledSwitch = ({
32
32
  onChange,
33
33
  ...rest
34
34
  }
35
- ), rightLabel ? /* @__PURE__ */ React.createElement(
35
+ ), rightLabel ? /* @__PURE__ */ React__default.createElement(
36
36
  LabelComponent,
37
37
  {
38
38
  active,
@@ -43,7 +43,7 @@ const LabeledSwitch = ({
43
43
  switchDisabled: disabled,
44
44
  onPress: () => onChange(!active)
45
45
  }
46
- ) : /* @__PURE__ */ React.createElement(React.Fragment, null));
46
+ ) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null));
47
47
  };
48
48
 
49
49
  export { LabeledSwitch as default };
@@ -1,4 +1,4 @@
1
- import nativeStyled, { css } from '@emotion/native';
1
+ import styled$1, { css } from '@emotion/native';
2
2
  import styled from '@emotion/styled';
3
3
  import { Text } from '@tecsinapse/react-core';
4
4
 
@@ -7,7 +7,7 @@ const StyledDiv = styled("div")`
7
7
  flex-direction: row;
8
8
  align-items: center;
9
9
  `;
10
- const StyledLabel = nativeStyled(Text)`
10
+ const StyledLabel = styled$1(Text)`
11
11
  ${({ theme, labelPosition }) => {
12
12
  if (labelPosition === "right")
13
13
  return css`
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { StyledMasonry, StyledColumnItem, StyledRowItem } from './styled.js';
3
3
 
4
4
  const Masonry = ({
@@ -12,20 +12,20 @@ const Masonry = ({
12
12
  { length: columns },
13
13
  () => []
14
14
  );
15
- React.Children.forEach(children, (child, index) => {
16
- if (child && React.isValidElement(child)) {
15
+ React__default.Children.forEach(children, (child, index) => {
16
+ if (child && React__default.isValidElement(child)) {
17
17
  columnsArray[index % columns].push(child);
18
18
  }
19
19
  });
20
20
  return columnsArray;
21
21
  };
22
22
  const renderColumn = (column) => {
23
- return column.map((item, index) => /* @__PURE__ */ React.createElement(StyledRowItem, { key: index, index, spacingTop }, item));
23
+ return column.map((item, index) => /* @__PURE__ */ React__default.createElement(StyledRowItem, { key: index, index, spacingTop }, item));
24
24
  };
25
25
  const renderColumns = () => {
26
- return getColumns().map((column, index) => /* @__PURE__ */ React.createElement(StyledColumnItem, { key: index, index, spacingLeft }, renderColumn(column)));
26
+ return getColumns().map((column, index) => /* @__PURE__ */ React__default.createElement(StyledColumnItem, { key: index, index, spacingLeft }, renderColumn(column)));
27
27
  };
28
- return /* @__PURE__ */ React.createElement(StyledMasonry, null, renderColumns());
28
+ return /* @__PURE__ */ React__default.createElement(StyledMasonry, null, renderColumns());
29
29
  };
30
30
 
31
31
  export { Masonry as default };