linear-react-components-ui 1.1.18-beta.9 → 1.1.18-rc.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 (45) hide show
  1. package/.eslintcache +1 -1
  2. package/lib/assets/styles/calendar.scss +64 -30
  3. package/lib/assets/styles/datepicker.scss +26 -6
  4. package/lib/assets/styles/periodpicker.scss +60 -20
  5. package/lib/assets/styles/sidenav.scss +1 -1
  6. package/lib/calendar/DangerCalendar.d.ts +1 -0
  7. package/lib/calendar/InfoCalendar.d.ts +1 -0
  8. package/lib/calendar/PrimaryCalendar.d.ts +1 -0
  9. package/lib/calendar/SuccessCalendar.d.ts +1 -0
  10. package/lib/calendar/WarningCalendar.d.ts +1 -0
  11. package/lib/calendar/base/Day.d.ts +1 -0
  12. package/lib/calendar/base/Day.js +6 -2
  13. package/lib/calendar/base/Month.d.ts +2 -1
  14. package/lib/calendar/base/Month.js +2 -0
  15. package/lib/calendar/base/Week.d.ts +1 -0
  16. package/lib/calendar/base/index.d.ts +1 -0
  17. package/lib/calendar/base/index.js +63 -13
  18. package/lib/calendar/index.d.ts +1 -0
  19. package/lib/calendar/types.d.ts +5 -0
  20. package/lib/dialog/base/Content.js +5 -4
  21. package/lib/drawer/Drawer.js +2 -2
  22. package/lib/inputs/date/Dialog.js +5 -4
  23. package/lib/inputs/date/Dropdown.js +15 -7
  24. package/lib/inputs/date/helpers.d.ts +1 -11
  25. package/lib/inputs/date/helpers.js +1 -11
  26. package/lib/inputs/date/index.js +138 -100
  27. package/lib/inputs/date/types.d.ts +7 -6
  28. package/lib/inputs/period/Dialog.d.ts +1 -1
  29. package/lib/inputs/period/Dialog.js +5 -3
  30. package/lib/inputs/period/Dropdown.js +19 -8
  31. package/lib/inputs/period/PeriodList.js +3 -12
  32. package/lib/inputs/period/index.js +238 -82
  33. package/lib/inputs/period/types.d.ts +10 -8
  34. package/lib/list/index.js +2 -2
  35. package/lib/menus/sidenav/NavMenuItem.js +2 -3
  36. package/lib/tabs/DropdownTabs.js +3 -1
  37. package/lib/tabs/MenuTabs.js +3 -1
  38. package/package.json +1 -1
  39. package/lib/inputs/mask/imaskHOC.js +0 -203
  40. package/lib/menus/sidenav/popup_menu_help/index.js +0 -85
  41. package/lib/tabs/DropdownItems.js +0 -62
  42. package/lib/tabs/MenuItems.js +0 -70
  43. package/lib/treeview_old/Header.js +0 -29
  44. package/lib/treeview_old/Node.js +0 -68
  45. package/lib/treeview_old/index.js +0 -43
@@ -3,28 +3,58 @@
3
3
  @import "commons.scss";
4
4
 
5
5
  $padding-size: 10px;
