@mailstep/design-system 0.7.25-beta.9 → 0.7.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailstep/design-system",
3
- "version": "0.7.25-beta.9",
3
+ "version": "0.7.25",
4
4
  "license": "ISC",
5
5
  "type": "module",
6
6
  "main": "./ui/index.js",
@@ -8,8 +8,7 @@ import { TimeSlots } from './components/TimeSlots';
8
8
  import { useChangeDate } from './hooks/useChangeDate';
9
9
  import { generateTimeArray } from './utils/generateTimeArray';
10
10
  import { getClosestStep } from './utils/getClosestStep';
11
- import { x } from '@xstyled/styled-components';
12
- import { Container } from './styles';
11
+ import { Block, Container } from './styles';
13
12
  var timeArray = generateTimeArray();
14
13
  export var Scheduler = function (_a) {
15
14
  var groups = _a.groups, activeHours = _a.activeHours, data = _a.data, handleSelectTimeSlot = _a.handleSelectTimeSlot, handleReloadTimeSlots = _a.handleReloadTimeSlots, handleTimeSlotClick = _a.handleTimeSlotClick, isLoading = _a.isLoading, timeSlotDefinitions = _a.timeSlotDefinitions;
@@ -24,5 +23,5 @@ export var Scheduler = function (_a) {
24
23
  }), handlePrevDay = _c.handlePrevDay, handleNextDay = _c.handleNextDay, handleChangeDate = _c.handleChangeDate, date = _c.date, isTodayDate = _c.isTodayDate;
25
24
  if (!(groups === null || groups === void 0 ? void 0 : groups.length))
26
25
  return null;
27
- return (_jsxs(x.div, { w: "100%", h: "100%", children: [_jsx(DateChanger, { isLoading: isLoading, isDatepickerOpen: isDatepickerOpen, toggleDatepicker: toggleDatepicker, closeDatePicker: closeDatePicker, handlePrevDay: handlePrevDay, handleNextDay: handleNextDay, handleChangeDate: handleChangeDate, date: date }), _jsxs(Container, { children: [_jsx(Groups, { groups: groups }), _jsx(TimeSlots, { timeArray: timeArray, groups: groups, activeHours: activeHours, timeSlots: groupedTimeSlots, handleSelectTimeSlot: !isLoading ? handleSelectTimeSlot : undefined, handleTimeSlotClick: !isLoading ? handleTimeSlotClick : undefined, isTodayDate: isTodayDate, date: date, timeSlotDefinitions: timeSlotDefinitions })] })] }));
26
+ return (_jsxs(Container, { children: [_jsx(DateChanger, { isLoading: isLoading, isDatepickerOpen: isDatepickerOpen, toggleDatepicker: toggleDatepicker, closeDatePicker: closeDatePicker, handlePrevDay: handlePrevDay, handleNextDay: handleNextDay, handleChangeDate: handleChangeDate, date: date }), _jsxs(Block, { children: [_jsx(Groups, { groups: groups }), _jsx(TimeSlots, { timeArray: timeArray, groups: groups, activeHours: activeHours, timeSlots: groupedTimeSlots, handleSelectTimeSlot: !isLoading ? handleSelectTimeSlot : undefined, handleTimeSlotClick: !isLoading ? handleTimeSlotClick : undefined, isTodayDate: isTodayDate, date: date, timeSlotDefinitions: timeSlotDefinitions })] })] }));
28
27
  };
@@ -4,8 +4,8 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  };
5
5
  import { groupsHeight, timeIntervalWidth } from '../../utils/constants';
6
6
  import styled, { th } from '@xstyled/styled-components';
7
- export var GroupContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", "px;\n display: flex;\n border-bottom: 1px solid ", ";\n width: 100%;\n"], ["\n height: ", "px;\n display: flex;\n border-bottom: 1px solid ", ";\n width: 100%;\n"])), groupsHeight, th.color('lightGray6'));
8
- export var GroupItem = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n width: ", ";\n max-width: 400px;\n min-width: 300px;\n height: 100%;\n font-size: 14px;\n font-weight: 600;\n padding: 10px;\n border-right: 1px solid ", ";\n\n &:last-child {\n border-right: none;\n }\n"], ["\n background-color: ", ";\n width: ", ";\n max-width: 400px;\n min-width: 300px;\n height: 100%;\n font-size: 14px;\n font-weight: 600;\n padding: 10px;\n border-right: 1px solid ", ";\n\n &:last-child {\n border-right: none;\n }\n"])), function (_a) {
7
+ export var GroupContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: ", "px;\n display: flex;\n border-bottom: 1px solid ", ";\n width: 100%;\n flex: 0 0 auto;\n"], ["\n height: ", "px;\n display: flex;\n border-bottom: 1px solid ", ";\n width: 100%;\n flex: 0 0 auto;\n"])), groupsHeight, th.color('lightGray6'));
8
+ export var GroupItem = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n width: ", ";\n min-width: 350px;\n height: 100%;\n font-size: 14px;\n font-weight: 600;\n padding: 10px;\n border-right: 1px solid ", ";\n\n &:last-child {\n border-right: none;\n }\n"], ["\n background-color: ", ";\n width: ", ";\n min-width: 350px;\n height: 100%;\n font-size: 14px;\n font-weight: 600;\n padding: 10px;\n border-right: 1px solid ", ";\n\n &:last-child {\n border-right: none;\n }\n"])), function (_a) {
9
9
  var bg = _a.bg;
