@alfalab/core-components-calendar-input 7.1.3 → 7.1.5

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/Component.js CHANGED
@@ -60,7 +60,7 @@ function __rest(s, e) {
60
60
  return t;
61
61
  }
62
62
 
63
- var styles = {"component":"calendar-input__component_174xs","block":"calendar-input__block_174xs","calendarContainer":"calendar-input__calendarContainer_174xs","calendarResponsive":"calendar-input__calendarResponsive_174xs","calendarIcon":"calendar-input__calendarIcon_174xs","nativeInput":"calendar-input__nativeInput_174xs"};
63
+ var styles = {"component":"calendar-input__component_renrw","block":"calendar-input__block_renrw","calendarContainer":"calendar-input__calendarContainer_renrw","calendarResponsive":"calendar-input__calendarResponsive_renrw","calendarIcon":"calendar-input__calendarIcon_renrw","nativeInput":"calendar-input__nativeInput_renrw"};
64
64
  require('./index.css')
65
65
 
66
66
  var CalendarInput = React.forwardRef(function (_a, ref) {
@@ -81,14 +81,14 @@ var CalendarInput = React.forwardRef(function (_a, ref) {
81
81
  var _v = React.useState(value || defaultValue), inputValue = _v[0], setInputValue = _v[1];
82
82
  var calendarValue = inputValue ? coreComponentsDateInput.parseDateString(inputValue).getTime() : undefined;
83
83
  var checkInputValueIsValid = React.useCallback(function (newInputValue) {
84
- if (!newInputValue || error)
84
+ if (!newInputValue)
85
85
  return false;
86
86
  var dateValue = coreComponentsDateInput.parseDateString(newInputValue).getTime();
87
87
  return !!(dateValue &&
88
88
  coreComponentsDateInput.isCompleteDateInput(newInputValue) &&
89
89
  coreComponentsCalendar.dateInLimits(dateValue, minDate, maxDate) &&
90
90
  !offDays.includes(dateValue));
91
- }, [error, maxDate, minDate, offDays]);
91
+ }, [maxDate, minDate, offDays]);
92
92
  var inputDisabled = disabled || readOnly;
93
93
  var inputWrapperRef = React.useRef(null);
94
94
  var calendarRef = React.useRef(null);
package/cssm/Component.js CHANGED
@@ -80,14 +80,14 @@ var CalendarInput = React.forwardRef(function (_a, ref) {
80
80
  var _v = React.useState(value || defaultValue), inputValue = _v[0], setInputValue = _v[1];
81
81
  var calendarValue = inputValue ? coreComponentsDateInput.parseDateString(inputValue).getTime() : undefined;
82
82
  var checkInputValueIsValid = React.useCallback(function (newInputValue) {
83
- if (!newInputValue || error)
83
+ if (!newInputValue)
84
84
  return false;
85
85
  var dateValue = coreComponentsDateInput.parseDateString(newInputValue).getTime();
86
86
  return !!(dateValue &&
87
87
  coreComponentsDateInput.isCompleteDateInput(newInputValue) &&
88
88
  coreComponentsCalendar.dateInLimits(dateValue, minDate, maxDate) &&
89
89
  !offDays.includes(dateValue));
90
- }, [error, maxDate, minDate, offDays]);
90
+ }, [maxDate, minDate, offDays]);
91
91
  var inputDisabled = disabled || readOnly;
92
92
  var inputWrapperRef = React.useRef(null);
93
93
  var calendarRef = React.useRef(null);
package/esm/Component.js CHANGED
@@ -50,7 +50,7 @@ function __rest(s, e) {
50
50
  return t;
51
51
  }
52
52
 
53
- var styles = {"component":"calendar-input__component_174xs","block":"calendar-input__block_174xs","calendarContainer":"calendar-input__calendarContainer_174xs","calendarResponsive":"calendar-input__calendarResponsive_174xs","calendarIcon":"calendar-input__calendarIcon_174xs","nativeInput":"calendar-input__nativeInput_174xs"};
53
+ var styles = {"component":"calendar-input__component_renrw","block":"calendar-input__block_renrw","calendarContainer":"calendar-input__calendarContainer_renrw","calendarResponsive":"calendar-input__calendarResponsive_renrw","calendarIcon":"calendar-input__calendarIcon_renrw","nativeInput":"calendar-input__nativeInput_renrw"};
54
54
  require('./index.css')
55
55
 
56
56
  var CalendarInput = forwardRef(function (_a, ref) {
@@ -71,14 +71,14 @@ var CalendarInput = forwardRef(function (_a, ref) {
71
71
  var _v = useState(value || defaultValue), inputValue = _v[0], setInputValue = _v[1];
72
72
  var calendarValue = inputValue ? parseDateString(inputValue).getTime() : undefined;
73
73
  var checkInputValueIsValid = useCallback(function (newInputValue) {
74
- if (!newInputValue || error)
74
+ if (!newInputValue)
75
75
  return false;
76
76
  var dateValue = parseDateString(newInputValue).getTime();
77
77
  return !!(dateValue &&
78
78
  isCompleteDateInput(newInputValue) &&
79
79
  dateInLimits(dateValue, minDate, maxDate) &&
80
80
  !offDays.includes(dateValue));
81
- }, [error, maxDate, minDate, offDays]);
81
+ }, [maxDate, minDate, offDays]);
82
82
  var inputDisabled = disabled || readOnly;
83
83
  var inputWrapperRef = useRef(null);
84
84
  var calendarRef = useRef(null);
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1rjsd */
1
+ /* hash: 1k6vw */
2
2
  :root {
3
3
  --color-light-graphic-primary: #0b1f35;
4
4
  }
@@ -44,39 +44,39 @@
44
44
  --calendar-input-icon-color: var(--color-light-graphic-primary);
45
45
  --calendar-input-popover-border-radius: 0 0 var(--border-radius-s) var(--border-radius-s);
46
46
  }
47
- .calendar-input__component_174xs {
47
+ .calendar-input__component_renrw {
48
48
  display: inline-block;
49
49
  outline: none;
50
50
  position: relative;
51
51
  }
52
- .calendar-input__block_174xs {
52
+ .calendar-input__block_renrw {
53
53
  width: 100%;
54
54
  }
55
- .calendar-input__calendarContainer_174xs {
55
+ .calendar-input__calendarContainer_renrw {
56
56
  display: inline-block;
57
57
  box-sizing: border-box;
58
58
  border-radius: var(--calendar-input-popover-border-radius)
59
59
  }
60
60
  @media (max-width: 374px) {
61
- .calendar-input__calendarContainer_174xs {
61
+ .calendar-input__calendarContainer_renrw {
62
62
  width: 100%;
63
63
  min-width: 288px
64
64
  }
65
65
  }
66
- .calendar-input__calendarResponsive_174xs {
66
+ .calendar-input__calendarResponsive_renrw {
67
67
  width: var(--calendar-width);
68
68
  padding: 0 var(--gap-m);
69
69
  }
70
- .calendar-input__calendarIcon_174xs {
70
+ .calendar-input__calendarIcon_renrw {
71
71
  width: 24px;
72
72
  height: 24px;
73
73
  display: block;
74
74
  color: var(--calendar-input-icon-color)
75
75
  }
76
- .calendar-input__calendarIcon_174xs:not(:only-child) {
76
+ .calendar-input__calendarIcon_renrw:not(:only-child) {
77
77
  margin-right: var(--gap-2xs);
78
78
  }
79
- .calendar-input__nativeInput_174xs {
79
+ .calendar-input__nativeInput_renrw {
80
80
  opacity: 0;
81
81
  position: absolute;
82
82
  top: 0;
@@ -87,9 +87,9 @@
87
87
  appearance: none;
88
88
  z-index: 1
89
89
  }
90
- .calendar-input__nativeInput_174xs::-webkit-calendar-picker-indicator {
90
+ .calendar-input__nativeInput_renrw::-webkit-calendar-picker-indicator {
91
91
  display: none;
92
92
  }
93
- .calendar-input__nativeInput_174xs::-webkit-inner-spin-button {
93
+ .calendar-input__nativeInput_renrw::-webkit-inner-spin-button {
94
94
  display: none;
95
95
  }
package/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1rjsd */
1
+ /* hash: 1k6vw */
2
2
  :root {
3
3
  --color-light-graphic-primary: #0b1f35;
4
4
  }
@@ -44,39 +44,39 @@
44
44
  --calendar-input-icon-color: var(--color-light-graphic-primary);
45
45
  --calendar-input-popover-border-radius: 0 0 var(--border-radius-s) var(--border-radius-s);
46
46
  }
47
- .calendar-input__component_174xs {
47
+ .calendar-input__component_renrw {
48
48
  display: inline-block;
49
49
  outline: none;
50
50
  position: relative;
51
51
  }
52
- .calendar-input__block_174xs {
52
+ .calendar-input__block_renrw {
53
53
  width: 100%;
54
54
  }
55
- .calendar-input__calendarContainer_174xs {
55
+ .calendar-input__calendarContainer_renrw {
56
56
  display: inline-block;
57
57
  box-sizing: border-box;
58
58
  border-radius: var(--calendar-input-popover-border-radius)
59
59
  }
60
60
  @media (max-width: 374px) {
61
- .calendar-input__calendarContainer_174xs {
61
+ .calendar-input__calendarContainer_renrw {
62
62
  width: 100%;
63
63
  min-width: 288px
64
64
  }
65
65
  }
66
- .calendar-input__calendarResponsive_174xs {
66
+ .calendar-input__calendarResponsive_renrw {
67
67
  width: var(--calendar-width);
68
68
  padding: 0 var(--gap-m);
69
69
  }
70
- .calendar-input__calendarIcon_174xs {
70
+ .calendar-input__calendarIcon_renrw {
71
71
  width: 24px;
72
72
  height: 24px;
73
73
  display: block;
74
74
  color: var(--calendar-input-icon-color)
75
75
  }
76
- .calendar-input__calendarIcon_174xs:not(:only-child) {
76
+ .calendar-input__calendarIcon_renrw:not(:only-child) {
77
77
  margin-right: var(--gap-2xs);
78
78
  }
79
- .calendar-input__nativeInput_174xs {
79
+ .calendar-input__nativeInput_renrw {
80
80
  opacity: 0;
81
81
  position: absolute;
82
82
  top: 0;
@@ -87,9 +87,9 @@
87
87
  appearance: none;
88
88
  z-index: 1
89
89
  }
90
- .calendar-input__nativeInput_174xs::-webkit-calendar-picker-indicator {
90
+ .calendar-input__nativeInput_renrw::-webkit-calendar-picker-indicator {
91
91
  display: none;
92
92
  }
93
- .calendar-input__nativeInput_174xs::-webkit-inner-spin-button {
93
+ .calendar-input__nativeInput_renrw::-webkit-inner-spin-button {
94
94
  display: none;
95
95
  }
@@ -11,7 +11,7 @@ import 'date-fns/format';
11
11
  import 'date-fns/isSameDay';
12
12
  import { SUPPORTS_INPUT_TYPE_DATE } from './utils.js';
13
13
 
14
- var styles = {"component":"calendar-input__component_174xs","block":"calendar-input__block_174xs","calendarContainer":"calendar-input__calendarContainer_174xs","calendarResponsive":"calendar-input__calendarResponsive_174xs","calendarIcon":"calendar-input__calendarIcon_174xs","nativeInput":"calendar-input__nativeInput_174xs"};
14
+ var styles = {"component":"calendar-input__component_renrw","block":"calendar-input__block_renrw","calendarContainer":"calendar-input__calendarContainer_renrw","calendarResponsive":"calendar-input__calendarResponsive_renrw","calendarIcon":"calendar-input__calendarIcon_renrw","nativeInput":"calendar-input__nativeInput_renrw"};
15
15
  require('./index.css')
16
16
 
17
17
  const CalendarInput = forwardRef(({ block = false, className, inputClassName, popoverClassName, defaultOpen = false, defaultMonth, defaultValue = '', calendarPosition = 'popover', value, dataTestId, calendarProps = {}, minDate = calendarProps.minDate, maxDate = calendarProps.maxDate, offDays = calendarProps.offDays || [], events = calendarProps.events || [], preventFlip, mobileMode = 'popover', wrapperRef = null, disabled, onChange = () => null, onInputChange, onCalendarChange, onKeyDown, readOnly, Calendar: Calendar$1 = Calendar, popoverPosition = 'bottom-start', zIndexPopover, useAnchorWidth, rightAddons, error, ...restProps }, ref) => {
@@ -29,14 +29,14 @@ const CalendarInput = forwardRef(({ block = false, className, inputClassName, po
29
29
  const [inputValue, setInputValue] = useState(value || defaultValue);
30
30
  const calendarValue = inputValue ? parseDateString(inputValue).getTime() : undefined;
31
31
  const checkInputValueIsValid = useCallback((newInputValue) => {
32
- if (!newInputValue || error)
32
+ if (!newInputValue)
33
33
  return false;
34
34
  const dateValue = parseDateString(newInputValue).getTime();
35
35
  return !!(dateValue &&
36
36
  isCompleteDateInput(newInputValue) &&
37
37
  dateInLimits(dateValue, minDate, maxDate) &&
38
38
  !offDays.includes(dateValue));
39
- }, [error, maxDate, minDate, offDays]);
39
+ }, [maxDate, minDate, offDays]);
40
40
  const inputDisabled = disabled || readOnly;
41
41
  const inputWrapperRef = useRef(null);
42
42
  const calendarRef = useRef(null);
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: 1rjsd */
1
+ /* hash: 1k6vw */
2
2
  :root {
3
3
  --color-light-graphic-primary: #0b1f35;
4
4
  }
@@ -44,39 +44,39 @@
44
44
  --calendar-input-icon-color: var(--color-light-graphic-primary);
45
45
  --calendar-input-popover-border-radius: 0 0 var(--border-radius-s) var(--border-radius-s);
46
46
  }
47
- .calendar-input__component_174xs {
47
+ .calendar-input__component_renrw {
48
48
  display: inline-block;
49
49
  outline: none;
50
50
  position: relative;
51
51
  }
52
- .calendar-input__block_174xs {
52
+ .calendar-input__block_renrw {
53
53
  width: 100%;
54
54
  }
55
- .calendar-input__calendarContainer_174xs {
55
+ .calendar-input__calendarContainer_renrw {
56
56
  display: inline-block;
57
57
  box-sizing: border-box;
58
58
  border-radius: var(--calendar-input-popover-border-radius)
59
59
  }
60
60
  @media (max-width: 374px) {
61
- .calendar-input__calendarContainer_174xs {
61
+ .calendar-input__calendarContainer_renrw {
62
62
  width: 100%;
63
63
  min-width: 288px
64
64
  }
65
65
  }
66
- .calendar-input__calendarResponsive_174xs {
66
+ .calendar-input__calendarResponsive_renrw {
67
67
  width: var(--calendar-width);
68
68
  padding: 0 var(--gap-m);
69
69
  }
70
- .calendar-input__calendarIcon_174xs {
70
+ .calendar-input__calendarIcon_renrw {
71
71
  width: 24px;
72
72
  height: 24px;
73
73
  display: block;
74
74
  color: var(--calendar-input-icon-color)
75
75
  }
76
- .calendar-input__calendarIcon_174xs:not(:only-child) {
76
+ .calendar-input__calendarIcon_renrw:not(:only-child) {
77
77
  margin-right: var(--gap-2xs);
78
78
  }
79
- .calendar-input__nativeInput_174xs {
79
+ .calendar-input__nativeInput_renrw {
80
80
  opacity: 0;
81
81
  position: absolute;
82
82
  top: 0;
@@ -87,9 +87,9 @@
87
87
  appearance: none;
88
88
  z-index: 1
89
89
  }
90
- .calendar-input__nativeInput_174xs::-webkit-calendar-picker-indicator {
90
+ .calendar-input__nativeInput_renrw::-webkit-calendar-picker-indicator {
91
91
  display: none;
92
92
  }
93
- .calendar-input__nativeInput_174xs::-webkit-inner-spin-button {
93
+ .calendar-input__nativeInput_renrw::-webkit-inner-spin-button {
94
94
  display: none;
95
95
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-calendar-input",
3
- "version": "7.1.3",
3
+ "version": "7.1.5",
4
4
  "description": "Calendar input component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -18,7 +18,7 @@
18
18
  "react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
19
19
  },
20
20
  "dependencies": {
21
- "@alfalab/core-components-calendar": "^6.1.3",
21
+ "@alfalab/core-components-calendar": "^6.1.4",
22
22
  "@alfalab/core-components-date-input": "^3.1.3",
23
23
  "@alfalab/core-components-popover": "^6.0.1",
24
24
  "@alfalab/hooks": "^1.7.0",