6
+ $border-radius-size: 5px;
6
7
  .calendar-component {
7
- display: grid;
8
- grid-template-rows: 30px 30px 1fr;
9
- border: 1px solid $component-border-color;
10
- border-radius: 5px;
11
- font-size: 12px;
8
+ width: auto;
12
9
  height: 100%;
13
- width: 100%;
10
+ min-height: 20rem;
11
+ font-size: 12px;
12
+ display: flex;
13
+ flex-direction: column;
14
+ border-radius: $border-radius-size;
15
+ border: 1px solid $component-border-color;
14
16
  > .calendarheader,
15
17
  > .daynames {
16
- background-color: #f0f0f0;
18
+ width: auto;
19
+ height: 1.85rem;
17
20
  display: grid;
21
+ align-items: center;
22
+ background-color: #f0f0f0;
18
23
  grid-template-columns: 20px 1fr 30px;
19
- padding: $padding-size;
20
- padding-top: 4px;
21
24
  }
22
25
  > .calendarheader {
26
+ width: auto;
27
+ height: 32px;
28
+ padding-top: 4px;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: space-between;
32
+ border-top-left-radius: $border-radius-size;
33
+ border-top-right-radius: $border-radius-size;
23
34
  > .navbutton {
35
+ width: 2rem;
36
+ height: 2rem;
37
+ padding: 0;
38
+ margin: 0px 2px;
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
24
42
  background-color: transparent;
25
43
  font-weight: bold;
26
- padding: 0;
27
44
  border: none;
45
+ svg {
46
+ margin: 0;
47
+ }
48
+ &:hover {
49
+ background-color: $component-border-color;
50
+ }
51
+ &:focus {
52
+ -webkit-box-shadow: none !important;
53
+ box-shadow: none !important;
54
+ border: 1px solid $default-border-color;
55
+ background-color: $component-border-color;
56
+ }
57
+ transition: none;
28
58
  }
29
59
  > .monthname {
30
60
  font-weight: bold;
@@ -35,16 +65,21 @@ $padding-size: 10px;
35
65
  }
36
66
  }
37
67
  > .daynames {
68
+ padding-top: 4px;
38
69
  border-bottom: 1px solid $component-border-color;
39
70
  grid-template-columns: repeat(7, 1fr);
40
71
  text-align: center;
41
- padding-top: 9px;
42
72
  }
43
73
  > .calendarmonth {
44
- background-color: $font-color-second;
74
+ width: 100%;
75
+ height: 100%;
76
+ flex: 1;
45
77
  display: grid;
46
78
  grid-template-rows: repeat(6, 1fr);
47
- padding: $padding-size;
79
+ padding: 2px;
80
+ background-color: $font-color-second;
81
+ border-bottom-left-radius: $border-radius-size;
82
+ border-bottom-right-radius: $border-radius-size;
48
83
  }
49
84
  > .calendarmonth > .monthweek {
50
85
  text-align: center;
@@ -52,16 +87,31 @@ $padding-size: 10px;
52
87
  grid-template-columns: repeat(7, 1fr)
53
88
  }
54
89
  .calendarmonth > .monthweek > .monthday {
55
- padding: 12px 0;
90
+ height: auto;
91
+ width: auto;
56
92
  text-align: center;
57
93
  border-right: 0;
58
94
  border-bottom: 0;
59
95
  transition: all 0.2s ease-in-out;
60
96
  > .daybutton {
97
+ height: 100%;
98
+ width: 100%;
99
+ padding: 0;
100
+ font-size: 13px;
101
+ border: none;
102
+ background-color: transparent;
103
+ &.-nowday {
104
+ font-weight: bold
105
+ }
106
+ &.-outmonth {
107
+ color: #777;
108
+ }
61
109
  &:focus {
62
110
  -webkit-box-shadow: none !important;
63
111
  box-shadow: none !important;
112
+ border: 2px solid $default-border-color;
64
113
  }
114
+ transition: none;
65
115
  }
66
116
  &:hover {
67
117
  background-color: $component-border-color;
@@ -74,19 +124,6 @@ $padding-size: 10px;
74
124
  &.-selectedday > .daybutton {
75
125
  color: $font-color-second;
76
126
  }
77
- > .daybutton {
78
- background-color: transparent;
79
- height: 100%;
80
- padding: 0;
81
- width: 100%;
82
- font-size: 13px;
83
- &.-nowday {
84
- font-weight: bold
85
- }
86
- &.-outmonth {
87
- color: #777;
88
- }
89
- }
90
127
  }
91
128
  }
92
129
 
@@ -167,6 +204,3 @@ $padding-size: 10px;
167
204
  }
168
205
  }
169
206
 
