@j2-health/design-system 0.3.2 → 0.5.0
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/README.md +84 -31
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/src/components/alert/Alert.cjs +12 -2
- package/dist/src/components/alert/Alert.cjs.map +1 -1
- package/dist/src/components/alert/Alert.d.ts +1 -1
- package/dist/src/components/alert/Alert.js +12 -2
- package/dist/src/components/alert/Alert.js.map +1 -1
- package/dist/src/components/alert/Alert.module.css.cjs +1 -1
- package/dist/src/components/alert/Alert.module.css.js +1 -1
- package/dist/src/components/barchart/BarChart.cjs +2 -2
- package/dist/src/components/barchart/BarChart.cjs.map +1 -1
- package/dist/src/components/barchart/BarChart.js +2 -2
- package/dist/src/components/barchart/BarChart.js.map +1 -1
- package/dist/src/components/card/Card.cjs +1 -1
- package/dist/src/components/card/Card.cjs.map +1 -1
- package/dist/src/components/card/Card.js +1 -1
- package/dist/src/components/card/Card.js.map +1 -1
- package/dist/src/components/collapse/Collapse.module.css.cjs +3 -3
- package/dist/src/components/collapse/Collapse.module.css.js +3 -3
- package/dist/src/components/drawer/Drawer.cjs +3 -1
- package/dist/src/components/drawer/Drawer.cjs.map +1 -1
- package/dist/src/components/drawer/Drawer.js +3 -1
- package/dist/src/components/drawer/Drawer.js.map +1 -1
- package/dist/src/components/form/Form.cjs +21 -4
- package/dist/src/components/form/Form.cjs.map +1 -1
- package/dist/src/components/form/Form.d.ts +10 -3
- package/dist/src/components/form/Form.js +20 -3
- package/dist/src/components/form/Form.js.map +1 -1
- package/dist/src/components/form/FormItem.cjs +42 -0
- package/dist/src/components/form/FormItem.cjs.map +1 -0
- package/dist/src/components/form/FormItem.d.ts +10 -0
- package/dist/src/components/form/FormItem.js +42 -0
- package/dist/src/components/form/FormItem.js.map +1 -0
- package/dist/src/components/form/FormItemFieldContext.cjs +8 -0
- package/dist/src/components/form/FormItemFieldContext.cjs.map +1 -0
- package/dist/src/components/form/FormItemFieldContext.d.ts +2 -0
- package/dist/src/components/form/FormItemFieldContext.js +8 -0
- package/dist/src/components/form/FormItemFieldContext.js.map +1 -0
- package/dist/src/components/form/FormikField.cjs +20 -0
- package/dist/src/components/form/FormikField.cjs.map +1 -0
- package/dist/src/components/form/FormikField.d.ts +8 -0
- package/dist/src/components/form/FormikField.js +20 -0
- package/dist/src/components/form/FormikField.js.map +1 -0
- package/dist/src/components/input/AntdInput.d.ts +77 -31
- package/dist/src/components/input/AntdSearchInput.d.ts +82 -30
- package/dist/src/components/input/Input.cjs +29 -3
- package/dist/src/components/input/Input.cjs.map +1 -1
- package/dist/src/components/input/Input.d.ts +4 -3
- package/dist/src/components/input/Input.js +29 -3
- package/dist/src/components/input/Input.js.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.cjs +20 -5
- package/dist/src/components/inputnumber/InputNumber.cjs.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.d.ts +4 -3
- package/dist/src/components/inputnumber/InputNumber.js +19 -4
- package/dist/src/components/inputnumber/InputNumber.js.map +1 -1
- package/dist/src/components/inputnumber/InputNumber.module.css.cjs +1 -1
- package/dist/src/components/inputnumber/InputNumber.module.css.js +1 -1
- package/dist/src/components/manageColumns/ManageColumnsItem.cjs +76 -0
- package/dist/src/components/manageColumns/ManageColumnsItem.cjs.map +1 -0
- package/dist/src/components/manageColumns/ManageColumnsItem.d.ts +7 -0
- package/dist/src/components/manageColumns/ManageColumnsItem.js +76 -0
- package/dist/src/components/manageColumns/ManageColumnsItem.js.map +1 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.cjs +79 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.cjs.map +1 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.d.ts +18 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.js +79 -0
- package/dist/src/components/manageColumns/ManageColumnsPanel.js.map +1 -0
- package/dist/src/components/manageColumns/SelectAll.cjs +27 -0
- package/dist/src/components/manageColumns/SelectAll.cjs.map +1 -0
- package/dist/src/components/manageColumns/SelectAll.d.ts +15 -0
- package/dist/src/components/manageColumns/SelectAll.js +27 -0
- package/dist/src/components/manageColumns/SelectAll.js.map +1 -0
- package/dist/src/components/manageColumns/index.d.ts +4 -0
- package/dist/src/components/modal/Modal.cjs +0 -1
- package/dist/src/components/modal/Modal.cjs.map +1 -1
- package/dist/src/components/modal/Modal.js +0 -1
- package/dist/src/components/modal/Modal.js.map +1 -1
- package/dist/src/components/notification/Notification.module.css.cjs +1 -1
- package/dist/src/components/notification/Notification.module.css.js +1 -1
- package/dist/src/components/notification/useNotification.cjs +5 -2
- package/dist/src/components/notification/useNotification.cjs.map +1 -1
- package/dist/src/components/notification/useNotification.js +5 -2
- package/dist/src/components/notification/useNotification.js.map +1 -1
- package/dist/src/components/pagination/Pagination.cjs +2 -0
- package/dist/src/components/pagination/Pagination.cjs.map +1 -1
- package/dist/src/components/pagination/Pagination.js +2 -0
- package/dist/src/components/pagination/Pagination.js.map +1 -1
- package/dist/src/components/popover/Popover.cjs +3 -1
- package/dist/src/components/popover/Popover.cjs.map +1 -1
- package/dist/src/components/popover/Popover.d.ts +1 -1
- package/dist/src/components/popover/Popover.js +3 -1
- package/dist/src/components/popover/Popover.js.map +1 -1
- package/dist/src/components/popover/Popover.module.css.cjs +9 -9
- package/dist/src/components/popover/Popover.module.css.js +9 -9
- package/dist/src/components/select/Select.cjs +29 -13
- package/dist/src/components/select/Select.cjs.map +1 -1
- package/dist/src/components/select/Select.js +29 -13
- package/dist/src/components/select/Select.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.cjs.map +1 -1
- package/dist/src/components/select/SummarizedSelect.js.map +1 -1
- package/dist/src/components/select/SummarizedSelect.module.css.cjs +8 -8
- package/dist/src/components/select/SummarizedSelect.module.css.js +8 -8
- package/dist/src/components/steps/Steps.cjs +14 -4
- package/dist/src/components/steps/Steps.cjs.map +1 -1
- package/dist/src/components/steps/Steps.d.ts +3 -3
- package/dist/src/components/steps/Steps.js +14 -4
- package/dist/src/components/steps/Steps.js.map +1 -1
- package/dist/src/components/table/Table.cjs +1 -1
- package/dist/src/components/table/Table.cjs.map +1 -1
- package/dist/src/components/table/Table.d.ts +4 -1
- package/dist/src/components/table/Table.js +1 -1
- package/dist/src/components/table/Table.js.map +1 -1
- package/dist/src/components/tag/Tag.cjs +4 -0
- package/dist/src/components/tag/Tag.cjs.map +1 -1
- package/dist/src/components/tag/Tag.d.ts +1 -1
- package/dist/src/components/tag/Tag.js +4 -0
- package/dist/src/components/tag/Tag.js.map +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.cjs +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.cjs.map +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.js +1 -1
- package/dist/src/components/vennDiagram/VennDiagram.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/style.css +92 -78
- package/dist/tailwind.cjs +4 -0
- package/dist/tailwind.cjs.map +1 -1
- package/dist/tailwind.config.d.ts +6 -0
- package/dist/tailwind.js +4 -0
- package/dist/tailwind.js.map +1 -1
- package/package.json +38 -26
- package/src/stylesheets/base.css +322 -0
- package/src/stylesheets/fonts.css +1 -0
- package/src/stylesheets/index.css +3 -327
- package/src/stylesheets/tailwind-v3.css +3 -0
- package/src/stylesheets/tailwind.css +4 -0
|
@@ -14,7 +14,9 @@ const Drawer = ({
|
|
|
14
14
|
{
|
|
15
15
|
...props,
|
|
16
16
|
closable: false,
|
|
17
|
-
...fillPage && {
|
|
17
|
+
...fillPage && {
|
|
18
|
+
size: props.placement === "top" || props.placement === "bottom" ? "100vh" : "100vw"
|
|
19
|
+
},
|
|
18
20
|
...footer && { footer },
|
|
19
21
|
extra: /* @__PURE__ */ jsxs(Space, { children: [
|
|
20
22
|
extraContent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sources":["../../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { Drawer as AntdDrawer, DrawerProps, Space } from 'antd'\nimport { Button } from '../button'\nimport { XIcon } from '@phosphor-icons/react'\nimport './Drawer.css'\n\ntype AllProps = Omit<DrawerProps, 'extra' | 'closable'> & {\n fillPage?: boolean\n footer?: React.ReactNode\n extraContent?: React.ReactNode\n}\n\nexport type Props = Expand<AllProps>\n\nexport const Drawer = ({\n fillPage = false,\n footer,\n extraContent,\n ...props\n}: Props) => {\n return (\n <AntdDrawer\n {...props}\n closable={false}\n {...(fillPage && {
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { Drawer as AntdDrawer, DrawerProps, Space } from 'antd'\nimport { Button } from '../button'\nimport { XIcon } from '@phosphor-icons/react'\nimport './Drawer.css'\n\ntype AllProps = Omit<DrawerProps, 'extra' | 'closable'> & {\n fillPage?: boolean\n footer?: React.ReactNode\n extraContent?: React.ReactNode\n}\n\nexport type Props = Expand<AllProps>\n\nexport const Drawer = ({\n fillPage = false,\n footer,\n extraContent,\n ...props\n}: Props) => {\n return (\n <AntdDrawer\n {...props}\n closable={false}\n {...(fillPage && {\n size:\n props.placement === 'top' || props.placement === 'bottom'\n ? '100vh'\n : '100vw',\n })}\n {...(footer && { footer })}\n extra={\n <Space>\n {extraContent}\n <Button\n className=\"p-0\"\n type=\"link\"\n onClick={props.onClose}\n aria-label=\"Close\"\n >\n <XIcon size={22} weight=\"regular\" />\n </Button>\n </Space>\n }\n className=\"j2-drawer\"\n />\n )\n}\n"],"names":["AntdDrawer"],"mappings":";;;;;AAaO,MAAM,SAAS,CAAC;AAAA,EACrB,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU;AAAA,MACT,GAAI,YAAY;AAAA,QACf,MACE,MAAM,cAAc,SAAS,MAAM,cAAc,WAC7C,UACA;AAAA,MAAA;AAAA,MAEP,GAAI,UAAU,EAAE,OAAA;AAAA,MACjB,4BACG,OAAA,EACE,UAAA;AAAA,QAAA;AAAA,QACD;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,MAAK;AAAA,YACL,SAAS,MAAM;AAAA,YACf,cAAW;AAAA,YAEX,UAAA,oBAAC,OAAA,EAAM,MAAM,IAAI,QAAO,UAAA,CAAU;AAAA,UAAA;AAAA,QAAA;AAAA,MACpC,GACF;AAAA,MAEF,WAAU;AAAA,IAAA;AAAA,EAAA;AAGhB;"}
|
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const
|
|
4
|
+
const antd = require("antd");
|
|
5
|
+
const formik = require("formik");
|
|
6
|
+
const FormItem = require("./FormItem.cjs");
|
|
5
7
|
;/* empty css */
|
|
6
|
-
const Form = ({ children, ...props }) => {
|
|
7
|
-
|
|
8
|
+
const Form = ({ children, onFinish, onReset, ...props }) => {
|
|
9
|
+
const { handleSubmit, handleReset } = formik.useFormikContext();
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
antd.Form,
|
|
12
|
+
{
|
|
13
|
+
...props,
|
|
14
|
+
onFinish: (values) => {
|
|
15
|
+
handleSubmit();
|
|
16
|
+
onFinish == null ? void 0 : onFinish(values);
|
|
17
|
+
},
|
|
18
|
+
onReset: (event) => {
|
|
19
|
+
handleReset(event);
|
|
20
|
+
onReset == null ? void 0 : onReset(event);
|
|
21
|
+
},
|
|
22
|
+
children
|
|
23
|
+
}
|
|
24
|
+
);
|
|
8
25
|
};
|
|
9
|
-
Form.Item =
|
|
26
|
+
Form.Item = FormItem.FormItem;
|
|
10
27
|
exports.Form = Form;
|
|
11
28
|
//# sourceMappingURL=Form.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.cjs","sources":["../../../../src/components/form/Form.tsx"],"sourcesContent":["import { FormProps } from 'antd'\nimport {
|
|
1
|
+
{"version":3,"file":"Form.cjs","sources":["../../../../src/components/form/Form.tsx"],"sourcesContent":["import { Form as AntdForm, type FormProps } from 'antd'\nimport { useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormItem } from './FormItem'\nimport './Form.css'\n\ntype Props = Expand<Omit<FormProps, 'children'> & { children?: ReactNode }>\n\nexport const Form = ({ children, onFinish, onReset, ...props }: Props) => {\n const { handleSubmit, handleReset } = useFormikContext()\n return (\n <AntdForm\n {...props}\n onFinish={(values) => {\n handleSubmit()\n onFinish?.(values)\n }}\n onReset={(event) => {\n handleReset(event)\n onReset?.(event)\n }}\n >\n {children}\n </AntdForm>\n )\n}\n\nForm.Item = FormItem\n"],"names":["useFormikContext","jsx","AntdForm","FormItem"],"mappings":";;;;;;;AAQO,MAAM,OAAO,CAAC,EAAE,UAAU,UAAU,SAAS,GAAG,YAAmB;AACxE,QAAM,EAAE,cAAc,YAAA,IAAgBA,wBAAA;AACtC,SACEC,2BAAAA;AAAAA,IAACC,KAAAA;AAAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU,CAAC,WAAW;AACpB,qBAAA;AACA,6CAAW;AAAA,MACb;AAAA,MACA,SAAS,CAAC,UAAU;AAClB,oBAAY,KAAK;AACjB,2CAAU;AAAA,MACZ;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,KAAK,OAAOC,SAAAA;;"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { FormProps } from 'antd';
|
|
2
|
-
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type Props = Expand<Omit<FormProps, 'children'> & {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}>;
|
|
3
6
|
export declare const Form: {
|
|
4
|
-
({ children, ...props }: Props): import("react").JSX.Element;
|
|
5
|
-
Item: ({ name,
|
|
7
|
+
({ children, onFinish, onReset, ...props }: Props): import("react").JSX.Element;
|
|
8
|
+
Item: ({ name, validate, children, showValidateSuccess, showInitialErrorAfterTouched, ...props }: Omit<import('antd').FormItemProps<any>, "children" | "name"> & Pick<import('./FormikField.js').FormikFieldProps, "name" | "validate"> & {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
showValidateSuccess?: boolean;
|
|
11
|
+
showInitialErrorAfterTouched?: boolean;
|
|
12
|
+
}) => import("react").JSX.Element;
|
|
6
13
|
};
|
|
7
14
|
export {};
|
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Form as Form$1
|
|
2
|
+
import { Form as Form$1 } from "antd";
|
|
3
|
+
import { useFormikContext } from "formik";
|
|
4
|
+
import { FormItem } from "./FormItem.js";
|
|
3
5
|
/* empty css */
|
|
4
|
-
const Form = ({ children, ...props }) => {
|
|
5
|
-
|
|
6
|
+
const Form = ({ children, onFinish, onReset, ...props }) => {
|
|
7
|
+
const { handleSubmit, handleReset } = useFormikContext();
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
Form$1,
|
|
10
|
+
{
|
|
11
|
+
...props,
|
|
12
|
+
onFinish: (values) => {
|
|
13
|
+
handleSubmit();
|
|
14
|
+
onFinish == null ? void 0 : onFinish(values);
|
|
15
|
+
},
|
|
16
|
+
onReset: (event) => {
|
|
17
|
+
handleReset(event);
|
|
18
|
+
onReset == null ? void 0 : onReset(event);
|
|
19
|
+
},
|
|
20
|
+
children
|
|
21
|
+
}
|
|
22
|
+
);
|
|
6
23
|
};
|
|
7
24
|
Form.Item = FormItem;
|
|
8
25
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../src/components/form/Form.tsx"],"sourcesContent":["import { FormProps } from 'antd'\nimport {
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../src/components/form/Form.tsx"],"sourcesContent":["import { Form as AntdForm, type FormProps } from 'antd'\nimport { useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormItem } from './FormItem'\nimport './Form.css'\n\ntype Props = Expand<Omit<FormProps, 'children'> & { children?: ReactNode }>\n\nexport const Form = ({ children, onFinish, onReset, ...props }: Props) => {\n const { handleSubmit, handleReset } = useFormikContext()\n return (\n <AntdForm\n {...props}\n onFinish={(values) => {\n handleSubmit()\n onFinish?.(values)\n }}\n onReset={(event) => {\n handleReset(event)\n onReset?.(event)\n }}\n >\n {children}\n </AntdForm>\n )\n}\n\nForm.Item = FormItem\n"],"names":["AntdForm"],"mappings":";;;;;AAQO,MAAM,OAAO,CAAC,EAAE,UAAU,UAAU,SAAS,GAAG,YAAmB;AACxE,QAAM,EAAE,cAAc,YAAA,IAAgB,iBAAA;AACtC,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU,CAAC,WAAW;AACpB,qBAAA;AACA,6CAAW;AAAA,MACb;AAAA,MACA,SAAS,CAAC,UAAU;AAClB,oBAAY,KAAK;AACjB,2CAAU;AAAA,MACZ;AAAA,MAEC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,KAAK,OAAO;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const antd = require("antd");
|
|
5
|
+
const formik = require("formik");
|
|
6
|
+
const FormikField = require("./FormikField.cjs");
|
|
7
|
+
const FormItemFieldContext = require("./FormItemFieldContext.cjs");
|
|
8
|
+
const FormItem = ({
|
|
9
|
+
name,
|
|
10
|
+
validate,
|
|
11
|
+
children,
|
|
12
|
+
showValidateSuccess,
|
|
13
|
+
showInitialErrorAfterTouched = false,
|
|
14
|
+
...props
|
|
15
|
+
}) => {
|
|
16
|
+
const form = formik.useFormikContext();
|
|
17
|
+
const error = formik.getIn(form.errors, name);
|
|
18
|
+
const initialError = formik.getIn(form.initialErrors, name);
|
|
19
|
+
const touched = formik.getIn(form.touched, name, false);
|
|
20
|
+
const isTouched = Array.isArray(touched) ? touched.length === 0 || touched.some(Boolean) : touched;
|
|
21
|
+
const hasError = error !== void 0 && isTouched;
|
|
22
|
+
const showInitialError = initialError !== void 0 && (!isTouched || showInitialErrorAfterTouched);
|
|
23
|
+
const isValid = !error && isTouched;
|
|
24
|
+
const item = /* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
+
antd.Form.Item,
|
|
26
|
+
{
|
|
27
|
+
htmlFor: name,
|
|
28
|
+
id: name,
|
|
29
|
+
validateStatus: hasError || initialError !== void 0 && !isTouched ? "error" : isValid && showValidateSuccess ? "success" : void 0,
|
|
30
|
+
hasFeedback: isValid,
|
|
31
|
+
help: hasError || showInitialError ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32
|
+
hasError && /* @__PURE__ */ jsxRuntime.jsx("li", { children: error }),
|
|
33
|
+
showInitialError && /* @__PURE__ */ jsxRuntime.jsx("li", { children: initialError })
|
|
34
|
+
] }) : null,
|
|
35
|
+
...props,
|
|
36
|
+
children
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
return validate ? /* @__PURE__ */ jsxRuntime.jsx(FormikField.FormikField, { name, validate, children: (fieldProps) => /* @__PURE__ */ jsxRuntime.jsx(FormItemFieldContext.FormItemFieldContext.Provider, { value: fieldProps, children: item }) }) : item;
|
|
40
|
+
};
|
|
41
|
+
exports.FormItem = FormItem;
|
|
42
|
+
//# sourceMappingURL=FormItem.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormItem.cjs","sources":["../../../../src/components/form/FormItem.tsx"],"sourcesContent":["import { Form as AntdForm, type FormItemProps as AntdFormItemProps } from 'antd'\nimport { getIn, useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormikField, type FormikFieldProps } from './FormikField'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\ntype Props = Omit<AntdFormItemProps, 'name' | 'children'> &\n Pick<FormikFieldProps, 'name' | 'validate'> & {\n children: ReactNode\n showValidateSuccess?: boolean\n showInitialErrorAfterTouched?: boolean\n }\n\nexport const FormItem = ({\n name,\n validate,\n children,\n showValidateSuccess,\n showInitialErrorAfterTouched = false,\n ...props\n}: Props) => {\n const form = useFormikContext()\n const error = getIn(form.errors, name)\n const initialError = getIn(form.initialErrors, name)\n const touched = getIn(form.touched, name, false)\n const isTouched = Array.isArray(touched)\n ? touched.length === 0 || touched.some(Boolean)\n : touched\n const hasError = error !== undefined && isTouched\n const showInitialError =\n initialError !== undefined && (!isTouched || showInitialErrorAfterTouched)\n const isValid = !error && isTouched\n\n const item = (\n <AntdForm.Item\n htmlFor={name}\n id={name}\n validateStatus={\n hasError || (initialError !== undefined && !isTouched)\n ? 'error'\n : isValid && showValidateSuccess\n ? 'success'\n : undefined\n }\n hasFeedback={isValid}\n help={\n hasError || showInitialError ? (\n <>\n {hasError && <li>{error}</li>}\n {showInitialError && <li>{initialError}</li>}\n </>\n ) : null\n }\n {...props}\n >\n {/* Formik owns values and validation; do not register an antd field. */}\n {children}\n </AntdForm.Item>\n )\n // Display-only items must not register a second field over their control.\n // When validate is supplied, the item owns validation (as before).\n return validate ? (\n <FormikField name={name} validate={validate}>\n {(fieldProps) => (\n <FormItemFieldContext.Provider value={fieldProps}>\n {item}\n </FormItemFieldContext.Provider>\n )}\n </FormikField>\n ) : (\n item\n )\n}\n"],"names":["useFormikContext","getIn","jsx","AntdForm","jsxs","Fragment","FormikField","FormItemFieldContext"],"mappings":";;;;;;;AAaO,MAAM,WAAW,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,+BAA+B;AAAA,EAC/B,GAAG;AACL,MAAa;AACX,QAAM,OAAOA,OAAAA,iBAAA;AACb,QAAM,QAAQC,OAAAA,MAAM,KAAK,QAAQ,IAAI;AACrC,QAAM,eAAeA,OAAAA,MAAM,KAAK,eAAe,IAAI;AACnD,QAAM,UAAUA,OAAAA,MAAM,KAAK,SAAS,MAAM,KAAK;AAC/C,QAAM,YAAY,MAAM,QAAQ,OAAO,IACnC,QAAQ,WAAW,KAAK,QAAQ,KAAK,OAAO,IAC5C;AACJ,QAAM,WAAW,UAAU,UAAa;AACxC,QAAM,mBACJ,iBAAiB,WAAc,CAAC,aAAa;AAC/C,QAAM,UAAU,CAAC,SAAS;AAE1B,QAAM,OACJC,2BAAAA;AAAAA,IAACC,KAAAA,KAAS;AAAA,IAAT;AAAA,MACC,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,gBACE,YAAa,iBAAiB,UAAa,CAAC,YACxC,UACA,WAAW,sBACT,YACA;AAAA,MAER,aAAa;AAAA,MACb,MACE,YAAY,mBACVC,2BAAAA,KAAAC,WAAAA,UAAA,EACG,UAAA;AAAA,QAAA,YAAYH,2BAAAA,IAAC,QAAI,UAAA,MAAA,CAAM;AAAA,QACvB,oBAAoBA,2BAAAA,IAAC,MAAA,EAAI,UAAA,aAAA,CAAa;AAAA,MAAA,EAAA,CACzC,IACE;AAAA,MAEL,GAAG;AAAA,MAGH;AAAA,IAAA;AAAA,EAAA;AAKL,SAAO,WACLA,2BAAAA,IAACI,yBAAA,EAAY,MAAY,UACtB,UAAA,CAAC,eACAJ,2BAAAA,IAACK,qBAAAA,qBAAqB,UAArB,EAA8B,OAAO,YACnC,UAAA,KAAA,CACH,GAEJ,IAEA;AAEJ;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormItemProps as AntdFormItemProps } from 'antd';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { FormikFieldProps } from './FormikField.js';
|
|
4
|
+
type Props = Omit<AntdFormItemProps, 'name' | 'children'> & Pick<FormikFieldProps, 'name' | 'validate'> & {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
showValidateSuccess?: boolean;
|
|
7
|
+
showInitialErrorAfterTouched?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const FormItem: ({ name, validate, children, showValidateSuccess, showInitialErrorAfterTouched, ...props }: Props) => import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Form } from "antd";
|
|
3
|
+
import { useFormikContext, getIn } from "formik";
|
|
4
|
+
import { FormikField } from "./FormikField.js";
|
|
5
|
+
import { FormItemFieldContext } from "./FormItemFieldContext.js";
|
|
6
|
+
const FormItem = ({
|
|
7
|
+
name,
|
|
8
|
+
validate,
|
|
9
|
+
children,
|
|
10
|
+
showValidateSuccess,
|
|
11
|
+
showInitialErrorAfterTouched = false,
|
|
12
|
+
...props
|
|
13
|
+
}) => {
|
|
14
|
+
const form = useFormikContext();
|
|
15
|
+
const error = getIn(form.errors, name);
|
|
16
|
+
const initialError = getIn(form.initialErrors, name);
|
|
17
|
+
const touched = getIn(form.touched, name, false);
|
|
18
|
+
const isTouched = Array.isArray(touched) ? touched.length === 0 || touched.some(Boolean) : touched;
|
|
19
|
+
const hasError = error !== void 0 && isTouched;
|
|
20
|
+
const showInitialError = initialError !== void 0 && (!isTouched || showInitialErrorAfterTouched);
|
|
21
|
+
const isValid = !error && isTouched;
|
|
22
|
+
const item = /* @__PURE__ */ jsx(
|
|
23
|
+
Form.Item,
|
|
24
|
+
{
|
|
25
|
+
htmlFor: name,
|
|
26
|
+
id: name,
|
|
27
|
+
validateStatus: hasError || initialError !== void 0 && !isTouched ? "error" : isValid && showValidateSuccess ? "success" : void 0,
|
|
28
|
+
hasFeedback: isValid,
|
|
29
|
+
help: hasError || showInitialError ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
|
+
hasError && /* @__PURE__ */ jsx("li", { children: error }),
|
|
31
|
+
showInitialError && /* @__PURE__ */ jsx("li", { children: initialError })
|
|
32
|
+
] }) : null,
|
|
33
|
+
...props,
|
|
34
|
+
children
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
return validate ? /* @__PURE__ */ jsx(FormikField, { name, validate, children: (fieldProps) => /* @__PURE__ */ jsx(FormItemFieldContext.Provider, { value: fieldProps, children: item }) }) : item;
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
FormItem
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=FormItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormItem.js","sources":["../../../../src/components/form/FormItem.tsx"],"sourcesContent":["import { Form as AntdForm, type FormItemProps as AntdFormItemProps } from 'antd'\nimport { getIn, useFormikContext } from 'formik'\nimport type { ReactNode } from 'react'\nimport { FormikField, type FormikFieldProps } from './FormikField'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\ntype Props = Omit<AntdFormItemProps, 'name' | 'children'> &\n Pick<FormikFieldProps, 'name' | 'validate'> & {\n children: ReactNode\n showValidateSuccess?: boolean\n showInitialErrorAfterTouched?: boolean\n }\n\nexport const FormItem = ({\n name,\n validate,\n children,\n showValidateSuccess,\n showInitialErrorAfterTouched = false,\n ...props\n}: Props) => {\n const form = useFormikContext()\n const error = getIn(form.errors, name)\n const initialError = getIn(form.initialErrors, name)\n const touched = getIn(form.touched, name, false)\n const isTouched = Array.isArray(touched)\n ? touched.length === 0 || touched.some(Boolean)\n : touched\n const hasError = error !== undefined && isTouched\n const showInitialError =\n initialError !== undefined && (!isTouched || showInitialErrorAfterTouched)\n const isValid = !error && isTouched\n\n const item = (\n <AntdForm.Item\n htmlFor={name}\n id={name}\n validateStatus={\n hasError || (initialError !== undefined && !isTouched)\n ? 'error'\n : isValid && showValidateSuccess\n ? 'success'\n : undefined\n }\n hasFeedback={isValid}\n help={\n hasError || showInitialError ? (\n <>\n {hasError && <li>{error}</li>}\n {showInitialError && <li>{initialError}</li>}\n </>\n ) : null\n }\n {...props}\n >\n {/* Formik owns values and validation; do not register an antd field. */}\n {children}\n </AntdForm.Item>\n )\n // Display-only items must not register a second field over their control.\n // When validate is supplied, the item owns validation (as before).\n return validate ? (\n <FormikField name={name} validate={validate}>\n {(fieldProps) => (\n <FormItemFieldContext.Provider value={fieldProps}>\n {item}\n </FormItemFieldContext.Provider>\n )}\n </FormikField>\n ) : (\n item\n )\n}\n"],"names":["AntdForm"],"mappings":";;;;;AAaO,MAAM,WAAW,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,+BAA+B;AAAA,EAC/B,GAAG;AACL,MAAa;AACX,QAAM,OAAO,iBAAA;AACb,QAAM,QAAQ,MAAM,KAAK,QAAQ,IAAI;AACrC,QAAM,eAAe,MAAM,KAAK,eAAe,IAAI;AACnD,QAAM,UAAU,MAAM,KAAK,SAAS,MAAM,KAAK;AAC/C,QAAM,YAAY,MAAM,QAAQ,OAAO,IACnC,QAAQ,WAAW,KAAK,QAAQ,KAAK,OAAO,IAC5C;AACJ,QAAM,WAAW,UAAU,UAAa;AACxC,QAAM,mBACJ,iBAAiB,WAAc,CAAC,aAAa;AAC/C,QAAM,UAAU,CAAC,SAAS;AAE1B,QAAM,OACJ;AAAA,IAACA,KAAS;AAAA,IAAT;AAAA,MACC,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,gBACE,YAAa,iBAAiB,UAAa,CAAC,YACxC,UACA,WAAW,sBACT,YACA;AAAA,MAER,aAAa;AAAA,MACb,MACE,YAAY,mBACV,qBAAA,UAAA,EACG,UAAA;AAAA,QAAA,YAAY,oBAAC,QAAI,UAAA,MAAA,CAAM;AAAA,QACvB,oBAAoB,oBAAC,MAAA,EAAI,UAAA,aAAA,CAAa;AAAA,MAAA,EAAA,CACzC,IACE;AAAA,MAEL,GAAG;AAAA,MAGH;AAAA,IAAA;AAAA,EAAA;AAKL,SAAO,WACL,oBAAC,aAAA,EAAY,MAAY,UACtB,UAAA,CAAC,eACA,oBAAC,qBAAqB,UAArB,EAA8B,OAAO,YACnC,UAAA,KAAA,CACH,GAEJ,IAEA;AAEJ;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const FormItemFieldContext = React.createContext(
|
|
5
|
+
void 0
|
|
6
|
+
);
|
|
7
|
+
exports.FormItemFieldContext = FormItemFieldContext;
|
|
8
|
+
//# sourceMappingURL=FormItemFieldContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormItemFieldContext.cjs","sources":["../../../../src/components/form/FormItemFieldContext.ts"],"sourcesContent":["import type { FieldProps } from 'formik'\nimport { createContext } from 'react'\n\n// An item with its own validator owns the field registration. Its controls\n// reuse that binding so mounting or unmounting them cannot replace the validator.\nexport const FormItemFieldContext = createContext<FieldProps | undefined>(\n undefined\n)\n"],"names":["createContext"],"mappings":";;;AAKO,MAAM,uBAAuBA,MAAAA;AAAAA,EAClC;AACF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormItemFieldContext.js","sources":["../../../../src/components/form/FormItemFieldContext.ts"],"sourcesContent":["import type { FieldProps } from 'formik'\nimport { createContext } from 'react'\n\n// An item with its own validator owns the field registration. Its controls\n// reuse that binding so mounting or unmounting them cannot replace the validator.\nexport const FormItemFieldContext = createContext<FieldProps | undefined>(\n undefined\n)\n"],"names":[],"mappings":";AAKO,MAAM,uBAAuB;AAAA,EAClC;AACF;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const formik = require("formik");
|
|
5
|
+
const React = require("react");
|
|
6
|
+
const FormItemFieldContext = require("./FormItemFieldContext.cjs");
|
|
7
|
+
const FormikField = ({
|
|
8
|
+
fast,
|
|
9
|
+
children,
|
|
10
|
+
...props
|
|
11
|
+
}) => {
|
|
12
|
+
const itemField = React.useContext(FormItemFieldContext.FormItemFieldContext);
|
|
13
|
+
if ((itemField == null ? void 0 : itemField.field.name) === props.name) {
|
|
14
|
+
return children(itemField);
|
|
15
|
+
}
|
|
16
|
+
const Component = fast ? formik.FastField : formik.Field;
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ...props, children });
|
|
18
|
+
};
|
|
19
|
+
exports.FormikField = FormikField;
|
|
20
|
+
//# sourceMappingURL=FormikField.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormikField.cjs","sources":["../../../../src/components/form/FormikField.tsx"],"sourcesContent":["import { FastField, Field, type FieldConfig, type FieldProps } from 'formik'\nimport { useContext, type ReactNode } from 'react'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\nexport type FormikFieldProps = Pick<FieldConfig, 'name' | 'validate'> & {\n fast?: boolean\n}\n\nexport const FormikField = ({\n fast,\n children,\n ...props\n}: FormikFieldProps & { children: (props: FieldProps) => ReactNode }) => {\n const itemField = useContext(FormItemFieldContext)\n if (itemField?.field.name === props.name) {\n return children(itemField)\n }\n const Component = fast ? FastField : Field\n return <Component {...props}>{children}</Component>\n}\n"],"names":["useContext","FormItemFieldContext","FastField","Field","jsx"],"mappings":";;;;;;AAQO,MAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAyE;AACvE,QAAM,YAAYA,MAAAA,WAAWC,yCAAoB;AACjD,OAAI,uCAAW,MAAM,UAAS,MAAM,MAAM;AACxC,WAAO,SAAS,SAAS;AAAA,EAC3B;AACA,QAAM,YAAY,OAAOC,OAAAA,YAAYC,OAAAA;AACrC,SAAOC,2BAAAA,IAAC,WAAA,EAAW,GAAG,OAAQ,SAAA,CAAS;AACzC;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FieldConfig, FieldProps } from 'formik';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type FormikFieldProps = Pick<FieldConfig, 'name' | 'validate'> & {
|
|
4
|
+
fast?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare const FormikField: ({ fast, children, ...props }: FormikFieldProps & {
|
|
7
|
+
children: (props: FieldProps) => ReactNode;
|
|
8
|
+
}) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import('react').ReactPortal | import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FastField, Field } from "formik";
|
|
3
|
+
import { useContext } from "react";
|
|
4
|
+
import { FormItemFieldContext } from "./FormItemFieldContext.js";
|
|
5
|
+
const FormikField = ({
|
|
6
|
+
fast,
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}) => {
|
|
10
|
+
const itemField = useContext(FormItemFieldContext);
|
|
11
|
+
if ((itemField == null ? void 0 : itemField.field.name) === props.name) {
|
|
12
|
+
return children(itemField);
|
|
13
|
+
}
|
|
14
|
+
const Component = fast ? FastField : Field;
|
|
15
|
+
return /* @__PURE__ */ jsx(Component, { ...props, children });
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
FormikField
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=FormikField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormikField.js","sources":["../../../../src/components/form/FormikField.tsx"],"sourcesContent":["import { FastField, Field, type FieldConfig, type FieldProps } from 'formik'\nimport { useContext, type ReactNode } from 'react'\nimport { FormItemFieldContext } from './FormItemFieldContext'\n\nexport type FormikFieldProps = Pick<FieldConfig, 'name' | 'validate'> & {\n fast?: boolean\n}\n\nexport const FormikField = ({\n fast,\n children,\n ...props\n}: FormikFieldProps & { children: (props: FieldProps) => ReactNode }) => {\n const itemField = useContext(FormItemFieldContext)\n if (itemField?.field.name === props.name) {\n return children(itemField)\n }\n const Component = fast ? FastField : Field\n return <Component {...props}>{children}</Component>\n}\n"],"names":[],"mappings":";;;;AAQO,MAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAyE;AACvE,QAAM,YAAY,WAAW,oBAAoB;AACjD,OAAI,uCAAW,MAAM,UAAS,MAAM,MAAM;AACxC,WAAO,SAAS,SAAS;AAAA,EAC3B;AACA,QAAM,YAAY,OAAO,YAAY;AACrC,SAAO,oBAAC,WAAA,EAAW,GAAG,OAAQ,SAAA,CAAS;AACzC;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputRef } from 'antd';
|
|
1
|
+
import { InputProps as AntDInputProps, InputRef } from 'antd';
|
|
2
2
|
export type { InputRef };
|
|
3
3
|
export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
4
4
|
[x: `data-${string}`]: string | undefined;
|
|
@@ -10,14 +10,40 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
10
10
|
addonAfter?: import('react').ReactNode;
|
|
11
11
|
bordered?: boolean | undefined;
|
|
12
12
|
variant?: import('antd/es/config-provider').Variant | undefined;
|
|
13
|
-
classNames?:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
classNames?: ((info: {
|
|
14
|
+
props: AntDInputProps;
|
|
15
|
+
}) => import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepClassNameType<{
|
|
16
|
+
root?: string;
|
|
17
|
+
prefix?: string;
|
|
18
|
+
suffix?: string;
|
|
19
|
+
clear?: string;
|
|
20
|
+
input?: string;
|
|
21
|
+
count?: string;
|
|
22
|
+
} | undefined>) | import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepClassNameType<{
|
|
23
|
+
root?: string;
|
|
24
|
+
prefix?: string;
|
|
25
|
+
suffix?: string;
|
|
26
|
+
clear?: string;
|
|
27
|
+
input?: string;
|
|
28
|
+
count?: string;
|
|
29
|
+
} | undefined>;
|
|
30
|
+
styles?: ((info: {
|
|
31
|
+
props: AntDInputProps;
|
|
32
|
+
}) => import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepStylesType<{
|
|
33
|
+
root?: React.CSSProperties;
|
|
34
|
+
prefix?: React.CSSProperties;
|
|
35
|
+
suffix?: React.CSSProperties;
|
|
36
|
+
clear?: React.CSSProperties;
|
|
37
|
+
input?: React.CSSProperties;
|
|
38
|
+
count?: React.CSSProperties;
|
|
39
|
+
} | undefined>) | import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepStylesType<{
|
|
40
|
+
root?: React.CSSProperties;
|
|
41
|
+
prefix?: React.CSSProperties;
|
|
42
|
+
suffix?: React.CSSProperties;
|
|
43
|
+
clear?: React.CSSProperties;
|
|
44
|
+
input?: React.CSSProperties;
|
|
45
|
+
count?: React.CSSProperties;
|
|
46
|
+
} | undefined>;
|
|
21
47
|
children?: import('react').ReactNode;
|
|
22
48
|
form?: string | undefined | undefined;
|
|
23
49
|
slot?: string | undefined | undefined;
|
|
@@ -27,12 +53,16 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
27
53
|
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
28
54
|
className?: string | undefined | undefined;
|
|
29
55
|
color?: string | undefined | undefined;
|
|
56
|
+
height?: number | string | undefined | undefined;
|
|
30
57
|
id?: string | undefined | undefined;
|
|
31
58
|
lang?: string | undefined | undefined;
|
|
32
59
|
max?: number | string | undefined | undefined;
|
|
33
60
|
min?: number | string | undefined | undefined;
|
|
34
61
|
name?: string | undefined | undefined;
|
|
35
|
-
|
|
62
|
+
nonce?: string | undefined | undefined;
|
|
63
|
+
part?: string | undefined | undefined;
|
|
64
|
+
type?: import('@rc-component/input/lib/utils/types').LiteralUnion<"button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week", string> | undefined;
|
|
65
|
+
width?: number | string | undefined | undefined;
|
|
36
66
|
role?: import('react').AriaRole | undefined;
|
|
37
67
|
tabIndex?: number | undefined | undefined;
|
|
38
68
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
@@ -107,18 +137,18 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
107
137
|
onFocusCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
108
138
|
onBlur?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
109
139
|
onBlurCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
110
|
-
onChange?: import('react').ChangeEventHandler<HTMLInputElement> | undefined;
|
|
111
|
-
onChangeCapture?: import('react').
|
|
140
|
+
onChange?: import('react').ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined;
|
|
141
|
+
onChangeCapture?: import('react').ChangeEventHandler<HTMLInputElement, Element> | undefined;
|
|
112
142
|
onBeforeInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
113
|
-
onBeforeInputCapture?: import('react').
|
|
114
|
-
onInput?: import('react').
|
|
115
|
-
onInputCapture?: import('react').
|
|
116
|
-
onReset?: import('react').
|
|
117
|
-
onResetCapture?: import('react').
|
|
118
|
-
onSubmit?: import('react').
|
|
119
|
-
onSubmitCapture?: import('react').
|
|
120
|
-
onInvalid?: import('react').
|
|
121
|
-
onInvalidCapture?: import('react').
|
|
143
|
+
onBeforeInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
144
|
+
onInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
145
|
+
onInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
146
|
+
onReset?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
147
|
+
onResetCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
148
|
+
onSubmit?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
|
|
149
|
+
onSubmitCapture?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
|
|
150
|
+
onInvalid?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
151
|
+
onInvalidCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
122
152
|
onLoad?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
123
153
|
onLoadCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
124
154
|
onError?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
@@ -239,6 +269,8 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
239
269
|
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
|
240
270
|
onScroll?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
241
271
|
onScrollCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
272
|
+
onScrollEnd?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
273
|
+
onScrollEndCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
242
274
|
onWheel?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
|
243
275
|
onWheelCapture?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
|
244
276
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
@@ -247,13 +279,25 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
247
279
|
onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
248
280
|
onAnimationIteration?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
249
281
|
onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
282
|
+
onToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
|
|
283
|
+
onBeforeToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
|
|
284
|
+
onTransitionCancel?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
285
|
+
onTransitionCancelCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
250
286
|
onTransitionEnd?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
251
287
|
onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
252
|
-
|
|
288
|
+
onTransitionRun?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
289
|
+
onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
290
|
+
onTransitionStart?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
291
|
+
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
292
|
+
value?: import('@rc-component/input/lib/interface').ValueType;
|
|
253
293
|
prefixCls?: string | undefined;
|
|
294
|
+
list?: string | undefined | undefined;
|
|
254
295
|
step?: number | string | undefined | undefined;
|
|
255
296
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
256
|
-
|
|
297
|
+
hidden?: boolean | undefined | undefined;
|
|
298
|
+
content?: string | undefined | undefined;
|
|
299
|
+
multiple?: boolean | undefined | undefined;
|
|
300
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
257
301
|
defaultChecked?: boolean | undefined | undefined;
|
|
258
302
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
259
303
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -264,13 +308,12 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
264
308
|
contextMenu?: string | undefined | undefined;
|
|
265
309
|
dir?: string | undefined | undefined;
|
|
266
310
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
267
|
-
hidden?: boolean | undefined | undefined;
|
|
268
|
-
nonce?: string | undefined | undefined;
|
|
269
311
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
270
312
|
radioGroup?: string | undefined | undefined;
|
|
271
313
|
about?: string | undefined | undefined;
|
|
272
314
|
datatype?: string | undefined | undefined;
|
|
273
315
|
inlist?: any;
|
|
316
|
+
prefix?: import('react').ReactNode;
|
|
274
317
|
property?: string | undefined | undefined;
|
|
275
318
|
rel?: string | undefined | undefined;
|
|
276
319
|
resource?: string | undefined | undefined;
|
|
@@ -287,36 +330,39 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
287
330
|
results?: number | undefined | undefined;
|
|
288
331
|
security?: string | undefined | undefined;
|
|
289
332
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
333
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
334
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
335
|
+
popoverTarget?: string | undefined | undefined;
|
|
336
|
+
inert?: boolean | undefined | undefined;
|
|
290
337
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
291
338
|
is?: string | undefined | undefined;
|
|
292
339
|
exportparts?: string | undefined | undefined;
|
|
293
|
-
|
|
294
|
-
formAction?: string | undefined;
|
|
340
|
+
formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
|
|
295
341
|
formEncType?: string | undefined | undefined;
|
|
296
342
|
formMethod?: string | undefined | undefined;
|
|
297
343
|
formNoValidate?: boolean | undefined | undefined;
|
|
298
344
|
formTarget?: string | undefined | undefined;
|
|
299
|
-
count?: import('rc-input/lib/interface').CountConfig | undefined;
|
|
345
|
+
count?: import('@rc-component/input/lib/interface').CountConfig | undefined;
|
|
300
346
|
checked?: boolean | undefined | undefined;
|
|
301
347
|
required?: boolean | undefined | undefined;
|
|
302
348
|
alt?: string | undefined | undefined;
|
|
303
349
|
autoComplete?: string | undefined;
|
|
304
350
|
accept?: string | undefined | undefined;
|
|
305
351
|
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
306
|
-
multiple?: boolean | undefined | undefined;
|
|
307
352
|
maxLength?: number | undefined | undefined;
|
|
308
353
|
minLength?: number | undefined | undefined;
|
|
309
354
|
src?: string | undefined | undefined;
|
|
310
355
|
placeholder?: string | undefined | undefined;
|
|
311
356
|
onClear?: (() => void) | undefined;
|
|
312
357
|
allowClear?: boolean | {
|
|
358
|
+
disabled?: boolean;
|
|
313
359
|
clearIcon?: import('react').ReactNode;
|
|
314
360
|
} | undefined;
|
|
361
|
+
suffix?: import('react').ReactNode;
|
|
315
362
|
readOnly?: boolean | undefined | undefined;
|
|
316
363
|
onPressEnter?: import('react').KeyboardEventHandler<HTMLInputElement> | undefined;
|
|
317
364
|
showCount?: boolean | {
|
|
318
|
-
formatter: import('rc-input/lib/interface').ShowCountFormatter;
|
|
365
|
+
formatter: import('@rc-component/input/lib/interface').ShowCountFormatter;
|
|
319
366
|
} | undefined;
|
|
320
367
|
htmlSize?: number | undefined;
|
|
321
|
-
suffix?: import('react').ReactNode;
|
|
322
368
|
} & import('react').RefAttributes<InputRef>>;
|