@ceed/ads 1.5.6-next.1 → 1.5.6-next.2
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/dist/hooks/use-controlled-state/index.d.ts +1 -3
- package/dist/index.cjs +5 -9
- package/dist/index.js +5 -9
- package/framer/index.js +4 -4
- package/package.json +1 -1
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export declare function useControlledState<T>(controlledValue: T | undefined, defaultValue: T, onChange?: (value: T) => void,
|
|
2
|
-
disableStrict?: boolean;
|
|
3
|
-
}): [T, (value: T | ((prev: T) => T)) => void, boolean];
|
|
1
|
+
export declare function useControlledState<T>(controlledValue: T | undefined, defaultValue: T, onChange?: (value: T) => void): [T, (value: T | ((prev: T) => T)) => void, boolean];
|
package/dist/index.cjs
CHANGED
|
@@ -403,7 +403,7 @@ var IconButton_default = IconButton;
|
|
|
403
403
|
|
|
404
404
|
// src/hooks/use-controlled-state/index.ts
|
|
405
405
|
var import_react5 = require("react");
|
|
406
|
-
function useControlledState(controlledValue, defaultValue, onChange
|
|
406
|
+
function useControlledState(controlledValue, defaultValue, onChange) {
|
|
407
407
|
const { current: isControlled } = (0, import_react5.useRef)(controlledValue !== void 0);
|
|
408
408
|
const [internalValue, setInternalValue] = (0, import_react5.useState)(
|
|
409
409
|
controlledValue ?? defaultValue
|
|
@@ -2364,8 +2364,7 @@ var DatePicker = (0, import_react19.forwardRef)(
|
|
|
2364
2364
|
(0, import_react19.useCallback)(
|
|
2365
2365
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
2366
2366
|
[props.name, onChange]
|
|
2367
|
-
)
|
|
2368
|
-
{ disableStrict: true }
|
|
2367
|
+
)
|
|
2369
2368
|
);
|
|
2370
2369
|
const [displayValue, setDisplayValue] = (0, import_react19.useState)(
|
|
2371
2370
|
() => value ? formatValueString(parseDate(value, format), displayFormat) : ""
|
|
@@ -4142,8 +4141,7 @@ var DateRangePicker = (0, import_react26.forwardRef)(
|
|
|
4142
4141
|
(0, import_react26.useCallback)(
|
|
4143
4142
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
4144
4143
|
[props.name, onChange]
|
|
4145
|
-
)
|
|
4146
|
-
{ disableStrict: true }
|
|
4144
|
+
)
|
|
4147
4145
|
);
|
|
4148
4146
|
const [anchorEl, setAnchorEl] = (0, import_react26.useState)(null);
|
|
4149
4147
|
const open = Boolean(anchorEl);
|
|
@@ -5070,8 +5068,7 @@ var MonthPicker = (0, import_react33.forwardRef)(
|
|
|
5070
5068
|
(0, import_react33.useCallback)(
|
|
5071
5069
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
5072
5070
|
[props.name, onChange]
|
|
5073
|
-
)
|
|
5074
|
-
{ disableStrict: true }
|
|
5071
|
+
)
|
|
5075
5072
|
);
|
|
5076
5073
|
const getFormattedDisplayValue = (0, import_react33.useCallback)(
|
|
5077
5074
|
(inputValue) => {
|
|
@@ -5364,8 +5361,7 @@ var MonthRangePicker = (0, import_react34.forwardRef)(
|
|
|
5364
5361
|
(0, import_react34.useCallback)(
|
|
5365
5362
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
5366
5363
|
[props.name, onChange]
|
|
5367
|
-
)
|
|
5368
|
-
{ disableStrict: true }
|
|
5364
|
+
)
|
|
5369
5365
|
);
|
|
5370
5366
|
const [anchorEl, setAnchorEl] = (0, import_react34.useState)(null);
|
|
5371
5367
|
const open = Boolean(anchorEl);
|
package/dist/index.js
CHANGED
|
@@ -311,7 +311,7 @@ var IconButton_default = IconButton;
|
|
|
311
311
|
|
|
312
312
|
// src/hooks/use-controlled-state/index.ts
|
|
313
313
|
import { useState, useCallback, useEffect, useRef } from "react";
|
|
314
|
-
function useControlledState(controlledValue, defaultValue, onChange
|
|
314
|
+
function useControlledState(controlledValue, defaultValue, onChange) {
|
|
315
315
|
const { current: isControlled } = useRef(controlledValue !== void 0);
|
|
316
316
|
const [internalValue, setInternalValue] = useState(
|
|
317
317
|
controlledValue ?? defaultValue
|
|
@@ -2315,8 +2315,7 @@ var DatePicker = forwardRef6(
|
|
|
2315
2315
|
useCallback7(
|
|
2316
2316
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
2317
2317
|
[props.name, onChange]
|
|
2318
|
-
)
|
|
2319
|
-
{ disableStrict: true }
|
|
2318
|
+
)
|
|
2320
2319
|
);
|
|
2321
2320
|
const [displayValue, setDisplayValue] = useState5(
|
|
2322
2321
|
() => value ? formatValueString(parseDate(value, format), displayFormat) : ""
|
|
@@ -4107,8 +4106,7 @@ var DateRangePicker = forwardRef8(
|
|
|
4107
4106
|
useCallback10(
|
|
4108
4107
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
4109
4108
|
[props.name, onChange]
|
|
4110
|
-
)
|
|
4111
|
-
{ disableStrict: true }
|
|
4109
|
+
)
|
|
4112
4110
|
);
|
|
4113
4111
|
const [anchorEl, setAnchorEl] = useState7(null);
|
|
4114
4112
|
const open = Boolean(anchorEl);
|
|
@@ -5057,8 +5055,7 @@ var MonthPicker = forwardRef9(
|
|
|
5057
5055
|
useCallback12(
|
|
5058
5056
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
5059
5057
|
[props.name, onChange]
|
|
5060
|
-
)
|
|
5061
|
-
{ disableStrict: true }
|
|
5058
|
+
)
|
|
5062
5059
|
);
|
|
5063
5060
|
const getFormattedDisplayValue = useCallback12(
|
|
5064
5061
|
(inputValue) => {
|
|
@@ -5359,8 +5356,7 @@ var MonthRangePicker = forwardRef10(
|
|
|
5359
5356
|
useCallback13(
|
|
5360
5357
|
(value2) => onChange?.({ target: { name: props.name, value: value2 } }),
|
|
5361
5358
|
[props.name, onChange]
|
|
5362
|
-
)
|
|
5363
|
-
{ disableStrict: true }
|
|
5359
|
+
)
|
|
5364
5360
|
);
|
|
5365
5361
|
const [anchorEl, setAnchorEl] = useState11(null);
|
|
5366
5362
|
const open = Boolean(anchorEl);
|