@tecsinapse/react-web-kit 3.0.0 → 3.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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 +55 -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 +83 -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 +47 -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 +62 -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,18 +1,18 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Text } from '@tecsinapse/react-core';
3
3
  import MenuItem from './MenuItem/MenuItem.js';
4
4
  import { StyledContainerMenu, StyledLeftComponent, StyledContainerItems } from './styled.js';
5
5
  import Masonry from '../../Masonry/Masonry.js';
6
6
 
7
7
  const MenuBlock = ({ options, toggle }) => {
8
- return /* @__PURE__ */ React.createElement(Masonry, { columns: 4, spacingTop: "kilo", spacingLeft: "mega" }, options.map((data) => /* @__PURE__ */ React.createElement(React.Fragment, { key: `${data.title}` }, /* @__PURE__ */ React.createElement(StyledContainerMenu, null, data.leftComponents && /* @__PURE__ */ React.createElement(StyledLeftComponent, null, data.leftComponents), /* @__PURE__ */ React.createElement(Text, { fontWeight: "bold" }, data.title)), /* @__PURE__ */ React.createElement(StyledContainerItems, null, data.items.map(
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
9
  ({
10
10
  title,
11
11
  Component,
12
12
  props,
13
13
  rightComponents,
14
14
  items
15
- }) => /* @__PURE__ */ React.createElement(
15
+ }) => /* @__PURE__ */ React__default.createElement(
16
16
  MenuItem,
17
17
  {
18
18
  items,
@@ -26,6 +26,6 @@ const MenuBlock = ({ options, toggle }) => {
26
26
  )
27
27
  )))));
28
28
  };
29
- var MenuBlock$1 = React.memo(MenuBlock);
29
+ var MenuBlock$1 = React__default.memo(MenuBlock);
30
30
 
31
31
  export { MenuBlock$1 as default };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Text, Icon } from '@tecsinapse/react-core';
3
3
  import SubMenuBlock from './SubMenuBlock/SubMenuBlock.js';
4
4
  import { StyledText, StyledRightComponent } from '../styled.js';
@@ -12,25 +12,25 @@ const MenuItem = ({
12
12
  items,
13
13
  toggle
14
14
  }) => {
15
- const [open, setOpen] = React.useState(false);
15
+ const [open, setOpen] = React__default.useState(false);
16
16
  const noTextDecoration = { textDecoration: "none" };
17
17
  const getIconName = () => open ? "arrow-up-drop-circle-outline" : "arrow-down-drop-circle-outline";
18
18
  const handleMenuAction = () => setOpen(!open);
19
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(StyledContainerItemText, { key: title }, /* @__PURE__ */ React.createElement(Component, { ...props, style: noTextDecoration, onClick: toggle }, /* @__PURE__ */ React.createElement(
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
20
  Text,
21
21
  {
22
22
  colorVariant: open ? "primary" : "secondary",
23
23
  colorTone: open ? "medium" : "dark"
24
24
  },
25
- /* @__PURE__ */ React.createElement(StyledText, null, title)
26
- )), rightComponents && !items && /* @__PURE__ */ React.createElement(StyledRightComponent, null, rightComponents), items && /* @__PURE__ */ React.createElement(StyledSubButton, { onClick: handleMenuAction }, /* @__PURE__ */ React.createElement(
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
27
  Icon,
28
28
  {
29
29
  name: getIconName(),
30
30
  type: "material-community",
31
31
  fontColor: "orange"
32
32
  }
33
- ))), open && items?.map((subItem) => /* @__PURE__ */ React.createElement(SubMenuBlock, { key: subItem.title, data: subItem, toggle })));
33
+ ))), open && items?.map((subItem) => /* @__PURE__ */ React__default.createElement(SubMenuBlock, { key: subItem.title, data: subItem, toggle })));
34
34
  };
35
35
 
36
36
  export { MenuItem as default };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
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,7 @@ 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.createElement(StyledContainerItem, null, /* @__PURE__ */ React.createElement(DummyBorder, null), /* @__PURE__ */ React.createElement(Component, { ...props, style: noTextDecoration, onClick: toggle }, /* @__PURE__ */ React.createElement(Text, { colorVariant: "secondary", colorTone: "medium", typography: "sub" }, /* @__PURE__ */ React.createElement(StyledText, null, title))), rightComponents && /* @__PURE__ */ React.createElement(StyledRightComponent, null, rightComponents));
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));
10
10
  };
