@tecsinapse/react-web-kit 3.4.21 → 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 +26 -22
- 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 +26 -22
- 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/DateTimePickerSelector/components/ScrollableDigit.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
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
var TBody = require('../../atoms/Table/Body/TBody.js');
|
|
5
6
|
var Td = require('../../atoms/Table/Cell/Td.js');
|
|
@@ -69,55 +70,62 @@ const DataGrid = ({
|
|
|
69
70
|
},
|
|
70
71
|
[onSelectedRows, rowKeyExtractor]
|
|
71
72
|
);
|
|
72
|
-
return /* @__PURE__ */
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
title: toolbarTitle,
|
|
76
|
-
rightIcons: toolbarRightIcons,
|
|
77
|
-
footer: toolbarFooter
|
|
78
|
-
}
|
|
79
|
-
), /* @__PURE__ */ React.createElement(Table, null, /* @__PURE__ */ React.createElement(
|
|
80
|
-
Header,
|
|
81
|
-
{
|
|
82
|
-
selectable,
|
|
83
|
-
headers,
|
|
84
|
-
data,
|
|
85
|
-
rowsCount: rowsCount ?? data.length,
|
|
86
|
-
rowKeyExtractor,
|
|
87
|
-
selectedRows,
|
|
88
|
-
onSelected: onSelectedRows
|
|
89
|
-
}
|
|
90
|
-
), !loading ? /* @__PURE__ */ React.createElement(TBody, null, data.length > 0 ? utils.getData(data, rowsCount, page, rowsPerPage, pagination).map(
|
|
91
|
-
(item) => /* @__PURE__ */ React.createElement(
|
|
92
|
-
Row,
|
|
73
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TableContainer, { ...rest, children: [
|
|
74
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
75
|
+
TableToolbar,
|
|
93
76
|
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
selectable,
|
|
98
|
-
headers,
|
|
99
|
-
data: item,
|
|
100
|
-
checked: selectedRows?.some(
|
|
101
|
-
(sel) => rowKeyExtractor(sel) === rowKeyExtractor(item)
|
|
102
|
-
)
|
|
77
|
+
title: toolbarTitle,
|
|
78
|
+
rightIcons: toolbarRightIcons,
|
|
79
|
+
footer: toolbarFooter
|
|
103
80
|
}
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Table, { children: [
|
|
83
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
84
|
+
Header,
|
|
85
|
+
{
|
|
86
|
+
selectable,
|
|
87
|
+
headers,
|
|
88
|
+
data,
|
|
89
|
+
rowsCount: rowsCount ?? data.length,
|
|
90
|
+
rowKeyExtractor,
|
|
91
|
+
selectedRows,
|
|
92
|
+
onSelected: onSelectedRows
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
!loading ? /* @__PURE__ */ jsxRuntime.jsx(TBody, { children: data.length > 0 ? utils.getData(data, rowsCount, page, rowsPerPage, pagination).map(
|
|
96
|
+
(item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
97
|
+
Row,
|
|
98
|
+
{
|
|
99
|
+
rowKeyExtractor,
|
|
100
|
+
handleSelect,
|
|
101
|
+
selectable,
|
|
102
|
+
headers,
|
|
103
|
+
data: item,
|
|
104
|
+
checked: selectedRows?.some(
|
|
105
|
+
(sel) => rowKeyExtractor(sel) === rowKeyExtractor(item)
|
|
106
|
+
)
|
|
107
|
+
},
|
|
108
|
+
rowKeyExtractor(item)
|
|
109
|
+
)
|
|
110
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 99, children: emptyPlaceholder }) }) }) : /* @__PURE__ */ jsxRuntime.jsx(TBody, { children: [...Array(rowsPerPage).keys()].map((idx) => /* @__PURE__ */ jsxRuntime.jsx(Tr, { children: /* @__PURE__ */ jsxRuntime.jsx(Td, { colSpan: 99, style: { padding: 0 }, children: skeletonComponent ?? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { height: 55, radius: "mili", animation: "wave", children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%" } }) }) }) }, `skeleton-${idx}`)) }),
|
|
111
|
+
(Number(rowsCount) > 0 || data.length > 0) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
112
|
+
Footer,
|
|
113
|
+
{
|
|
114
|
+
exportFunction,
|
|
115
|
+
exportLabel,
|
|
116
|
+
rowsPerPageLabel,
|
|
117
|
+
rowsPerPage,
|
|
118
|
+
onRowsPerPageChange,
|
|
119
|
+
rowsPerPageOptions,
|
|
120
|
+
rowsCount: rowsCount ?? data.length,
|
|
121
|
+
page,
|
|
122
|
+
onPageChange,
|
|
123
|
+
pagination,
|
|
124
|
+
exportComponent
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
] })
|
|
128
|
+
] });
|
|
121
129
|
};
|
|
122
130
|
|
|
123
131
|
module.exports = DataGrid;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
var Button = require('../../../atoms/Button/Button.js');
|
|
5
6
|
var reactCore = require('@tecsinapse/react-core');
|
|
@@ -53,63 +54,77 @@ const Footer = ({
|
|
|
53
54
|
);
|
|
54
55
|
const currentInitItem = page * rowsPerPage + 1;
|
|
55
56
|
const currentFinalItem = (page + 1) * rowsPerPage > rowsCount ? rowsCount : (page + 1) * rowsPerPage;
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
fontColor: "
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
57
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TFoot, { children: /* @__PURE__ */ jsxRuntime.jsx(Tr, { children: /* @__PURE__ */ jsxRuntime.jsx(styled.TdFooterStyled, { colSpan: 99, children: /* @__PURE__ */ jsxRuntime.jsxs(styled.FooterContainer, { children: [
|
|
58
|
+
/* @__PURE__ */ jsxRuntime.jsxs(styled.FooterContainerStart, { children: [
|
|
59
|
+
pagination && /* @__PURE__ */ jsxRuntime.jsx(styled.SelectContainer, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
Select,
|
|
61
|
+
{
|
|
62
|
+
options: rowsPerPageOptions,
|
|
63
|
+
onSelect: handleRowsPerPage,
|
|
64
|
+
value: rowsPerPage,
|
|
65
|
+
type: "single",
|
|
66
|
+
keyExtractor: (value) => String(value),
|
|
67
|
+
labelExtractor: rowsPerPageLabel,
|
|
68
|
+
anchor: "top"
|
|
69
|
+
}
|
|
70
|
+
) }),
|
|
71
|
+
exportComponent && !exportFunction && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: exportComponent }),
|
|
72
|
+
exportFunction && /* @__PURE__ */ jsxRuntime.jsx(styled.HoveredText, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "outlined", onPress: () => exportFunction(), children: /* @__PURE__ */ jsxRuntime.jsx(reactCore.Text, { fontColor: "orange", fontWeight: "bold", children: exportLabel }) }) })
|
|
73
|
+
] }),
|
|
74
|
+
pagination && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
75
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
76
|
+
styled.TextPagination,
|
|
77
|
+
{
|
|
78
|
+
fontWeight: "bold",
|
|
79
|
+
fontColor: "medium",
|
|
80
|
+
children: `Exibindo ${currentInitItem} a ${currentFinalItem} de ${rowsCount} registros`
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ jsxRuntime.jsxs(styled.FooterContainerEnd, { children: [
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
85
|
+
styled.NavigationButton,
|
|
86
|
+
{
|
|
87
|
+
onPress: () => onPageChange?.(page - 1),
|
|
88
|
+
disabled: page === 0,
|
|
89
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
90
|
+
reactCore.Icon,
|
|
91
|
+
{
|
|
92
|
+
name: "chevron-left",
|
|
93
|
+
type: "material-community",
|
|
94
|
+
fontColor: "light"
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ jsxRuntime.jsx(styled.PagesContainer, { children: [...Array(Math.ceil(rowsCount / rowsPerPage)).keys()].slice(
|
|
100
|
+
getPaginationSlice().start,
|
|
101
|
+
getPaginationSlice().end
|
|
102
|
+
).map((value) => /* @__PURE__ */ jsxRuntime.jsx(styled.HoveredText, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
103
|
+
styled.PageButton,
|
|
104
|
+
{
|
|
105
|
+
variant: page === value ? "outlined" : "text",
|
|
106
|
+
onPress: () => onPageChange?.(value),
|
|
107
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactCore.Text, { fontColor: "medium", fontWeight: "bold", children: value + 1 })
|
|
108
|
+
}
|
|
109
|
+
) }, `page-${value}`)) }),
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
111
|
+
styled.NavigationButton,
|
|
112
|
+
{
|
|
113
|
+
onPress: () => onPageChange?.(page + 1),
|
|
114
|
+
disabled: page === Math.ceil(rowsCount / rowsPerPage) - 1,
|
|
115
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
116
|
+
reactCore.Icon,
|
|
117
|
+
{
|
|
118
|
+
name: "chevron-right",
|
|
119
|
+
type: "material-community",
|
|
120
|
+
fontColor: "light"
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
)
|
|
125
|
+
] })
|
|
126
|
+
] })
|
|
127
|
+
] }) }) }) });
|
|
113
128
|
};
|
|
114
129
|
var Footer$1 = React.memo(Footer);
|
|
115
130
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var styled = require('@emotion/styled');
|
|
4
4
|
var styled$1 = require('@emotion/native');
|
|
5
5
|
var reactCore = require('@tecsinapse/react-core');
|
|
6
|
-
require('react');
|
|
6
|
+
require('react/jsx-runtime');
|
|
7
7
|
var Td = require('../../../atoms/Table/Cell/Td.js');
|
|
8
8
|
require('../../../atoms/Table/Container/styled.js');
|
|
9
9
|
require('../../../atoms/Table/Footer/styled.js');
|
|
@@ -12,6 +12,7 @@ require('../../../atoms/Table/Row/styled.js');
|
|
|
12
12
|
require('../../../atoms/Table/Toolbar/styled.js');
|
|
13
13
|
require('../../../atoms/Table/styled.js');
|
|
14
14
|
var Button = require('../../../atoms/Button/Button.js');
|
|
15
|
+
require('react');
|
|
15
16
|
|
|
16
17
|
const TdFooterStyled = styled(Td)`
|
|
17
18
|
padding: ${({ theme }) => theme.spacing.centi} 0 0 0;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
var reactCore = require('@tecsinapse/react-core');
|
|
5
6
|
require('../../../atoms/Table/Cell/styled.js');
|
|
@@ -54,31 +55,36 @@ const Header = ({
|
|
|
54
55
|
}
|
|
55
56
|
onSelected?.(selectedRows.concat(unselectedItemsOnData));
|
|
56
57
|
};
|
|
57
|
-
return /* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
)), headers.map(({ label, sort, justifyContent = "flex-start" }) => /* @__PURE__ */ React.createElement(Th, { key: label }, /* @__PURE__ */ React.createElement(
|
|
64
|
-
"div",
|
|
65
|
-
{
|
|
66
|
-
style: {
|
|
67
|
-
display: "flex",
|
|
68
|
-
alignItems: "center",
|
|
69
|
-
justifyContent
|
|
58
|
+
return /* @__PURE__ */ jsxRuntime.jsx(THead, { children: /* @__PURE__ */ jsxRuntime.jsxs(Tr, { children: [
|
|
59
|
+
selectable && /* @__PURE__ */ jsxRuntime.jsx(styled.CheckboxHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
60
|
+
reactCore.Checkbox,
|
|
61
|
+
{
|
|
62
|
+
checked: rowsCount === selectedRows?.length,
|
|
63
|
+
onChange: handleSelectAll
|
|
70
64
|
}
|
|
71
|
-
},
|
|
72
|
-
label,
|
|
73
|
-
|
|
74
|
-
reactCore.Icon,
|
|
65
|
+
) }),
|
|
66
|
+
headers.map(({ label, sort, justifyContent = "flex-start" }) => /* @__PURE__ */ jsxRuntime.jsx(Th, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
67
|
+
"div",
|
|
75
68
|
{
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
style: {
|
|
70
|
+
display: "flex",
|
|
71
|
+
alignItems: "center",
|
|
72
|
+
justifyContent
|
|
73
|
+
},
|
|
74
|
+
children: [
|
|
75
|
+
label,
|
|
76
|
+
sort && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginLeft: 8 }, children: /* @__PURE__ */ jsxRuntime.jsx(reactCore.PressableSurface, { onPress: () => handleSortDirection(sort), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
77
|
+
reactCore.Icon,
|
|
78
|
+
{
|
|
79
|
+
name: `sort-alphabetical-${utils.getIconSuffix(sortDirection)}`,
|
|
80
|
+
type: "material-community",
|
|
81
|
+
fontColor: utils.getIconColor(sortDirection)
|
|
82
|
+
}
|
|
83
|
+
) }) })
|
|
84
|
+
]
|
|
79
85
|
}
|
|
80
|
-
)))
|
|
81
|
-
))
|
|
86
|
+
) }, label))
|
|
87
|
+
] }) });
|
|
82
88
|
};
|
|
83
89
|
|
|
84
90
|
module.exports = Header;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var styled = require('@emotion/styled');
|
|
4
|
-
require('react');
|
|
4
|
+
require('react/jsx-runtime');
|
|
5
5
|
require('../../../atoms/Table/Cell/styled.js');
|
|
6
6
|
require('../../../atoms/Table/Container/styled.js');
|
|
7
7
|
require('../../../atoms/Table/Footer/styled.js');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
3
4
|
var React = require('react');
|
|
4
5
|
var reactCore = require('@tecsinapse/react-core');
|
|
5
6
|
var styled = require('../styled.js');
|
|
@@ -19,13 +20,16 @@ const Row = ({
|
|
|
19
20
|
selectable,
|
|
20
21
|
headers
|
|
21
22
|
}) => {
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Tr, { children: [
|
|
24
|
+
selectable && /* @__PURE__ */ jsxRuntime.jsx(styled.CheckboxCell, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
+
reactCore.Checkbox,
|
|
26
|
+
{
|
|
27
|
+
checked: _checked,
|
|
28
|
+
onChange: (checked) => handleSelect(data, checked)
|
|
29
|
+
}
|
|
30
|
+
) }),
|
|
31
|
+
headers.map(({ label, render }) => /* @__PURE__ */ jsxRuntime.jsx(Td, { children: render(data) }, `row-${rowKeyExtractor(data)}-column-${label}`))
|
|
32
|
+
] }, rowKeyExtractor(data));
|
|
29
33
|
};
|
|
30
34
|
var Row$1 = React.memo(Row);
|
|
31
35
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default, { useRef } from 'react';
|
|
2
3
|
import { Text, Icon } from '@tecsinapse/react-core';
|
|
3
4
|
import { AccordionContainer, TitleContainer, IconContainer, ContentContainer } from './styled.js';
|
|
@@ -32,36 +33,42 @@ const Accordion = ({
|
|
|
32
33
|
}
|
|
33
34
|
setOpen((state) => !state);
|
|
34
35
|
}, [onChange]);
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
return /* @__PURE__ */ jsxs(AccordionContainer, { ...rest, children: [
|
|
37
|
+
/* @__PURE__ */ jsxs(TitleContainer, { onClick: handleClick, children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Transition, { in: open, timeout: transition, nodeRef: titleTransitionRef, children: (state) => /* @__PURE__ */ jsx("div", { ref: titleTransitionRef, children: /* @__PURE__ */ jsx(
|
|
39
|
+
Text,
|
|
40
|
+
{
|
|
41
|
+
typography: "h4",
|
|
42
|
+
fontWeight: "bold",
|
|
43
|
+
style: {
|
|
44
|
+
...titleStyle(transition, theme),
|
|
45
|
+
...titleTransition(theme)[state]
|
|
46
|
+
},
|
|
47
|
+
children: title
|
|
48
|
+
}
|
|
49
|
+
) }) }),
|
|
50
|
+
/* @__PURE__ */ jsx(IconContainer, { children: /* @__PURE__ */ jsx(
|
|
51
|
+
Icon,
|
|
52
|
+
{
|
|
53
|
+
type: "material-community",
|
|
54
|
+
name: open ? "chevron-up" : "chevron-down",
|
|
55
|
+
size: "kilo",
|
|
56
|
+
fontColor: "medium"
|
|
57
|
+
}
|
|
58
|
+
) })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsx(Transition, { in: open, timeout: transition, nodeRef: ref, children: (state) => /* @__PURE__ */ jsx(
|
|
61
|
+
ContentContainer,
|
|
62
|
+
{
|
|
63
|
+
ref: (htmlEl) => ref.current = htmlEl,
|
|
64
|
+
style: {
|
|
65
|
+
...contentStyle(open, transition, contentHeight, theme),
|
|
66
|
+
...contentTransition(contentHeight, theme)[state]
|
|
67
|
+
},
|
|
68
|
+
children
|
|
43
69
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
))), /* @__PURE__ */ React__default.createElement(IconContainer, null, /* @__PURE__ */ React__default.createElement(
|
|
47
|
-
Icon,
|
|
48
|
-
{
|
|
49
|
-
type: "material-community",
|
|
50
|
-
name: open ? "chevron-up" : "chevron-down",
|
|
51
|
-
size: "kilo",
|
|
52
|
-
fontColor: "medium"
|
|
53
|
-
}
|
|
54
|
-
))), /* @__PURE__ */ React__default.createElement(Transition, { in: open, timeout: transition, nodeRef: ref }, (state) => /* @__PURE__ */ React__default.createElement(
|
|
55
|
-
ContentContainer,
|
|
56
|
-
{
|
|
57
|
-
ref: (htmlEl) => ref.current = htmlEl,
|
|
58
|
-
style: {
|
|
59
|
-
...contentStyle(open, transition, contentHeight, theme),
|
|
60
|
-
...contentTransition(contentHeight, theme)[state]
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
children
|
|
64
|
-
)));
|
|
70
|
+
) })
|
|
71
|
+
] });
|
|
65
72
|
};
|
|
66
73
|
|
|
67
74
|
export { Accordion as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { Badge as Badge$1, Text } from '@tecsinapse/react-core';
|
|
2
|
-
import React__default from 'react';
|
|
3
3
|
|
|
4
4
|
const Badge = ({
|
|
5
5
|
children,
|
|
@@ -7,13 +7,13 @@ const Badge = ({
|
|
|
7
7
|
value,
|
|
8
8
|
...props
|
|
9
9
|
}) => {
|
|
10
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
11
|
Badge$1,
|
|
12
12
|
{
|
|
13
13
|
...props,
|
|
14
|
-
value: /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
value: /* @__PURE__ */ jsx(Text, { fontColor, fontWeight: "bold", typography: "label", children: value }),
|
|
15
|
+
children
|
|
16
|
+
}
|
|
17
17
|
);
|
|
18
18
|
};
|
|
19
19
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useMouseHover } from './hooks/useMouseHover.js';
|
|
3
3
|
import { useMousePressed } from './hooks/useMousePressed.js';
|
|
4
4
|
import { StyledWebButton } from './styled.js';
|
|
@@ -26,7 +26,7 @@ const Button = ({
|
|
|
26
26
|
onPressIn,
|
|
27
27
|
onPressOut
|
|
28
28
|
);
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
30
|
StyledWebButton,
|
|
31
31
|
{
|
|
32
32
|
...rest,
|
|
@@ -39,9 +39,9 @@ const Button = ({
|
|
|
39
39
|
onPressIn: handlePressIn,
|
|
40
40
|
onPressOut: handlePressOut,
|
|
41
41
|
pressed,
|
|
42
|
-
variant
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
variant,
|
|
43
|
+
children
|
|
44
|
+
}
|
|
45
45
|
);
|
|
46
46
|
};
|
|
47
47
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
1
2
|
import React__default from 'react';
|
|
2
3
|
import { StyledContainerDropdown } from './styled.js';
|
|
3
4
|
import { Transition } from 'react-transition-group';
|
|
@@ -13,14 +14,14 @@ const Component = ({
|
|
|
13
14
|
}) => {
|
|
14
15
|
const refDropDown = React__default.useRef(null);
|
|
15
16
|
useClickAwayListener(refDropDown, setVisible, "mousedown", onClickAway);
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
+
return /* @__PURE__ */ jsx(Transition, { in: visible, timeout: 300, nodeRef: refDropDown, children: (state) => /* @__PURE__ */ jsx(
|
|
17
18
|
StyledContainerDropdown,
|
|
18
19
|
{
|
|
19
20
|
style: { ...defaultStyles, ...transition["bottom"][state] },
|
|
20
|
-
ref: refDropDown
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
));
|
|
21
|
+
ref: refDropDown,
|
|
22
|
+
children
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
24
25
|
};
|
|
25
26
|
const Dropdown = Component;
|
|
26
27
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
2
|
import { useInputFocus, InputContainer, Hint } from '@tecsinapse/react-core';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import { View } from 'react-native-web';
|
|
@@ -28,45 +29,48 @@ const Input = React__default.forwardRef(
|
|
|
28
29
|
value,
|
|
29
30
|
...rest
|
|
30
31
|
}, ref) => {
|
|
31
|
-
const _hint = hintComponent || /* @__PURE__ */
|
|
32
|
+
const _hint = hintComponent || /* @__PURE__ */ jsx(Hint, { text: hint, variant });
|
|
32
33
|
const { focused, handleBlur, handleFocus } = useInputFocus(
|
|
33
34
|
onFocus,
|
|
34
35
|
onBlur,
|
|
35
36
|
!disabled
|
|
36
37
|
);
|
|
37
38
|
const onlyLabel = label && !placeholder;
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
label: value ? label : void 0,
|
|
42
|
-
labelColor,
|
|
43
|
-
labelColorVariant,
|
|
44
|
-
labelColorTone,
|
|
45
|
-
labelTypography,
|
|
46
|
-
labelStack,
|
|
47
|
-
labelWeight,
|
|
48
|
-
leftComponent,
|
|
49
|
-
rightComponent,
|
|
50
|
-
borderColor,
|
|
51
|
-
borderColorGradation,
|
|
52
|
-
inputContainerStyle,
|
|
53
|
-
focused,
|
|
54
|
-
disabled,
|
|
55
|
-
variant
|
|
56
|
-
},
|
|
57
|
-
/* @__PURE__ */ React__default.createElement(
|
|
58
|
-
StyledWebTextInput,
|
|
39
|
+
return /* @__PURE__ */ jsxs(View, { style, children: [
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
InputContainer,
|
|
59
42
|
{
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
43
|
+
label: value ? label : void 0,
|
|
44
|
+
labelColor,
|
|
45
|
+
labelColorVariant,
|
|
46
|
+
labelColorTone,
|
|
47
|
+
labelTypography,
|
|
48
|
+
labelStack,
|
|
49
|
+
labelWeight,
|
|
50
|
+
leftComponent,
|
|
51
|
+
rightComponent,
|
|
52
|
+
borderColor,
|
|
53
|
+
borderColorGradation,
|
|
54
|
+
inputContainerStyle,
|
|
55
|
+
focused,
|
|
64
56
|
disabled,
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
variant,
|
|
58
|
+
children: /* @__PURE__ */ jsx(
|
|
59
|
+
StyledWebTextInput,
|
|
60
|
+
{
|
|
61
|
+
...rest,
|
|
62
|
+
placeholder: onlyLabel ? label : placeholder,
|
|
63
|
+
value,
|
|
64
|
+
ref,
|
|
65
|
+
disabled,
|
|
66
|
+
onFocus: handleFocus,
|
|
67
|
+
onBlur: handleBlur
|
|
68
|
+
}
|
|
69
|
+
)
|
|
67
70
|
}
|
|
68
|
-
)
|
|
69
|
-
|
|
71
|
+
),
|
|
72
|
+
hint && _hint
|
|
73
|
+
] });
|
|
70
74
|
}
|
|
71
75
|
);
|
|
72
76
|
Input.displayName = "Input";
|