x-ui-design 0.2.63 → 0.2.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import './styles/global.css';
2
- declare const Button: import("react").ComponentType<import("./types/button").ButtonProps>;
2
+ declare const Button: import("react").ComponentType<import("@/types/button").ButtonProps>;
3
3
  declare const Checkbox: import("react").ComponentType<import("./types").DefaultProps & {
4
4
  disabled?: boolean;
5
5
  onChange?: (e: import("react").MouseEvent<HTMLInputElement> & import("./types").TargetProps) => void;
@@ -152,7 +152,9 @@ declare const SkeletonButton: import("react").ComponentType<import("./types/skel
152
152
  declare const SkeletonImage: import("react").ComponentType<import("./types/skeleton").SkeletonImageProps>;
153
153
  declare const SkeletonInput: import("react").ComponentType<import("./types/skeleton").SkeletonInputProps>;
154
154
  export { Button, Checkbox, Empty, DatePicker, RangePicker, TimePicker, Form, FormItem, Input, Textarea, Radio, RadioButton, RadioGroup, Select, Option, Tag, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, Upload };
155
- export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon } from '@/components/Icons';
155
+ export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon, } from '@/components/Icons';
156
156
  export { useForm } from '@/hooks/useForm';
157
157
  export { useWatch } from '@/hooks/useWatch';
158
158
  export type { FormInstance } from '@/types/form';
159
+ export type { ButtonProps } from '@/types/button';
160
+ export { clsx, createArray, parseValue } from '@/helpers';
package/dist/index.d.ts CHANGED
@@ -1,14 +1,17 @@
1
1
  import * as react from 'react';
2
- import { CSSProperties, ReactNode, MouseEventHandler, MouseEvent, ReactEventHandler, Key, FocusEventHandler, KeyboardEventHandler, FocusEvent, ButtonHTMLAttributes } from 'react';
2
+ import { CSSProperties, ReactNode, MouseEventHandler, MouseEvent, ReactEventHandler, Key, FocusEventHandler, KeyboardEventHandler, FocusEvent } from 'react';
3
3
  import * as __types_form from '@/types/form';
4
4
  export { FormInstance } from '@/types/form';
5
+ import * as __types_button from '@/types/button';
6
+ export { ButtonProps } from '@/types/button';
5
7
  export { ArrowIcon, CalendarIcon, CheckIcon, ClearIcon, DateDistanceIcon, ErrorIcon, LoadingIcon, SearchIcon, SpinerIcon, StampleIcon, SuccessIcon, TimeIcon, TrashIcon } from '@/components/Icons';
6
8
  export { useForm } from '@/hooks/useForm';
7
9
  export { useWatch } from '@/hooks/useWatch';
10
+ export { clsx, createArray, parseValue } from '@/helpers';
8
11
 
9
12
  type RuleType = any;
10
13
  type RuleTypes = RuleType | RuleType[];