10
10
  return bg || th.color('bgLightGray');
11
11
  }, function (_a) {
@@ -4,8 +4,8 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
4
4
  };
5
5
  import { minuteHeight, stepInMinutes, timeIntervalWidth } from '../../utils/constants';
6
6
  import styled, { th } from '@xstyled/styled-components';
7
- export var TimeSlotsContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n -ms-overflow-style: none;\n scrollbar-width: none;\n scroll-behavior: smooth;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"], ["\n position: relative;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n -ms-overflow-style: none;\n scrollbar-width: none;\n scroll-behavior: smooth;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"])));
8
- export var EmptyTimeSlot = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", "px;\n width: ", ";\n max-width: 400px;\n min-width: 300px;\n position: relative;\n background-color: ", ";\n cursor: ", ";\n border-right: 1px solid ", ";\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background-color: ", ";\n }\n"], ["\n height: ", "px;\n width: ", ";\n max-width: 400px;\n min-width: 300px;\n position: relative;\n background-color: ", ";\n cursor: ", ";\n border-right: 1px solid ", ";\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), minuteHeight * stepInMinutes, function (_a) {
7
+ export var TimeSlotsContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n flex: 1 1 auto;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n -ms-overflow-style: none;\n scrollbar-width: none;\n scroll-behavior: smooth;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"], ["\n position: relative;\n flex: 1 1 auto;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n width: 100%;\n\n -ms-overflow-style: none;\n scrollbar-width: none;\n scroll-behavior: smooth;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"])));
8
+ export var EmptyTimeSlot = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: ", "px;\n width: ", ";\n min-width: 350px;\n position: relative;\n background-color: ", ";\n cursor: ", ";\n border-right: 1px solid ", ";\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background-color: ", ";\n }\n"], ["\n height: ", "px;\n width: ", ";\n min-width: 350px;\n position: relative;\n background-color: ", ";\n cursor: ", ";\n border-right: 1px solid ", ";\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), minuteHeight * stepInMinutes, function (_a) {
9
9
  var groupsCount = _a.groupsCount;
10
10
  return "calc((100% / ".concat(groupsCount, ") - (").concat(timeIntervalWidth, "px / ").concat(groupsCount, "))");
11
11
  }, function (_a) {
@@ -1,2 +1,2 @@
1
1
  export { Scheduler as default } from './Scheduler';
2
- export type { GroupType, ActiveHours, TimeSlotType, SelectedTimeSlotType, TimeSlotDefinitionType } from './types';
2
+ export type { GroupType, ActiveHours, TimeSlotType, SelectedTimeSlotType } from './types';
@@ -1 +1,2 @@
1
+ export declare const Block: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
1
2
  export declare const Container: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
@@ -3,5 +3,6 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import styled, { th } from '@xstyled/styled-components';
6
- export var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: white;\n color: ", ";\n overflow-x: auto;\n text-align: center;\n display: flex;\n flex-direction: column;\n height: 100%;\n max-height: 80vh;\n border: 1px solid ", ";\n user-select: none;\n}\n"], ["\n background-color: white;\n color: ", ";\n overflow-x: auto;\n text-align: center;\n display: flex;\n flex-direction: column;\n height: 100%;\n max-height: 80vh;\n border: 1px solid ", ";\n user-select: none;\n}\n"])), th.color('typoPrimary'), th.color('lightGray6'));
7
- var templateObject_1;
6
+ export var Block = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: white;\n color: ", ";\n overflow-x: auto;\n overflow-y: hidden;\n text-align: center;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n border: 1px solid ", ";\n user-select: none;\n width: 100%;\n}\n"], ["\n background-color: white;\n color: ", ";\n overflow-x: auto;\n overflow-y: hidden;\n text-align: center;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n border: 1px solid ", ";\n user-select: none;\n width: 100%;\n}\n"])), th.color('typoPrimary'), th.color('lightGray6'));
7
+ export var Container = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n overflow-y: hidden;\n"], ["\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n overflow-y: hidden;\n"])));
8
+ var templateObject_1, templateObject_2;