@tecsinapse/react-web-kit 3.5.0 → 3.5.1-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/Accordion/Accordion.js +36 -29
- package/dist/cjs/components/atoms/Badge/Badge.js +5 -5
- package/dist/cjs/components/atoms/Button/Button.js +5 -5
- package/dist/cjs/components/atoms/Dropdown/index.js +6 -5
- package/dist/cjs/components/atoms/Input/Input.js +34 -30
- package/dist/cjs/components/atoms/InputMask/InputMask.js +34 -30
- package/dist/cjs/components/atoms/Modal/Modal.js +17 -13
- package/dist/cjs/components/atoms/Overlay/Overlay.js +6 -5
- package/dist/cjs/components/atoms/Skeleton/Skeleton.js +12 -12
- package/dist/cjs/components/atoms/Switch/Switch.js +13 -12
- package/dist/cjs/components/atoms/Table/Body/TBody.js +2 -2
- package/dist/cjs/components/atoms/Table/Cell/Td.js +2 -2
- package/dist/cjs/components/atoms/Table/Container/TableContainer.js +2 -2
- package/dist/cjs/components/atoms/Table/Footer/TFoot.js +2 -2
- package/dist/cjs/components/atoms/Table/Header/THead.js +5 -2
- package/dist/cjs/components/atoms/Table/Header/Th.js +2 -2
- package/dist/cjs/components/atoms/Table/Row/Tr.js +2 -2
- package/dist/cjs/components/atoms/Table/Table.js +2 -2
- package/dist/cjs/components/atoms/Table/Toolbar/TableToolbar.js +8 -2
- package/dist/cjs/components/atoms/Tag/Tag.js +6 -6
- package/dist/cjs/components/atoms/Tooltip/Tooltip.js +21 -17
- package/dist/cjs/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +13 -10
- package/dist/cjs/components/molecules/Breadcrumbs/Breadcrumbs.js +6 -6
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js +13 -12
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +4 -3
- package/dist/cjs/components/molecules/DateTimePickerSelector/DateTimePickerSelector.js +53 -64
- package/dist/cjs/components/molecules/DateTimePickerSelector/components/MemoizedTimeCard.js +6 -5
- package/dist/cjs/components/molecules/DateTimePickerSelector/components/ScrollableDigit.js +25 -21
- package/dist/cjs/components/molecules/Drawer/Drawer.js +16 -12
- package/dist/cjs/components/molecules/Grid/Grid.js +25 -24
- package/dist/cjs/components/molecules/Grid/Item/Item.js +2 -1
- package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js +33 -31
- package/dist/cjs/components/molecules/IconTextButton/TextComponent.js +6 -5
- package/dist/cjs/components/molecules/InputPassword/InputPassword.js +13 -9
- package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js +6 -5
- package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js +36 -32
- package/dist/cjs/components/molecules/Masonry/Masonry.js +4 -3
- package/dist/cjs/components/molecules/Menubar/MenuBlock/MenuBlock.js +24 -17
- package/dist/cjs/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +23 -15
- package/dist/cjs/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +6 -2
- package/dist/cjs/components/molecules/Menubar/Menubar.js +73 -58
- package/dist/cjs/components/molecules/Menubar/MostUsed/MostUsed.js +30 -23
- package/dist/cjs/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +14 -11
- package/dist/cjs/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
- package/dist/cjs/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js +28 -24
- package/dist/cjs/components/molecules/ScrollableTimePicker/ScrollableTimePicker.js +31 -47
- package/dist/cjs/components/molecules/Select/Dropdown/Dropdown.js +50 -45
- package/dist/cjs/components/molecules/Select/Dropdown/components/SearchInput.js +3 -2
- package/dist/cjs/components/molecules/Select/Select.js +50 -45
- package/dist/cjs/components/molecules/Select/SelectItem/SelectItem.js +5 -1
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +2 -2
- package/dist/cjs/components/molecules/TextArea/TextArea.js +19 -19
- package/dist/cjs/components/organisms/DataGrid/DataGrid.js +55 -47
- package/dist/cjs/components/organisms/DataGrid/Footer/Footer.js +72 -57
- package/dist/cjs/components/organisms/DataGrid/Footer/styled.js +2 -1
- package/dist/cjs/components/organisms/DataGrid/Header/Header.js +28 -22
- package/dist/cjs/components/organisms/DataGrid/Header/styled.js +1 -1
- package/dist/cjs/components/organisms/DataGrid/Row/Row.js +11 -7
- package/dist/cjs/components/organisms/DataGrid/styled.js +1 -1
- package/dist/esm/components/atoms/Accordion/Accordion.js +36 -29
- package/dist/esm/components/atoms/Badge/Badge.js +5 -5
- package/dist/esm/components/atoms/Button/Button.js +5 -5
- package/dist/esm/components/atoms/Dropdown/index.js +6 -5
- package/dist/esm/components/atoms/Input/Input.js +34 -30
- package/dist/esm/components/atoms/InputMask/InputMask.js +34 -30
- package/dist/esm/components/atoms/Modal/Modal.js +18 -14
- package/dist/esm/components/atoms/Overlay/Overlay.js +7 -6
- package/dist/esm/components/atoms/Skeleton/Skeleton.js +12 -12
- package/dist/esm/components/atoms/Switch/Switch.js +14 -13
- package/dist/esm/components/atoms/Table/Body/TBody.js +2 -2
- package/dist/esm/components/atoms/Table/Cell/Td.js +2 -2
- package/dist/esm/components/atoms/Table/Container/TableContainer.js +2 -2
- package/dist/esm/components/atoms/Table/Footer/TFoot.js +2 -2
- package/dist/esm/components/atoms/Table/Header/THead.js +5 -2
- package/dist/esm/components/atoms/Table/Header/Th.js +2 -2
- package/dist/esm/components/atoms/Table/Row/Tr.js +2 -2
- package/dist/esm/components/atoms/Table/Table.js +2 -2
- package/dist/esm/components/atoms/Table/Toolbar/TableToolbar.js +8 -2
- package/dist/esm/components/atoms/Tag/Tag.js +6 -6
- package/dist/esm/components/atoms/Tooltip/Tooltip.js +21 -17
- package/dist/esm/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +13 -10
- package/dist/esm/components/molecules/Breadcrumbs/Breadcrumbs.js +6 -6
- package/dist/esm/components/molecules/DatePicker/DatePicker.js +14 -13
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +5 -4
- package/dist/esm/components/molecules/DateTimePickerSelector/DateTimePickerSelector.js +53 -45
- package/dist/esm/components/molecules/DateTimePickerSelector/components/MemoizedTimeCard.js +6 -5
- package/dist/esm/components/molecules/DateTimePickerSelector/components/ScrollableDigit.js +25 -21
- package/dist/esm/components/molecules/Drawer/Drawer.js +17 -13
- package/dist/esm/components/molecules/Grid/Grid.js +25 -24
- package/dist/esm/components/molecules/Grid/Item/Item.js +2 -1
- package/dist/esm/components/molecules/IconTextButton/IconTextButton.js +33 -31
- package/dist/esm/components/molecules/IconTextButton/TextComponent.js +6 -5
- package/dist/esm/components/molecules/InputPassword/InputPassword.js +13 -9
- package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js +6 -5
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +36 -32
- package/dist/esm/components/molecules/Masonry/Masonry.js +4 -3
- package/dist/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js +24 -17
- package/dist/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +23 -15
- package/dist/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +6 -2
- package/dist/esm/components/molecules/Menubar/Menubar.js +73 -58
- package/dist/esm/components/molecules/Menubar/MostUsed/MostUsed.js +31 -24
- package/dist/esm/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +14 -11
- package/dist/esm/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
- package/dist/esm/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js +28 -24
- package/dist/esm/components/molecules/ScrollableTimePicker/ScrollableTimePicker.js +31 -28
- package/dist/esm/components/molecules/Select/Dropdown/Dropdown.js +50 -45
- package/dist/esm/components/molecules/Select/Dropdown/components/SearchInput.js +3 -2
- package/dist/esm/components/molecules/Select/Select.js +50 -45
- package/dist/esm/components/molecules/Select/SelectItem/SelectItem.js +5 -1
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +2 -2
- package/dist/esm/components/molecules/TextArea/TextArea.js +19 -19
- package/dist/esm/components/organisms/DataGrid/DataGrid.js +55 -47
- package/dist/esm/components/organisms/DataGrid/Footer/Footer.js +72 -57
- package/dist/esm/components/organisms/DataGrid/Footer/styled.js +2 -1
- package/dist/esm/components/organisms/DataGrid/Header/Header.js +28 -22
- package/dist/esm/components/organisms/DataGrid/Header/styled.js +1 -1
- package/dist/esm/components/organisms/DataGrid/Row/Row.js +11 -7
- package/dist/esm/components/organisms/DataGrid/styled.js +1 -1
- package/dist/types/components/atoms/Accordion/Accordion.d.ts +1 -1
- package/dist/types/components/molecules/Select/Dropdown/components/SearchInput.d.ts +1 -1
- package/dist/types/components/organisms/DataGrid/Row/Row.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import Button from '../../atoms/Button/Button.js';
|
|
3
|
+
import 'react';
|
|
3
4
|
import { Icon, Calendar, Text } from '@tecsinapse/react-core';
|
|
4
5
|
import { Root, Header, BackButton, Content } from './styled.js';
|
|
5
6
|
import ScrollableTimePicker from '../ScrollableTimePicker/ScrollableTimePicker.js';
|
|
@@ -24,54 +25,61 @@ const DateTimePickerSelector = ({
|
|
|
24
25
|
minuteLabel,
|
|
25
26
|
...rest
|
|
26
27
|
}) => {
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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,
|
|
28
|
+
return /* @__PURE__ */ jsxs(Root, { ...rest, children: [
|
|
29
|
+
/* @__PURE__ */ jsxs(Header, { children: [
|
|
30
|
+
currentMode === 1 && /* @__PURE__ */ jsx(BackButton, { onPress: handlePressBack, children: /* @__PURE__ */ jsx(
|
|
31
|
+
Icon,
|
|
32
|
+
{
|
|
33
|
+
type: "material-community",
|
|
34
|
+
name: "chevron-left",
|
|
35
|
+
size: "mega",
|
|
36
|
+
colorVariant: "secondary"
|
|
37
|
+
}
|
|
38
|
+
) }),
|
|
39
|
+
/* @__PURE__ */ jsx(TextComponent, { typography: "base", colorVariant: "secondary", children: modalTitle })
|
|
40
|
+
] }),
|
|
41
|
+
isDate ? /* @__PURE__ */ jsx(
|
|
42
|
+
Calendar,
|
|
51
43
|
{
|
|
52
|
-
|
|
53
|
-
date,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
type: "day",
|
|
45
|
+
value: date,
|
|
46
|
+
onChange: handleCalendarChange,
|
|
47
|
+
year: date.getFullYear(),
|
|
48
|
+
month: date.getMonth()
|
|
57
49
|
}
|
|
58
|
-
)
|
|
59
|
-
|
|
60
|
-
Content,
|
|
61
|
-
{
|
|
62
|
-
style: { width: "100%", flexDirection: "row", display: "flex" }
|
|
63
|
-
},
|
|
64
|
-
/* @__PURE__ */ React.createElement(
|
|
65
|
-
ScrollableTimePicker,
|
|
50
|
+
) : isMonth ? /* @__PURE__ */ jsx(Content, { style: { flexDirection: "column" }, children: /* @__PURE__ */ jsx(
|
|
51
|
+
Content,
|
|
66
52
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
53
|
+
style: { width: "100%", flexDirection: "row", display: "flex" },
|
|
54
|
+
children: /* @__PURE__ */ jsx(
|
|
55
|
+
ScrollableMonthYearPicker,
|
|
56
|
+
{
|
|
57
|
+
setDate,
|
|
58
|
+
date,
|
|
59
|
+
locale,
|
|
60
|
+
yearLabel,
|
|
61
|
+
monthLabel
|
|
62
|
+
}
|
|
63
|
+
)
|
|
72
64
|
}
|
|
73
|
-
)
|
|
74
|
-
|
|
65
|
+
) }) : /* @__PURE__ */ jsx(Content, { style: { flexDirection: "column" }, children: /* @__PURE__ */ jsx(
|
|
66
|
+
Content,
|
|
67
|
+
{
|
|
68
|
+
style: { width: "100%", flexDirection: "row", display: "flex" },
|
|
69
|
+
children: /* @__PURE__ */ jsx(
|
|
70
|
+
ScrollableTimePicker,
|
|
71
|
+
{
|
|
72
|
+
setDate,
|
|
73
|
+
date,
|
|
74
|
+
locale,
|
|
75
|
+
hourLabel,
|
|
76
|
+
minuteLabel
|
|
77
|
+
}
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
) }),
|
|
81
|
+
/* @__PURE__ */ jsx(Button, { color: "primary", onPress: handlePressConfirm, children: /* @__PURE__ */ jsx(TextComponent, { fontWeight: "bold", fontColor: "light", children: confirmButtonText || "OK" }) })
|
|
82
|
+
] });
|
|
75
83
|
};
|
|
76
84
|
|
|
77
85
|
export { DateTimePickerSelector as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { TimeCard } from '../styled.js';
|
|
3
4
|
|
|
@@ -7,14 +8,14 @@ const MemoizedTimeCard = React__default.memo(
|
|
|
7
8
|
isSelected,
|
|
8
9
|
onPress,
|
|
9
10
|
TextComponent
|
|
10
|
-
}) => /* @__PURE__ */
|
|
11
|
+
}) => /* @__PURE__ */ jsx(TimeCard, { id: time, isSelected, onPress, children: /* @__PURE__ */ jsx(
|
|
11
12
|
TextComponent,
|
|
12
13
|
{
|
|
13
14
|
colorVariant: isSelected ? "primary" : "secondary",
|
|
14
|
-
colorTone: "xdark"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
))
|
|
15
|
+
colorTone: "xdark",
|
|
16
|
+
children: time
|
|
17
|
+
}
|
|
18
|
+
) }, time)
|
|
18
19
|
);
|
|
19
20
|
|
|
20
21
|
export { MemoizedTimeCard as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import { useTheme, RFValue, Text } from '@tecsinapse/react-core';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { StyledTextLabel, TimeDigitContainer } from '../styled.js';
|
|
@@ -23,7 +24,7 @@ const ScrollableDigit = ({
|
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
26
|
const timeCardsBuilder = React.useCallback(
|
|
26
|
-
({ item }) => /* @__PURE__ */
|
|
27
|
+
({ item }) => /* @__PURE__ */ jsx(
|
|
27
28
|
MemoizedTimeCard,
|
|
28
29
|
{
|
|
29
30
|
time: getDisplayedValue(item),
|
|
@@ -36,26 +37,29 @@ const ScrollableDigit = ({
|
|
|
36
37
|
),
|
|
37
38
|
[handleTimeChange, TextComponent]
|
|
38
39
|
);
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
40
|
+
return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
|
|
41
|
+
/* @__PURE__ */ jsx(StyledTextLabel, { children: timeLabel }),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
TimeDigitContainer,
|
|
44
|
+
{
|
|
45
|
+
showsHorizontalScrollIndicator: true,
|
|
46
|
+
data,
|
|
47
|
+
renderItem: timeCardsBuilder,
|
|
48
|
+
keyExtractor: (item) => item,
|
|
49
|
+
contentContainerStyle: {
|
|
50
|
+
alignItems: "center"
|
|
51
|
+
},
|
|
52
|
+
numColumns: 1,
|
|
53
|
+
initialScrollIndex,
|
|
54
|
+
getItemLayout: (_, index) => ({
|
|
55
|
+
length: digitCardHeight,
|
|
56
|
+
offset: digitCardHeight * index,
|
|
57
|
+
index
|
|
58
|
+
}),
|
|
59
|
+
fadingEdgeLength: 200
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] });
|
|
59
63
|
};
|
|
60
64
|
|
|
61
65
|
export { ScrollableDigit as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { useRef } from 'react';
|
|
2
3
|
import { StyledContainerDrawer } from './styled.js';
|
|
3
4
|
import { Transition } from 'react-transition-group';
|
|
4
5
|
import Overlay from '../../atoms/Overlay/Overlay.js';
|
|
@@ -30,18 +31,21 @@ const Drawer = ({
|
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
35
|
+
/* @__PURE__ */ jsx(Overlay, { timeout: 300, open, onClose, zIndex: "drawer" }),
|
|
36
|
+
/* @__PURE__ */ jsx(Transition, { in: open, timeout: 300, nodeRef: transitionRef, children: (state) => /* @__PURE__ */ jsx(
|
|
37
|
+
StyledContainerDrawer,
|
|
38
|
+
{
|
|
39
|
+
ref: transitionRef,
|
|
40
|
+
style: { ...style, ...getStyles(anchorPosition, state) },
|
|
41
|
+
anchorPosition,
|
|
42
|
+
onClose,
|
|
43
|
+
open,
|
|
44
|
+
...rest,
|
|
45
|
+
children
|
|
46
|
+
}
|
|
47
|
+
) })
|
|
48
|
+
] });
|
|
45
49
|
};
|
|
46
50
|
|
|
47
51
|
export { Drawer as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import GridItem from './Item/Item.js';
|
|
3
4
|
|
|
@@ -11,7 +12,7 @@ const Grid = ({
|
|
|
11
12
|
}) => {
|
|
12
13
|
if (layout) {
|
|
13
14
|
const flatLayout = layout.flat();
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
15
16
|
"div",
|
|
16
17
|
{
|
|
17
18
|
style: {
|
|
@@ -20,21 +21,21 @@ const Grid = ({
|
|
|
20
21
|
flexDirection: "row",
|
|
21
22
|
flexWrap: "wrap"
|
|
22
23
|
},
|
|
23
|
-
...rest
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
...rest,
|
|
25
|
+
children: React__default.Children.map(children, (child, index) => /* @__PURE__ */ jsx(
|
|
26
|
+
GridItem,
|
|
27
|
+
{
|
|
28
|
+
columns,
|
|
29
|
+
span: flatLayout[index],
|
|
30
|
+
spacing,
|
|
31
|
+
children: child
|
|
32
|
+
},
|
|
33
|
+
`child-${index}`
|
|
34
|
+
))
|
|
35
|
+
}
|
|
35
36
|
);
|
|
36
37
|
}
|
|
37
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
38
39
|
"div",
|
|
39
40
|
{
|
|
40
41
|
style: {
|
|
@@ -43,16 +44,16 @@ const Grid = ({
|
|
|
43
44
|
flexDirection: "row",
|
|
44
45
|
flexWrap: "wrap"
|
|
45
46
|
},
|
|
46
|
-
...rest
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
})
|
|
55
|
-
}
|
|
47
|
+
...rest,
|
|
48
|
+
children: React__default.Children.map(children, (child, index) => {
|
|
49
|
+
return React__default.cloneElement(child, {
|
|
50
|
+
...child?.props,
|
|
51
|
+
columns,
|
|
52
|
+
spacing: child?.props.spacing ?? spacing,
|
|
53
|
+
key: `child-${index}`
|
|
54
|
+
});
|
|
55
|
+
})
|
|
56
|
+
}
|
|
56
57
|
);
|
|
57
58
|
};
|
|
58
59
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { useTheme, getGridItemColumSpan, getGridItemPadding } from '@tecsinapse/react-core';
|
|
3
4
|
import { useBreakpoints } from '../../../../hooks/useBreakpoints.js';
|
|
@@ -53,7 +54,7 @@ const GridItem = ({
|
|
|
53
54
|
...children?.props,
|
|
54
55
|
style: wrapper ? children?.props.style : { ..._style, ...children?.props.style }
|
|
55
56
|
});
|
|
56
|
-
return wrapper ? /* @__PURE__ */
|
|
57
|
+
return wrapper ? /* @__PURE__ */ jsx("div", { ...rest, style: _style, children: clone }) : clone;
|
|
57
58
|
};
|
|
58
59
|
|
|
59
60
|
export { GridItem as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import { IconComponent } from '@tecsinapse/react-core';
|
|
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__ */
|
|
17
|
+
return /* @__PURE__ */ jsxs(
|
|
18
18
|
StyledIconTextButton,
|
|
19
19
|
{
|
|
20
20
|
boxed: !label,
|
|
@@ -24,35 +24,37 @@ const IconTextButton = ({
|
|
|
24
24
|
onMouseOver: () => handleHover(false),
|
|
25
25
|
onPressIn: () => handlePressed(true),
|
|
26
26
|
onPressOut: () => handlePressed(false),
|
|
27
|
-
...rest
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
27
|
+
...rest,
|
|
28
|
+
children: [
|
|
29
|
+
iconPosition === "left" ? /* @__PURE__ */ jsx(
|
|
30
|
+
IconComponent,
|
|
31
|
+
{
|
|
32
|
+
iconProps,
|
|
33
|
+
size,
|
|
34
|
+
defaultFontColor
|
|
35
|
+
}
|
|
36
|
+
) : /* @__PURE__ */ jsx(Fragment, {}),
|
|
37
|
+
/* @__PURE__ */ jsx(
|
|
38
|
+
TextComponent,
|
|
39
|
+
{
|
|
40
|
+
label,
|
|
41
|
+
defaultFontColor,
|
|
42
|
+
hasIcon: !!iconProps,
|
|
43
|
+
iconPosition,
|
|
44
|
+
textProps,
|
|
45
|
+
size
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
iconPosition === "right" ? /* @__PURE__ */ jsx(
|
|
49
|
+
IconComponent,
|
|
50
|
+
{
|
|
51
|
+
iconProps,
|
|
52
|
+
size,
|
|
53
|
+
defaultFontColor
|
|
54
|
+
}
|
|
55
|
+
) : /* @__PURE__ */ jsx(Fragment, {})
|
|
56
|
+
]
|
|
57
|
+
}
|
|
56
58
|
);
|
|
57
59
|
};
|
|
58
60
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import { Text } from '@tecsinapse/react-core';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
|
|
@@ -7,16 +8,16 @@ const TextComponent = ({
|
|
|
7
8
|
defaultFontColor,
|
|
8
9
|
label
|
|
9
10
|
}) => {
|
|
10
|
-
return label ? /* @__PURE__ */
|
|
11
|
+
return label ? /* @__PURE__ */ jsx(
|
|
11
12
|
Text,
|
|
12
13
|
{
|
|
13
14
|
typography: textProps?.typography ?? size === "small" ? "sub" : "base",
|
|
14
15
|
fontWeight: textProps?.fontWeight ?? "bold",
|
|
15
16
|
fontColor: textProps?.fontColor ?? defaultFontColor,
|
|
16
|
-
...textProps
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
) : /* @__PURE__ */
|
|
17
|
+
...textProps,
|
|
18
|
+
children: label
|
|
19
|
+
}
|
|
20
|
+
) : /* @__PURE__ */ jsx(Fragment, {});
|
|
20
21
|
};
|
|
21
22
|
var TextComponent$1 = React__default.memo(TextComponent);
|
|
22
23
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import { InputPasswordIcon } from '@tecsinapse/react-core';
|
|
2
3
|
import React__default, { useState } from 'react';
|
|
3
4
|
import Input from '../../atoms/Input/Input.js';
|
|
@@ -5,20 +6,23 @@ import Input from '../../atoms/Input/Input.js';
|
|
|
5
6
|
const InputPassword = React__default.forwardRef(
|
|
6
7
|
({ rightComponent, ...rest }, ref) => {
|
|
7
8
|
const [revealed, setRevealed] = useState(false);
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
9
10
|
Input,
|
|
10
11
|
{
|
|
11
12
|
...rest,
|
|
12
13
|
ref,
|
|
13
14
|
secureTextEntry: !revealed,
|
|
14
|
-
rightComponent: /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
rightComponent: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16
|
+
/* @__PURE__ */ jsx(
|
|
17
|
+
InputPasswordIcon,
|
|
18
|
+
{
|
|
19
|
+
onChangeState: setRevealed,
|
|
20
|
+
revealed,
|
|
21
|
+
effect: "none"
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
rightComponent
|
|
25
|
+
] })
|
|
22
26
|
}
|
|
23
27
|
);
|
|
24
28
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { Pressable } from 'react-native-web';
|
|
3
4
|
import { StyledLabel } from './styled.js';
|
|
@@ -12,16 +13,16 @@ const LabelComponent = ({
|
|
|
12
13
|
}) => {
|
|
13
14
|
const defaultFontColor = active && !switchDisabled ? "dark" : "medium";
|
|
14
15
|
const defaultFontWeight = active && !switchDisabled ? "bold" : "regular";
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
+
return /* @__PURE__ */ jsx(Pressable, { ...rest, children: /* @__PURE__ */ jsx(
|
|
16
17
|
StyledLabel,
|
|
17
18
|
{
|
|
18
19
|
labelPosition,
|
|
19
20
|
fontColor: labelProps?.fontColor ?? defaultFontColor,
|
|
20
21
|
fontWeight: labelProps?.fontWeight ?? defaultFontWeight,
|
|
21
|
-
...labelProps
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
));
|
|
22
|
+
...labelProps,
|
|
23
|
+
children: label
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
25
26
|
};
|
|
26
27
|
var LabelComponent$1 = React__default.memo(LabelComponent);
|
|
27
28
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import LabelComponent from './LabelComponent.js';
|
|
3
3
|
import { StyledDiv } from './styled.js';
|
|
4
4
|
import Switch from '../../atoms/Switch/Switch.js';
|
|
@@ -13,37 +13,41 @@ const LabeledSwitch = ({
|
|
|
13
13
|
rightLabel,
|
|
14
14
|
...rest
|
|
15
15
|
}) => {
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
16
|
+
return /* @__PURE__ */ jsxs(StyledDiv, { children: [
|
|
17
|
+
leftLabel ? /* @__PURE__ */ jsx(
|
|
18
|
+
LabelComponent,
|
|
19
|
+
{
|
|
20
|
+
active,
|
|
21
|
+
label: leftLabel,
|
|
22
|
+
labelPosition: "left",
|
|
23
|
+
labelProps,
|
|
24
|
+
disabled: !pressableLabel || disabled,
|
|
25
|
+
switchDisabled: disabled,
|
|
26
|
+
onPress: () => onChange(!active)
|
|
27
|
+
}
|
|
28
|
+
) : /* @__PURE__ */ jsx(Fragment, {}),
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
Switch,
|
|
31
|
+
{
|
|
32
|
+
active,
|
|
33
|
+
disabled,
|
|
34
|
+
onChange,
|
|
35
|
+
...rest
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
rightLabel ? /* @__PURE__ */ jsx(
|
|
39
|
+
LabelComponent,
|
|
40
|
+
{
|
|
41
|
+
active,
|
|
42
|
+
label: rightLabel,
|
|
43
|
+
labelPosition: "right",
|
|
44
|
+
labelProps,
|
|
45
|
+
disabled: !pressableLabel || disabled,
|
|
46
|
+
switchDisabled: disabled,
|
|
47
|
+
onPress: () => onChange(!active)
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ jsx(Fragment, {})
|
|
50
|
+
] });
|
|
47
51
|
};
|
|
48
52
|
|
|
49
53
|
export { LabeledSwitch as default };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { StyledMasonry, StyledColumnItem, StyledRowItem } from './styled.js';
|
|
3
4
|
|
|
@@ -20,12 +21,12 @@ const Masonry = ({
|
|
|
20
21
|
return columnsArray;
|
|
21
22
|
};
|
|
22
23
|
const renderColumn = (column) => {
|
|
23
|
-
return column.map((item, index) => /* @__PURE__ */
|
|
24
|
+
return column.map((item, index) => /* @__PURE__ */ jsx(StyledRowItem, { index, spacingTop, children: item }, index));
|
|
24
25
|
};
|
|
25
26
|
const renderColumns = () => {
|
|
26
|
-
return getColumns().map((column, index) => /* @__PURE__ */
|
|
27
|
+
return getColumns().map((column, index) => /* @__PURE__ */ jsx(StyledColumnItem, { index, spacingLeft, children: renderColumn(column) }, index));
|
|
27
28
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ jsx(StyledMasonry, { children: renderColumns() });
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
export { Masonry as default };
|