sakana-element 2.1.5 → 2.3.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.
Files changed (157) hide show
  1. package/README.md +95 -19
  2. package/dist/es/{Alert-C76ZWSVk.js → Alert-BwTsp4X3.js} +2 -2
  3. package/dist/es/Avatar-CJu6JYV3.js +9 -0
  4. package/dist/es/Badge-BmxZXX8k.js +14 -0
  5. package/dist/es/Breadcrumb-BP8MSklj.js +15 -0
  6. package/dist/es/{Button-fW_ZOLmT.js → Button-BJHtN7gh.js} +5 -5
  7. package/dist/es/Card-DJHkCmsz.js +16 -0
  8. package/dist/es/Checkbox-DX8L3fyp.js +51 -0
  9. package/dist/es/Collapse-Ir3V9CuO.js +53 -0
  10. package/dist/es/ConfigProvider-CsbSqwwi.js +44 -0
  11. package/dist/es/Divider-C7PtODSK.js +9 -0
  12. package/dist/es/Drawer-C2eVmvUp.js +40 -0
  13. package/dist/es/Dropdown-CVg_c2fB.js +104 -0
  14. package/dist/es/FileInput-BE26BmXm.js +33 -0
  15. package/dist/es/Form-7lZt5ehf.js +122 -0
  16. package/dist/es/{Icon-DpJyuj7c.js → Icon-BLDDdSU-.js} +1 -1
  17. package/dist/es/Indicator-B-en-MgG.js +9 -0
  18. package/dist/es/{Input-DBPpvf0Y.js → Input-C5HuVehE.js} +4 -4
  19. package/dist/es/Link-Av9RdcFv.js +11 -0
  20. package/dist/es/Loading-CBNDUWQd.js +92 -0
  21. package/dist/es/Message-DgnyyuXn.js +152 -0
  22. package/dist/es/Notification-LYRXnVAf.js +69 -0
  23. package/dist/es/{Overlay-BRDSWspM.js → Overlay-CpvMhnuU.js} +1 -1
  24. package/dist/es/Pixelate-BPypBgJU.js +67 -0
  25. package/dist/es/Popconfirm-DvxFdLrw.js +23 -0
  26. package/dist/es/Progress-Bc5INMhJ.js +12 -0
  27. package/dist/es/Radio-263_rtRl.js +33 -0
  28. package/dist/es/Select-7ZxUCS8z.js +133 -0
  29. package/dist/es/Switch-DiCsMJT3.js +34 -0
  30. package/dist/es/Table-BvA_xzDe.js +10 -0
  31. package/dist/es/Tooltip-J3ji6weH.js +74 -0
  32. package/dist/es/hooks-BqobYUzS.js +171 -0
  33. package/dist/es/index.js +94 -64
  34. package/dist/{theme → es/theme}/Alert.css +1 -1
  35. package/dist/es/theme/Avatar.css +86 -0
  36. package/dist/{theme → es/theme}/Badge.css +36 -30
  37. package/dist/es/theme/Breadcrumb.css +192 -0
  38. package/dist/{theme → es/theme}/Button.css +216 -216
  39. package/dist/es/theme/Card.css +347 -0
  40. package/dist/es/theme/Checkbox.css +484 -0
  41. package/dist/{theme → es/theme}/Collapse.css +214 -54
  42. package/dist/es/theme/Divider.css +111 -0
  43. package/dist/es/theme/Drawer.css +206 -0
  44. package/dist/es/theme/Dropdown.css +471 -0
  45. package/dist/es/theme/FileInput.css +365 -0
  46. package/dist/es/theme/Form.css +83 -0
  47. package/dist/es/theme/Indicator.css +159 -0
  48. package/dist/{theme → es/theme}/Input.css +1 -0
  49. package/dist/es/theme/Link.css +69 -0
  50. package/dist/es/theme/Loading.css +266 -0
  51. package/dist/es/theme/Message.css +565 -0
  52. package/dist/es/theme/Notification.css +316 -0
  53. package/dist/es/theme/Popconfirm.css +46 -0
  54. package/dist/es/theme/Progress.css +278 -0
  55. package/dist/es/theme/Radio.css +426 -0
  56. package/dist/{theme → es/theme}/Select.css +78 -78
  57. package/dist/es/theme/Table.css +680 -0
  58. package/dist/es/theme/Tooltip.css +235 -0
  59. package/dist/es/utils-BS5vsvlM.js +101 -0
  60. package/dist/index.css +1 -1
  61. package/dist/types/components/Avatar/index.d.ts +30 -0
  62. package/dist/types/components/Avatar/types.d.ts +8 -0
  63. package/dist/types/components/Badge/types.d.ts +1 -0
  64. package/dist/types/components/Breadcrumb/constants.d.ts +3 -0
  65. package/dist/types/components/Breadcrumb/index.d.ts +45 -0
  66. package/dist/types/components/Breadcrumb/types.d.ts +13 -0
  67. package/dist/types/components/Card/types.d.ts +6 -0
  68. package/dist/types/components/Checkbox/constants.d.ts +5 -0
  69. package/dist/types/components/Checkbox/index.d.ts +94 -0
  70. package/dist/types/components/Checkbox/types.d.ts +46 -0
  71. package/dist/types/components/Collapse/constants.d.ts +3 -0
  72. package/dist/types/components/Collapse/index.d.ts +14 -8
  73. package/dist/types/components/Collapse/types.d.ts +12 -0
  74. package/dist/types/components/Divider/index.d.ts +30 -0
  75. package/dist/types/components/Divider/types.d.ts +10 -0
  76. package/dist/types/components/Drawer/constants.d.ts +1 -0
  77. package/dist/types/components/Drawer/index.d.ts +72 -0
  78. package/dist/types/components/Drawer/types.d.ts +20 -0
  79. package/dist/types/components/Dropdown/index.d.ts +11 -1
  80. package/dist/types/components/Dropdown/types.d.ts +3 -0
  81. package/dist/types/components/Dropdown/useDropdownKeyboard.d.ts +8 -0
  82. package/dist/types/components/FileInput/constants.d.ts +3 -0
  83. package/dist/types/components/FileInput/index.d.ts +58 -0
  84. package/dist/types/components/FileInput/types.d.ts +24 -0
  85. package/dist/types/components/Form/types.d.ts +17 -7
  86. package/dist/types/components/Indicator/constants.d.ts +2 -0
  87. package/dist/types/components/Indicator/index.d.ts +28 -0
  88. package/dist/types/components/Indicator/types.d.ts +10 -0
  89. package/dist/types/components/Input/index.d.ts +10 -10
  90. package/dist/types/components/Link/index.d.ts +34 -0
  91. package/dist/types/components/Link/types.d.ts +10 -0
  92. package/dist/types/components/Loading/index.d.ts +25 -0
  93. package/dist/types/components/Loading/types.d.ts +9 -0
  94. package/dist/types/components/Message/methods.d.ts +2 -0
  95. package/dist/types/components/Message/types.d.ts +9 -3
  96. package/dist/types/components/MessageBox/types.d.ts +16 -4
  97. package/dist/types/components/Notification/index.d.ts +1 -1
  98. package/dist/types/components/Notification/methods.d.ts +6 -1
  99. package/dist/types/components/Notification/types.d.ts +10 -4
  100. package/dist/types/components/Pixelate/constants.d.ts +2 -0
  101. package/dist/types/components/Pixelate/index.d.ts +71 -0
  102. package/dist/types/components/Pixelate/types.d.ts +23 -0
  103. package/dist/types/components/Popconfirm/index.d.ts +16 -7
  104. package/dist/types/components/Popconfirm/types.d.ts +2 -1
  105. package/dist/types/components/Progress/constants.d.ts +2 -0
  106. package/dist/types/components/Progress/index.d.ts +50 -0
  107. package/dist/types/components/Progress/types.d.ts +22 -0
  108. package/dist/types/components/Radio/constants.d.ts +5 -0
  109. package/dist/types/components/Radio/index.d.ts +88 -0
  110. package/dist/types/components/Radio/types.d.ts +43 -0
  111. package/dist/types/components/Select/constants.d.ts +2 -1
  112. package/dist/types/components/Select/index.d.ts +35 -26
  113. package/dist/types/components/Switch/index.d.ts +5 -5
  114. package/dist/types/components/Table/index.d.ts +27 -0
  115. package/dist/types/components/Table/types.d.ts +20 -0
  116. package/dist/types/components/Tooltip/index.d.ts +6 -0
  117. package/dist/types/components/Tooltip/types.d.ts +7 -0
  118. package/dist/types/components/index.d.ts +12 -0
  119. package/dist/types/hooks/index.d.ts +3 -1
  120. package/dist/types/hooks/useDraggable.d.ts +7 -0
  121. package/dist/types/hooks/useFocusTrap.d.ts +5 -0
  122. package/dist/types/hooks/vitest.setup.d.ts +4 -0
  123. package/dist/types/utils/index.d.ts +1 -0
  124. package/dist/types/utils/instance-management.d.ts +40 -0
  125. package/dist/umd/index.css +1 -1
  126. package/dist/umd/index.css.gz +0 -0
  127. package/dist/umd/index.umd.cjs +5 -14
  128. package/dist/umd/index.umd.cjs.gz +0 -0
  129. package/package.json +5 -6
  130. package/dist/es/Badge-BG-vYP8Y.js +0 -13
  131. package/dist/es/Card-BCBnlVi_.js +0 -12
  132. package/dist/es/Collapse-B08VhCVq.js +0 -38
  133. package/dist/es/ConfigProvider-DZO1d5Eq.js +0 -44
  134. package/dist/es/Dropdown-49nf6F8P.js +0 -40
  135. package/dist/es/Form-CGiTDSGI.js +0 -108
  136. package/dist/es/Loading-DlygqGOv.js +0 -88
  137. package/dist/es/Message-ganFfLeU.js +0 -123
  138. package/dist/es/Notification-D4RYHV9o.js +0 -58
  139. package/dist/es/Popconfirm-Cop44KwQ.js +0 -22
  140. package/dist/es/Select-Blw_iO2r.js +0 -133
  141. package/dist/es/Switch-CHjcLtHs.js +0 -34
  142. package/dist/es/Tooltip-HWx_i2FA.js +0 -74
  143. package/dist/es/hooks-CYdEHUVd.js +0 -105
  144. package/dist/es/utils-bsCscZfS.js +0 -84
  145. package/dist/theme/Card.css +0 -112
  146. package/dist/theme/Dropdown.css +0 -187
  147. package/dist/theme/Form.css +0 -52
  148. package/dist/theme/Loading.css +0 -78
  149. package/dist/theme/Message.css +0 -353
  150. package/dist/theme/Notification.css +0 -126
  151. package/dist/theme/Popconfirm.css +0 -30
  152. package/dist/theme/Tooltip.css +0 -111
  153. /package/dist/{theme → es/theme}/Icon.css +0 -0
  154. /package/dist/{theme → es/theme}/Overlay.css +0 -0
  155. /package/dist/{theme → es/theme}/Switch.css +0 -0
  156. /package/dist/{theme → es/theme}/fonts/zpix.woff2 +0 -0
  157. /package/dist/{theme → es/theme}/index.css +0 -0
