szld-libs 0.0.29 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/szld-components.es.js +344 -337
- package/dist/szld-components.umd.js +20 -20
- package/es/components/CreateForm/index.d.ts +3 -1
- package/es/components/CreateForm/index.js +12 -5
- package/lib/components/CreateForm/index.d.ts +3 -1
- package/lib/components/CreateForm/index.js +12 -5
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { DefaultOptionType } from "antd/es/cascader";
|
|
|
3
3
|
import { CheckboxGroupProps } from "antd/es/checkbox";
|
|
4
4
|
import { DatePickerProps, RangePickerProps } from "antd/es/date-picker";
|
|
5
5
|
import { PasswordProps, TextAreaProps } from "antd/es/input";
|
|
6
|
-
import React, { ReactElement, ReactNode } from "react";
|
|
6
|
+
import React, { CSSProperties, ReactElement, ReactNode } from "react";
|
|
7
7
|
import { UploadFileProps } from "../Upload";
|
|
8
8
|
export type ValueType = "rangePicker" | "select" | "input" | "password" | "textarea" | "radio" | "inputNumber" | "switch" | "checkbox" | "timePicker" | "datePicker" | "cascader" | "upload" | "modal" | "rate" | "custom" | "btns";
|
|
9
9
|
interface ValueBtnProps extends ButtonProps {
|
|
@@ -17,6 +17,8 @@ interface ValueModalProps {
|
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
labelKey: string;
|
|
19
19
|
value?: any;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
className?: string;
|
|
20
22
|
}
|
|
21
23
|
interface customValueProps {
|
|
22
24
|
children: ReactElement;
|
|
@@ -233,11 +233,18 @@ const FormFields = (props) => {
|
|
|
233
233
|
});
|
|
234
234
|
};
|
|
235
235
|
const FieldModal = (props) => {
|
|
236
|
-
const { placeholder: placeholder2, labelKey, onToggle, value, onClear } = props;
|
|
237
|
-
return /* @__PURE__ */ jsxs(
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
236
|
+
const { placeholder: placeholder2, labelKey, onToggle, value, onClear, className, style } = props;
|
|
237
|
+
return /* @__PURE__ */ jsxs(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
className: [styles.fieldModal, className].filter((v) => v).join(" "),
|
|
241
|
+
style,
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ jsx("div", { className: styles.content, onClick: () => onToggle(true), children: !value ? /* @__PURE__ */ jsx("span", { className: styles.placeholder, children: placeholder2 }) : /* @__PURE__ */ jsx("span", { children: value[labelKey] }) }),
|
|
244
|
+
/* @__PURE__ */ jsx("span", { className: styles.suffix, onClick: onClear, children: value && /* @__PURE__ */ jsx(CloseCircleFilled, {}) })
|
|
245
|
+
]
|
|
246
|
+
}
|
|
247
|
+
);
|
|
241
248
|
};
|
|
242
249
|
export {
|
|
243
250
|
FormFields,
|
|
@@ -3,7 +3,7 @@ import { DefaultOptionType } from "antd/es/cascader";
|
|
|
3
3
|
import { CheckboxGroupProps } from "antd/es/checkbox";
|
|
4
4
|
import { DatePickerProps, RangePickerProps } from "antd/es/date-picker";
|
|
5
5
|
import { PasswordProps, TextAreaProps } from "antd/es/input";
|
|
6
|
-
import React, { ReactElement, ReactNode } from "react";
|
|
6
|
+
import React, { CSSProperties, ReactElement, ReactNode } from "react";
|
|
7
7
|
import { UploadFileProps } from "../Upload";
|
|
8
8
|
export type ValueType = "rangePicker" | "select" | "input" | "password" | "textarea" | "radio" | "inputNumber" | "switch" | "checkbox" | "timePicker" | "datePicker" | "cascader" | "upload" | "modal" | "rate" | "custom" | "btns";
|
|
9
9
|
interface ValueBtnProps extends ButtonProps {
|
|
@@ -17,6 +17,8 @@ interface ValueModalProps {
|
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
labelKey: string;
|
|
19
19
|
value?: any;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
className?: string;
|
|
20
22
|
}
|
|
21
23
|
interface customValueProps {
|
|
22
24
|
children: ReactElement;
|
|
@@ -235,11 +235,18 @@ const FormFields = (props) => {
|
|
|
235
235
|
});
|
|
236
236
|
};
|
|
237
237
|
const FieldModal = (props) => {
|
|
238
|
-
const { placeholder: placeholder2, labelKey, onToggle, value, onClear } = props;
|
|
239
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
238
|
+
const { placeholder: placeholder2, labelKey, onToggle, value, onClear, className, style } = props;
|
|
239
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
240
|
+
"div",
|
|
241
|
+
{
|
|
242
|
+
className: [styles.fieldModal, className].filter((v) => v).join(" "),
|
|
243
|
+
style,
|
|
244
|
+
children: [
|
|
245
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles.content, onClick: () => onToggle(true), children: !value ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.placeholder, children: placeholder2 }) : /* @__PURE__ */ jsxRuntime.jsx("span", { children: value[labelKey] }) }),
|
|
246
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles.suffix, onClick: onClear, children: value && /* @__PURE__ */ jsxRuntime.jsx(icons.CloseCircleFilled, {}) })
|
|
247
|
+
]
|
|
248
|
+
}
|
|
249
|
+
);
|
|
243
250
|
};
|
|
244
251
|
exports.FormFields = FormFields;
|
|
245
252
|
exports.default = CreateForm;
|