@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.
Files changed (122) hide show
  1. package/dist/cjs/components/atoms/Accordion/Accordion.js +36 -29
  2. package/dist/cjs/components/atoms/Badge/Badge.js +5 -5
  3. package/dist/cjs/components/atoms/Button/Button.js +5 -5
  4. package/dist/cjs/components/atoms/Dropdown/index.js +6 -5
  5. package/dist/cjs/components/atoms/Input/Input.js +34 -30
  6. package/dist/cjs/components/atoms/InputMask/InputMask.js +34 -30
  7. package/dist/cjs/components/atoms/Modal/Modal.js +17 -13
  8. package/dist/cjs/components/atoms/Overlay/Overlay.js +6 -5
  9. package/dist/cjs/components/atoms/Skeleton/Skeleton.js +12 -12
  10. package/dist/cjs/components/atoms/Switch/Switch.js +13 -12
  11. package/dist/cjs/components/atoms/Table/Body/TBody.js +2 -2
  12. package/dist/cjs/components/atoms/Table/Cell/Td.js +2 -2
  13. package/dist/cjs/components/atoms/Table/Container/TableContainer.js +2 -2
  14. package/dist/cjs/components/atoms/Table/Footer/TFoot.js +2 -2
  15. package/dist/cjs/components/atoms/Table/Header/THead.js +5 -2
  16. package/dist/cjs/components/atoms/Table/Header/Th.js +2 -2
  17. package/dist/cjs/components/atoms/Table/Row/Tr.js +2 -2
  18. package/dist/cjs/components/atoms/Table/Table.js +2 -2
  19. package/dist/cjs/components/atoms/Table/Toolbar/TableToolbar.js +8 -2
  20. package/dist/cjs/components/atoms/Tag/Tag.js +6 -6
  21. package/dist/cjs/components/atoms/Tooltip/Tooltip.js +21 -17
  22. package/dist/cjs/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +13 -10
  23. package/dist/cjs/components/molecules/Breadcrumbs/Breadcrumbs.js +6 -6
  24. package/dist/cjs/components/molecules/DatePicker/DatePicker.js +13 -12
  25. package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +4 -3
  26. package/dist/cjs/components/molecules/DateTimePickerSelector/DateTimePickerSelector.js +53 -64
  27. package/dist/cjs/components/molecules/DateTimePickerSelector/components/MemoizedTimeCard.js +6 -5
  28. package/dist/cjs/components/molecules/DateTimePickerSelector/components/ScrollableDigit.js +25 -21
  29. package/dist/cjs/components/molecules/Drawer/Drawer.js +16 -12
  30. package/dist/cjs/components/molecules/Grid/Grid.js +25 -24
  31. package/dist/cjs/components/molecules/Grid/Item/Item.js +2 -1
  32. package/dist/cjs/components/molecules/IconTextButton/IconTextButton.js +33 -31
  33. package/dist/cjs/components/molecules/IconTextButton/TextComponent.js +6 -5
  34. package/dist/cjs/components/molecules/InputPassword/InputPassword.js +13 -9
  35. package/dist/cjs/components/molecules/LabeledSwitch/LabelComponent.js +6 -5
  36. package/dist/cjs/components/molecules/LabeledSwitch/LabeledSwitch.js +36 -32
  37. package/dist/cjs/components/molecules/Masonry/Masonry.js +4 -3
  38. package/dist/cjs/components/molecules/Menubar/MenuBlock/MenuBlock.js +24 -17
  39. package/dist/cjs/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +23 -15
  40. package/dist/cjs/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +6 -2
  41. package/dist/cjs/components/molecules/Menubar/Menubar.js +73 -58
  42. package/dist/cjs/components/molecules/Menubar/MostUsed/MostUsed.js +30 -23
  43. package/dist/cjs/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +14 -11
  44. package/dist/cjs/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
  45. package/dist/cjs/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js +28 -24
  46. package/dist/cjs/components/molecules/ScrollableTimePicker/ScrollableTimePicker.js +31 -47
  47. package/dist/cjs/components/molecules/Select/Dropdown/Dropdown.js +50 -45
  48. package/dist/cjs/components/molecules/Select/Dropdown/components/SearchInput.js +3 -2
  49. package/dist/cjs/components/molecules/Select/Select.js +50 -45
  50. package/dist/cjs/components/molecules/Select/SelectItem/SelectItem.js +5 -1
  51. package/dist/cjs/components/molecules/Snackbar/Snackbar.js +2 -2
  52. package/dist/cjs/components/molecules/TextArea/TextArea.js +19 -19
  53. package/dist/cjs/components/organisms/DataGrid/DataGrid.js +55 -47
  54. package/dist/cjs/components/organisms/DataGrid/Footer/Footer.js +72 -57
  55. package/dist/cjs/components/organisms/DataGrid/Footer/styled.js +2 -1
  56. package/dist/cjs/components/organisms/DataGrid/Header/Header.js +28 -22
  57. package/dist/cjs/components/organisms/DataGrid/Header/styled.js +1 -1
  58. package/dist/cjs/components/organisms/DataGrid/Row/Row.js +11 -7
  59. package/dist/cjs/components/organisms/DataGrid/styled.js +1 -1
  60. package/dist/esm/components/atoms/Accordion/Accordion.js +36 -29
  61. package/dist/esm/components/atoms/Badge/Badge.js +5 -5
  62. package/dist/esm/components/atoms/Button/Button.js +5 -5
  63. package/dist/esm/components/atoms/Dropdown/index.js +6 -5
  64. package/dist/esm/components/atoms/Input/Input.js +34 -30
  65. package/dist/esm/components/atoms/InputMask/InputMask.js +34 -30
  66. package/dist/esm/components/atoms/Modal/Modal.js +18 -14
  67. package/dist/esm/components/atoms/Overlay/Overlay.js +7 -6
  68. package/dist/esm/components/atoms/Skeleton/Skeleton.js +12 -12
  69. package/dist/esm/components/atoms/Switch/Switch.js +14 -13
  70. package/dist/esm/components/atoms/Table/Body/TBody.js +2 -2
  71. package/dist/esm/components/atoms/Table/Cell/Td.js +2 -2
  72. package/dist/esm/components/atoms/Table/Container/TableContainer.js +2 -2
  73. package/dist/esm/components/atoms/Table/Footer/TFoot.js +2 -2
  74. package/dist/esm/components/atoms/Table/Header/THead.js +5 -2
  75. package/dist/esm/components/atoms/Table/Header/Th.js +2 -2
  76. package/dist/esm/components/atoms/Table/Row/Tr.js +2 -2
  77. package/dist/esm/components/atoms/Table/Table.js +2 -2
  78. package/dist/esm/components/atoms/Table/Toolbar/TableToolbar.js +8 -2
  79. package/dist/esm/components/atoms/Tag/Tag.js +6 -6
  80. package/dist/esm/components/atoms/Tooltip/Tooltip.js +21 -17
  81. package/dist/esm/components/molecules/Breadcrumbs/BreadcrumbItem/BreadcrumbItem.js +13 -10
  82. package/dist/esm/components/molecules/Breadcrumbs/Breadcrumbs.js +6 -6
  83. package/dist/esm/components/molecules/DatePicker/DatePicker.js +14 -13
  84. package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +5 -4
  85. package/dist/esm/components/molecules/DateTimePickerSelector/DateTimePickerSelector.js +53 -45
  86. package/dist/esm/components/molecules/DateTimePickerSelector/components/MemoizedTimeCard.js +6 -5
  87. package/dist/esm/components/molecules/DateTimePickerSelector/components/ScrollableDigit.js +25 -21
  88. package/dist/esm/components/molecules/Drawer/Drawer.js +17 -13
  89. package/dist/esm/components/molecules/Grid/Grid.js +25 -24
  90. package/dist/esm/components/molecules/Grid/Item/Item.js +2 -1
  91. package/dist/esm/components/molecules/IconTextButton/IconTextButton.js +33 -31
  92. package/dist/esm/components/molecules/IconTextButton/TextComponent.js +6 -5
  93. package/dist/esm/components/molecules/InputPassword/InputPassword.js +13 -9
  94. package/dist/esm/components/molecules/LabeledSwitch/LabelComponent.js +6 -5
  95. package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +36 -32
  96. package/dist/esm/components/molecules/Masonry/Masonry.js +4 -3
  97. package/dist/esm/components/molecules/Menubar/MenuBlock/MenuBlock.js +24 -17
  98. package/dist/esm/components/molecules/Menubar/MenuBlock/MenuItem/MenuItem.js +23 -15
  99. package/dist/esm/components/molecules/Menubar/MenuBlock/MenuItem/SubMenuBlock/SubMenuBlock.js +6 -2
  100. package/dist/esm/components/molecules/Menubar/Menubar.js +73 -58
  101. package/dist/esm/components/molecules/Menubar/MostUsed/MostUsed.js +31 -24
  102. package/dist/esm/components/molecules/Menubar/SearchResultItem/SearchResultItem.js +14 -11
  103. package/dist/esm/components/molecules/Menubar/SearchResultItem/utils.js +2 -2
  104. package/dist/esm/components/molecules/ScrollableMonthYearPicker/ScrollableMonthYearPicker.js +28 -24
  105. package/dist/esm/components/molecules/ScrollableTimePicker/ScrollableTimePicker.js +31 -28
  106. package/dist/esm/components/molecules/Select/Dropdown/Dropdown.js +50 -45
  107. package/dist/esm/components/molecules/Select/Dropdown/components/SearchInput.js +3 -2
  108. package/dist/esm/components/molecules/Select/Select.js +50 -45
  109. package/dist/esm/components/molecules/Select/SelectItem/SelectItem.js +5 -1
  110. package/dist/esm/components/molecules/Snackbar/Snackbar.js +2 -2
  111. package/dist/esm/components/molecules/TextArea/TextArea.js +19 -19
  112. package/dist/esm/components/organisms/DataGrid/DataGrid.js +55 -47
  113. package/dist/esm/components/organisms/DataGrid/Footer/Footer.js +72 -57
  114. package/dist/esm/components/organisms/DataGrid/Footer/styled.js +2 -1
  115. package/dist/esm/components/organisms/DataGrid/Header/Header.js +28 -22
  116. package/dist/esm/components/organisms/DataGrid/Header/styled.js +1 -1
  117. package/dist/esm/components/organisms/DataGrid/Row/Row.js +11 -7
  118. package/dist/esm/components/organisms/DataGrid/styled.js +1 -1
  119. package/dist/types/components/atoms/Accordion/Accordion.d.ts +1 -1
  120. package/dist/types/components/molecules/Select/Dropdown/components/SearchInput.d.ts +1 -1
  121. package/dist/types/components/organisms/DataGrid/Row/Row.d.ts +1 -1
  122. package/package.json +3 -3