@@ -0,0 +1,58 @@
1
+ export declare const PxFileInput: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').FileInputProps> & Readonly<{
3
+ onClear?: (() => any) | undefined;
4
+ onChange?: ((value: FileList | null) => any) | undefined;
5
+ "onUpdate:modelValue"?: ((value: FileList | null) => any) | undefined;
6
+ }>, {
7
+ ref: import('vue').Ref<HTMLInputElement | undefined>;
8
+ open(): void;
9
+ clear(): void;
10
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
11
+ clear: () => any;
12
+ change: (value: FileList | null) => any;
13
+ "update:modelValue": (value: FileList | null) => any;
14
+ }, import('vue').PublicProps, {
15
+ placeholder: string;
16
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
17
+ inputRef: HTMLInputElement;
18
+ }, any, import('vue').ComponentProvideOptions, {
19
+ P: {};
20
+ B: {};
21
+ D: {};
22
+ C: {};
23
+ M: {};
24
+ Defaults: {};
25
+ }, Readonly<import('packages/core').FileInputProps> & Readonly<{
26
+ onClear?: (() => any) | undefined;
27
+ onChange?: ((value: FileList | null) => any) | undefined;
28
+ "onUpdate:modelValue"?: ((value: FileList | null) => any) | undefined;
29
+ }>, {
30
+ ref: import('vue').Ref<HTMLInputElement | undefined>;
31
+ open(): void;
32
+ clear(): void;
33
+ }, {}, {}, {}, {
34
+ placeholder: string;
35
+ }>;
36
+ __isFragment?: never;
37
+ __isTeleport?: never;
38
+ __isSuspense?: never;
39
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').FileInputProps> & Readonly<{
40
+ onClear?: (() => any) | undefined;
41
+ onChange?: ((value: FileList | null) => any) | undefined;
42
+ "onUpdate:modelValue"?: ((value: FileList | null) => any) | undefined;
43
+ }>, {
44
+ ref: import('vue').Ref<HTMLInputElement | undefined>;
45
+ open(): void;
46
+ clear(): void;
47
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
48
+ clear: () => any;
49
+ change: (value: FileList | null) => any;
50
+ "update:modelValue": (value: FileList | null) => any;
51
+ }, string, {
52
+ placeholder: string;
53
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
54
+ $slots: {
55
+ trigger?(_: {}): any;
56
+ };
57
+ }) & import('vue').Plugin;
58
+ export * from './types';
@@ -0,0 +1,24 @@
1
+ import { Ref } from 'vue';
2
+ export interface FileInputProps {
3
+ modelValue?: FileList | null;
4
+ id?: string;
5
+ size?: 'large' | 'small';
6
+ color?: string;
7
+ ghost?: boolean;
8
+ disabled?: boolean;
9
+ accept?: string;
10
+ multiple?: boolean;
11
+ placeholder?: string;
12
+ clearable?: boolean;
13
+ form?: string;
14
+ }
15
+ export interface FileInputEmits {
16
+ (e: 'update:modelValue', value: FileList | null): void;
17
+ (e: 'change', value: FileList | null): void;
18
+ (e: 'clear'): void;
19
+ }
20
+ export interface FileInputInstance {
21
+ ref: Ref<HTMLInputElement | undefined>;
22
+ open(): void;
23
+ clear(): void;
24
+ }
@@ -1,20 +1,30 @@
1
- import { RuleItem, ValidateError, ValidateFieldsError } from 'async-validator';
2
1
  import { Ref } from 'vue';