11
11
 
12
12
  export { SubMenuBlock as default };
@@ -1,4 +1,4 @@
1
- import React, { useRef } from 'react';
1
+ import React__default, { useRef } from 'react';
2
2
  import { useDebouncedState, Icon, Text } from '@tecsinapse/react-core';
3
3
  import { Transition } from 'react-transition-group';
4
4
  import { StyledMenuBar, StyledMenuButton, StyledInputContainer, StyledInput, StyledIconInput, StyledContainerOpenMenu, StyledSearchResultsContainer, StyledSearchTextContainer } from './styled.js';
@@ -20,24 +20,24 @@ const Menubar = ({
20
20
  searchable = true,
21
21
  ...rest
22
22
  }) => {
23
- const [search, setSearch] = React.useState("");
24
- const [results, setResults] = React.useState([]);
23
+ const [search, setSearch] = React__default.useState("");
24
+ const [results, setResults] = React__default.useState([]);
25
25
  const [input, setInput] = useDebouncedState("", setSearch);
26
- const [open, setOpen] = React.useState(false);
26
+ const [open, setOpen] = React__default.useState(false);
27
27
  const menuRef = useRef(null);
28
28
  const transitionInputRef = useRef(null);
29
29
  const transitionMenuRef = useRef(null);
30
30
  useClickAwayListener(menuRef, setOpen, "mouseup");
31
- const toggleOpen = React.useCallback(
31
+ const toggleOpen = React__default.useCallback(
32
32
  () => setOpen((state) => !state),
33
33
  [setOpen]
34
34
  );
35
- React.useEffect(() => {
35
+ React__default.useEffect(() => {
36
36
  if (search === "")
37
37
  return;
38
38
  setResults(filterAndTransform(options, search));
39
39
  }, [search]);
40
- return /* @__PURE__ */ React.createElement("div", { ref: (ref) => menuRef.current = ref, ...rest }, /* @__PURE__ */ React.createElement(StyledMenuBar, null, /* @__PURE__ */ React.createElement(StyledMenuButton, { variant: "filled", color: "primary", onPress: toggleOpen }, !open ? /* @__PURE__ */ React.createElement(
40
+ 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(
41
41
  Icon,
42
42
  {
43
43
  size: "deca",
@@ -45,7 +45,7 @@ const Menubar = ({
45
45
  type: "material-community",
46
46
  fontColor: "light"
47
47
  }
48
- ) : /* @__PURE__ */ React.createElement(
48
+ ) : /* @__PURE__ */ React__default.createElement(
49
49
  Icon,
50
50
  {
51
51
  size: "deca",
@@ -53,35 +53,35 @@ const Menubar = ({
53
53
  type: "material-community",
54
54
  fontColor: "light"
55
55
  }
56
- )), leftComponents, /* @__PURE__ */ React.createElement(Transition, { in: open, timeout: 250, nodeRef: transitionInputRef }, (state) => /* @__PURE__ */ React.createElement(
56
+ )), leftComponents, /* @__PURE__ */ React__default.createElement(Transition, { in: open, timeout: 250, nodeRef: transitionInputRef }, (state) => /* @__PURE__ */ React__default.createElement(
57
57
  StyledInputContainer,
58
58
  {
59
59
  style: getInputContainerStyles(state),
60
60
  ref: transitionInputRef
61
61
  },
62
- searchable && /* @__PURE__ */ React.createElement(
62
+ searchable && /* @__PURE__ */ React__default.createElement(
63
63
  StyledInput,
64
64
  {
65
65
  placeholder: searchPlaceholder,
66
- leftComponent: /* @__PURE__ */ React.createElement(StyledIconInput, null, /* @__PURE__ */ React.createElement(Icon, { name: "magnify", type: "material-community" })),
66
+ leftComponent: /* @__PURE__ */ React__default.createElement(StyledIconInput, null, /* @__PURE__ */ React__default.createElement(Icon, { name: "magnify", type: "material-community" })),
67
67
  value: input,
68
68
  onChange: setInput
69
69
  }
70
70
  )
71
- )), rightComponents), /* @__PURE__ */ React.createElement(Transition, { in: open, timeout: 250, nodeRef: transitionMenuRef }, (state) => /* @__PURE__ */ React.createElement(
71
+ )), rightComponents), /* @__PURE__ */ React__default.createElement(Transition, { in: open, timeout: 250, nodeRef: transitionMenuRef }, (state) => /* @__PURE__ */ React__default.createElement(
72
72
  StyledContainerOpenMenu,
73
73
  {
74
74
  style: getContainerOpenMenuStyles(state),
75
75
  ref: transitionMenuRef
76
76
  },
77
- !search ? /* @__PURE__ */ React.createElement(React.Fragment, null, mostUsed && /* @__PURE__ */ React.createElement(
77
+ !search ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, mostUsed && /* @__PURE__ */ React__default.createElement(
78
78
  MostUsed,
79
79
  {
80
80
  label: mostUsedLabel,
81
81
  data: mostUsed,
82
82
  toggle: toggleOpen
83
83
  }
84
- ), /* @__PURE__ */ React.createElement(MenuBlock, { options, toggle: toggleOpen })) : /* @__PURE__ */ React.createElement(StyledSearchResultsContainer, null, /* @__PURE__ */ React.createElement(StyledSearchTextContainer, null, /* @__PURE__ */ React.createElement(Text, { fontWeight: "bold" }, searchResultsLabel)), results.map((result) => /* @__PURE__ */ React.createElement(
84
+ ), /* @__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(
85
85
  SearchResultItem,
86
86
  {
87
87
  key: `${result.title}-${result.category}`,
@@ -1,16 +1,16 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Text } from '@tecsinapse/react-core';
3
3
  import { StyledCardContainer, StyledCard } from './styled.js';
4
4
 
5
5
  const MostUsed = ({ data, label, toggle }) => {
6
6
  const noTextDecoration = { textDecoration: "none" };
7
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, { fontWeight: "bold" }, label), /* @__PURE__ */ React.createElement(StyledCardContainer, null, data.slice(0, 4).map(
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
8
  ({
9
9
  title,
10
10
  category,
11
11
  Component = "a",
12
12
  props = {}
13
- }) => /* @__PURE__ */ React.createElement(
13
+ }) => /* @__PURE__ */ React__default.createElement(
14
14
  Component,
15
15
  {
16
16
  ...props,
@@ -18,7 +18,7 @@ const MostUsed = ({ data, label, toggle }) => {
18
18
  key: `${title}-${category}`,
19
19
  onClick: toggle
20
20
  },
21
- /* @__PURE__ */ React.createElement(StyledCard, { elevated: true, key: `${title}-${category}` }, /* @__PURE__ */ React.createElement(Text, { fontWeight: "bold", colorVariant: "primary" }, title), /* @__PURE__ */ React.createElement(
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
22
  Text,
23
23
  {
24
24
  fontWeight: "bold",
@@ -30,6 +30,6 @@ const MostUsed = ({ data, label, toggle }) => {
30
30
  )
31
31
  )));
32
32
  };
33
- var MostUsed$1 = React.memo(MostUsed);
33
+ var MostUsed$1 = React__default.memo(MostUsed);
34
34
 
35
35
  export { MostUsed$1 as default };
@@ -1,6 +1,6 @@
1
1
  import styled from '@emotion/styled';
2
2
  import { Card } from '@tecsinapse/react-core';
3
- import nativeStyled from '@emotion/native';
3
+ import styled$1 from '@emotion/native';
4
4
 
5
5
  const StyledCardContainer = styled("div")`
6
6
  display: grid;
@@ -9,7 +9,7 @@ const StyledCardContainer = styled("div")`
9
9
  margin-bottom: ${({ theme }) => theme.spacing.kilo};
10
10
  margin-top: ${({ theme }) => theme.spacing.centi};
11
11
  `;
12
- const StyledCard = nativeStyled(Card)`
12
+ const StyledCard = styled$1(Card)`
13
13
  padding-top: ${({ theme }) => theme.spacing.mili};
14
14
  padding-bottom: ${({ theme }) => theme.spacing.mili};
15
15
  padding-left: ${({ theme }) => theme.spacing.deca};
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Text } from '@tecsinapse/react-core';
3
3
  import { StyledSearchItemContainer, HighlightText } from './styled.js';
4
4
  import { highlight } from './utils.js';
@@ -11,7 +11,7 @@ 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.createElement(Component, { ...props, style: noTextDecoration, onClick: toggle }, /* @__PURE__ */ React.createElement(StyledSearchItemContainer, null, /* @__PURE__ */ React.createElement(Text, { typography: "base", colorVariant: "secondary", colorTone: "dark" }, highlight(searchTerm, title, HighlightText, textProps)), /* @__PURE__ */ React.createElement(
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
15
  Text,
16
16
  {
17
17
  typography: "sub",
@@ -1,5 +1,5 @@
1
1
  import styled from '@emotion/styled';
2
- import nativeStyled from '@emotion/native';
2
+ import styled$1 from '@emotion/native';
3
3
  import { hex2rgba, Text } from '@tecsinapse/react-core';
4
4
 
5
5
  const StyledSearchItemContainer = styled("div")`
@@ -11,7 +11,7 @@ const StyledSearchItemContainer = styled("div")`
11
11
  0.05
12
12
  )}`};
13
13
  `;
14
- const HighlightText = nativeStyled(Text)`
14
+ const HighlightText = styled$1(Text)`
15
15
  text-decoration: underline;
16
16
  text-decoration-color: ${({ theme }) => theme.font.color.orange};
17
17
  `;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
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.createElement(Component, { key: `highlight-${value}${idx}`, ...props }, value) : /* @__PURE__ */ React.createElement(React.Fragment, null, value);
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);
33
33
  });
34
34
  };
35
35
  const highlight = (searchTerm, textToReplace, Component, props) => {
@@ -1,5 +1,5 @@
1
1
  import styled from '@emotion/styled';
2
- import nativeStyled from '@emotion/native';
2
+ import styled$1 from '@emotion/native';
3
3
  import { hex2rgba } from '@tecsinapse/react-core';
4
4
  import Button from '../../atoms/Button/Button.js';
5
5
  import 'react';
@@ -20,7 +20,7 @@ const StyledMenuBar = styled("div")`
20
20
  padding: ${({ theme }) => `${theme.spacing.deca} ${theme.spacing.kilo}`};
21
21
  box-shadow: 0px 2px 8px ${({ theme }) => hex2rgba(theme.miscellaneous.shadow, 0.05)};
22
22
  `;
23
- const StyledMenuButton = nativeStyled(Button)`
23
+ const StyledMenuButton = styled$1(Button)`
24
24
  padding-top: calc(${({ theme }) => theme.spacing.centi} + 2px);
25
25
  padding-right: calc(${({ theme }) => theme.spacing.centi} + 2px);
26
26
  padding-bottom: calc(${({ theme }) => theme.spacing.centi} + 2px);
@@ -48,7 +48,7 @@ const StyledContainerOpenMenu = styled("div")`
48
48
  width: -webkit-fill-available;
49
49
  width: -moz-available;
50
50
  `;
51
- const StyledInput = nativeStyled(Input)`
51
+ const StyledInput = styled$1(Input)`
52
52
  width: 100%;
53
53
  `;
54
54
  const StyledInputContainer = styled("div")`
@@ -0,0 +1,62 @@
1
+ import * as React from 'react';
2
+ import { DivStyledColumn, DivStyledRow } from './styled.js';
3
+ import ScrollableDigit from '../DateTimePickerSelector/components/ScrollableDigit.js';
4
+ import '../DateTimePickerSelector/components/MemoizedTimeCard.js';
5
+ import { format } from 'date-fns';
6
+
7
+ const ScrollableMonthYearPicker = ({
8
+ setDate,
9
+ date,
10
+ locale,
11
+ monthLabel,
12
+ yearLabel
13
+ }) => {
14
+ const handleMonthYearChange = (newTime, updateType) => {
15
+ const newDate = new Date(date);
16
+ if (updateType === "year") {
17
+ newDate.setFullYear(Number(newTime));
18
+ } else if (updateType === "month") {
19
+ newDate.setMonth(months.indexOf(newTime));
20
+ }
21
+ setDate(newDate);
22
+ };
23
+ const yearsToShow = 20;
24
+ const firstYear = (/* @__PURE__ */ new Date()).getFullYear() - 10;
25
+ const years = React.useMemo(
26
+ () => Array.from({ length: yearsToShow }, (_, i) => String(i + firstYear)),
27
+ [yearsToShow, firstYear]
28
+ );
29
+ const months = [...Array(12)].map(
30
+ (_, index) => format((/* @__PURE__ */ new Date()).setMonth(index), "MMM", { locale })
31
+ );
32
+ const getInitialScrollIndex = (value, data) => {
33
+ const selectedIndex = data.findIndex((item) => item === value);
34
+ return selectedIndex >= 0 ? selectedIndex : 0;
35
+ };
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
+ )));
60
+ };
61
+
62
+ export { ScrollableMonthYearPicker as default };
@@ -0,0 +1,15 @@
1
+ import styled from '@emotion/styled';
2
+
3
+ const DivStyledColumn = styled("div")`
4
+ width: 100%;
5
+ display: flex;
6
+ flex-direction: column;
7
+ `;
8
+ const DivStyledRow = styled("div")`
9
+ width: 100%;
10
+ display: flex;
11
+ justify-content: space-between;
12
+ flex-direction: row;
13
+ `;
14
+
15
+ export { DivStyledColumn, DivStyledRow };
@@ -0,0 +1,56 @@
1
+ import * as React from 'react';
2
+ import ScrollableDigit from '../DateTimePickerSelector/components/ScrollableDigit.js';
3
+ import '../DateTimePickerSelector/components/MemoizedTimeCard.js';
4
+ import { DivStyledColumn, DivStyledRow } from './styled.js';
5
+
6
+ const ScrollableTimePicker = ({
7
+ date,
8
+ setDate,
9
+ minuteLabel,
10
+ hourLabel
11
+ }) => {
12
+ const handleTimeChange = (newTime, updateType) => {
13
+ const newDate = new Date(date);
14
+ if (updateType === "hour") {
15
+ newDate.setHours(Number(newTime));
16
+ } else if (updateType === "minute") {
17
+ newDate.setMinutes(Number(newTime));
18
+ }
19
+ setDate(newDate);
20
+ };
21
+ const minutes = Array.from({ length: 60 }, (_, i) => String(i));
22
+ const hours = Array.from({ length: 24 }, (_, i) => String(i));
23
+ const getInitialScrollIndex = (value, data) => {
24
+ const selectedIndex = data.findIndex((item) => item === value);
25
+ return selectedIndex >= 0 ? selectedIndex : 0;
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
+ )));
54
+ };
55
+
56
+ export { ScrollableTimePicker as default };
@@ -0,0 +1,15 @@
1
+ import styled from '@emotion/styled';
2
+
3
+ const DivStyledColumn = styled("div")`
4
+ width: '100%';
5
+ display: flex;
6
+ flex-direction: column;
7
+ `;
8
+ const DivStyledRow = styled("div")`
9
+ width: '100%';
10
+ display: flex;
11
+ justify-content: space-between;
12
+ flex-direction: row;
13
+ `;
14
+
15
+ export { DivStyledColumn, DivStyledRow };
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { useDebouncedState, Checkbox, Text } from '@tecsinapse/react-core';
3
3
  import ItemSelect from '../SelectItem/SelectItem.js';
4
4
  import { StyledContainerDropdown, StyledContainerCheckAll, SearchBarContainer, StyledContainerTextLabel, StyledSpan, PaddedContainer, OptionsContainer } from './styled.js';
@@ -21,16 +21,16 @@ const Component = ({
21
21
  searchBarPlaceholder
22
22
  }, ref) => {
23
23
  const [searchArg, setSearchArg] = useDebouncedState("", onSearch);
24
- const lengthOptions = React.useMemo(() => options.length, [options]);
25
- const [checkedAll, setCheckedAll] = React.useState(
24
+ const lengthOptions = React__default.useMemo(() => options.length, [options]);
25
+ const [checkedAll, setCheckedAll] = React__default.useState(
26
26
  type === "multi" && value?.length === lengthOptions
27
27
  );
28
- React.useEffect(() => {
28
+ React__default.useEffect(() => {
29
29
  if (type === "multi") {
30
30
  lengthOptions === value?.length ? setCheckedAll(true) : setCheckedAll(false);
31
31
  }
32
32
  }, [value, type, lengthOptions]);
33
- const onClickCheckAll = React.useCallback(() => {
33
+ const onClickCheckAll = React__default.useCallback(() => {
34
34
  const items = options.map((option) => option);
35
35
  let aux;
36
36
  setCheckedAll((prev) => {
@@ -40,11 +40,11 @@ const Component = ({
40
40
  const auxArray = [];
41
41
  !aux ? onSelect(auxArray) : onSelect(items);
42
42
  }, [options, setCheckedAll, onSelect]);
43
- const onChange = React.useCallback(
43
+ const onChange = React__default.useCallback(
44
44
  (text) => setSearchArg(text),
45
45
  [setSearchArg]
46
46
  );
47
- return /* @__PURE__ */ React.createElement(
47
+ return /* @__PURE__ */ React__default.createElement(
48
48
  StyledContainerDropdown,
49
49
  {
50
50
  lengthOptions,
@@ -52,13 +52,13 @@ const Component = ({
52
52
  anchor,
53
53
  ref
54
54
  },
55
- type === "multi" && /* @__PURE__ */ React.createElement(
55
+ type === "multi" && /* @__PURE__ */ React__default.createElement(
56
56
  StyledContainerCheckAll,
57
57
  {
58
58
  onClick: hideSearchBar ? onClickCheckAll : void 0
59
59
  },
60
- /* @__PURE__ */ React.createElement(Checkbox, { checked: checkedAll, onChange: onClickCheckAll }),
61
- !hideSearchBar ? /* @__PURE__ */ React.createElement(SearchBarContainer, null, /* @__PURE__ */ React.createElement(
60
+ /* @__PURE__ */ React__default.createElement(Checkbox, { checked: checkedAll, onChange: onClickCheckAll }),
61
+ !hideSearchBar ? /* @__PURE__ */ React__default.createElement(SearchBarContainer, null, /* @__PURE__ */ React__default.createElement(
62
62
  SearchInput,
63
63
  {
64
64
  searchArg,
@@ -66,9 +66,9 @@ const Component = ({
66
66
  fullWidth,
67
67
  placeholder: searchBarPlaceholder
68
68
  }
69
- )) : /* @__PURE__ */ React.createElement(StyledContainerTextLabel, null, /* @__PURE__ */ React.createElement(Text, { fontWeight: "bold" }, /* @__PURE__ */ React.createElement(StyledSpan, null, selectAllLabel)))
69
+ )) : /* @__PURE__ */ React__default.createElement(StyledContainerTextLabel, null, /* @__PURE__ */ React__default.createElement(Text, { fontWeight: "bold" }, /* @__PURE__ */ React__default.createElement(StyledSpan, null, selectAllLabel)))
70
70
  ),
71
- type === "single" && !hideSearchBar && /* @__PURE__ */ React.createElement(PaddedContainer, null, /* @__PURE__ */ React.createElement(
71
+ type === "single" && !hideSearchBar && /* @__PURE__ */ React__default.createElement(PaddedContainer, null, /* @__PURE__ */ React__default.createElement(
72
72
  SearchInput,
73
73
  {
74
74
  searchArg,
@@ -77,7 +77,7 @@ const Component = ({
77
77
  placeholder: searchBarPlaceholder
78
78
  }
79
79
  )),
80
- /* @__PURE__ */ React.createElement(OptionsContainer, { lengthOptions: options.length }, options.map((item, index) => /* @__PURE__ */ React.createElement(
80
+ /* @__PURE__ */ React__default.createElement(OptionsContainer, { lengthOptions: options.length }, options.map((item, index) => /* @__PURE__ */ React__default.createElement(
81
81
  ItemSelect,
82
82
  {
83
83
  type,
@@ -96,6 +96,6 @@ const Component = ({
96
96
  )))
97
97
  );
98
98
  };
99
- const Dropdown = React.forwardRef(Component);
99
+ const Dropdown = React__default.forwardRef(Component);
100
100
 
101
101
  export { Dropdown as default };
@@ -1,8 +1,8 @@
1
- import React from 'react';
1
+ import React__default from 'react';
2
2
  import { Icon } from '@tecsinapse/react-core';
3
3
  import Input from '../../../../atoms/Input/Input.js';
4
4
 
5
- const InputIcon = /* @__PURE__ */ React.createElement(
5
+ const InputIcon = /* @__PURE__ */ React__default.createElement(
6
6
  Icon,
7
7
  {
8
8
  name: "magnify",
@@ -12,7 +12,7 @@ const InputIcon = /* @__PURE__ */ React.createElement(
12
12
  }
13
13
  );
14
14
  const SearchInput = ({ fullWidth, searchArg, onChange, placeholder }) => {
15
- return /* @__PURE__ */ React.createElement(
15
+ return /* @__PURE__ */ React__default.createElement(
16
16
  Input,
17
17
  {
18
18
  style: fullWidth,
@@ -23,6 +23,6 @@ const SearchInput = ({ fullWidth, searchArg, onChange, placeholder }) => {
23
23
  }
24
24
  );
25
25
  };
26
- var SearchInput$1 = React.memo(SearchInput);
26
+ var SearchInput$1 = React__default.memo(SearchInput);
27
27
 
28
28
  export { SearchInput$1 as default };