@@ -1,3 +1,4 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import React__default from 'react';
2
3
  import { Text } from '@tecsinapse/react-core';
3
4
  import MenuItem from './MenuItem/MenuItem.js';
@@ -5,26 +6,32 @@ import { StyledContainerMenu, StyledLeftComponent, StyledContainerItems } from '
5
6
  import Masonry from '../../Masonry/Masonry.js';
6
7
 
7
8
  const MenuBlock = ({ options, toggle }) => {
8
- return /* @__PURE__ */ React__default.createElement(Masonry, { columns: 4, spacingTop: "kilo", spacingLeft: "mega" }, options.map((data) => /* @__PURE__ */ React__default.createElement(React__default.Fragment, { key: `${data.title}` }, /* @__PURE__ */ React__default.createElement(StyledContainerMenu, null, data.leftComponents && /* @__PURE__ */ React__default.createElement(StyledLeftComponent, null, data.leftComponents), /* @__PURE__ */ React__default.createElement(Text, { fontWeight: "bold" }, data.title)), /* @__PURE__ */ React__default.createElement(StyledContainerItems, null, data.items.map(
9
- ({
10
- title,
11
- Component,
12
- props,
13
- rightComponents,
14
- items
15
- }) => /* @__PURE__ */ React__default.createElement(
16
- MenuItem,
17
- {
18
- items,
19
- key: title,
9
+ return /* @__PURE__ */ jsx(Masonry, { columns: 4, spacingTop: "kilo", spacingLeft: "mega", children: options.map((data) => /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
10
+ /* @__PURE__ */ jsxs(StyledContainerMenu, { children: [
11
+ data.leftComponents && /* @__PURE__ */ jsx(StyledLeftComponent, { children: data.leftComponents }),
12
+ /* @__PURE__ */ jsx(Text, { fontWeight: "bold", children: data.title })
13
+ ] }),
14
+ /* @__PURE__ */ jsx(StyledContainerItems, { children: data.items.map(
15
+ ({
20
16
  title,
21
17
  Component,
22
- rightComponents,
23
18
  props,
24
- toggle
25
- }
26
- )
27
- )))));
19
+ rightComponents,
20
+ items
21
+ }) => /* @__PURE__ */ jsx(
22
+ MenuItem,
23
+ {
24
+ items,
25
+ title,
26
+ Component,
27
+ rightComponents,
28
+ props,
29
+ toggle
30
+ },
31
+ title
32
+ )
33
+ ) })
34
+ ] }, `${data.title}`)) });
28
35
  };
