@onesy/ui-react 1.0.157 → 1.0.158

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.
@@ -440,8 +440,8 @@ const CalendarMonth = /*#__PURE__*/_react.default.forwardRef((props__, ref) => {
440
440
  selectedSame: value.filter(item => item.year === day.year && item.month === day.month && item.day === day.day).length === 2
441
441
  };
442
442
 
443
- // selected
444
- for (const itemRange of rangesSelected) {
443
+ // value
444
+ for (const itemRange of rangesValue) {
445
445
  const rangeStartDay = (0, _date.format)(new _date.OnesyDate(itemRange.start), 'DD-MM-YYYY');
446
446
  const rangeEndDay = (0, _date.format)(new _date.OnesyDate(itemRange.end), 'DD-MM-YYYY');
447
447
 
@@ -456,14 +456,11 @@ const CalendarMonth = /*#__PURE__*/_react.default.forwardRef((props__, ref) => {
456
456
 
457
457
  // same
458
458
  result.same = result.start && result.end;
459
- if (result.selected) {
460
- result.fromSelected = true;
461
- return result;
462
- }
459
+ if (result.selected) return result;
463
460
  }
464
461
 
465
- // value
466
- for (const itemRange of rangesValue) {
462
+ // selected
463
+ for (const itemRange of rangesSelected) {
467
464
  const rangeStartDay = (0, _date.format)(new _date.OnesyDate(itemRange.start), 'DD-MM-YYYY');
468
465
  const rangeEndDay = (0, _date.format)(new _date.OnesyDate(itemRange.end), 'DD-MM-YYYY');
469
466
 
@@ -478,7 +475,10 @@ const CalendarMonth = /*#__PURE__*/_react.default.forwardRef((props__, ref) => {
478
475
 
479
476
  // same
480
477
  result.same = result.start && result.end;
481
- if (result.selected) return result;
478
+ if (result.selected) {
479
+ result.fromSelected = true;
480
+ return result;
481
+ }
482
482
  }
483
483
  result.outside = true;
484
484
  return result;
@@ -409,8 +409,8 @@ const CalendarMonth = /*#__PURE__*/React.forwardRef((props__, ref) => {
409
409
  selectedSame: value.filter(item => item.year === day.year && item.month === day.month && item.day === day.day).length === 2
410
410
  };
411
411
 
412
- // selected
413
- for (const itemRange of rangesSelected) {
412
+ // value
413
+ for (const itemRange of rangesValue) {
414
414
  const rangeStartDay = format(new OnesyDate(itemRange.start), 'DD-MM-YYYY');
415
415
  const rangeEndDay = format(new OnesyDate(itemRange.end), 'DD-MM-YYYY');
416
416
 
@@ -425,14 +425,11 @@ const CalendarMonth = /*#__PURE__*/React.forwardRef((props__, ref) => {
425
425
 
426
426
  // same
427
427
  result.same = result.start && result.end;
428
- if (result.selected) {
429
- result.fromSelected = true;
430
- return result;
431
- }
428
+ if (result.selected) return result;
432
429
  }
433
430
 
434
- // value
435
- for (const itemRange of rangesValue) {
431
+ // selected
432
+ for (const itemRange of rangesSelected) {
436
433
  const rangeStartDay = format(new OnesyDate(itemRange.start), 'DD-MM-YYYY');
437
434
  const rangeEndDay = format(new OnesyDate(itemRange.end), 'DD-MM-YYYY');
438
435
 
@@ -447,7 +444,10 @@ const CalendarMonth = /*#__PURE__*/React.forwardRef((props__, ref) => {
447
444
 
448
445
  // same
449
446
  result.same = result.start && result.end;
450
- if (result.selected) return result;
447
+ if (result.selected) {
448
+ result.fromSelected = true;
449
+ return result;
450
+ }
451
451
  }
452
452
  result.outside = true;
453
453
  return result;
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.156
1
+ /** @license UiReact v1.0.157
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.156
1
+ /** @license UiReact v1.0.157
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.157",
3
+ "version": "1.0.158",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar Erić <lazareric1@proton.me>",