170
- .numberdaycalendar {
171
- border: none!important;
172
- }
@@ -1,16 +1,36 @@
1
1
  @import "commons.scss";
2
2
  @import "effects.scss";
3
3
 
4
+ .datepicker-container {
5
+ position: relative;
6
+ transition: none;
7
+ }
8
+
4
9
  .datepicker-component {
5
10
  @extend %component-box-shadow;
6
- height: auto;
7
- position: absolute;
8
- z-index: 999999999999999;
11
+ z-index: 999999999999;
12
+ margin-top: 4px;
13
+ position: fixed;
9
14
  animation: 0.5s ease-in 0s 1 slideDown;
15
+ transition: none;
10
16
  }
11
17
 
12
18
  .calendar-button {
13
19
  width: 26px;
14
- padding: 4px;
15
- border: none;
16
- }
20
+ border-radius: 0;
21
+ border: 0 !important;
22
+ display: flex;
23
+ align-items: center;
24
+ box-shadow: none !important;
25
+ justify-content: center;
26
+ padding: 0 !important;
27
+
28
+ svg {
29
+ margin: 0 !important;
30
+ }
31
+
32
+ >.icon-component {
33
+ width: 16px !important;
34
+ height: 16px !important;
35
+ }
36
+ }
@@ -1,12 +1,18 @@
1
1
  @import "commons.scss";
2
2
  @import "effects.scss";
3
+ @import "colors.scss";
4
+
5
+ .datepicker-period-container {
6
+ position: relative;
7
+ transition: none;
8
+ }
3
9
 
4
10
  .periodpicker-component {
5
11
  height: auto;
6
12
  position: relative;
7
13
  display: flex;
8
14
  border-radius: 2px;
9
- border: 1px solid #dae1e8;
15
+ border: 1px solid $component-border-color;
10
16
 
11
17
  .inputwrapper {
12
18
  border: none;
@@ -18,31 +24,79 @@
18
24
  }
19
25
 
20
26
  .calendar-button {
21
- flex: 0 0 20px;
22
- padding: 4px;
23
- border: none;
27
+ width: 26px;
28
+ border-radius: 0;
29
+ border: 0 !important;
30
+ display: flex;
31
+ align-items: center;
32
+ box-shadow: none !important;
33
+ justify-content: center;
34
+ padding: 0 !important;
35
+
36
+ svg {
37
+ margin: 0 !important;
38
+ }
39
+
40
+ >.icon-component {
41
+ width: 16px !important;
42
+ height: 16px !important;
43
+ }
24
44
  }
25
45
 
26
46
  .input-base-component {
27
47
  flex: 1;
28
48
  }
49
+ }
29
50
 
51
+ .datepicker-component {
52
+ @extend %component-box-shadow;
53
+ border-radius: 5px;
54
+ margin-top: 4px !important;
55
+ position: fixed;
56
+ animation: 0.5s ease-in 0s 1 slideDown;
57
+ transition: none;
58
+ }
59
+
60
+ .dropdown-period {
61
+ width: 100%;
62
+ border-radius: 3px;
63
+ background-color: $component-bg-default;
64
+ border: 1px solid $component-border-color;
65
+ display: grid;
66
+ grid-template-rows: auto;
67
+ height: auto;
68
+ overflow-y: auto;
69
+ overflow-x: hidden;
30
70
  }
31
71
 
32
72
  .dropdown-period>.item {
73
+ all: unset;
33
74
  margin: 0;
34
75
  padding: 6px 10px;
35
76
  display: flex;
36
77
  cursor: pointer;
37
78
  justify-content: stretch;
38
- border-bottom: solid 1px #e1e1e1;
79
+
80
+ &:not(:last-child) {
81
+ border-bottom: solid 1px $separator-background;
82
+ }
83
+
84
+ &:first-child {
85
+ border-top-left-radius: 3px;
86
+ border-top-right-radius: 3px;
87
+ }
88
+
89
+ &:last-child {
90
+ border-bottom-left-radius: 3px;
91
+ border-bottom-right-radius: 3px;
92
+ }
39
93
 
40
94
  &:hover {
41
95
  background-color: $default-hover-color;
42
96
  }
43
97
 
44
98
  &.-selected {
45
- background-color: $default-hover-color;
99
+ background-color: $component-bg-selected-color;
46
100
  }
47
101
 
48
102
  &.-disabled {
@@ -53,17 +107,3 @@
53
107
  }
54
108
  }