29
36
  var MenuBlock$1 = React__default.memo(MenuBlock);
30
37
 
@@ -1,3 +1,4 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
1
2
  import React__default from 'react';
2
3
  import { Text, Icon } from '@tecsinapse/react-core';
3
4
  import SubMenuBlock from './SubMenuBlock/SubMenuBlock.js';
@@ -16,21 +17,28 @@ const MenuItem = ({
16
17
  const noTextDecoration = { textDecoration: "none" };
17
18
  const getIconName = () => open ? "arrow-up-drop-circle-outline" : "arrow-down-drop-circle-outline";
18
19
  const handleMenuAction = () => setOpen(!open);
19
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(StyledContainerItemText, { key: title }, /* @__PURE__ */ React__default.createElement(Component, { ...props, style: noTextDecoration, onClick: toggle }, /* @__PURE__ */ React__default.createElement(
20
- Text,
21
- {
22
- colorVariant: open ? "primary" : "secondary",
23
- colorTone: open ? "medium" : "dark"
24
- },
25
- /* @__PURE__ */ React__default.createElement(StyledText, null, title)
26
- )), rightComponents && !items && /* @__PURE__ */ React__default.createElement(StyledRightComponent, null, rightComponents), items && /* @__PURE__ */ React__default.createElement(StyledSubButton, { onClick: handleMenuAction }, /* @__PURE__ */ React__default.createElement(
27
- Icon,
28
- {
29
- name: getIconName(),
30
- type: "material-community",
31
- fontColor: "orange"
32
- }
33
- ))), open && items?.map((subItem) => /* @__PURE__ */ React__default.createElement(SubMenuBlock, { key: subItem.title, data: subItem, toggle })));
20
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
21
+ /* @__PURE__ */ jsxs(StyledContainerItemText, { children: [
22
+ /* @__PURE__ */ jsx(Component, { ...props, style: noTextDecoration, onClick: toggle, children: /* @__PURE__ */ jsx(
23
+ Text,
24
+ {
25
+ colorVariant: open ? "primary" : "secondary",
26
+ colorTone: open ? "medium" : "dark",
27
+ children: /* @__PURE__ */ jsx(StyledText, { children: title })
28
+ }
29
+ ) }),
30
+ rightComponents && !items && /* @__PURE__ */ jsx(StyledRightComponent, { children: rightComponents }),
31
+ items && /* @__PURE__ */ jsx(StyledSubButton, { onClick: handleMenuAction, children: /* @__PURE__ */ jsx(
32
+ Icon,
33
+ {
34
+ name: getIconName(),
35
+ type: "material-community",
36
+ fontColor: "orange"
37
+ }
38
+ ) })
39
+ ] }, title),
40
+ open && items?.map((subItem) => /* @__PURE__ */ jsx(SubMenuBlock, { data: subItem, toggle }, subItem.title))
41
+ ] });
34
42
  };
