@wrdagency/blockout 0.1.8 → 0.1.9
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HTMLInputAutoCompleteAttribute } from 'react';
|
|
1
|
+
import { HTMLAttributes, HTMLInputAutoCompleteAttribute } from 'react';
|
|
2
2
|
import { ControlFC } from '../base-control/props';
|
|
3
3
|
import { DateFormat, DateString } from './types';
|
|
4
4
|
interface DateControlProps {
|
|
@@ -9,6 +9,7 @@ interface DateControlProps {
|
|
|
9
9
|
viewFormat?: DateFormat;
|
|
10
10
|
separator?: string;
|
|
11
11
|
fullYear?: boolean;
|
|
12
|
+
"aria-invalid"?: HTMLAttributes<HTMLInputElement>["aria-invalid"];
|
|
12
13
|
}
|
|
13
14
|
export declare const DateControl: ControlFC<DateControlProps>;
|
|
14
15
|
export {};
|
|
@@ -1,38 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createElement as
|
|
3
|
-
import { useSplitInput as
|
|
1
|
+
import { jsx as a, jsxs as C, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { createElement as h } from "react";
|
|
3
|
+
import { useSplitInput as v } from "../../../hooks/input.js";
|
|
4
4
|
import { noop as F } from "../../../utils/noop.js";
|
|
5
5
|
import { BaseControl as x } from "../base-control/index.js";
|
|
6
6
|
import { useBaseControlProps as D } from "../base-control/props.js";
|
|
7
|
-
import { DateComponentInput as
|
|
8
|
-
import { getDefaultFormat as
|
|
9
|
-
import '../../../assets/index6.css';const
|
|
7
|
+
import { DateComponentInput as I } from "./component.js";
|
|
8
|
+
import { getDefaultFormat as e } from "./types.js";
|
|
9
|
+
import '../../../assets/index6.css';const y = (n) => {
|
|
10
10
|
const { baseProps: m, controlProps: p } = D(n, {
|
|
11
11
|
className: "component-date-control"
|
|
12
|
-
}), { register: s } =
|
|
13
|
-
value:
|
|
14
|
-
onChangeValue:
|
|
15
|
-
autoComplete:
|
|
16
|
-
dataFormat:
|
|
17
|
-
viewFormat: o =
|
|
12
|
+
}), { register: s } = v(), {
|
|
13
|
+
value: i = "",
|
|
14
|
+
onChangeValue: l = F,
|
|
15
|
+
autoComplete: c,
|
|
16
|
+
dataFormat: d = e(),
|
|
17
|
+
viewFormat: o = e(),
|
|
18
|
+
"aria-invalid": f
|
|
18
19
|
} = p;
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
20
|
+
return /* @__PURE__ */ a(x, { ...m, children: o.components.map((r, t, u) => /* @__PURE__ */ C(g, { children: [
|
|
21
|
+
/* @__PURE__ */ h(
|
|
22
|
+
I,
|
|
22
23
|
{
|
|
23
|
-
...s(
|
|
24
|
-
key:
|
|
25
|
-
component:
|
|
26
|
-
dataFormat:
|
|
24
|
+
...s(t),
|
|
25
|
+
key: r,
|
|
26
|
+
component: r,
|
|
27
|
+
dataFormat: d,
|
|
27
28
|
viewFormat: o,
|
|
28
|
-
value:
|
|
29
|
-
onChangeValue:
|
|
30
|
-
autoComplete:
|
|
29
|
+
value: i,
|
|
30
|
+
onChangeValue: l,
|
|
31
|
+
autoComplete: c,
|
|
32
|
+
"aria-invalid": f
|
|
31
33
|
}
|
|
32
34
|
),
|
|
33
|
-
u.length - 1 !==
|
|
35
|
+
u.length - 1 !== t && /* @__PURE__ */ a("span", { className: "component-date-control__separator", children: o.separator })
|
|
34
36
|
] })) });
|
|
35
37
|
};
|
|
36
38
|
export {
|
|
37
|
-
|
|
39
|
+
y as DateControl
|
|
38
40
|
};
|