@alfalab/core-components-date-range-input 2.2.14 → 2.3.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.
@@ -22,7 +22,7 @@ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
22
22
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
23
23
  var dateFnsIsValid__default = /*#__PURE__*/_interopDefaultCompat(dateFnsIsValid);
24
24
 
25
- var styles = {"component":"date-range-input__component_1sfql","calendarContainer":"date-range-input__calendarContainer_1sfql","calendarResponsive":"date-range-input__calendarResponsive_1sfql","block":"date-range-input__block_1sfql"};
25
+ var styles = {"component":"date-range-input__component_b9ymy","calendarContainer":"date-range-input__calendarContainer_b9ymy","calendarResponsive":"date-range-input__calendarResponsive_b9ymy","block":"date-range-input__block_b9ymy"};
26
26
  require('./index.css')
27
27
 
28
28
  /* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */
@@ -1,4 +1,4 @@
1
- /* hash: 1vqtk */
1
+ /* hash: qg16h */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-secondary: #e7e9eb; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -41,22 +41,22 @@
41
41
  /* marker */
42
42
  } :root {
43
43
  --calendar-popover-border-radius: var(--border-radius-m);
44
- } .date-range-input__component_1sfql {
44
+ } .date-range-input__component_b9ymy {
45
45
  display: inline-block;
46
46
  outline: none;
47
47
  position: relative;
48
- } .date-range-input__calendarContainer_1sfql {
48
+ } .date-range-input__calendarContainer_b9ymy {
49
49
  display: inline-block;
50
50
  box-sizing: border-box;
51
51
  border-radius: var(--calendar-popover-border-radius);
52
52
  border: 1px solid var(--color-light-border-secondary)
53
- } @media (max-width: 374px) { .date-range-input__calendarContainer_1sfql {
53
+ } @media (max-width: 374px) { .date-range-input__calendarContainer_b9ymy {
54
54
  width: 100%;
55
55
  min-width: 288px
56
56
  }
57
- } .date-range-input__calendarResponsive_1sfql {
57
+ } .date-range-input__calendarResponsive_b9ymy {
58
58
  width: var(--calendar-width);
59
59
  padding: 0 var(--gap-m);
60
- } .date-range-input__block_1sfql {
60
+ } .date-range-input__block_b9ymy {
61
61
  width: 100%;
62
62
  }
@@ -71,8 +71,13 @@ var format = function (value) {
71
71
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) -/, '$1') // 12.12.2005 - => 12.12.2005
72
72
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) (\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005
73
73
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) {2}(\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005
74
- .replace(/^(\d\d\.\d\d\.\d\d\d\d)-/, '$1');
75
- }; // 12.12.2005- => 12.12.2005
74
+ .replace(/^(\d\d\.\d\d\.\d\d\d\d)-/, '$1') // 12.12.2005- => 12.12.2005
75
+ .replace(/^(\d\.\d\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.12.2005123123 => 1.12.2005
76
+ .replace(/^(\d\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005
77
+ .replace(/^(\d)\.(\d\d)([0-9]*)\.(\d\d\d\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005
78
+ .replace(/^(\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005
79
+ .replace(/^()\.(\d)\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3');
80
+ }; // .2.2005123123 => .2.2005
76
81
  var parseTimestampToDate = function (timestamp) {
77
82
  var date = new Date(timestamp);
78
83
  var year = date.getFullYear();
@@ -13,7 +13,7 @@ import { CalendarMIcon } from '@alfalab/icons-glyph/CalendarMIcon';
13
13
  import { parseTimestampToDate, DATE_FORMAT, format, parseDateString, DATE_MASK, isCompleteDateInput, isValid } from '../../utils/format.js';
14
14
  import 'date-fns/parse';
15
15
 
16
- var styles = {"component":"date-range-input__component_1sfql","calendarContainer":"date-range-input__calendarContainer_1sfql","calendarResponsive":"date-range-input__calendarResponsive_1sfql","block":"date-range-input__block_1sfql"};
16
+ var styles = {"component":"date-range-input__component_b9ymy","calendarContainer":"date-range-input__calendarContainer_b9ymy","calendarResponsive":"date-range-input__calendarResponsive_b9ymy","block":"date-range-input__block_b9ymy"};
17
17
  require('./index.css')
18
18
 
19
19
  /* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */
@@ -1,4 +1,4 @@
1
- /* hash: 1vqtk */
1
+ /* hash: qg16h */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-secondary: #e7e9eb; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -41,22 +41,22 @@
41
41
  /* marker */
42
42
  } :root {
43
43
  --calendar-popover-border-radius: var(--border-radius-m);
44
- } .date-range-input__component_1sfql {
44
+ } .date-range-input__component_b9ymy {
45
45
  display: inline-block;
46
46
  outline: none;
47
47
  position: relative;
48
- } .date-range-input__calendarContainer_1sfql {
48
+ } .date-range-input__calendarContainer_b9ymy {
49
49
  display: inline-block;
50
50
  box-sizing: border-box;
51
51
  border-radius: var(--calendar-popover-border-radius);
52
52
  border: 1px solid var(--color-light-border-secondary)
53
- } @media (max-width: 374px) { .date-range-input__calendarContainer_1sfql {
53
+ } @media (max-width: 374px) { .date-range-input__calendarContainer_b9ymy {
54
54
  width: 100%;
55
55
  min-width: 288px
56
56
  }
57
- } .date-range-input__calendarResponsive_1sfql {
57
+ } .date-range-input__calendarResponsive_b9ymy {
58
58
  width: var(--calendar-width);
59
59
  padding: 0 var(--gap-m);
60
- } .date-range-input__block_1sfql {
60
+ } .date-range-input__block_b9ymy {
61
61
  width: 100%;
62
62
  }
@@ -64,8 +64,13 @@ var format = function (value) {
64
64
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) -/, '$1') // 12.12.2005 - => 12.12.2005
65
65
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) (\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005
66
66
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) {2}(\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005
67
- .replace(/^(\d\d\.\d\d\.\d\d\d\d)-/, '$1');
68
- }; // 12.12.2005- => 12.12.2005
67
+ .replace(/^(\d\d\.\d\d\.\d\d\d\d)-/, '$1') // 12.12.2005- => 12.12.2005
68
+ .replace(/^(\d\.\d\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.12.2005123123 => 1.12.2005
69
+ .replace(/^(\d\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005
70
+ .replace(/^(\d)\.(\d\d)([0-9]*)\.(\d\d\d\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005
71
+ .replace(/^(\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005
72
+ .replace(/^()\.(\d)\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3');
73
+ }; // .2.2005123123 => .2.2005
69
74
  var parseTimestampToDate = function (timestamp) {
70
75
  var date = new Date(timestamp);
71
76
  var year = date.getFullYear();
@@ -12,7 +12,7 @@ import { CalendarMIcon } from '@alfalab/icons-glyph/CalendarMIcon';
12
12
  import { parseTimestampToDate, DATE_FORMAT, format, parseDateString, DATE_MASK, isCompleteDateInput, isValid } from '../../utils/format.js';
13
13
  import 'date-fns/parse';
14
14
 
15
- const styles = {"component":"date-range-input__component_1sfql","calendarContainer":"date-range-input__calendarContainer_1sfql","calendarResponsive":"date-range-input__calendarResponsive_1sfql","block":"date-range-input__block_1sfql"};
15
+ const styles = {"component":"date-range-input__component_b9ymy","calendarContainer":"date-range-input__calendarContainer_b9ymy","calendarResponsive":"date-range-input__calendarResponsive_b9ymy","block":"date-range-input__block_b9ymy"};
16
16
  require('./index.css')
17
17
 
18
18
  /* eslint-disable no-useless-escape, jsx-a11y/click-events-have-key-events */
@@ -1,4 +1,4 @@
1
- /* hash: 1vqtk */
1
+ /* hash: qg16h */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-secondary: #e7e9eb; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -41,22 +41,22 @@
41
41
  /* marker */
42
42
  } :root {
43
43
  --calendar-popover-border-radius: var(--border-radius-m);
44
- } .date-range-input__component_1sfql {
44
+ } .date-range-input__component_b9ymy {
45
45
  display: inline-block;
46
46
  outline: none;
47
47
  position: relative;
48
- } .date-range-input__calendarContainer_1sfql {
48
+ } .date-range-input__calendarContainer_b9ymy {
49
49
  display: inline-block;
50
50
  box-sizing: border-box;
51
51
  border-radius: var(--calendar-popover-border-radius);
52
52
  border: 1px solid var(--color-light-border-secondary)
53
- } @media (max-width: 374px) { .date-range-input__calendarContainer_1sfql {
53
+ } @media (max-width: 374px) { .date-range-input__calendarContainer_b9ymy {
54
54
  width: 100%;
55
55
  min-width: 288px
56
56
  }
57
- } .date-range-input__calendarResponsive_1sfql {
57
+ } .date-range-input__calendarResponsive_b9ymy {
58
58
  width: var(--calendar-width);
59
59
  padding: 0 var(--gap-m);
60
- } .date-range-input__block_1sfql {
60
+ } .date-range-input__block_b9ymy {
61
61
  width: 100%;
62
62
  }
@@ -58,7 +58,12 @@ const format = (value) => value
58
58
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) -/, '$1') // 12.12.2005 - => 12.12.2005
59
59
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) (\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005
60
60
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) {2}(\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005
61
- .replace(/^(\d\d\.\d\d\.\d\d\d\d)-/, '$1'); // 12.12.2005- => 12.12.2005
61
+ .replace(/^(\d\d\.\d\d\.\d\d\d\d)-/, '$1') // 12.12.2005- => 12.12.2005
62
+ .replace(/^(\d\.\d\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.12.2005123123 => 1.12.2005
63
+ .replace(/^(\d\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005
64
+ .replace(/^(\d)\.(\d\d)([0-9]*)\.(\d\d\d\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005
65
+ .replace(/^(\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005
66
+ .replace(/^()\.(\d)\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3'); // .2.2005123123 => .2.2005
62
67
  const parseTimestampToDate = (timestamp) => {
63
68
  const date = new Date(timestamp);
64
69
  const year = date.getFullYear();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-date-range-input",
3
- "version": "2.2.14",
3
+ "version": "2.3.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@alfalab/core-components-input": "^11.1.8",
19
19
  "@alfalab/core-components-icon-button": "^6.0.8",
20
- "@alfalab/core-components-calendar": "^6.2.13",
20
+ "@alfalab/core-components-calendar": "^6.2.14",
21
21
  "@alfalab/core-components-popover": "^6.0.7",
22
22
  "@alfalab/hooks": "^1.13.0",
23
23
  "classnames": "^2.3.1",
package/utils/format.js CHANGED
@@ -71,8 +71,13 @@ var format = function (value) {
71
71
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) -/, '$1') // 12.12.2005 - => 12.12.2005
72
72
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) (\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005
73
73
  .replace(/^(\d\d\.\d\d\.\d\d\d\d) {2}(\d.*)/, '$1 - $2') // 12.12.2005 12.12.2005 => 12.12.2005 - 12.12.2005
74
- .replace(/^(\d\d\.\d\d\.\d\d\d\d)-/, '$1');
75
- }; // 12.12.2005- => 12.12.2005
74
+ .replace(/^(\d\d\.\d\d\.\d\d\d\d)-/, '$1') // 12.12.2005- => 12.12.2005
75
+ .replace(/^(\d\.\d\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.12.2005123123 => 1.12.2005
76
+ .replace(/^(\d\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005
77
+ .replace(/^(\d)\.(\d\d)([0-9]*)\.(\d\d\d\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005
78
+ .replace(/^(\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005
79
+ .replace(/^()\.(\d)\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3');
80
+ }; // .2.2005123123 => .2.2005
76
81
  var parseTimestampToDate = function (timestamp) {
77
82
  var date = new Date(timestamp);
78
83
  var year = date.getFullYear();