35
43
 
36
44
  export { MenuItem as default };
@@ -1,4 +1,4 @@
1
- import React__default from 'react';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Text } from '@tecsinapse/react-core';
3
3
  import { StyledText, StyledRightComponent } from '../../styled.js';
4
4
  import { StyledContainerItem, DummyBorder } from './styled.js';
@@ -6,7 +6,11 @@ import { StyledContainerItem, DummyBorder } from './styled.js';
6
6
  const SubMenuBlock = ({ data, toggle }) => {
7
7
  const { Component, props, rightComponents, title } = data;
8
8
  const noTextDecoration = { textDecoration: "none" };
9
- return /* @__PURE__ */ React__default.createElement(StyledContainerItem, null, /* @__PURE__ */ React__default.createElement(DummyBorder, null), /* @__PURE__ */ React__default.createElement(Component, { ...props, style: noTextDecoration, onClick: toggle }, /* @__PURE__ */ React__default.createElement(Text, { colorVariant: "secondary", colorTone: "medium", typography: "sub" }, /* @__PURE__ */ React__default.createElement(StyledText, null, title))), rightComponents && /* @__PURE__ */ React__default.createElement(StyledRightComponent, null, rightComponents));
9
+ return /* @__PURE__ */ jsxs(StyledContainerItem, { children: [
10
+ /* @__PURE__ */ jsx(DummyBorder, {}),
11
+ /* @__PURE__ */ jsx(Component, { ...props, style: noTextDecoration, onClick: toggle, children: /* @__PURE__ */ jsx(Text, { colorVariant: "secondary", colorTone: "medium", typography: "sub", children: /* @__PURE__ */ jsx(StyledText, { children: title }) }) }),
12
+ rightComponents && /* @__PURE__ */ jsx(StyledRightComponent, { children: rightComponents })
13
+ ] });
10
14
  };
11
15
 
12
16
  export { SubMenuBlock as default };
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
1
2
  import React__default, { useRef } from 'react';
2
3
  import { useDebouncedState, Icon, Text } from '@tecsinapse/react-core';
3
4
  import { Transition } from 'react-transition-group';
@@ -36,69 +37,83 @@ const Menubar = ({
36
37
  if (search === "") return;
37
38
  setResults(filterAndTransform(options, search));
38
39
  }, [search]);
