@next-bricks/form 1.21.2 → 1.21.3

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.
Files changed (36) hide show
  1. package/dist/bricks.json +24 -24
  2. package/dist/chunks/2537.5bbad3eb.js.map +1 -1
  3. package/dist/chunks/9949.c6f285e9.js.map +1 -1
  4. package/dist/chunks/eo-auto-complete.9d9f68a8.js.map +1 -1
  5. package/dist/chunks/eo-checkbox.0b875e8b.js.map +1 -1
  6. package/dist/chunks/eo-date-picker.f5894c3c.js.map +1 -1
  7. package/dist/chunks/eo-dynamic-form-item.3837c24e.js.map +1 -1
  8. package/dist/chunks/eo-radio.f2527bfa.js.map +1 -1
  9. package/dist/chunks/eo-search.206dd65e.js.map +1 -1
  10. package/dist/chunks/eo-select.78631f61.js.map +1 -1
  11. package/dist/chunks/eo-submit-buttons.bccc3dbf.js.map +1 -1
  12. package/dist/chunks/eo-textarea.fbc8c190.js.map +1 -1
  13. package/dist/chunks/eo-time-picker.da156d88.js.map +1 -1
  14. package/dist/chunks/eo-time-range-picker.15864724.js.map +1 -1
  15. package/dist/chunks/eo-upload-file.8e5acc0f.js.map +1 -1
  16. package/dist/chunks/eo-upload-image.1ae9beb3.js.map +1 -1
  17. package/dist/examples.json +11 -11
  18. package/dist/{index.64a9544d.js → index.388bae12.js} +2 -2
  19. package/dist/{index.64a9544d.js.map → index.388bae12.js.map} +1 -1
  20. package/dist/manifest.json +369 -369
  21. package/dist/types.json +2074 -2072
  22. package/dist-types/auto-complete/index.d.ts +1 -1
  23. package/dist-types/checkbox/index.d.ts +0 -2
  24. package/dist-types/date-picker/index.d.ts +1 -1
  25. package/dist-types/dynamic-form-item/index.d.ts +1 -1
  26. package/dist-types/input/index.d.ts +1 -1
  27. package/dist-types/jsx.d.ts +3 -3
  28. package/dist-types/radio/index.d.ts +2 -2
  29. package/dist-types/select/index.d.ts +1 -1
  30. package/dist-types/submit-buttons/index.d.ts +6 -4
  31. package/dist-types/textarea/index.d.ts +2 -1
  32. package/dist-types/time-picker/index.d.ts +1 -1
  33. package/dist-types/time-range-picker/index.d.ts +11 -9
  34. package/dist-types/upload/upload-file/index.d.ts +1 -1
  35. package/dist-types/upload/upload-image/index.d.ts +1 -1
  36. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import "@next-core/theme";
3
3
  import { FormItemElementBase, MessageBody } from "@next-shared/form";