3
- export interface FormItemRule extends RuleItem {
2
+ import { ZodType } from 'zod';
3
+ export interface FormItemRule {
4
4
  trigger?: string | string[];
5
+ schema?: ZodType;
6
+ required?: boolean;
7
+ message?: string;
5
8
  }
6
9
  export type FormRules = Record<string, FormItemRule[]>;
7
10
  export type FormValidateResult = Promise<boolean>;
8
- export type FormValidateCallback = (isValid: boolean, invalidFields?: ValidateFieldsError) => void;
11
+ export type FormValidateCallback = (isValid: boolean, invalidFields?: FormValidateFailure['fields']) => void;
9
12
  export type ValidateStatus = 'success' | 'error' | 'init' | 'validating';
10
- export interface FormValidateFailuer {
11
- errors?: ValidateError[];
12
- fields: ValidateFieldsError;
13
+ export interface FormValidateFailure {
14
+ errors: {
15
+ field: string;
16
+ message: string;
17
+ }[];
18
+ fields: Record<string, {
19
+ message: string;
20
+ }[]>;
13
21
  }
14
22
  export interface FormProps {
15
- model: Record<string, any>;
23
+ model: Record<string, unknown>;
16
24
  rules?: FormRules;
17
25
  disabled?: boolean;
26
+ inline?: boolean;
27
+ statusIcon?: boolean;
18
28
  labelWidth?: number | string;
19
29
  labelPosition?: 'left' | 'right' | 'top';
20
30
  labelSuffix?: string;
@@ -0,0 +1,2 @@
1
+ import { ColorTemplate } from '@sakana-element/utils';
2
+ export declare const INDICATOR_COLOR_TEMPLATE: ColorTemplate;
@@ -0,0 +1,28 @@
1
+ export declare const PxIndicator: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').IndicatorProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3
+ type: import('packages/core').IndicatorType;
4
+ placement: import('packages/core').IndicatorPlacement;
5
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
6
+ P: {};
7
+ B: {};
8
+ D: {};
9
+ C: {};
10
+ M: {};
11
+ Defaults: {};
12
+ }, Readonly<import('packages/core').IndicatorProps> & Readonly<{}>, {}, {}, {}, {}, {
13
+ type: import('packages/core').IndicatorType;
14
+ placement: import('packages/core').IndicatorPlacement;
15
+ }>;
16
+ __isFragment?: never;
17
+ __isTeleport?: never;
18
+ __isSuspense?: never;
19
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').IndicatorProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
20
+ type: import('packages/core').IndicatorType;
21
+ placement: import('packages/core').IndicatorPlacement;
22
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
23
+ $slots: {
24
+ default?(_: {}): any;
25
+ indicator?(_: {}): any;
26
+ };
27
+ }) & import('vue').Plugin;
28
+ export * from './types';
@@ -0,0 +1,10 @@
1
+ export type IndicatorPlacement = 'top-start' | 'top-center' | 'top-end' | 'middle-start' | 'middle-center' | 'middle-end' | 'bottom-start' | 'bottom-center' | 'bottom-end';
2
+ export type IndicatorType = 'primary' | 'success' | 'info' | 'warning' | 'danger';
3
+ export interface IndicatorProps {
4
+ placement?: IndicatorPlacement;
5
+ type?: IndicatorType;
6
+ color?: string;
7
+ offset?: [number, number];
8
+ inline?: boolean;
9
+ processing?: boolean;
10
+ }
@@ -2,10 +2,10 @@ export declare const PxInput: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').InputProps> & Readonly<{
3
3
  onInput?: ((value: string) => any) | undefined;