39
- return /* @__PURE__ */ React__default.createElement("div", { ref: (ref) => menuRef.current = ref, ...rest }, /* @__PURE__ */ React__default.createElement(StyledMenuBar, null, /* @__PURE__ */ React__default.createElement(StyledMenuButton, { variant: "filled", color: "primary", onPress: toggleOpen }, !open ? /* @__PURE__ */ React__default.createElement(
40
- Icon,
41
- {
42
- size: "deca",
43
- name: "menu",
44
- type: "material-community",
45
- fontColor: "light"
46
- }
47
- ) : /* @__PURE__ */ React__default.createElement(
48
- Icon,
49
- {
50
- size: "deca",
51
- name: "close",
52
- type: "material-community",
53
- fontColor: "light"
54
- }
55
- )), leftComponents, /* @__PURE__ */ React__default.createElement(Transition, { in: open, timeout: 250, nodeRef: transitionInputRef }, (state) => /* @__PURE__ */ React__default.createElement(
56
- StyledInputContainer,
57
- {
58
- style: getInputContainerStyles(state),
59
- ref: transitionInputRef
60
- },
61
- searchable && /* @__PURE__ */ React__default.createElement(
62
- StyledInput,
63
- {
64
- placeholder: searchPlaceholder,
65
- leftComponent: /* @__PURE__ */ React__default.createElement(StyledIconInput, null, /* @__PURE__ */ React__default.createElement(Icon, { name: "magnify", type: "material-community" })),
66
- value: input,
67
- onChange: setInput
68
- }
69
- )
70
- )), rightComponents), /* @__PURE__ */ React__default.createElement(
71
- Transition,
72
- {
73
- in: open,
74
- timeout: 250,
75
- nodeRef: transitionMenuRef,
76
- unmountOnExit: true
77
- },
78
- (state) => /* @__PURE__ */ React__default.createElement(
79
- StyledContainerOpenMenu,
80
- {
81
- style: getContainerOpenMenuStyles(state),
82
- ref: transitionMenuRef
83
- },
84
- !search ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, mostUsed && /* @__PURE__ */ React__default.createElement(
85
- MostUsed,
40
+ return /* @__PURE__ */ jsxs("div", { ref: (ref) => menuRef.current = ref, ...rest, children: [
41
+ /* @__PURE__ */ jsxs(StyledMenuBar, { children: [
42
+ /* @__PURE__ */ jsx(StyledMenuButton, { variant: "filled", color: "primary", onPress: toggleOpen, children: !open ? /* @__PURE__ */ jsx(
43
+ Icon,
86
44
  {
87
- label: mostUsedLabel,
88
- data: mostUsed,
89
- toggle: toggleOpen
45
+ size: "deca",
46
+ name: "menu",
47
+ type: "material-community",
48
+ fontColor: "light"
90
49
  }
91
- ), /* @__PURE__ */ React__default.createElement(MenuBlock, { options, toggle: toggleOpen })) : /* @__PURE__ */ React__default.createElement(StyledSearchResultsContainer, null, /* @__PURE__ */ React__default.createElement(StyledSearchTextContainer, null, /* @__PURE__ */ React__default.createElement(Text, { fontWeight: "bold" }, searchResultsLabel)), results.map((result) => /* @__PURE__ */ React__default.createElement(
92
- SearchResultItem,
50
+ ) : /* @__PURE__ */ jsx(
51
+ Icon,
93
52
  {
94
- key: `${result.title}-${result.category}`,
95
- data: result,
96
- searchTerm: search,
97
- toggle: toggleOpen
53
+ size: "deca",
54
+ name: "close",
55
+ type: "material-community",
56
+ fontColor: "light"
98
57
  }
99
- )))
58
+ ) }),
59
+ leftComponents,
60
+ /* @__PURE__ */ jsx(Transition, { in: open, timeout: 250, nodeRef: transitionInputRef, children: (state) => /* @__PURE__ */ jsx(
61
+ StyledInputContainer,
62
+ {
63
+ style: getInputContainerStyles(state),
64
+ ref: transitionInputRef,
65
+ children: searchable && /* @__PURE__ */ jsx(
66
+ StyledInput,
67
+ {
68
+ placeholder: searchPlaceholder,
69
+ leftComponent: /* @__PURE__ */ jsx(StyledIconInput, { children: /* @__PURE__ */ jsx(Icon, { name: "magnify", type: "material-community" }) }),
70
+ value: input,
71
+ onChange: setInput
72
+ }
73
+ )
74
+ }
75
+ ) }),
76
+ rightComponents
77
+ ] }),
78
+ /* @__PURE__ */ jsx(
79
+ Transition,
80
+ {
81
+ in: open,
82
+ timeout: 250,
83
+ nodeRef: transitionMenuRef,
84
+ unmountOnExit: true,
85
+ children: (state) => /* @__PURE__ */ jsx(
86
+ StyledContainerOpenMenu,
87
+ {
88
+ style: getContainerOpenMenuStyles(state),
89
+ ref: transitionMenuRef,
90
+ children: !search ? /* @__PURE__ */ jsxs(Fragment, { children: [
91
+ mostUsed && /* @__PURE__ */ jsx(
92
+ MostUsed,
93
+ {
94
+ label: mostUsedLabel,
95
+ data: mostUsed,
96
+ toggle: toggleOpen
97
+ }
98
+ ),
99
+ /* @__PURE__ */ jsx(MenuBlock, { options, toggle: toggleOpen })
100
+ ] }) : /* @__PURE__ */ jsxs(StyledSearchResultsContainer, { children: [
101
+ /* @__PURE__ */ jsx(StyledSearchTextContainer, { children: /* @__PURE__ */ jsx(Text, { fontWeight: "bold", children: searchResultsLabel }) }),
102
+ results.map((result) => /* @__PURE__ */ jsx(
103
+ SearchResultItem,
104
+ {
105
+ data: result,
106
+ searchTerm: search,
107
+ toggle: toggleOpen
108
+ },
109
+ `${result.title}-${result.category}`
110
+ ))
111
+ ] })
112
+ }
113
+ )
114
+ }
100
115
  )
101
- ));
116
+ ] });
102
117
  };
103
118
 
104
119
  export { Menubar as default };
@@ -1,34 +1,41 @@
1
- import React__default from 'react';
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import React__default, { createElement } from 'react';
2
3
  import { Text } from '@tecsinapse/react-core';
3
4
  import { StyledCardContainer, StyledCard } from './styled.js';
4
5
 
