@bolttech/atoms-date-input 0.1.2 → 0.1.4
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/index.cjs.js +2 -2
- package/package.json +2 -2
- package/src/lib/date-input.styles.d.ts +9 -35
package/index.cjs.js
CHANGED
|
@@ -1978,7 +1978,7 @@ const DateInput = /*#__PURE__*/react.forwardRef(({
|
|
|
1978
1978
|
addOpenPositionClass
|
|
1979
1979
|
} = uiUtils.useOpenPosition(calendarRef, containerRef, ['top', 'bottom'], 'bottom');
|
|
1980
1980
|
const updateDate = e => {
|
|
1981
|
-
const value = !year.current
|
|
1981
|
+
const value = !year.current || !month.current || !day.current ? '' : `${year.current}-${month.current}-${day.current}`;
|
|
1982
1982
|
onChange && onChange(Object.assign(Object.assign({}, e), {
|
|
1983
1983
|
target: Object.assign(Object.assign({}, e.target), {
|
|
1984
1984
|
value
|
|
@@ -2028,7 +2028,7 @@ const DateInput = /*#__PURE__*/react.forwardRef(({
|
|
|
2028
2028
|
setInputValue(date);
|
|
2029
2029
|
setIsCalendarOpen(false);
|
|
2030
2030
|
updateDate({});
|
|
2031
|
-
}, [
|
|
2031
|
+
}, []);
|
|
2032
2032
|
react.useEffect(() => {
|
|
2033
2033
|
if (!value || typeof value !== 'string') return;
|
|
2034
2034
|
setInputValue(value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/atoms-date-input",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@bolttech/atoms-input": "^0.26.1",
|
|
6
6
|
"@bolttech/molecules-calendar": "^0.25.1",
|
|
@@ -11,6 +11,6 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"react": "18.2.0",
|
|
13
13
|
"react-dom": "18.2.0",
|
|
14
|
-
"styled-components": "
|
|
14
|
+
"styled-components": "5.3.11"
|
|
15
15
|
}
|
|
16
16
|
}
|
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}>> & string;
|
|
11
|
-
export declare const Container: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
12
|
-
$hasError: boolean;
|
|
13
|
-
$hasValue: boolean;
|
|
14
|
-
$variant: InputVariants;
|
|
15
|
-
}>> & string;
|
|
16
|
-
export declare const LeftContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
17
|
-
$direction?: string | undefined;
|
|
18
|
-
$variant?: InputVariants | undefined;
|
|
19
|
-
$before: boolean;
|
|
20
|
-
}>> & string;
|
|
21
|
-
export declare const Input: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {
|
|
22
|
-
$variant: InputVariants;
|
|
23
|
-
$width?: string | undefined;
|
|
24
|
-
}>> & string;
|
|
25
|
-
export declare const Icon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
26
|
-
$hasError: boolean;
|
|
27
|
-
$variant: InputVariants;
|
|
28
|
-
}>> & string;
|
|
29
|
-
export declare const Error: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
30
|
-
$variant: InputVariants;
|
|
31
|
-
}>> & string;
|
|
32
|
-
export declare const DatePickerContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
33
|
-
disabled?: boolean | undefined;
|
|
34
|
-
}>> & string;
|
|
35
|
-
export declare const CalendarContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
1
|
+
export declare const Label: any;
|
|
2
|
+
export declare const InputWrapper: any;
|
|
3
|
+
export declare const Container: any;
|
|
4
|
+
export declare const LeftContainer: any;
|
|
5
|
+
export declare const Input: any;
|
|
6
|
+
export declare const Icon: any;
|
|
7
|
+
export declare const Error: any;
|
|
8
|
+
export declare const DatePickerContainer: any;
|
|
9
|
+
export declare const CalendarContainer: any;
|