4
4
  onClear?: (() => any) | undefined;
5
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
6
- onChange?: ((value: string) => any) | undefined;
7
5
  onBlur?: ((value: FocusEvent) => any) | undefined;
6
+ onChange?: ((value: string) => any) | undefined;
8
7
  onFocus?: ((value: FocusEvent) => any) | undefined;
8
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
9
9
  }>, {
10
10
  ref: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | undefined>;
11
11
  focus(): Promise<void>;
@@ -15,10 +15,10 @@ export declare const PxInput: {
15
15
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
16
16
  input: (value: string) => any;
17
17
  clear: () => any;
18
- "update:modelValue": (value: string) => any;
19
- change: (value: string) => any;
20
18
  blur: (value: FocusEvent) => any;
19
+ change: (value: string) => any;
21
20
  focus: (value: FocusEvent) => any;
21
+ "update:modelValue": (value: string) => any;
22
22
  }, import('vue').PublicProps, {
23
23
  type: string;
24
24
  autocomplete: string;
@@ -36,10 +36,10 @@ export declare const PxInput: {
36
36
  }, Readonly<import('packages/core').InputProps> & Readonly<{
37
37
  onInput?: ((value: string) => any) | undefined;
38
38
  onClear?: (() => any) | undefined;
39
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
40
- onChange?: ((value: string) => any) | undefined;
41
39
  onBlur?: ((value: FocusEvent) => any) | undefined;
40
+ onChange?: ((value: string) => any) | undefined;
42
41
  onFocus?: ((value: FocusEvent) => any) | undefined;
42
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
43
43
  }>, {
44
44
  ref: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | undefined>;
45
45
  focus(): Promise<void>;
@@ -56,10 +56,10 @@ export declare const PxInput: {
56
56
  } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').InputProps> & Readonly<{
57
57
  onInput?: ((value: string) => any) | undefined;
58
58
  onClear?: (() => any) | undefined;
59
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
60
- onChange?: ((value: string) => any) | undefined;
61
59
  onBlur?: ((value: FocusEvent) => any) | undefined;
60
+ onChange?: ((value: string) => any) | undefined;
62
61
  onFocus?: ((value: FocusEvent) => any) | undefined;
62
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
63
63
  }>, {
64
64
  ref: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | undefined>;
65
65
  focus(): Promise<void>;
@@ -69,10 +69,10 @@ export declare const PxInput: {
69
69
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
70
70
  input: (value: string) => any;
71
71
  clear: () => any;
72
- "update:modelValue": (value: string) => any;
73
- change: (value: string) => any;
74
72
  blur: (value: FocusEvent) => any;
73
+ change: (value: string) => any;
75
74
  focus: (value: FocusEvent) => any;
75
+ "update:modelValue": (value: string) => any;
76
76
  }, string, {
77
77
  type: string;
78
78
  autocomplete: string;
@@ -0,0 +1,34 @@
1
+ export declare const PxLink: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').LinkProps> & Readonly<{
3
+ onClick?: ((event: MouseEvent) => any) | undefined;
4
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
5
+ click: (event: MouseEvent) => any;
6
+ }, import('vue').PublicProps, {
7
+ underline: boolean;
8
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLAnchorElement, import('vue').ComponentProvideOptions, {
9
+ P: {};
10
+ B: {};
11
+ D: {};
12
+ C: {};
13
+ M: {};
14
+ Defaults: {};
15
+ }, Readonly<import('packages/core').LinkProps> & Readonly<{
16
+ onClick?: ((event: MouseEvent) => any) | undefined;
17
+ }>, {}, {}, {}, {}, {
18
+ underline: boolean;
19
+ }>;
20
+ __isFragment?: never;
21
+ __isTeleport?: never;
22
+ __isSuspense?: never;
23
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').LinkProps> & Readonly<{
24
+ onClick?: ((event: MouseEvent) => any) | undefined;
25
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
26
+ click: (event: MouseEvent) => any;
27
+ }, string, {
28
+ underline: boolean;
29
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
30
+ $slots: {
31
+ default?(_: {}): any;
32
+ };
33
+ }) & import('vue').Plugin;
34
+ export * from './types';
@@ -0,0 +1,10 @@
1
+ export type LinkType = 'primary' | 'success' | 'info' | 'warning' | 'danger';
2
+ export interface LinkProps {
3
+ type?: LinkType;
4
+ underline?: boolean;
5
+ disabled?: boolean;
6
+ href?: string;
7
+ target?: string;
8
+ color?: string;
9
+ }
10
+ export type LinkEmits = (e: 'click', event: MouseEvent) => void;
@@ -1,6 +1,31 @@
1
1
  import { App } from 'vue';
2
2
  import { vLoading } from './directive';
3
3
  import { Loading } from './service';
4
+ export declare const PxLoadingIndicator: {
5
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').LoadingIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
6
+ size: import('packages/core').LoadingSize;
7
+ type: import('packages/core').LoadingType;
8
+ variant: import('packages/core').LoadingVariant;
9
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLSpanElement, import('vue').ComponentProvideOptions, {
10
+ P: {};
11
+ B: {};
12
+ D: {};
13
+ C: {};
14
+ M: {};
15
+ Defaults: {};
16
+ }, Readonly<import('packages/core').LoadingIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, {
17
+ size: import('packages/core').LoadingSize;
18
+ type: import('packages/core').LoadingType;
19
+ variant: import('packages/core').LoadingVariant;
20
+ }>;
21
+ __isFragment?: never;
22
+ __isTeleport?: never;
23
+ __isSuspense?: never;
24
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').LoadingIndicatorProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
25
+ size: import('packages/core').LoadingSize;
26
+ type: import('packages/core').LoadingType;
27
+ variant: import('packages/core').LoadingVariant;
28
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
4
29
  export declare const PxLoading: {
5
30
  name: string;
6
31
  install(app: App): void;
@@ -17,3 +17,12 @@ export type LoadingOptions = Partial<Omit<LoadingOptionsResolved, 'parent' | 'ta
17
17
  zIndex?: number;
18
18
  onAfterLeave(): void;
19
19
  }>;
20
+ export type LoadingVariant = 'spinner' | 'dots' | 'bars' | 'ring';
21
+ export type LoadingSize = 'xs' | 'sm' | 'md' | 'lg';
22
+ export type LoadingType = 'primary' | 'success' | 'info' | 'warning' | 'danger';
23
+ export interface LoadingIndicatorProps {
24
+ variant?: LoadingVariant;
25
+ size?: LoadingSize;
26
+ type?: LoadingType;
27
+ color?: string;
28
+ }
@@ -8,5 +8,7 @@ export declare const messageDefaults: {
8
8
  export declare function getLastBottomOffset(this: MessageProps): any;
9
9
  export declare const message: MessageFn & Partial<Message>;
10
10
  export declare function closeAll(type?: MessageType): void;
11
+ /** Forcefully unmount all message instances, bypassing CSS transitions. */
12
+ export declare function destroyAll(): void;
11
13
  declare const _default: Message;
12
14
  export default _default;
@@ -26,9 +26,15 @@ export interface MessageProps {
26
26
  offset?: number;
27
27
  zIndex: number;
28
28
  transitionName?: string;
29
- onDestory(): void;
29
+ plain?: boolean;
30
+ ghost?: boolean;
31
+ icon?: string;
32
+ showTimer?: boolean;
33
+ onDestroy(): void;
30
34
  }
31
- export type MessageOptions = Partial<Omit<MessageProps, 'id'>>;
35
+ export type MessageOptions = Partial<Omit<MessageProps, 'id'>> & {
36
+ max?: number;
37
+ };
32
38
  export type MessageParams = string | VNode | MessageOptions;
33
39
  export interface MessageInstance {
34
40
  id: string;
@@ -41,4 +47,4 @@ export interface MessageCompInstance {
41
47
  close(): void;
42
48
  bottomOffset: Ref<number>;
43
49
  }
44
- export type CreateMessageProps = Omit<MessageProps, 'onDestory' | 'id' | 'zIndex'>;
50
+ export type CreateMessageProps = Omit<MessageProps, 'onDestroy' | 'id' | 'zIndex'>;
@@ -1,4 +1,5 @@
1
- import { Ref, VNode } from 'vue';
1
+ import { CSSProperties, Ref, VNode } from 'vue';
2
+ import { ZodType } from 'zod';
2
3
  import { ButtonType } from '../Button/types';
3
4
  import { MessageType } from '../Message/types';
4
5
  export type MessageBoxAction = 'confirm' | 'cancel' | 'close';
@@ -11,7 +12,7 @@ export type MessageBoxInputData = {
11
12
  value: string;
12
13
  action: MessageBoxAction;
13
14
  };
14
- export type MessageBoxData = MessageBoxInputData & MessageBoxAction;
15
+ export type MessageBoxData = MessageBoxInputData | MessageBoxAction;
15
16
  export interface MessageBoxOptions {
16
17
  title?: string;
17
18
  message?: string | VNode | (() => VNode);
@@ -39,7 +40,18 @@ export interface MessageBoxOptions {
39
40
  inputValue?: string;
40
41
  inputType?: 'text' | 'textarea' | 'password' | 'number';
41
42
  buttonSize?: 'default' | 'small' | 'large';
42
- beforeClose?: (action: MessageBoxAction, instance: MessageBoxOptions, done: () => void) => void;
43
+ beforeClose?: (action: MessageBoxAction, instance: MessageBoxOptions, done: () => void) => void | Promise<void>;
44
+ customClass?: string;
45
+ customStyle?: CSSProperties;
46
+ width?: string | number;
47
+ closeOnPressEscape?: boolean;
48
+ inputSchema?: ZodType;
49
+ inputErrorMessage?: string;
50
+ distinguishCancelAndClose?: boolean;
51
+ overlayClass?: string | string[] | Record<string, boolean>;
52
+ closeOnHashChange?: boolean;
53
+ draggable?: boolean;
54
+ footer?: VNode | (() => VNode);
43
55
  }
44
56
  export interface MessageBoxProps extends MessageBoxOptions {
45
57
  visible?: Ref<boolean>;
@@ -49,7 +61,7 @@ export interface MessageBoxProps extends MessageBoxOptions {
49
61
  }
50
62
  export type MessageBoxShortcutMethod = ((message: MessageBoxOptions['message'], title: MessageBoxOptions['title'], options?: MessageBoxOptions) => Promise<MessageBoxData>) & ((message: MessageBoxOptions['message'], options?: MessageBoxOptions) => Promise<MessageBoxData>);
51
63
  export interface IErMessageBox {
52
- (options: MessageBoxOptions | string | VNode): Promise<any>;
64
+ (options: MessageBoxOptions | string | VNode): Promise<MessageBoxData>;
53
65
  alert: MessageBoxShortcutMethod;
54
66
  confirm: MessageBoxShortcutMethod;
55
67
  prompt: MessageBoxShortcutMethod;
@@ -1,2 +1,2 @@
1
- export declare const PxNotification: Notification & import('vue').Plugin;
1
+ export declare const PxNotification: import('packages/core').Notification & import('vue').Plugin;
2
2
  export * from './types';
@@ -1,13 +1,18 @@
1
- import { NotificationFn, NotificationProps, NotificationType } from './types';
1
+ import { Notification, NotificationFn, NotificationProps, NotificationType } from './types';
2
2
  export declare const notificationDefaults: {
3
+ readonly title: "";
3
4
  readonly type: "info";
4
5
  readonly duration: 3000;
5
6
  readonly offset: 20;
7
+ readonly position: "top-right";
6
8
  readonly transitionName: "fade";
7
9
  readonly showClose: true;
10
+ readonly showTimer: true;
8
11
  };
9
12
  export declare const notification: NotificationFn & Partial<Notification>;
10
13
  export declare function closeAll(type?: NotificationType): void;
14
+ /** Forcefully unmount all notification instances, bypassing CSS transitions. */
15
+ export declare function destroyAll(): void;
11
16
  export declare function getLastBottomOffset(this: NotificationProps): any;
12
17
  declare const _default: Notification;
13
18
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { ComponentInternalInstance, Ref, VNode } from 'vue';
2
- export declare const notificationTypes: readonly ["info", "success", "warning", "danger"];
2
+ export declare const notificationTypes: readonly ["info", "success", "warning", "danger", "error"];
3
3
  export type NotificationType = (typeof notificationTypes)[number];
4
4
  export declare const notificationPosition: readonly ["top-right", "top-left", "bottom-right", "bottom-left"];
5
5
  export type NotificationPosition = (typeof notificationPosition)[number];
@@ -15,9 +15,12 @@ export interface NotificationProps {
15
15
  offset?: number;
16
16
  transitionName?: string;
17
17
  icon?: string;
18
+ plain?: boolean;
19
+ ghost?: boolean;
20
+ showTimer?: boolean;
18
21
  onClick?(): void;
19
22
  onClose?(): void;
20
- onDestory(): void;
23
+ onDestroy(): void;
21
24
  }
22
25
  export interface NotificationInstance {
23
26
  id: string;
@@ -30,11 +33,13 @@ export interface NotificationCompInstance {
30
33
  close(): void;
31
34
  bottomOffset: Ref<number>;
32
35
  }
33
- export type CreateNotificationProps = Omit<NotificationProps, 'onDestory' | 'id' | 'zIndex'>;
36
+ export type CreateNotificationProps = Omit<NotificationProps, 'onDestroy' | 'id' | 'zIndex'>;
34
37
  export interface NotificationHandler {
35
38
  close(): void;
36
39
  }
37
- export type NotificationOptions = Partial<Omit<NotificationProps, 'id'>>;
40
+ export type NotificationOptions = Partial<Omit<NotificationProps, 'id'>> & {
41
+ max?: number;
42
+ };
38
43
  export type NotificationParams = string | VNode | NotificationOptions;
39
44
  export type NotificationFn = {
40
45
  (props: NotificationParams): NotificationHandler;
@@ -46,4 +51,5 @@ export interface Notification extends NotificationFn {
46
51
  warning: NotificationTypeFn;
47
52
  info: NotificationTypeFn;
48
53
  danger: NotificationTypeFn;
54
+ error: NotificationTypeFn;
49
55
  }
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_PIXEL_SIZE = 8;
2
+ export declare const DEFAULT_BACKGROUND = "#FFFFFF";
@@ -0,0 +1,71 @@
1
+ export declare const PxPixelate: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').PixelateProps> & Readonly<{
3
+ onError?: ((event: Event) => any) | undefined;
4
+ onRendered?: (() => any) | undefined;
5
+ }>, {
6
+ render: () => void;
7
+ canvasRef: import('vue').Ref<HTMLCanvasElement | undefined, HTMLCanvasElement | undefined>;
8
+ originRef: import('vue').Ref<HTMLImageElement | undefined, HTMLImageElement | undefined>;
9
+ getSize: () => {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ getImageData: () => ImageData | null;
14
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
15
+ error: (event: Event) => any;
16
+ rendered: () => any;
17
+ }, import('vue').PublicProps, {
18
+ background: string;
19
+ pixelSize: number;
20
+ grayscale: boolean;
21
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
22
+ canvasRef: HTMLCanvasElement;
23
+ originRef: HTMLImageElement;
24
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
25
+ P: {};
26
+ B: {};
27
+ D: {};
28
+ C: {};
29
+ M: {};
30
+ Defaults: {};
31
+ }, Readonly<import('packages/core').PixelateProps> & Readonly<{
32
+ onError?: ((event: Event) => any) | undefined;
33
+ onRendered?: (() => any) | undefined;
34
+ }>, {
35
+ render: () => void;
36
+ canvasRef: import('vue').Ref<HTMLCanvasElement | undefined, HTMLCanvasElement | undefined>;
37
+ originRef: import('vue').Ref<HTMLImageElement | undefined, HTMLImageElement | undefined>;
38
+ getSize: () => {
39
+ width: number;
40
+ height: number;
41
+ };
42
+ getImageData: () => ImageData | null;
43
+ }, {}, {}, {}, {
44
+ background: string;
45
+ pixelSize: number;
46
+ grayscale: boolean;
47
+ }>;
48
+ __isFragment?: never;
49
+ __isTeleport?: never;
50
+ __isSuspense?: never;
51
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').PixelateProps> & Readonly<{
52
+ onError?: ((event: Event) => any) | undefined;
53
+ onRendered?: (() => any) | undefined;
54
+ }>, {
55
+ render: () => void;
56
+ canvasRef: import('vue').Ref<HTMLCanvasElement | undefined, HTMLCanvasElement | undefined>;
57
+ originRef: import('vue').Ref<HTMLImageElement | undefined, HTMLImageElement | undefined>;
58
+ getSize: () => {
59
+ width: number;
60
+ height: number;
61
+ };
62
+ getImageData: () => ImageData | null;
63
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
64
+ error: (event: Event) => any;
65
+ rendered: () => any;
66
+ }, string, {
67
+ background: string;
68
+ pixelSize: number;
69
+ grayscale: boolean;
70
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
71
+ export * from './types';
@@ -0,0 +1,23 @@
1
+ export interface PixelateProps {
2
+ src: string;
3
+ pixelSize?: number;
4
+ width?: number | string;
5
+ height?: number | string;
6
+ grayscale?: boolean;
7
+ palette?: string[] | number[][];
8
+ background?: string;
9
+ }
10
+ export interface PixelateEmits {
11
+ (e: 'rendered'): void;
12
+ (e: 'error', event: Event): void;
13
+ }
14
+ export interface PixelateInstance {
15
+ render(): void;
16
+ canvasRef: HTMLCanvasElement;
17
+ originRef: HTMLImageElement;
18
+ getSize(): {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ getImageData(): ImageData | null;
23
+ }