@onesy/ui-react 1.0.152 → 1.0.153

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.
@@ -544,9 +544,6 @@ const CalendarMonth = /*#__PURE__*/_react.default.forwardRef((props__, ref) => {
544
544
  });
545
545
  }
546
546
  }
547
- const colorTheme = _react.default.useMemo(() => {
548
- return theme.palette.color[color] || theme.methods.color(color);
549
- }, [color, theme]);
550
547
  const colorSelectedTheme = _react.default.useMemo(() => {
551
548
  return theme.palette.color[colorSelected] || theme.methods.color(colorSelected);
552
549
  }, [colorSelected, theme]);
@@ -612,7 +609,7 @@ const CalendarMonth = /*#__PURE__*/_react.default.forwardRef((props__, ref) => {
612
609
  // between
613
610
  day.is.between && !day.is.same && [!day.is.end && day.dayWeek !== 0 && !day.is.monthEnd && classes.dayStartSelection, !day.is.start && day.dayWeek !== 1 && !day.is.monthStart && classes.dayEndSelection]]),
614
611
  style: {
615
- '--onesy-color': day.is.fromSelected ? colorSelectedTheme.main : colorTheme.main
612
+ '--onesy-color': day.is.fromSelected ? colorSelectedTheme === null || colorSelectedTheme === void 0 ? void 0 : colorSelectedTheme.main : palette === null || palette === void 0 ? void 0 : palette.main
616
613
  }
617
614
  }, (0, _utils.is)('function', renderDay) ? renderDay(day.onesyDate, propsDay, day, outside) : /*#__PURE__*/_react.default.createElement(PaginationItem, (0, _extends2.default)({
618
615
  tonal: tonal,
@@ -631,7 +628,7 @@ const CalendarMonth = /*#__PURE__*/_react.default.forwardRef((props__, ref) => {
631
628
  }, PaginationItemProps, {
632
629
  className: (0, _styleReact.classNames)([(0, _utils2.staticClassName)('CalendarMonth', theme) && ['onesy-CalendarMonth-day-value', day.in && 'onesy-CalendarMonth-day-in', day.dayWeek && 'onesy-CalendarMonth-day-day-week', day.weekend && 'onesy-CalendarMonth-day-weekend', day.today && 'onesy-CalendarMonth-day-today', day.is.between && 'onesy-CalendarMonth-day-between', day.is.selected && 'onesy-CalendarMonth-day-selected', day.is.start && 'onesy-CalendarMonth-day-start', day.is.end && 'onesy-CalendarMonth-day-end'], PaginationItemProps === null || PaginationItemProps === void 0 ? void 0 : PaginationItemProps.className, classes.dayValue, day.is.selected && classes.daySelected, classes[`day_size_${size}`]]),
633
630
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, day.today ? {
634
- boxShadow: `inset 0px 0px 0px 1px ${colorTheme[40]}`
631
+ boxShadow: `inset 0px 0px 0px 1px ${palette[40]}`
635
632
  } : undefined), day.is.selected && day.is.between && {
636
633
  color: `hsl(from var(--onesy-color) h s ${theme.palette.light ? 10 : 98})`,
637
634
  backgroundColor: `hsl(from var(--onesy-color) h s ${theme.palette.light ? propsDay.disabled ? 90 : 85 : propsDay.disabled ? 20 : 25})`
@@ -515,9 +515,6 @@ const CalendarMonth = /*#__PURE__*/React.forwardRef((props__, ref) => {
515
515
  });
516
516
  }
517
517
  }
518
- const colorTheme = React.useMemo(() => {
519
- return theme.palette.color[color] || theme.methods.color(color);
520
- }, [color, theme]);
521
518
  const colorSelectedTheme = React.useMemo(() => {
522
519
  return theme.palette.color[colorSelected] || theme.methods.color(colorSelected);
523
520
  }, [colorSelected, theme]);
@@ -582,7 +579,7 @@ const CalendarMonth = /*#__PURE__*/React.forwardRef((props__, ref) => {
582
579
  // between
583
580
  day.is.between && !day.is.same && [!day.is.end && day.dayWeek !== 0 && !day.is.monthEnd && classes.dayStartSelection, !day.is.start && day.dayWeek !== 1 && !day.is.monthStart && classes.dayEndSelection]]),
584
581
  style: {
585
- '--onesy-color': day.is.fromSelected ? colorSelectedTheme.main : colorTheme.main
582
+ '--onesy-color': day.is.fromSelected ? colorSelectedTheme?.main : palette?.main
586
583
  }
587
584
  }, is('function', renderDay) ? renderDay(day.onesyDate, propsDay, day, outside) : /*#__PURE__*/React.createElement(PaginationItem, _extends({
588
585
  tonal: tonal,
@@ -601,7 +598,7 @@ const CalendarMonth = /*#__PURE__*/React.forwardRef((props__, ref) => {
601
598
  }, PaginationItemProps, {
602
599
  className: classNames([staticClassName('CalendarMonth', theme) && ['onesy-CalendarMonth-day-value', day.in && 'onesy-CalendarMonth-day-in', day.dayWeek && 'onesy-CalendarMonth-day-day-week', day.weekend && 'onesy-CalendarMonth-day-weekend', day.today && 'onesy-CalendarMonth-day-today', day.is.between && 'onesy-CalendarMonth-day-between', day.is.selected && 'onesy-CalendarMonth-day-selected', day.is.start && 'onesy-CalendarMonth-day-start', day.is.end && 'onesy-CalendarMonth-day-end'], PaginationItemProps?.className, classes.dayValue, day.is.selected && classes.daySelected, classes[`day_size_${size}`]]),
603
600
  style: _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, day.today ? {
604
- boxShadow: `inset 0px 0px 0px 1px ${colorTheme[40]}`
601
+ boxShadow: `inset 0px 0px 0px 1px ${palette[40]}`
605
602
  } : undefined), day.is.selected && day.is.between && {
606
603
  color: `hsl(from var(--onesy-color) h s ${theme.palette.light ? 10 : 98})`,
607
604
  backgroundColor: `hsl(from var(--onesy-color) h s ${theme.palette.light ? propsDay.disabled ? 90 : 85 : propsDay.disabled ? 20 : 25})`
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.151
1
+ /** @license UiReact v1.0.152
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.151
1
+ /** @license UiReact v1.0.152
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.152",
3
+ "version": "1.0.153",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar Erić <lazareric1@proton.me>",