@alfalab/core-components-date-input 4.1.7 → 4.2.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.
package/Component.js CHANGED
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
15
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
16
  var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
17
17
 
18
- var styles = {"nativeInput":"date-input__nativeInput_w21tv"};
18
+ var styles = {"nativeInput":"date-input__nativeInput_1985c"};
19
19
  require('./index.css')
20
20
 
21
21
  var DateInput = React.forwardRef(function (_a, ref) {
@@ -1,6 +1,6 @@
1
1
  :root {
2
- } /* deprecated */ :root {
3
- } :root {
2
+ } /* deprecated */ :root { /* 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 */
3
+ } :root { /* 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 */
4
4
  } :root {
5
5
  } :root {
6
6
 
@@ -34,8 +34,16 @@ var format = function (value) {
34
34
  .replace(/^(\d\d\.\d\d\.\d\d\d\d).*/, '$1') // 12.12.20056 => 12.12.2005
35
35
  .replace(/\.$/, '') // 12. => 12
36
36
  .replace(/^(\d\d\.\d\d)(\d\d\d\d)/, '$1.$2') // 12.122005 => 12.12.2005
37
- .replace(/^(\d\d)(\d\d\.\d\d\d\d)/, '$1.$2');
38
- }; // 1212.2005 => 12.12.2005
37
+ .replace(/^(\d\d)(\d\d\.\d\d\d\d)/, '$1.$2') // 1212.2005 => 12.12.2005
38
+ .replace(/^(\d\.\d\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.12.2005123123 => 01.12.2005
39
+ .replace(/^(\d\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005
40
+ .replace(/^(\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005
41
+ .replace(/^(\d)\.(\d\d)([0-9]*)\.(\d\d\d\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005
42
+ .replace(/^(\d\d)\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // 01..2005123123 => 01..2005
43
+ .replace(/^(\d)\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // 1..2005123123 => 1..2005
44
+ .replace(/^()\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // ..2005123123 => ..2005
45
+ .replace(/^()\.(\d)\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3');
46
+ }; // .2.2005123123 => .2.2005
39
47
 
40
48
  exports.DATE_FORMAT = DATE_FORMAT;
41
49
  exports.DATE_MASK = DATE_MASK;
package/esm/Component.js CHANGED
@@ -8,7 +8,7 @@ import 'date-fns/format';
8
8
  import 'date-fns/isValid';
9
9
  import 'date-fns/parse';
10
10
 
11
- var styles = {"nativeInput":"date-input__nativeInput_w21tv"};
11
+ var styles = {"nativeInput":"date-input__nativeInput_1985c"};
12
12
  require('./index.css')
13
13
 
14
14
  var DateInput = forwardRef(function (_a, ref) {
package/esm/index.css CHANGED
@@ -1,7 +1,7 @@
1
- /* hash: 1hc2p */
1
+ /* hash: 12hzq */
2
2
  :root {
3
- } /* deprecated */ :root {
4
- } :root {
3
+ } /* deprecated */ :root { /* 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 */
4
+ } :root { /* 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 */
5
5
  } :root {
6
6
  } :root {
7
7
 
@@ -14,7 +14,7 @@
14
14
  } :root {
15
15
  } :root {
16
16
  } :root {
17
- } .date-input__nativeInput_w21tv {
17
+ } .date-input__nativeInput_1985c {
18
18
  opacity: 0;
19
19
  position: absolute;
20
20
  top: 0;
@@ -24,8 +24,8 @@
24
24
  -webkit-appearance: none;
25
25
  appearance: none;
26
26
  z-index: 1
27
- } .date-input__nativeInput_w21tv::-webkit-calendar-picker-indicator {
27
+ } .date-input__nativeInput_1985c::-webkit-calendar-picker-indicator {
28
28
  display: none;
29
- } .date-input__nativeInput_w21tv::-webkit-inner-spin-button {
29
+ } .date-input__nativeInput_1985c::-webkit-inner-spin-button {
30
30
  display: none;
31
31
  }
@@ -26,7 +26,15 @@ var format = function (value) {
26
26
  .replace(/^(\d\d\.\d\d\.\d\d\d\d).*/, '$1') // 12.12.20056 => 12.12.2005
27
27
  .replace(/\.$/, '') // 12. => 12
28
28
  .replace(/^(\d\d\.\d\d)(\d\d\d\d)/, '$1.$2') // 12.122005 => 12.12.2005
29
- .replace(/^(\d\d)(\d\d\.\d\d\d\d)/, '$1.$2');
30
- }; // 1212.2005 => 12.12.2005
29
+ .replace(/^(\d\d)(\d\d\.\d\d\d\d)/, '$1.$2') // 1212.2005 => 12.12.2005
30
+ .replace(/^(\d\.\d\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.12.2005123123 => 01.12.2005
31
+ .replace(/^(\d\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005
32
+ .replace(/^(\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005
33
+ .replace(/^(\d)\.(\d\d)([0-9]*)\.(\d\d\d\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005
34
+ .replace(/^(\d\d)\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // 01..2005123123 => 01..2005
35
+ .replace(/^(\d)\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // 1..2005123123 => 1..2005
36
+ .replace(/^()\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // ..2005123123 => ..2005
37
+ .replace(/^()\.(\d)\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3');
38
+ }; // .2.2005123123 => .2.2005
31
39
 
32
40
  export { DATE_FORMAT, DATE_MASK, NATIVE_DATE_FORMAT, format, formatDate, isCompleteDateInput, isValid, parseDateString };
package/index.css CHANGED
@@ -1,7 +1,7 @@
1
- /* hash: 1hc2p */
1
+ /* hash: 12hzq */
2
2
  :root {
3
- } /* deprecated */ :root {
4
- } :root {
3
+ } /* deprecated */ :root { /* 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 */
4
+ } :root { /* 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 */
5
5
  } :root {
6
6
  } :root {
7
7
 
@@ -14,7 +14,7 @@
14
14
  } :root {
15
15
  } :root {
16
16
  } :root {
17
- } .date-input__nativeInput_w21tv {
17
+ } .date-input__nativeInput_1985c {
18
18
  opacity: 0;
19
19
  position: absolute;
20
20
  top: 0;
@@ -24,8 +24,8 @@
24
24
  -webkit-appearance: none;
25
25
  appearance: none;
26
26
  z-index: 1
27
- } .date-input__nativeInput_w21tv::-webkit-calendar-picker-indicator {
27
+ } .date-input__nativeInput_1985c::-webkit-calendar-picker-indicator {
28
28
  display: none;
29
- } .date-input__nativeInput_w21tv::-webkit-inner-spin-button {
29
+ } .date-input__nativeInput_1985c::-webkit-inner-spin-button {
30
30
  display: none;
31
31
  }
@@ -7,7 +7,7 @@ import 'date-fns/format';
7
7
  import 'date-fns/isValid';
8
8
  import 'date-fns/parse';
9
9
 
10
- const styles = {"nativeInput":"date-input__nativeInput_w21tv"};
10
+ const styles = {"nativeInput":"date-input__nativeInput_1985c"};
11
11
  require('./index.css')
12
12
 
13
13
  const DateInput = forwardRef(({ mobileMode = 'input', defaultValue = '', rightAddons, error, value: propValue, onBlur, onChange, onComplete, ...restProps }, ref) => {
package/modern/index.css CHANGED
@@ -1,7 +1,7 @@
1
- /* hash: 1hc2p */
1
+ /* hash: 12hzq */
2
2
  :root {
3
- } /* deprecated */ :root {
4
- } :root {
3
+ } /* deprecated */ :root { /* 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 */
4
+ } :root { /* 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 */
5
5
  } :root {
6
6
  } :root {
7
7
 
@@ -14,7 +14,7 @@
14
14
  } :root {
15
15
  } :root {
16
16
  } :root {
17
- } .date-input__nativeInput_w21tv {
17
+ } .date-input__nativeInput_1985c {
18
18
  opacity: 0;
19
19
  position: absolute;
20
20
  top: 0;
@@ -24,8 +24,8 @@
24
24
  -webkit-appearance: none;
25
25
  appearance: none;
26
26
  z-index: 1
27
- } .date-input__nativeInput_w21tv::-webkit-calendar-picker-indicator {
27
+ } .date-input__nativeInput_1985c::-webkit-calendar-picker-indicator {
28
28
  display: none;
29
- } .date-input__nativeInput_w21tv::-webkit-inner-spin-button {
29
+ } .date-input__nativeInput_1985c::-webkit-inner-spin-button {
30
30
  display: none;
31
31
  }
@@ -17,6 +17,14 @@ const format = (value) => value
17
17
  .replace(/^(\d\d\.\d\d\.\d\d\d\d).*/, '$1') // 12.12.20056 => 12.12.2005
18
18
  .replace(/\.$/, '') // 12. => 12
19
19
  .replace(/^(\d\d\.\d\d)(\d\d\d\d)/, '$1.$2') // 12.122005 => 12.12.2005
20
- .replace(/^(\d\d)(\d\d\.\d\d\d\d)/, '$1.$2'); // 1212.2005 => 12.12.2005
20
+ .replace(/^(\d\d)(\d\d\.\d\d\d\d)/, '$1.$2') // 1212.2005 => 12.12.2005
21
+ .replace(/^(\d\.\d\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.12.2005123123 => 01.12.2005
22
+ .replace(/^(\d\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005
23
+ .replace(/^(\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005
24
+ .replace(/^(\d)\.(\d\d)([0-9]*)\.(\d\d\d\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005
25
+ .replace(/^(\d\d)\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // 01..2005123123 => 01..2005
26
+ .replace(/^(\d)\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // 1..2005123123 => 1..2005
27
+ .replace(/^()\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // ..2005123123 => ..2005
28
+ .replace(/^()\.(\d)\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3'); // .2.2005123123 => .2.2005
21
29
 
22
30
  export { DATE_FORMAT, DATE_MASK, NATIVE_DATE_FORMAT, format, formatDate, isCompleteDateInput, isValid, parseDateString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-date-input",
3
- "version": "4.1.7",
3
+ "version": "4.2.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -17,7 +17,7 @@
17
17
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
18
18
  },
19
19
  "dependencies": {
20
- "@alfalab/core-components-input": "^11.1.7",
20
+ "@alfalab/core-components-input": "^11.1.8",
21
21
  "date-fns": "^2.16.1",
22
22
  "react-merge-refs": "^1.1.0",
23
23
  "tslib": "^2.4.0"
package/utils/format.js CHANGED
@@ -34,8 +34,16 @@ var format = function (value) {
34
34
  .replace(/^(\d\d\.\d\d\.\d\d\d\d).*/, '$1') // 12.12.20056 => 12.12.2005
35
35
  .replace(/\.$/, '') // 12. => 12
36
36
  .replace(/^(\d\d\.\d\d)(\d\d\d\d)/, '$1.$2') // 12.122005 => 12.12.2005
37
- .replace(/^(\d\d)(\d\d\.\d\d\d\d)/, '$1.$2');
38
- }; // 1212.2005 => 12.12.2005
37
+ .replace(/^(\d\d)(\d\d\.\d\d\d\d)/, '$1.$2') // 1212.2005 => 12.12.2005
38
+ .replace(/^(\d\.\d\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.12.2005123123 => 01.12.2005
39
+ .replace(/^(\d\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 01.2.20055125125 => 01.2.2005
40
+ .replace(/^(\d\.\d\.\d\d\d\d)([0-9]*)/, '$1') // 1.2.20055125125 => 1.2.2005
41
+ .replace(/^(\d)\.(\d\d)([0-9]*)\.(\d\d\d\d)/, '$1.$2.$4') // 1.123123.2005 => 1.12.2005
42
+ .replace(/^(\d\d)\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // 01..2005123123 => 01..2005
43
+ .replace(/^(\d)\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // 1..2005123123 => 1..2005
44
+ .replace(/^()\.()\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3') // ..2005123123 => ..2005
45
+ .replace(/^()\.(\d)\.(\d\d\d\d)([0-9]*)/, '$1.$2.$3');
46
+ }; // .2.2005123123 => .2.2005
39
47
 
40
48
  exports.DATE_FORMAT = DATE_FORMAT;
41
49
  exports.DATE_MASK = DATE_MASK;