11
- type SizeType$1 = 'small' | 'middle' | 'large';
14
+ type SizeType = 'small' | 'middle' | 'large';
12
15
  interface DefaultProps {
13
16
  prefixCls?: string;
14
17
  className?: string;
@@ -125,7 +128,7 @@ interface RadioGroupProps {
125
128
  defaultValue?: RuleType;
126
129
  value?: RuleType;
127
130
  onChange?: (e: SyntheticBaseEvent) => void;
128
- size?: SizeType$1;
131
+ size?: SizeType;
129
132
  disabled?: boolean;
130
133
  onMouseEnter?: MouseEventHandler<HTMLDivElement>;
131
134
  onMouseLeave?: MouseEventHandler<HTMLDivElement>;
@@ -173,7 +176,7 @@ type RadioProps = DefaultProps & {
173
176
  };
174
177
  type RadioButtonProps = RadioProps & {
175
178
  children?: ReactNode;
176
- size?: SizeType$1;
179
+ size?: SizeType;
177
180
  };
178
181
 
179
182
  interface BaseInfo {
@@ -202,7 +205,7 @@ type TDatePickerProps = DefaultProps & {
202
205
  }) => boolean;
203
206
  suffixIcon?: ReactNode;
204
207
  prefix?: ReactNode;
205
- size?: SizeType$1;
208
+ size?: SizeType;
206
209
  format?: FormatType<RuleType> | FormatType<RuleType>[] | {
207
210
  format: string;
208
211
  type?: 'mask';
@@ -350,49 +353,7 @@ type EmptyContentProps = DefaultProps & {
350
353
  icon?: ReactNode;
351
354
  };
352
355
 
353
- declare const ButtonTypes: readonly ["default", "primary", "dashed", "link", "text", "ghost"];
354
- declare const ButtonShapes: readonly ["default", "circle", "round"];
355
- declare const ButtonVariantTypes: readonly ["outlined", "dashed", "solid", "filled", "text", "link"];
356
- declare const ButtonColorTypes: readonly ["default", "primary", "danger", "blue", "purple", "cyan", "green", "magenta", "pink", "red", "orange", "yellow", "volcano", "geekblue", "lime", "gold"];
357
- type ButtonType = (typeof ButtonTypes)[number];
358
- type ButtonShape = (typeof ButtonShapes)[number];
359
- type ButtonVariantType = (typeof ButtonVariantTypes)[number];
360
- type ButtonColorType = (typeof ButtonColorTypes)[number];
361
- type SizeType = 'small' | 'middle' | 'large' | undefined;
362
- type ButtonHTMLType = 'button' | 'submit' | 'reset';
363
- interface BaseButtonProps {
364
- type?: ButtonType;
365
- color?: ButtonColorType;
366
- variant?: ButtonVariantType;
367
- icon?: ReactNode;
368
- iconPosition?: 'start' | 'end';
369
- shape?: ButtonShape;
370
- size?: SizeType;
371
- disabled?: boolean;
372
- loading?: boolean | {
373
- delay?: number;
374
- icon?: ReactNode;
375
- };
376
- prefixCls?: string;
377
- className?: string;
378
- rootClassName?: string;
379
- ghost?: boolean;
380
- danger?: boolean;
381
- block?: boolean;
382
- children?: ReactNode;
383
- classNames?: {
384
- icon?: string;
385
- };
386
- styles?: {
387
- icon?: CSSProperties;
388
- };
389
- }
390
- interface ButtonProps extends BaseButtonProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color' | 'type'> {
391
- href?: string;
392
- htmlType?: ButtonHTMLType;
393
- }
394
-
395
- declare const Button: react.ComponentType<ButtonProps>;
356
+ declare const Button: react.ComponentType<__types_button.ButtonProps>;
396
357
  declare const Checkbox: react.ComponentType<DefaultProps & {
397
358
  disabled?: boolean;
398
359
  onChange?: (e: react.MouseEvent<HTMLInputElement> & TargetProps) => void;
@@ -423,7 +384,7 @@ declare const FormItem: react.ComponentType<__types_form.FormItemProps>;
423
384
  declare const Input: react.ComponentType<Omit<react.InputHTMLAttributes<HTMLInputElement>, "size" | "prefix"> & DefaultProps & {
424
385
  addonBefore?: react.ReactNode;
425
386
  addonAfter?: react.ReactNode;
426
- size?: SizeType$1;
387
+ size?: SizeType;
427
388
  prefix?: react.ReactNode;
428
389
  suffix?: react.ReactNode;
429
390
  disabled?: boolean;
@@ -458,7 +419,7 @@ declare const Textarea: react.ComponentType<Omit<react.TextareaHTMLAttributes<HT
458
419
  count?: react.CSSProperties;
459
420
  };
460
421
  bordered?: boolean;
461
- size?: SizeType$1;
422
+ size?: SizeType;
462
423
  status?: "success" | "error";
463
424
  rootClassName?: string;
464
425
  variant?: "outlined" | "borderless" | "filled" | "underlined";
package/dist/index.esm.js CHANGED
@@ -3529,5 +3529,5 @@ var Skeleton$1 = /*#__PURE__*/Object.freeze({
3529
3529
  default: Skeleton
3530
3530
  });
3531
3531
 
3532
- export { ArrowIcon, Button$3 as Button, CalendarIcon, CheckIcon, Checkbox$2 as Checkbox, ClearIcon, DateDistanceIcon, DatePicker$2 as DatePicker, Empty$1 as Empty, ErrorIcon, Form, FormItem, Input$3 as Input, LoadingIcon, Option$2 as Option, Radio$3 as Radio, RadioButton$1 as RadioButton, RadioGroup$1 as RadioGroup, RangePicker$2 as RangePicker, SearchIcon, Select$2 as Select, Skeleton$2 as Skeleton, SkeletonAvatar$1 as SkeletonAvatar, SkeletonButton$1 as SkeletonButton, SkeletonImage$1 as SkeletonImage, SkeletonInput$1 as SkeletonInput, SpinerIcon, StampleIcon, SuccessIcon, Tag$2 as Tag, Textarea$2 as Textarea, TimeIcon, TimePicker$2 as TimePicker, TrashIcon, Upload$2 as Upload, useForm, useWatch };
3532
+ export { ArrowIcon, Button$3 as Button, CalendarIcon, CheckIcon, Checkbox$2 as Checkbox, ClearIcon, DateDistanceIcon, DatePicker$2 as DatePicker, Empty$1 as Empty, ErrorIcon, Form, FormItem, Input$3 as Input, LoadingIcon, Option$2 as Option, Radio$3 as Radio, RadioButton$1 as RadioButton, RadioGroup$1 as RadioGroup, RangePicker$2 as RangePicker, SearchIcon, Select$2 as Select, Skeleton$2 as Skeleton, SkeletonAvatar$1 as SkeletonAvatar, SkeletonButton$1 as SkeletonButton, SkeletonImage$1 as SkeletonImage, SkeletonInput$1 as SkeletonInput, SpinerIcon, StampleIcon, SuccessIcon, Tag$2 as Tag, Textarea$2 as Textarea, TimeIcon, TimePicker$2 as TimePicker, TrashIcon, Upload$2 as Upload, clsx, createArray, parseValue, useForm, useWatch };
3533
3533
  //# sourceMappingURL=index.esm.js.map