55
109
  }
56
-
57
- .dropdown-period {
58
- width: 100%;
59
- /* animation: 0.5s ease-in 0s 1 slideDown; */
60
- background-color: #FFF;
61
- border: #dae1e8;
62
- display: grid;
63
- grid-template-rows: auto;
64
- height: auto;
65
- overflow-y: auto;
66
- overflow-x: hidden;
67
- /* margin-top: 2px; */
68
- z-index: 99999999999;
69
- }
@@ -95,7 +95,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
95
95
  overflow-y: auto;
96
96
 
97
97
  &::-webkit-scrollbar {
98
- width: 5px;
98
+ width: 2px;
99
99
  }
100
100
 
101
101
  &::-webkit-scrollbar-track {
@@ -1,4 +1,5 @@
1
1
  import { ICalendarProps } from './types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../@types/ColorStyles.js';
4
5
 
@@ -1,4 +1,5 @@
1
1
  import { ICalendarProps } from './types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../@types/ColorStyles.js';
4
5
 
@@ -1,4 +1,5 @@
1
1
  import { ICalendarProps } from './types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../@types/ColorStyles.js';
4
5
 
@@ -1,4 +1,5 @@
1
1
  import { ICalendarProps } from './types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../@types/ColorStyles.js';
4
5
 
@@ -1,4 +1,5 @@
1
1
  import { ICalendarProps } from './types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../@types/ColorStyles.js';
4
5
 
@@ -1,4 +1,5 @@
1
1
  import { IDayProps } from '../types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../../@types/ColorStyles.js';
4
5
 
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
+ var _uuid = require("uuid");
8
9
  var _helpers = require("./helpers");
9
10
  var _buttons = _interopRequireDefault(require("../../buttons"));
10
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -21,12 +22,15 @@ const Day = _ref => {
21
22
  return /*#__PURE__*/_react.default.createElement("div", {
22
23
  className: (0, _helpers.getDayContainerCssClass)(currentDate, day)
23
24
  }, /*#__PURE__*/_react.default.createElement(_buttons.default, {
25
+ id: (0, _uuid.v1)(),
26
+ type: "button",
27
+ tabIndex: (0, _helpers.dateIsEquals)(currentDate, day) ? 0 : -1,
24
28
  boxShadow: false,
29
+ label: day.format('D'),
25
30
  onClick: () => {
26
31
  if (handleDateChange) handleDateChange(day);
27
32
  },
28
- customClass: " ".concat((0, _helpers.getDayCssClass)(currentDate, day), " numberdaycalendar"),
29
- label: day.format('D')
33
+ customClass: " ".concat((0, _helpers.getDayCssClass)(currentDate, day), " numberdaycalendar")
30
34
  }));
31
35
  };
32
36
  var _default = exports.default = Day;
@@ -1,7 +1,8 @@
1
1
  import { IMonthProps } from '../types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../../@types/ColorStyles.js';
4
5
 
5
- declare const Month: ({ currentDate }: IMonthProps) => JSX.Element;
6
+ declare const Month: ({ monthRef, currentDate }: IMonthProps) => JSX.Element;
6
7
 
7
8
  export { Month as default };
@@ -10,6 +10,7 @@ var _helpers = require("./helpers");
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  const Month = _ref => {
12
12
  let {
13
+ monthRef,
13
14
  currentDate
14
15
  } = _ref;
15
16
  const renderWeeks = () => {
@@ -31,6 +32,7 @@ const Month = _ref => {
31
32
  return weeks;
32
33
  };
33
34
  return /*#__PURE__*/_react.default.createElement("div", {
35
+ ref: monthRef,
34
36
  className: "calendarmonth"
35
37
  }, renderWeeks());
36
38
  };
@@ -1,4 +1,5 @@
1
1
  import { IWeekProps } from '../types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../../@types/ColorStyles.js';
4
5
 
@@ -1,4 +1,5 @@
1
1
  import { ICalendarProps } from '../types.js';
2
+ import 'react';
2
3
  import 'moment';
3
4
  import '../../@types/ColorStyles.js';
4
5
 
@@ -5,14 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireWildcard(require("react"));
8
+ var _uuid = require("uuid");
8
9
  var _moment = _interopRequireDefault(require("moment"));
9
10
  var _Month = _interopRequireDefault(require("./Month"));
10
11
  var _buttons = _interopRequireDefault(require("../../buttons"));
12
+ var _gridlayout = _interopRequireDefault(require("../../gridlayout"));
11
13
  var _helpers = require("./helpers");
12
14
  require("../../assets/styles/calendar.scss");
13
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
+ const arrowKeys = ['ArrowUp', 'ArrowRight', 'ArrowDown', 'ArrowLeft'];
16
19
  const Calendar = props => {
17
20
  const {
18
21
  currentDate = (0, _moment.default)(),
@@ -20,12 +23,14 @@ const Calendar = props => {
20
23
  drawGridLines = false,
21
24
  colorStyle,
22
25
  unpadding = false,
23
- customClass
26
+ customClass,
27
+ gridLayout,
28
+ currentDateButton,
29
+ calendarContainer
24
30
  } = props;
31
+ const currentMonth = (0, _react.useRef)(null);
32
+ const currentCalendarRef = (0, _react.useRef)(null);
25
33
  const [dataAtual, setDataAtual] = (0, _react.useState)((0, _helpers.validDate)(currentDate));
26
- (0, _react.useEffect)(() => {
27
- setDataAtual((0, _helpers.validDate)(currentDate));
28
- }, []);
29
34
  const onDateChangeFunction = date => {
30
35
  if (onDateChange) onDateChange(date);
31
36
  setDataAtual(date);
@@ -38,12 +43,48 @@ const Calendar = props => {
38
43
  const currentDateClone = dataAtual.clone();
39
44
  setDataAtual(currentDateClone.add(1, 'month'));
40
45
  };
46
+ const navigateWithArrows = event => {
47
+ var _currentMonth$current;
48
+ const sourceTarget = event.target;
49
+ const daysOfMonth = (_currentMonth$current = currentMonth.current) === null || _currentMonth$current === void 0 ? void 0 : _currentMonth$current.getElementsByClassName('daybutton');
50
+ let indexCurrentDay = 0;
51
+ if (daysOfMonth.length) {
52
+ Array.from(daysOfMonth).find((dayButton, index) => {
53
+ if (dayButton && dayButton.id === sourceTarget.id) indexCurrentDay = index;
54
+ });
55
+ }
56
+ const element = {
57
+ ArrowUp: daysOfMonth[indexCurrentDay - 7],
58
+ ArrowRight: daysOfMonth[indexCurrentDay + 1],
59
+ ArrowDown: daysOfMonth[indexCurrentDay + 7],
60
+ ArrowLeft: daysOfMonth[indexCurrentDay - 1]
61
+ }[event.code];
62
+ if (element) element.focus();
63
+ };
41
64
  const contextValues = {
42
65
  handleDateChange: onDateChangeFunction
43
66
  };
44
- return /*#__PURE__*/_react.default.createElement(_helpers.CalendarContext.Provider, {
45
- value: contextValues
46
- }, /*#__PURE__*/_react.default.createElement("div", {
67
+ (0, _react.useEffect)(() => {
68
+ calendarContainer === null || calendarContainer === void 0 ? void 0 : calendarContainer(currentCalendarRef === null || currentCalendarRef === void 0 ? void 0 : currentCalendarRef.current);
69
+ setDataAtual((0, _helpers.validDate)(currentDate));
70
+ document.addEventListener('keydown', event => {
71
+ if (event && event.code && arrowKeys.includes(event.code) && currentCalendarRef.current && currentCalendarRef.current.contains(document.activeElement) && currentMonth.current && currentMonth.current.contains(document.activeElement)) {
72
+ navigateWithArrows(event);
73
+ event.stopPropagation();
74
+ event.preventDefault();
75
+ }
76
+ });
77
+ return () => {
78
+ document.removeEventListener('keydown', () => {});
79
+ };
80
+ }, []);
81
+ (0, _react.useEffect)(() => {
82
+ var _currentMonth$current2;
83
+ const daysOfMonth = (_currentMonth$current2 = currentMonth.current) === null || _currentMonth$current2 === void 0 ? void 0 : _currentMonth$current2.getElementsByClassName('-selectedday')[0];
84
+ currentDateButton === null || currentDateButton === void 0 ? void 0 : currentDateButton(daysOfMonth.firstChild);
85
+ }, [currentDate]);
86
+ const component = /*#__PURE__*/_react.default.createElement("div", {
87
+ ref: currentCalendarRef,
47
88
  className: (0, _helpers.getCalendarCssClass)({
48
89
  unpadding,
49
90
  drawGridLines,
@@ -53,27 +94,36 @@ const Calendar = props => {
53
94
  }, /*#__PURE__*/_react.default.createElement("div", {
54
95
  className: "calendarheader"
55
96
  }, /*#__PURE__*/_react.default.createElement(_buttons.default, {
56
- iconName: "arrow_left",
97
+ id: (0, _uuid.v1)(),
57
98
  boxShadow: false,
99
+ iconName: "arrow_left",
100
+ customClass: "navbutton nav-arrow-left",
58
101
  onClick: () => {
59
102
  previousMonth();
60
- },
61
- customClass: "navbutton"
103
+ }
62
104
  }), /*#__PURE__*/_react.default.createElement("span", {
63
105
  className: "monthname"
64
106
  }, dataAtual.format('MMMM YYYY')), /*#__PURE__*/_react.default.createElement(_buttons.default, {
107
+ id: (0, _uuid.v1)(),
65
108
  boxShadow: false,
66
109
  iconName: "arrow_right",
110
+ customClass: "navbutton nav-arrow-right",
67
111
  onClick: () => {
68
112
  nextMonth();
69
- },
70
- customClass: "navbutton"
113
+ }
71
114
  })), /*#__PURE__*/_react.default.createElement("div", {
72
115
  className: "daynames"
73
116
  }, (0, _helpers.dayNames)().map(name => /*#__PURE__*/_react.default.createElement("div", {
74
117
  key: "day-".concat(name)
75
118
  }, name))), /*#__PURE__*/_react.default.createElement(_Month.default, {
119
+ monthRef: currentMonth,
76
120
  currentDate: dataAtual
77
- })));
121
+ }));
122
+ return /*#__PURE__*/_react.default.createElement(_helpers.CalendarContext.Provider, {
123
+ value: contextValues
124
+ }, !gridLayout ? component : /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
125
+ customClass: "-withinput",
126
+ cols: gridLayout
127
+ }, component));
78
128
  };
79
129
  var _default = exports.default = Calendar;
@@ -5,6 +5,7 @@ export { default as DangerCalendar } from './DangerCalendar.js';
5
5
  export { default as WarningCalendar } from './WarningCalendar.js';
6
6
  export { default as InfoCalendar } from './InfoCalendar.js';
7
7
  import './types.js';
8
+ import 'react';
8
9
  import 'moment';
9
10
  import '../@types/ColorStyles.js';
10
11
 
@@ -1,3 +1,4 @@
1
+ import { LegacyRef } from 'react';
1
2
  import { Moment } from 'moment';
2
3
  import { ColorStyles } from '../@types/ColorStyles.js';
3
4
 
@@ -9,6 +10,9 @@ interface ICalendarProps {
9
10
  onDateChange?: (date: Moment) => void;
10
11
  colorStyle?: ColorStyles;
11
12
  handleDateChange?: (date: Moment) => void;
13
+ gridLayout?: string;
14
+ currentDateButton?: (buttonElement: HTMLButtonElement) => void;
15
+ calendarContainer?: (calendarElement: HTMLDivElement | null) => void;
12
16
  }
13
17
  interface IWeekProps {
14
18
  weekStartDate: Moment;
@@ -19,6 +23,7 @@ interface IDayProps {
19
23
  day: Moment;
20
24
  }
21
25
  interface IMonthProps {
26
+ monthRef: LegacyRef<HTMLDivElement> | undefined;
22
27
  currentDate: Moment;
23
28
  }
24
29
 
@@ -4,18 +4,19 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
7
+ var _react = _interopRequireWildcard(require("react"));
8
8
  require("../../assets/styles/dialog.scss");
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
10
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
11
  const Content = _ref => {
11
12
  let {
12
13
  children,
13
14
  styleForContent
14
15
  } = _ref;
15
- return /*#__PURE__*/_react.default.createElement("div", {
16
+ return /*#__PURE__*/_react.default.createElement(_react.Suspense, null, /*#__PURE__*/_react.default.createElement("div", {
16
17
  id: "modal-dialog-content",
17
18
  className: "dialog-content",
18
19
  style: styleForContent
19
- }, children);
20
+ }, children));
20
21
  };
21
22
  var _default = exports.default = Content;
@@ -122,7 +122,7 @@ const BaseDrawer = _ref => {
122
122
  };
123
123
  const drawerContent = () => /*#__PURE__*/_react.default.createElement(_helpers.default.Provider, {
124
124
  value: contextValues
125
- }, /*#__PURE__*/_react.default.createElement("div", {
125
+ }, /*#__PURE__*/_react.default.createElement(_react.Suspense, null, /*#__PURE__*/_react.default.createElement("div", {
126
126
  "data-testid": "drawercontainer-component",
127
127
  className: "".concat(position, " ").concat(customClass),
128
128
  style: style
@@ -132,7 +132,7 @@ const BaseDrawer = _ref => {
132
132
  className: "drawercontent ".concat(skeletonize ? '-skeletonized' : '', " ").concat(customClassForContent)
133
133
  }, title && /*#__PURE__*/_react.default.createElement(_.DrawerHeader, _extends({}, headerProps, {
134
134
  customClass: customClassForDrawer
135
- })), content ? /*#__PURE__*/_react.default.createElement(_.DrawerContent, null, content) : children, getSpinner())));
135
+ })), content ? /*#__PURE__*/_react.default.createElement(_.DrawerContent, null, content) : children, getSpinner()))));
136
136
  return /*#__PURE__*/_reactDom.default.createPortal(drawerContent(), drawerContainerEl.current);
137
137
  };
138
138
  var _default = exports.default = BaseDrawer;
@@ -14,12 +14,13 @@ const Dialog = _ref => {
14
14
  dialogSize
15
15
  } = _ref;
16
16
  return /*#__PURE__*/_react.default.createElement(_base.default, {
17
+ closeOnEsc: true,
18
+ closeOnOutsideClick: true,
19
+ handlerClose: () => handlerClose(false),
20
+ wrapperClassName: "",
17
21
  width: dialogSize.width,
18
22
  height: dialogSize.height,
19
- onOpenChange: handlerClose,
20
- closeOnOutsideClick: true,
21
- closeOnEsc: true,
22
- wrapperClassName: ""
23
+ onOpenChange: handlerClose
23
24
  }, children);
24
25
  };
25
26
  var _default = exports.default = Dialog;