5
6
  const MostUsed = ({ data, label, toggle }) => {
6
7
  const noTextDecoration = { textDecoration: "none" };
7
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Text, { fontWeight: "bold" }, label), /* @__PURE__ */ React__default.createElement(StyledCardContainer, null, data.slice(0, 4).map(
8
- ({
9
- title,
10
- category,
11
- Component = "a",
12
- props = {}
13
- }) => /* @__PURE__ */ React__default.createElement(
14
- Component,
15
- {
16
- ...props,
17
- style: noTextDecoration,
18
- key: `${title}-${category}`,
19
- onClick: toggle
20
- },
21
- /* @__PURE__ */ React__default.createElement(StyledCard, { elevated: true, key: `${title}-${category}` }, /* @__PURE__ */ React__default.createElement(Text, { fontWeight: "bold", colorVariant: "primary" }, title), /* @__PURE__ */ React__default.createElement(
22
- Text,
8
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
9
+ /* @__PURE__ */ jsx(Text, { fontWeight: "bold", children: label }),
10
+ /* @__PURE__ */ jsx(StyledCardContainer, { children: data.slice(0, 4).map(
11
+ ({
12
+ title,
13
+ category,
14
+ Component = "a",
15
+ props = {}
16
+ }) => /* @__PURE__ */ createElement(
17
+ Component,
23
18
  {
24
- fontWeight: "bold",
25
- colorVariant: "secondary",
26
- typography: "label"
19
+ ...props,
20
+ style: noTextDecoration,
21
+ key: `${title}-${category}`,
22
+ onClick: toggle
27
23
  },
28
- category
29
- ))
30
- )
31
- )));
24
+ /* @__PURE__ */ jsxs(StyledCard, { elevated: true, children: [
25
+ /* @__PURE__ */ jsx(Text, { fontWeight: "bold", colorVariant: "primary", children: title }),
26
+ /* @__PURE__ */ jsx(
27
+ Text,
28
+ {
29
+ fontWeight: "bold",
30
+ colorVariant: "secondary",
31
+ typography: "label",
32
+ children: category
33
+ }
34
+ )
35
+ ] }, `${title}-${category}`)
36
+ )
37
+ ) })
38
+ ] });
32
39
  };
33
40
  var MostUsed$1 = React__default.memo(MostUsed);
34
41
 
@@ -1,4 +1,4 @@
1
- import React__default from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Text } from '@tecsinapse/react-core';
3
3
  import { StyledSearchItemContainer, HighlightText } from './styled.js';
4
4
  import { highlight } from './utils.js';