4
- import type { FormItemProps } from "../form-item/index.jsx";
4
+ import type { FormItemProps } from "../form-item/index.js";
5
5
  export interface AutoCompleteProps extends FormItemProps {
6
6
  curElement?: HTMLElement;
7
7
  value?: string;
@@ -30,8 +30,6 @@ export interface CheckboxProps extends FormItemProps {
30
30
  isGroup?: boolean;
31
31
  optionGroups?: OptionGroup[];
32
32
  themeVariant?: "default" | "elevo";
33
- onChange?: (value: CheckboxValueType[]) => void;
34
- optionsChange?: (options: CheckboxOptionType[], name: string) => void;
35
33
  }
36
34
  /**
37
35
  * 表单复选框构件
@@ -1,7 +1,7 @@
1
1
  import React, { CSSProperties } from "react";
2
2
  import "@next-core/theme";
3
3
  import { FormItemElementBase } from "@next-shared/form";
4
- import type { FormItemProps } from "../form-item/index.jsx";
4
+ import type { FormItemProps } from "../form-item/index.js";
5
5
  import type { Dayjs } from "dayjs";
6
6
  import "dayjs/locale/zh-cn.js";
7
7
  import { DisabledDateType, PickerMode } from "../interface.js";
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import type { Form } from "../form/index.js";
3
- import type { FormItemProps } from "../form-item/index.jsx";
3
+ import type { FormItemProps } from "../form-item/index.js";
4
4
  import { UseBrickConf } from "@next-core/types";
5
5
  import "@next-core/theme";
6
6
  import { FormItemElementBase } from "@next-shared/form";
@@ -1,7 +1,7 @@
1
1
  import React, { type CSSProperties } from "react";
2
2
  import "@next-core/theme";
3
3
  import { FormItemElementBase, MessageBody } from "@next-shared/form";
4
- import type { FormItemProps } from "../form-item/index.jsx";
4
+ import type { FormItemProps } from "../form-item/index.js";
5
5
  import { ComponentSize, InputType } from "../interface.js";
6
6
  export interface InputProps extends FormItemProps {
7
7
  value?: string;
@@ -4,7 +4,7 @@ import type { Checkbox, CheckboxProps, CheckboxOptionType } from "./checkbox";
4
4
  import type { EoColorPicker, EoColorPickerProps } from "./color-picker";
5
5
  import type { Form, FormProps } from "./form";
6
6
  import type { IconSelect, IconSelectProps } from "./icon-select";
7
- import type { Input, InputProps } from "./input/index.jsx";
7
+ import type { Input, InputProps } from "./input/index.js";
8
8
  import type { GeneralComplexOption, Radio, RadioProps } from "./radio";
9
9
  import type { GeneralSearch, SearchProps } from "./search";
10
10
  import type { Select, SelectProps } from "./select";
@@ -16,7 +16,7 @@ import type { EoUploadFile, UploadFileProps } from "./upload/upload-file";
16
16
  import type { FileData } from "./upload/utils.js";
17
17
  import type { EoDatePicker } from "./date-picker";
18
18
  import type { DynamicFormItem } from "./dynamic-form-item";
19
- import type { SubmitButtons } from "./submit-buttons";
19
+ import type { SubmitButtons, SubmitButtonsProps } from "./submit-buttons";
20
20
  import type { GeneralSwitch } from "./general-switch";
21
21
  import type { EoTimePicker } from "./time-picker";
22
22
  import type { MessageBody } from "@next-shared/form";
@@ -100,7 +100,7 @@ declare global {
100
100
  name: string;
101
101
  }>) => void;
102
102
  };
103
- "eo-submit-buttons": DetailedHTMLProps<HTMLAttributes<SubmitButtons>, SubmitButtons> & {
103
+ "eo-submit-buttons": DetailedHTMLProps<HTMLAttributes<SubmitButtons>, SubmitButtons> & SubmitButtonsProps & {
104
104
  onSubmit?: (event: CustomEvent<void>) => void;
105
105
  onCancel?: (event: CustomEvent<void>) => void;
106
106
  };
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { FormItemElementBase } from "@next-shared/form";
3
3
  import type { RadioType, GeneralOption, GeneralComplexOption, UIType, RadioGroupButtonStyle, ComponentSize } from "../interface.js";
4
4
  import "@next-core/theme";
5
- import type { FormItemProps } from "../form-item/index.jsx";
5
+ import type { FormItemProps } from "../form-item/index.js";
6
6
  import { UseSingleBrickConf } from "@next-core/types";
7
7
  import "./host-context.css";
8
8
  interface CustomOptions {
@@ -13,7 +13,7 @@ interface CustomOptions {
13
13
  value: string;
14
14
  [propName: string]: any;
15
15
  }
16
- export interface RadioProps {
16
+ export interface RadioProps extends FormItemProps {
17
17
  type?: RadioType;
18
18
  options: GeneralOption[] | CustomOptions[] | undefined;
19
19
  value?: any;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { FormItemElementBase } from "@next-shared/form";
3
3
  import type { GeneralComplexOption } from "../interface.js";
4
4
  import "@next-core/theme";
5
- import type { FormItemProps } from "../form-item/index.jsx";
5
+ import type { FormItemProps } from "../form-item/index.js";
6
6
  import { UseSingleBrickConf } from "@next-core/types";
7
7
  interface UseBackendConf {
8
8
  provider: string;
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { FormItemElementBase } from "@next-shared/form";
3
3
  import type { FormItemProps } from "../form-item/index.js";
4
4
  import type { ButtonType } from "../interface.js";
5
- interface SubmitButtonsProps extends FormItemProps {
5
+ export interface SubmitButtonsProps extends FormItemProps {
6
6
  curElement: HTMLElement;
7
7
  submitText?: string;
8
8
  submitType?: ButtonType;
@@ -10,8 +10,6 @@ interface SubmitButtonsProps extends FormItemProps {
10
10
  cancelText?: string;
11
11
  cancelType?: ButtonType;
12
12
  themeVariant?: "default" | "elevo";
13
- onSubmitClick?: (event: React.MouseEvent) => void;
14
- onCancelClick?: (event: React.MouseEvent) => void;
15
13
  }
16
14
  /**
17
15
  * 表单提交按钮
@@ -51,5 +49,9 @@ declare class SubmitButtons extends FormItemElementBase {
51
49
  private _handleCancelClick;
52
50
  render(): React.JSX.Element;
53
51
  }
54
- export declare function ButtonsComponent(props: SubmitButtonsProps): React.JSX.Element;
52
+ interface SubmitButtonComponentProps extends SubmitButtonsProps {
53
+ onSubmitClick?: (event: React.MouseEvent) => void;
54
+ onCancelClick?: (event: React.MouseEvent) => void;
55
+ }
56
+ export declare function ButtonsComponent(props: SubmitButtonComponentProps): React.JSX.Element;
55
57
  export { SubmitButtons };
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { FormItemElementBase } from "@next-shared/form";
3
3
  import "@next-core/theme";
4
- import type { FormItemProps } from "../form-item/index.jsx";
4
+ import type { FormItemProps } from "../form-item/index.js";
5
5
  type AutoSize = boolean | {
6
6
  minRows?: number;
7
7
  maxRows?: number;
@@ -20,6 +20,7 @@ export interface TextareaProps extends FormItemProps {
20
20
  maxLength?: number;
21
21
  autoSize?: AutoSize;
22
22
  validateState?: string;
23
+ variant?: "default" | "muted";
23
24
  themeVariant?: "default" | "elevo";
24
25
  }
25
26
  export interface TextareaComponentProps extends TextareaProps {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import "@next-core/theme";
3
3
  import { FormItemElementBase } from "@next-shared/form";
4
- import type { FormItemProps } from "../form-item/index.jsx";
4
+ import type { FormItemProps } from "../form-item/index.js";
5
5
  import { TimePickerProps } from "antd/lib/time-picker";
6
6
  interface EoTimePickerProps extends FormItemProps {
7
7
  shadowRoot: ShadowRoot | null;
@@ -1,6 +1,6 @@
1
1
  import React, { CSSProperties } from "react";
2
2
  import { FormItemElementBase, MessageBody } from "@next-shared/form";
3
- import type { FormItemProps } from "../form-item/index.jsx";
3
+ import type { FormItemProps } from "../form-item/index.js";
4
4
  import "@next-core/theme";
5
5
  import "dayjs/locale/zh-cn.js";
6
6
  export declare enum presetRangeType {
@@ -11,12 +11,12 @@ export declare enum presetRangeType {
11
11
  ThisYear = "\u4ECA\u5E74"
12
12
  }
13
13
  export interface TimeRange {
14
- startTime: string;
15
- endTime: string;
14
+ startTime?: string;
15
+ endTime?: string;
16
16
  }
17
- type PickerType = "date" | "week" | "month" | "quarter" | "year";
18
- type OtherPickerType = "dateTime" | "hmTime" | "time";
19
- export type RangeType = PickerType & OtherPickerType;
17
+ export type PickerType = "date" | "week" | "month" | "quarter" | "year";
18
+ export type OtherPickerType = "dateTime" | "hmTime" | "time";
19
+ export type RangeType = PickerType | OtherPickerType;
20
20
  export interface EoTimeRangePickerProps extends FormItemProps {
21
21
  shadowRoot?: ShadowRoot | null;
22
22
  value?: TimeRange;
@@ -24,12 +24,11 @@ export interface EoTimeRangePickerProps extends FormItemProps {
24
24
  rangeType?: RangeType;
25
25
  placeholder?: string | [string, string];
26
26
  inputStyle?: CSSProperties;
27
- onChange?: (range: TimeRange) => void;
28
27
  emitChangeOnInit?: boolean;
29
28
  selectNearDays?: number;
30
29
  presetRanges?: presetRangeType[];
31
30
  }
32
- type RealTimeRangePickerProps = Omit<EoTimeRangePickerProps, keyof Omit<FormItemProps, "formElement">>;
31
+ type RealTimeRangePickerProps = Omit<EoTimeRangePickerComponentProps, keyof Omit<FormItemProps, "formElement">>;
33
32
  /**
34
33
  * 时间区间选择器
35
34
  * @author zhendonghuang
@@ -88,5 +87,8 @@ export declare class EoTimeRangePicker extends FormItemElementBase {
88
87
  render(): React.JSX.Element;
89
88
  }
90
89
  export declare function RealTimeRangePicker(props: RealTimeRangePickerProps): React.ReactElement;
91
- export declare function EoTimeRangePickerComponent(props: EoTimeRangePickerProps): React.JSX.Element;
90
+ interface EoTimeRangePickerComponentProps extends EoTimeRangePickerProps {
91
+ onChange?: (range: TimeRange) => void;
92
+ }
93
+ export declare function EoTimeRangePickerComponent(props: EoTimeRangePickerComponentProps): React.JSX.Element;
92
94
  export {};
@@ -5,7 +5,7 @@ import { FormItemElementBase } from "@next-shared/form";
5
5
  import type { FormItemProps } from "../../form-item/index.js";
6
6
  import "@next-core/theme";
7
7
  import { FileData } from "../utils.js";
8
- export interface UploadFileProps {
8
+ export interface UploadFileProps extends FormItemProps {
9
9
  label?: string;
10
10
  name?: string;
11
11
  required?: boolean;
@@ -3,7 +3,7 @@ import "@next-core/theme";
3
3
  import { FormItemElementBase } from "@next-shared/form";
4
4
  import type { FormItemProps } from "../../form-item/index.js";
5
5
  import { type ImageData } from "./utils.js";
6
- export interface UploadImageProps {
6
+ export interface UploadImageProps extends FormItemProps {
7
7
  label?: string;
8
8
  name?: string;
9
9
  required?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/form",
3
- "version": "1.21.2",
3
+ "version": "1.21.3",
4
4
  "homepage": "https://github.com/easyops-cn/next-advanced-bricks/tree/master/bricks/form",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,5 +46,5 @@
46
46
  "@next-bricks/icons": "*",
47
47
  "@next-bricks/illustrations": "*"
48
48
  },
49
- "gitHead": "acf4cd2e2492c1ff5cd58abfcb5c29d6e5ba9aea"
49
+ "gitHead": "44ff0a9a170ae911252a2030b9edde16ad229532"
50
50
  }