@j2-health/design-system 0.3.2 → 0.4.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 +53 -20
- 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/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 +72 -26
- package/dist/src/components/input/AntdSearchInput.d.ts +77 -25
- 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/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/style.css +92 -78
- package/package.json +11 -13
|
@@ -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,9 +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
|
-
|
|
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>;
|
|
16
47
|
prefix?: import('react').ReactNode;
|
|
17
48
|
height?: number | string | undefined | undefined;
|
|
18
49
|
width?: number | string | undefined | undefined;
|
|
@@ -32,7 +63,9 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
32
63
|
max?: number | string | undefined | undefined;
|
|
33
64
|
min?: number | string | undefined | undefined;
|
|
34
65
|
name?: string | undefined | undefined;
|
|
35
|
-
|
|
66
|
+
nonce?: string | undefined | undefined;
|
|
67
|
+
part?: string | undefined | undefined;
|
|
68
|
+
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;
|
|
36
69
|
role?: import('react').AriaRole | undefined;
|
|
37
70
|
tabIndex?: number | undefined | undefined;
|
|
38
71
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
@@ -107,18 +140,18 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
107
140
|
onFocusCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
108
141
|
onBlur?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
109
142
|
onBlurCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
110
|
-
onChange?: import('react').ChangeEventHandler<HTMLInputElement> | undefined;
|
|
111
|
-
onChangeCapture?: import('react').
|
|
143
|
+
onChange?: import('react').ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined;
|
|
144
|
+
onChangeCapture?: import('react').ChangeEventHandler<HTMLInputElement, Element> | undefined;
|
|
112
145
|
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').
|
|
146
|
+
onBeforeInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
147
|
+
onInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
148
|
+
onInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
149
|
+
onReset?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
150
|
+
onResetCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
151
|
+
onSubmit?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
|
|
152
|
+
onSubmitCapture?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
|
|
153
|
+
onInvalid?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
154
|
+
onInvalidCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
122
155
|
onLoad?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
123
156
|
onLoadCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
124
157
|
onError?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
@@ -239,6 +272,8 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
239
272
|
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
|
240
273
|
onScroll?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
241
274
|
onScrollCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
275
|
+
onScrollEnd?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
276
|
+
onScrollEndCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
242
277
|
onWheel?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
|
243
278
|
onWheelCapture?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
|
244
279
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
@@ -247,13 +282,23 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
247
282
|
onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
248
283
|
onAnimationIteration?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
249
284
|
onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
285
|
+
onToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
|
|
286
|
+
onBeforeToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
|
|
287
|
+
onTransitionCancel?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
288
|
+
onTransitionCancelCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
250
289
|
onTransitionEnd?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
251
290
|
onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
252
|
-
|
|
291
|
+
onTransitionRun?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
292
|
+
onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
293
|
+
onTransitionStart?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
294
|
+
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
295
|
+
value?: import('@rc-component/input/lib/interface').ValueType;
|
|
253
296
|
prefixCls?: string | undefined;
|
|
297
|
+
list?: string | undefined | undefined;
|
|
254
298
|
step?: number | string | undefined | undefined;
|
|
255
299
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
256
|
-
|
|
300
|
+
hidden?: boolean | undefined | undefined;
|
|
301
|
+
multiple?: boolean | undefined | undefined;
|
|
257
302
|
defaultChecked?: boolean | undefined | undefined;
|
|
258
303
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
259
304
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -264,8 +309,6 @@ export declare const AntdInput: import('react').ForwardRefExoticComponent<{
|
|
|
264
309
|
contextMenu?: string | undefined | undefined;
|
|
265
310
|
dir?: string | undefined | undefined;
|
|
266
311
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
267
|
-
hidden?: boolean | undefined | undefined;
|
|
268
|
-
nonce?: string | undefined | undefined;
|
|
269
312
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
270
313
|
radioGroup?: string | undefined | undefined;
|
|
271
314
|
about?: 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>>;
|
|
@@ -1,13 +1,53 @@
|
|
|
1
1
|
import { InputRef } from 'antd';
|
|
2
|
+
import { SearchProps as AntDSearchProps } from 'antd/es/input/Search';
|
|
2
3
|
export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<{
|
|
3
4
|
[x: `data-${string}`]: string | undefined;
|
|
4
5
|
inputPrefixCls?: string | undefined;
|
|
5
6
|
onSearch?: ((value: string, event?: React.ChangeEvent<HTMLInputElement> | React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLInputElement>, info?: {
|
|
6
7
|
source?: "clear" | "input";
|
|
7
8
|
}) => void) | undefined;
|
|
9
|
+
searchIcon?: import('react').ReactNode;
|
|
8
10
|
enterButton?: import('react').ReactNode;
|
|
9
11
|
loading?: boolean | undefined;
|
|
10
12
|
onPressEnter?: ((e: React.KeyboardEvent<HTMLInputElement>) => void) | undefined;
|
|
13
|
+
classNames?: ((info: {
|
|
14
|
+
props: AntDSearchProps;
|
|
15
|
+
}) => import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepClassNameType<{
|
|
16
|
+
root?: string;
|
|
17
|
+
input?: string;
|
|
18
|
+
prefix?: string;
|
|
19
|
+
suffix?: string;
|
|
20
|
+
clear?: string;
|
|
21
|
+
count?: string;
|
|
22
|
+
button?: import('antd/es/button/Button').ButtonSemanticType["classNames"];
|
|
23
|
+
} | undefined>) | import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepClassNameType<{
|
|
24
|
+
root?: string;
|
|
25
|
+
input?: string;
|
|
26
|
+
prefix?: string;
|
|
27
|
+
suffix?: string;
|
|
28
|
+
clear?: string;
|
|
29
|
+
count?: string;
|
|
30
|
+
button?: import('antd/es/button/Button').ButtonSemanticType["classNames"];
|
|
31
|
+
} | undefined>;
|
|
32
|
+
styles?: ((info: {
|
|
33
|
+
props: AntDSearchProps;
|
|
34
|
+
}) => import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepStylesType<{
|
|
35
|
+
root?: React.CSSProperties;
|
|
36
|
+
input?: React.CSSProperties;
|
|
37
|
+
prefix?: React.CSSProperties;
|
|
38
|
+
suffix?: React.CSSProperties;
|
|
39
|
+
clear?: React.CSSProperties;
|
|
40
|
+
count?: React.CSSProperties;
|
|
41
|
+
button?: import('antd/es/button/Button').ButtonSemanticType["styles"];
|
|
42
|
+
} | undefined>) | import('antd/es/_util/hooks/useMergeSemantic/semanticType').DeepStylesType<{
|
|
43
|
+
root?: React.CSSProperties;
|
|
44
|
+
input?: React.CSSProperties;
|
|
45
|
+
prefix?: React.CSSProperties;
|
|
46
|
+
suffix?: React.CSSProperties;
|
|
47
|
+
clear?: React.CSSProperties;
|
|
48
|
+
count?: React.CSSProperties;
|
|
49
|
+
button?: import('antd/es/button/Button').ButtonSemanticType["styles"];
|
|
50
|
+
} | undefined>;
|
|
11
51
|
rootClassName?: string | undefined;
|
|
12
52
|
size?: import('antd/es/button').ButtonSize;
|
|
13
53
|
disabled?: boolean | undefined;
|
|
@@ -16,9 +56,6 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
16
56
|
addonAfter?: import('react').ReactNode;
|
|
17
57
|
bordered?: boolean | undefined;
|
|
18
58
|
variant?: import('antd/es/config-provider').Variant | undefined;
|
|
19
|
-
classNames?: Partial<Record<"prefix" | "input" | "count" | "suffix", string>> | undefined;
|
|
20
|
-
styles?: Partial<Record<"prefix" | "input" | "count" | "suffix", React.CSSProperties>> | undefined;
|
|
21
|
-
_skipAddonWarning?: boolean | undefined;
|
|
22
59
|
prefix?: import('react').ReactNode;
|
|
23
60
|
height?: number | string | undefined | undefined;
|
|
24
61
|
width?: number | string | undefined | undefined;
|
|
@@ -38,7 +75,9 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
38
75
|
max?: number | string | undefined | undefined;
|
|
39
76
|
min?: number | string | undefined | undefined;
|
|
40
77
|
name?: string | undefined | undefined;
|
|
41
|
-
|
|
78
|
+
nonce?: string | undefined | undefined;
|
|
79
|
+
part?: string | undefined | undefined;
|
|
80
|
+
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;
|
|
42
81
|
role?: import('react').AriaRole | undefined;
|
|
43
82
|
tabIndex?: number | undefined | undefined;
|
|
44
83
|
"aria-activedescendant"?: string | undefined | undefined;
|
|
@@ -113,18 +152,18 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
113
152
|
onFocusCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
114
153
|
onBlur?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
115
154
|
onBlurCapture?: import('react').FocusEventHandler<HTMLInputElement> | undefined;
|
|
116
|
-
onChange?: import('react').ChangeEventHandler<HTMLInputElement> | undefined;
|
|
117
|
-
onChangeCapture?: import('react').
|
|
155
|
+
onChange?: import('react').ChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined;
|
|
156
|
+
onChangeCapture?: import('react').ChangeEventHandler<HTMLInputElement, Element> | undefined;
|
|
118
157
|
onBeforeInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
119
|
-
onBeforeInputCapture?: import('react').
|
|
120
|
-
onInput?: import('react').
|
|
121
|
-
onInputCapture?: import('react').
|
|
122
|
-
onReset?: import('react').
|
|
123
|
-
onResetCapture?: import('react').
|
|
124
|
-
onSubmit?: import('react').
|
|
125
|
-
onSubmitCapture?: import('react').
|
|
126
|
-
onInvalid?: import('react').
|
|
127
|
-
onInvalidCapture?: import('react').
|
|
158
|
+
onBeforeInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
159
|
+
onInput?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
160
|
+
onInputCapture?: import('react').InputEventHandler<HTMLInputElement> | undefined;
|
|
161
|
+
onReset?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
162
|
+
onResetCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
163
|
+
onSubmit?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
|
|
164
|
+
onSubmitCapture?: import('react').SubmitEventHandler<HTMLInputElement> | undefined;
|
|
165
|
+
onInvalid?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
166
|
+
onInvalidCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
128
167
|
onLoad?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
129
168
|
onLoadCapture?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
130
169
|
onError?: import('react').ReactEventHandler<HTMLInputElement> | undefined;
|
|
@@ -245,6 +284,8 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
245
284
|
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLInputElement> | undefined;
|
|
246
285
|
onScroll?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
247
286
|
onScrollCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
287
|
+
onScrollEnd?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
288
|
+
onScrollEndCapture?: import('react').UIEventHandler<HTMLInputElement> | undefined;
|
|
248
289
|
onWheel?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
|
249
290
|
onWheelCapture?: import('react').WheelEventHandler<HTMLInputElement> | undefined;
|
|
250
291
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
@@ -253,13 +294,23 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
253
294
|
onAnimationEndCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
254
295
|
onAnimationIteration?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
255
296
|
onAnimationIterationCapture?: import('react').AnimationEventHandler<HTMLInputElement> | undefined;
|
|
297
|
+
onToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
|
|
298
|
+
onBeforeToggle?: import('react').ToggleEventHandler<HTMLInputElement> | undefined;
|
|
299
|
+
onTransitionCancel?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
300
|
+
onTransitionCancelCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
256
301
|
onTransitionEnd?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
257
302
|
onTransitionEndCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
258
|
-
|
|
303
|
+
onTransitionRun?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
304
|
+
onTransitionRunCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
305
|
+
onTransitionStart?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
306
|
+
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLInputElement> | undefined;
|
|
307
|
+
value?: import('@rc-component/input/lib/interface').ValueType;
|
|
259
308
|
prefixCls?: string | undefined;
|
|
309
|
+
list?: string | undefined | undefined;
|
|
260
310
|
step?: number | string | undefined | undefined;
|
|
261
311
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
262
|
-
|
|
312
|
+
hidden?: boolean | undefined | undefined;
|
|
313
|
+
multiple?: boolean | undefined | undefined;
|
|
263
314
|
defaultChecked?: boolean | undefined | undefined;
|
|
264
315
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
265
316
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -270,8 +321,6 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
270
321
|
contextMenu?: string | undefined | undefined;
|
|
271
322
|
dir?: string | undefined | undefined;
|
|
272
323
|
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
273
|
-
hidden?: boolean | undefined | undefined;
|
|
274
|
-
nonce?: string | undefined | undefined;
|
|
275
324
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
276
325
|
radioGroup?: string | undefined | undefined;
|
|
277
326
|
about?: string | undefined | undefined;
|
|
@@ -293,35 +342,38 @@ export declare const AntdSearchInput: import('react').ForwardRefExoticComponent<
|
|
|
293
342
|
results?: number | undefined | undefined;
|
|
294
343
|
security?: string | undefined | undefined;
|
|
295
344
|
unselectable?: "on" | "off" | undefined | undefined;
|
|
345
|
+
popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
|
|
346
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
347
|
+
popoverTarget?: string | undefined | undefined;
|
|
348
|
+
inert?: boolean | undefined | undefined;
|
|
296
349
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
297
350
|
is?: string | undefined | undefined;
|
|
298
351
|
exportparts?: string | undefined | undefined;
|
|
299
|
-
|
|
300
|
-
formAction?: string | undefined;
|
|
352
|
+
formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
|
|
301
353
|
formEncType?: string | undefined | undefined;
|
|
302
354
|
formMethod?: string | undefined | undefined;
|
|
303
355
|
formNoValidate?: boolean | undefined | undefined;
|
|
304
356
|
formTarget?: string | undefined | undefined;
|
|
305
|
-
count?: import('rc-input/lib/interface').CountConfig | undefined;
|
|
357
|
+
count?: import('@rc-component/input/lib/interface').CountConfig | undefined;
|
|
306
358
|
checked?: boolean | undefined | undefined;
|
|
307
359
|
required?: boolean | undefined | undefined;
|
|
308
360
|
alt?: string | undefined | undefined;
|
|
309
361
|
autoComplete?: string | undefined;
|
|
310
362
|
accept?: string | undefined | undefined;
|
|
311
363
|
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
312
|
-
multiple?: boolean | undefined | undefined;
|
|
313
364
|
maxLength?: number | undefined | undefined;
|
|
314
365
|
minLength?: number | undefined | undefined;
|
|
315
366
|
src?: string | undefined | undefined;
|
|
316
367
|
placeholder?: string | undefined | undefined;
|
|
317
368
|
onClear?: (() => void) | undefined;
|
|
318
369
|
allowClear?: boolean | {
|
|
370
|
+
disabled?: boolean;
|
|
319
371
|
clearIcon?: import('react').ReactNode;
|
|
320
372
|
} | undefined;
|
|
373
|
+
suffix?: import('react').ReactNode;
|
|
321
374
|
readOnly?: boolean | undefined | undefined;
|
|
322
375
|
showCount?: boolean | {
|
|
323
|
-
formatter: import('rc-input/lib/interface').ShowCountFormatter;
|
|
376
|
+
formatter: import('@rc-component/input/lib/interface').ShowCountFormatter;
|
|
324
377
|
} | undefined;
|
|
325
378
|
htmlSize?: number | undefined;
|
|
326
|
-
suffix?: import('react').ReactNode;
|
|
327
379
|
} & import('react').RefAttributes<InputRef>>;
|
|
@@ -1,9 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
4
|
+
const antd = require("antd");
|
|
5
|
+
const FormikField = require("../form/FormikField.cjs");
|
|
6
|
+
const Input = ({
|
|
7
|
+
size = "large",
|
|
8
|
+
name,
|
|
9
|
+
validate,
|
|
10
|
+
fast,
|
|
11
|
+
onChange,
|
|
12
|
+
onBlur,
|
|
13
|
+
...props
|
|
14
|
+
}) => {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormikField.FormikField, { name, validate, fast, children: ({ field }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
16
|
+
antd.Input,
|
|
17
|
+
{
|
|
18
|
+
size,
|
|
19
|
+
name,
|
|
20
|
+
id: name,
|
|
21
|
+
...props,
|
|
22
|
+
value: field.value,
|
|
23
|
+
onChange: (event) => {
|
|
24
|
+
field.onChange(event);
|
|
25
|
+
onChange == null ? void 0 : onChange(event);
|
|
26
|
+
},
|
|
27
|
+
onBlur: (event) => {
|
|
28
|
+
field.onBlur(event);
|
|
29
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
) });
|
|
7
33
|
};
|
|
8
34
|
exports.Input = Input;
|
|
9
35
|
//# sourceMappingURL=Input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.cjs","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import { Input as
|
|
1
|
+
{"version":3,"file":"Input.cjs","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import { Input as AntdInput, type InputProps } from 'antd'\nimport { FormikField, type FormikFieldProps } from '../form/FormikField'\ntype Props = Expand<InputProps & FormikFieldProps>\n\nexport const Input = ({\n size = 'large',\n name,\n validate,\n fast,\n onChange,\n onBlur,\n ...props\n}: Props) => {\n return (\n <FormikField name={name} validate={validate} fast={fast}>\n {({ field }) => (\n <AntdInput\n size={size}\n name={name}\n id={name}\n {...props}\n value={field.value}\n onChange={(event) => {\n field.onChange(event)\n onChange?.(event)\n }}\n onBlur={(event) => {\n field.onBlur(event)\n onBlur?.(event)\n }}\n />\n )}\n </FormikField>\n )\n}\n"],"names":["jsx","FormikField","AntdInput"],"mappings":";;;;;AAIO,MAAM,QAAQ,CAAC;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACEA,2BAAAA,IAACC,2BAAY,MAAY,UAAoB,MAC1C,UAAA,CAAC,EAAE,YACFD,2BAAAA;AAAAA,IAACE,KAAAA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,IAAI;AAAA,MACH,GAAG;AAAA,MACJ,OAAO,MAAM;AAAA,MACb,UAAU,CAAC,UAAU;AACnB,cAAM,SAAS,KAAK;AACpB,6CAAW;AAAA,MACb;AAAA,MACA,QAAQ,CAAC,UAAU;AACjB,cAAM,OAAO,KAAK;AAClB,yCAAS;AAAA,MACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { InputProps } from '
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { InputProps } from 'antd';
|
|
2
|
+
import { FormikFieldProps } from '../form/FormikField.js';
|
|
3
|
+
type Props = Expand<InputProps & FormikFieldProps>;
|
|
4
|
+
export declare const Input: ({ size, name, validate, fast, onChange, onBlur, ...props }: Props) => import("react").JSX.Element;
|
|
4
5
|
export {};
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Input as Input$1 } from "
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { Input as Input$1 } from "antd";
|
|
3
|
+
import { FormikField } from "../form/FormikField.js";
|
|
4
|
+
const Input = ({
|
|
5
|
+
size = "large",
|
|
6
|
+
name,
|
|
7
|
+
validate,
|
|
8
|
+
fast,
|
|
9
|
+
onChange,
|
|
10
|
+
onBlur,
|
|
11
|
+
...props
|
|
12
|
+
}) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(FormikField, { name, validate, fast, children: ({ field }) => /* @__PURE__ */ jsx(
|
|
14
|
+
Input$1,
|
|
15
|
+
{
|
|
16
|
+
size,
|
|
17
|
+
name,
|
|
18
|
+
id: name,
|
|
19
|
+
...props,
|
|
20
|
+
value: field.value,
|
|
21
|
+
onChange: (event) => {
|
|
22
|
+
field.onChange(event);
|
|
23
|
+
onChange == null ? void 0 : onChange(event);
|
|
24
|
+
},
|
|
25
|
+
onBlur: (event) => {
|
|
26
|
+
field.onBlur(event);
|
|
27
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
5
31
|
};
|
|
6
32
|
export {
|
|
7
33
|
Input
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import { Input as
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../src/components/input/Input.tsx"],"sourcesContent":["import { Input as AntdInput, type InputProps } from 'antd'\nimport { FormikField, type FormikFieldProps } from '../form/FormikField'\ntype Props = Expand<InputProps & FormikFieldProps>\n\nexport const Input = ({\n size = 'large',\n name,\n validate,\n fast,\n onChange,\n onBlur,\n ...props\n}: Props) => {\n return (\n <FormikField name={name} validate={validate} fast={fast}>\n {({ field }) => (\n <AntdInput\n size={size}\n name={name}\n id={name}\n {...props}\n value={field.value}\n onChange={(event) => {\n field.onChange(event)\n onChange?.(event)\n }}\n onBlur={(event) => {\n field.onBlur(event)\n onBlur?.(event)\n }}\n />\n )}\n </FormikField>\n )\n}\n"],"names":["AntdInput"],"mappings":";;;AAIO,MAAM,QAAQ,CAAC;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACE,oBAAC,eAAY,MAAY,UAAoB,MAC1C,UAAA,CAAC,EAAE,YACF;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,IAAI;AAAA,MACH,GAAG;AAAA,MACJ,OAAO,MAAM;AAAA,MACb,UAAU,CAAC,UAAU;AACnB,cAAM,SAAS,KAAK;AACpB,6CAAW;AAAA,MACb;AAAA,MACA,QAAQ,CAAC,UAAU;AACjB,cAAM,OAAO,KAAK;AAClB,yCAAS;AAAA,MACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
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 FormikField = require("../form/FormikField.cjs");
|
|
5
6
|
const cx = require("classnames");
|
|
6
7
|
const InputNumber_module = require("./InputNumber.module.css.cjs");
|
|
7
8
|
const react = require("@phosphor-icons/react");
|
|
@@ -11,12 +12,17 @@ const InputNumber = ({
|
|
|
11
12
|
name,
|
|
12
13
|
max,
|
|
13
14
|
min,
|
|
15
|
+
validate,
|
|
16
|
+
fast,
|
|
17
|
+
onChange,
|
|
18
|
+
onBlur,
|
|
14
19
|
...props
|
|
15
20
|
}) => {
|
|
16
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
17
|
-
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FormikField.FormikField, { name, validate, fast, children: ({ field, form }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
22
|
+
antd.InputNumber,
|
|
18
23
|
{
|
|
19
24
|
name,
|
|
25
|
+
id: name,
|
|
20
26
|
max,
|
|
21
27
|
min,
|
|
22
28
|
step,
|
|
@@ -24,9 +30,18 @@ const InputNumber = ({
|
|
|
24
30
|
upHandler: /* @__PURE__ */ jsxRuntime.jsx(react.CaretUpIcon, { weight: "bold", size: 12 }),
|
|
25
31
|
downHandler: /* @__PURE__ */ jsxRuntime.jsx(react.CaretDownIcon, { weight: "bold", size: 12 }),
|
|
26
32
|
size,
|
|
27
|
-
...props
|
|
33
|
+
...props,
|
|
34
|
+
value: field.value,
|
|
35
|
+
onChange: (value) => {
|
|
36
|
+
void form.setFieldValue(name, value);
|
|
37
|
+
onChange == null ? void 0 : onChange(value);
|
|
38
|
+
},
|
|
39
|
+
onBlur: (event) => {
|
|
40
|
+
field.onBlur(event);
|
|
41
|
+
onBlur == null ? void 0 : onBlur(event);
|
|
42
|
+
}
|
|
28
43
|
}
|
|
29
|
-
);
|
|
44
|
+
) });
|
|
30
45
|
};
|
|
31
46
|
exports.InputNumber = InputNumber;
|
|
32
47
|
//# sourceMappingURL=InputNumber.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumber.cjs","sources":["../../../../src/components/inputnumber/InputNumber.tsx"],"sourcesContent":["import { InputNumber as
|
|
1
|
+
{"version":3,"file":"InputNumber.cjs","sources":["../../../../src/components/inputnumber/InputNumber.tsx"],"sourcesContent":["import { InputNumber as AntdInputNumber, type InputNumberProps } from 'antd'\nimport { FormikField, type FormikFieldProps } from '../form/FormikField'\nimport cx from 'classnames'\nimport styles from './InputNumber.module.css'\nimport { CaretDownIcon, CaretUpIcon } from '@phosphor-icons/react'\ntype Props = Expand<InputNumberProps & FormikFieldProps> & {\n name: string\n max?: number\n min?: number\n step?: number\n}\n\nexport const InputNumber = ({\n size = 'large',\n step = 1,\n name,\n max,\n min,\n validate,\n fast,\n onChange,\n onBlur,\n ...props\n}: Props) => {\n return (\n <FormikField name={name} validate={validate} fast={fast}>\n {({ field, form }) => (\n <AntdInputNumber\n name={name}\n id={name}\n max={max}\n min={min}\n step={step}\n className={cx(styles.j2InputNumber, props.className)}\n upHandler={<CaretUpIcon weight=\"bold\" size={12} />}\n downHandler={<CaretDownIcon weight=\"bold\" size={12} />}\n size={size}\n {...props}\n value={field.value}\n onChange={(value) => {\n void form.setFieldValue(name, value)\n onChange?.(value)\n }}\n onBlur={(event) => {\n field.onBlur(event)\n onBlur?.(event)\n }}\n />\n )}\n </FormikField>\n )\n}\n"],"names":["jsx","FormikField","AntdInputNumber","styles","CaretUpIcon","CaretDownIcon"],"mappings":";;;;;;;;AAYO,MAAM,cAAc,CAAC;AAAA,EAC1B,OAAO;AAAA,EACP,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAa;AACX,SACEA,+BAACC,YAAAA,eAAY,MAAY,UAAoB,MAC1C,UAAA,CAAC,EAAE,OAAO,KAAA,MACTD,2BAAAA;AAAAA,IAACE,KAAAA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,GAAGC,mBAAAA,QAAO,eAAe,MAAM,SAAS;AAAA,MACnD,WAAWH,2BAAAA,IAACI,mBAAA,EAAY,QAAO,QAAO,MAAM,IAAI;AAAA,MAChD,aAAaJ,2BAAAA,IAACK,qBAAA,EAAc,QAAO,QAAO,MAAM,IAAI;AAAA,MACpD;AAAA,MACC,GAAG;AAAA,MACJ,OAAO,MAAM;AAAA,MACb,UAAU,CAAC,UAAU;AACnB,aAAK,KAAK,cAAc,MAAM,KAAK;AACnC,6CAAW;AAAA,MACb;AAAA,MACA,QAAQ,CAAC,UAAU;AACjB,cAAM,OAAO,KAAK;AAClB,yCAAS;AAAA,MACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;;"}
|