@@ -11,16 +11,19 @@ const SearchResultItem = ({
11
11
  const { title, category, Component, props } = data;
12
12
  const noTextDecoration = { textDecoration: "none" };
13
13
  const textProps = { fontColor: "orange", fontWeight: "bold" };
14
- return /* @__PURE__ */ React__default.createElement(Component, { ...props, style: noTextDecoration, onClick: toggle }, /* @__PURE__ */ React__default.createElement(StyledSearchItemContainer, null, /* @__PURE__ */ React__default.createElement(Text, { typography: "base", colorVariant: "secondary", colorTone: "dark" }, highlight(searchTerm, title, HighlightText, textProps)), /* @__PURE__ */ React__default.createElement(
15
- Text,
16
- {
17
- typography: "sub",
18
- fontWeight: "bold",
19
- colorVariant: "secondary",
20
- colorTone: "medium"
21
- },
22
- category
23
- )));
14
+ return /* @__PURE__ */ jsx(Component, { ...props, style: noTextDecoration, onClick: toggle, children: /* @__PURE__ */ jsxs(StyledSearchItemContainer, { children: [
15
+ /* @__PURE__ */ jsx(Text, { typography: "base", colorVariant: "secondary", colorTone: "dark", children: highlight(searchTerm, title, HighlightText, textProps) }),
16
+ /* @__PURE__ */ jsx(
17
+ Text,
18
+ {
19
+ typography: "sub",
20
+ fontWeight: "bold",
21
+ colorVariant: "secondary",
22
+ colorTone: "medium",
23
+ children: category
24
+ }
25
+ )
26
+ ] }) });
24
27
  };
25
28
 
26
29
  export { SearchResultItem as default };
@@ -1,4 +1,4 @@
1
- import React__default from 'react';
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
2
2
 
3
3
  const normalize = (str) => {
4
4
  return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[-[\]{}()*+?.,\\^$|#]/g, " ").toLowerCase();
@@ -29,7 +29,7 @@ const highlightReplacer = (searchTerm, textToReplace, Component, props) => {
29
29
  const indexes = matches.map((match) => match.index);
30
30
  const splited = matchSpliter(textToReplace, indexes, searchTerm.length);
31
31
  return splited.map((value, idx) => {
32
- return normalize(value) === search ? /* @__PURE__ */ React__default.createElement(Component, { key: `highlight-${value}${idx}`, ...props }, value) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, value);
32
+ return normalize(value) === search ? /* @__PURE__ */ jsx(Component, { ...props, children: value }, `highlight-${value}${idx}`) : /* @__PURE__ */ jsx(Fragment, { children: value });
33
33
  });
34
34
  };
35
35
  const highlight = (searchTerm, textToReplace, Component, props) => {
@@ -1,3 +1,4 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { DivStyledColumn, DivStyledRow } from './styled.js';
3
4
  import ScrollableDigit from '../DateTimePickerSelector/components/ScrollableDigit.js';
@@ -33,30 +34,33 @@ const ScrollableMonthYearPicker = ({
33
34
  const selectedIndex = data.findIndex((item) => item === value);
34
35
  return selectedIndex >= 0 ? selectedIndex : 0;
35
36
  };
36
- return /* @__PURE__ */ React.createElement(DivStyledColumn, null, /* @__PURE__ */ React.createElement(DivStyledRow, null, /* @__PURE__ */ React.createElement(
37
- ScrollableDigit,
38
- {
39
- data: months,
40
- timeLabel: monthLabel ?? "Month",
41
- handleTimeChange: handleMonthYearChange,
42
- initialScrollIndex: getInitialScrollIndex(
43
- months[date.getMonth()],
44
- months
45
- ),
46
- updateType: "month",
47
- currentTime: months[date.getMonth()]
48
- }
49
- ), /* @__PURE__ */ React.createElement(
50
- ScrollableDigit,
51
- {
52
- data: years,
53
- timeLabel: yearLabel ?? "Year",
54
- handleTimeChange: handleMonthYearChange,
55
- initialScrollIndex: getInitialScrollIndex(date.getFullYear(), years),
56
- updateType: "year",
57
- currentTime: date?.getFullYear().toString()
58
- }
59
- )));
37
+ return /* @__PURE__ */ jsx(DivStyledColumn, { children: /* @__PURE__ */ jsxs(DivStyledRow, { children: [
38
+ /* @__PURE__ */ jsx(
39
+ ScrollableDigit,
40
+ {
41
+ data: months,
42
+ timeLabel: monthLabel ?? "Month",
43
+ handleTimeChange: handleMonthYearChange,
44
+ initialScrollIndex: getInitialScrollIndex(
45
+ months[date.getMonth()],
46
+ months
47
+ ),
48
+ updateType: "month",
49
+ currentTime: months[date.getMonth()]
50
+ }
51
+ ),
52
+ /* @__PURE__ */ jsx(
53
+ ScrollableDigit,
54
+ {
55
+ data: years,
56
+ timeLabel: yearLabel ?? "Year",
57
+ handleTimeChange: handleMonthYearChange,
58
+ initialScrollIndex: getInitialScrollIndex(date.getFullYear(), years),
59
+ updateType: "year",
60
+ currentTime: date?.getFullYear().toString()
61
+ }
62
+ )
63
+ ] }) });
60
64
  };
61
65
 
62
66
  export { ScrollableMonthYearPicker as default };
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import ScrollableDigit from '../DateTimePickerSelector/components/ScrollableDigit.js';
3
3
  import '../DateTimePickerSelector/components/MemoizedTimeCard.js';
4
4
  import { DivStyledColumn, DivStyledRow } from './styled.js';
@@ -24,33 +24,36 @@ const ScrollableTimePicker = ({
24
24
  const selectedIndex = data.findIndex((item) => item === value);
25
25
  return selectedIndex >= 0 ? selectedIndex : 0;
26
26
  };
27
- return /* @__PURE__ */ React.createElement(DivStyledColumn, null, /* @__PURE__ */ React.createElement(DivStyledRow, null, /* @__PURE__ */ React.createElement(
28
- ScrollableDigit,
29
- {
30
- data: hours,
31
- timeLabel: hourLabel ?? "Hour",
32
- handleTimeChange,
33
- currentTime: date?.getHours().toString(),
34
- updateType: "hour",
35
- initialScrollIndex: getInitialScrollIndex(
36
- date.getHours().toString(),
37
- hours
38
- )
39
- }
40
- ), /* @__PURE__ */ React.createElement(
41
- ScrollableDigit,
42
- {
43
- data: minutes,
44
- timeLabel: minuteLabel ?? "Minute",
45
- updateType: "minute",
46
- currentTime: date?.getMinutes().toString(),
47
- handleTimeChange,
48
- initialScrollIndex: getInitialScrollIndex(
49
- date.getMinutes().toString(),
50
- minutes
51
- )
52
- }
53
- )));
27
+ return /* @__PURE__ */ jsx(DivStyledColumn, { children: /* @__PURE__ */ jsxs(DivStyledRow, { children: [
28
+ /* @__PURE__ */ jsx(
29
+ ScrollableDigit,
30
+ {
31
+ data: hours,
32
+ timeLabel: hourLabel ?? "Hour",
33
+ handleTimeChange,
34
+ currentTime: date?.getHours().toString(),
35
+ updateType: "hour",
36
+ initialScrollIndex: getInitialScrollIndex(
37
+ date.getHours().toString(),
38
+ hours
39
+ )
40
+ }
41
+ ),
42
+ /* @__PURE__ */ jsx(
43
+ ScrollableDigit,
44
+ {
45
+ data: minutes,
46
+ timeLabel: minuteLabel ?? "Minute",
47
+ updateType: "minute",
48
+ currentTime: date?.getMinutes().toString(),
49
+ handleTimeChange,
50
+ initialScrollIndex: getInitialScrollIndex(
51
+ date.getMinutes().toString(),
52
+ minutes
53
+ )
54
+ }
55
+ )
56
+ ] }) });
54
57
  };
55
58
 
56
59
  export { ScrollableTimePicker as default };
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import React__default from 'react';
2
3
  import { useDebouncedState, Checkbox, Text } from '@tecsinapse/react-core';
3
4
  import ItemSelect from '../SelectItem/SelectItem.js';
@@ -44,56 +45,60 @@ const Component = ({
44
45
  (text) => setSearchArg(text),
45
46
  [setSearchArg]
46
47
  );
47
- return /* @__PURE__ */ React__default.createElement(
48
+ return /* @__PURE__ */ jsxs(
48
49
  StyledContainerDropdown,
49
50
  {
50
51
  lengthOptions,
51
52
  style,
52
53
  anchor,
53
- ref
54
- },
55
- type === "multi" && /* @__PURE__ */ React__default.createElement(
56
- StyledContainerCheckAll,
57
- {
58
- onClick: hideSearchBar ? onClickCheckAll : void 0
59
- },
60
- /* @__PURE__ */ React__default.createElement(Checkbox, { checked: checkedAll, onChange: onClickCheckAll }),
61
- !hideSearchBar ? /* @__PURE__ */ React__default.createElement(SearchBarContainer, null, /* @__PURE__ */ React__default.createElement(
62
- SearchInput,
63
- {
64
- searchArg,
65
- onChange,
66
- fullWidth,
67
- placeholder: searchBarPlaceholder
68
- }
69
- )) : /* @__PURE__ */ React__default.createElement(StyledContainerTextLabel, null, /* @__PURE__ */ React__default.createElement(Text, { fontWeight: "bold" }, /* @__PURE__ */ React__default.createElement(StyledSpan, null, selectAllLabel)))
70
- ),
71
- type === "single" && !hideSearchBar && /* @__PURE__ */ React__default.createElement(PaddedContainer, null, /* @__PURE__ */ React__default.createElement(
72
- SearchInput,
73
- {
74
- searchArg,
75
- onChange,
76
- fullWidth,
77
- placeholder: searchBarPlaceholder
78
- }
79
- )),
80
- /* @__PURE__ */ React__default.createElement(OptionsContainer, { lengthOptions: options.length }, options.map((item, index) => /* @__PURE__ */ React__default.createElement(
81
- ItemSelect,
82
- {
83
- type,
84
- key: keyExtractor(item),
85
- item,
86
- onSelect,
87
- value,
88
- keyExtractor,
89
- index,
90
- labelExtractor,
91
- setDropDownVisible,
92
- checkedAll,
93
- setCheckedAll,
94
- lenghtOptions: lengthOptions
95
- }
96
- )))
54
+ ref,
55
+ children: [
56
+ type === "multi" && /* @__PURE__ */ jsxs(
57
+ StyledContainerCheckAll,
58
+ {
59
+ onClick: hideSearchBar ? onClickCheckAll : void 0,
60
+ children: [
61
+ /* @__PURE__ */ jsx(Checkbox, { checked: checkedAll, onChange: onClickCheckAll }),
62
+ !hideSearchBar ? /* @__PURE__ */ jsx(SearchBarContainer, { children: /* @__PURE__ */ jsx(
63
+ SearchInput,
64
+ {
65
+ searchArg,
66
+ onChange,
67
+ fullWidth,
68
+ placeholder: searchBarPlaceholder
69
+ }
70
+ ) }) : /* @__PURE__ */ jsx(StyledContainerTextLabel, { children: /* @__PURE__ */ jsx(Text, { fontWeight: "bold", children: /* @__PURE__ */ jsx(StyledSpan, { children: selectAllLabel }) }) })
71
+ ]
72
+ }
73
+ ),
74
+ type === "single" && !hideSearchBar && /* @__PURE__ */ jsx(PaddedContainer, { children: /* @__PURE__ */ jsx(
75
+ SearchInput,
76
+ {
77
+ searchArg,
78
+ onChange,
79
+ fullWidth,
80
+ placeholder: searchBarPlaceholder
81
+ }
82
+ ) }),
83
+ /* @__PURE__ */ jsx(OptionsContainer, { lengthOptions: options.length, children: options.map((item, index) => /* @__PURE__ */ jsx(
84
+ ItemSelect,
85
+ {
86
+ type,
87
+ item,
88
+ onSelect,
89
+ value,
90
+ keyExtractor,
91
+ index,
92
+ labelExtractor,
93
+ setDropDownVisible,
94
+ checkedAll,
95
+ setCheckedAll,
96
+ lenghtOptions: lengthOptions
97
+ },
98
+ keyExtractor(item)
99
+ )) })
100
+ ]
101
+ }
97
102
  );
98
103
  };
99
104
  const Dropdown = React__default.forwardRef(Component);