@astral/ui 1.40.1 → 1.40.3

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.
@@ -50,8 +50,12 @@ const DatePickerInner = (0, react_1.forwardRef)(({ onChange, onOpen, onBlur, onC
50
50
  setSelectedDate(date);
51
51
  closePopper(undefined, 'selectOption');
52
52
  };
53
- (0, react_1.useEffect)(() => onChange === null || onChange === void 0 ? void 0 : onChange(selectedDate || maskedDate), [selectedDate, maskedDate]);
54
- (0, react_1.useEffect)(() => checkValue(parentValue || ''), [parentValue]);
53
+ (0, react_1.useEffect)(() => {
54
+ onChange === null || onChange === void 0 ? void 0 : onChange(selectedDate || maskedDate);
55
+ }, [selectedDate, maskedDate]);
56
+ (0, react_1.useEffect)(() => {
57
+ checkValue(parentValue || '');
58
+ }, [parentValue]);
55
59
  const blurHandler = (e) => {
56
60
  checkValue(e.target.value);
57
61
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
@@ -13,7 +13,9 @@ const useCalendarNavigate = ({ date, addCb, }) => {
13
13
  const handlePrevClick = () => {
14
14
  setBaseDate(addCb(baseDate, -1));
15
15
  };
16
- (0, react_1.useEffect)(() => setBaseDate(date), [date]);
16
+ (0, react_1.useEffect)(() => {
17
+ setBaseDate(date);
18
+ }, [date]);
17
19
  return {
18
20
  baseDate,
19
21
  handlePrevClick,
@@ -47,8 +47,12 @@ const DatePickerInner = forwardRef(({ onChange, onOpen, onBlur, onClose, mask =
47
47
  setSelectedDate(date);
48
48
  closePopper(undefined, 'selectOption');
49
49
  };
50
- useEffect(() => onChange === null || onChange === void 0 ? void 0 : onChange(selectedDate || maskedDate), [selectedDate, maskedDate]);
51
- useEffect(() => checkValue(parentValue || ''), [parentValue]);
50
+ useEffect(() => {
51
+ onChange === null || onChange === void 0 ? void 0 : onChange(selectedDate || maskedDate);
52
+ }, [selectedDate, maskedDate]);
53
+ useEffect(() => {
54
+ checkValue(parentValue || '');
55
+ }, [parentValue]);
52
56
  const blurHandler = (e) => {
53
57
  checkValue(e.target.value);
54
58
  onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
@@ -10,7 +10,9 @@ export const useCalendarNavigate = ({ date, addCb, }) => {
10
10
  const handlePrevClick = () => {
11
11
  setBaseDate(addCb(baseDate, -1));
12
12
  };
13
- useEffect(() => setBaseDate(date), [date]);
13
+ useEffect(() => {
14
+ setBaseDate(date);
15
+ }, [date]);
14
16
  return {
15
17
  baseDate,
16
18
  handlePrevClick,
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "1.40.1",
3
+ "version": "1.40.3",
4
4
  "browser": "./esm/index.js",
5
5
  "main": "./index.js",
6
6
  "dependencies": {
7
- "@astral/icons": "^1.40.1",
7
+ "@astral/icons": "^1.40.3",
8
8
  "@emotion/cache": "11.7.1",
9
9
  "@emotion/react": "11.9.0",
10
10
  "@emotion/server": "11.4.0",