sakana-element 2.1.4 → 2.2.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 (85) hide show
  1. package/README.md +9 -6
  2. package/dist/es/Avatar-CxsRW-wl.js +9 -0
  3. package/dist/es/Badge-CoFWwBwv.js +14 -0
  4. package/dist/es/Breadcrumb-BtrwTVKW.js +15 -0
  5. package/dist/es/{Button-fW_ZOLmT.js → Button-S_31-UWJ.js} +3 -3
  6. package/dist/es/Card-DcW6nHYD.js +16 -0
  7. package/dist/es/Collapse-DsS7M-m3.js +53 -0
  8. package/dist/es/ConfigProvider-BgIewHXP.js +44 -0
  9. package/dist/es/{Dropdown-49nf6F8P.js → Dropdown-GcomGMAI.js} +10 -10
  10. package/dist/es/FileInput-BQ59woas.js +33 -0
  11. package/dist/es/Form-j90EzLXU.js +122 -0
  12. package/dist/es/{Input-DBPpvf0Y.js → Input-CiE4bPJN.js} +4 -4
  13. package/dist/es/Link-B9B2APZq.js +11 -0
  14. package/dist/es/Loading-BW99pE5N.js +92 -0
  15. package/dist/es/Message-DCNnTUje.js +123 -0
  16. package/dist/es/{Notification-D4RYHV9o.js → Notification-CBzY5904.js} +14 -14
  17. package/dist/es/Popconfirm-DF6d2ORS.js +23 -0
  18. package/dist/es/Select-Dwqv8isB.js +133 -0
  19. package/dist/es/Switch-B1Gnv1tB.js +34 -0
  20. package/dist/es/{Tooltip-HWx_i2FA.js → Tooltip-k6gKnMyt.js} +3 -3
  21. package/dist/es/hooks-BaG7l8K5.js +116 -0
  22. package/dist/es/index.js +73 -63
  23. package/dist/index.css +1 -1
  24. package/dist/theme/Alert.css +1 -1
  25. package/dist/theme/Avatar.css +116 -0
  26. package/dist/theme/Badge.css +36 -30
  27. package/dist/theme/Breadcrumb.css +150 -0
  28. package/dist/theme/Button.css +216 -216
  29. package/dist/theme/Card.css +170 -19
  30. package/dist/theme/Collapse.css +214 -54
  31. package/dist/theme/FileInput.css +365 -0
  32. package/dist/theme/Form.css +65 -34
  33. package/dist/theme/Link.css +50 -0
  34. package/dist/theme/Loading.css +154 -4
  35. package/dist/theme/Message.css +7 -4
  36. package/dist/theme/Notification.css +21 -21
  37. package/dist/theme/Popconfirm.css +5 -5
  38. package/dist/theme/Select.css +78 -78
  39. package/dist/theme/index.css +1 -5
  40. package/dist/types/components/Avatar/index.d.ts +30 -0
  41. package/dist/types/components/Avatar/types.d.ts +10 -0
  42. package/dist/types/components/Badge/types.d.ts +1 -0
  43. package/dist/types/components/Breadcrumb/constants.d.ts +3 -0
  44. package/dist/types/components/Breadcrumb/index.d.ts +45 -0
  45. package/dist/types/components/Breadcrumb/types.d.ts +13 -0
  46. package/dist/types/components/Card/types.d.ts +6 -0
  47. package/dist/types/components/Collapse/constants.d.ts +3 -0
  48. package/dist/types/components/Collapse/index.d.ts +9 -3
  49. package/dist/types/components/Collapse/types.d.ts +12 -0
  50. package/dist/types/components/FileInput/constants.d.ts +3 -0
  51. package/dist/types/components/FileInput/index.d.ts +58 -0
  52. package/dist/types/components/FileInput/types.d.ts +24 -0
  53. package/dist/types/components/Form/types.d.ts +17 -7
  54. package/dist/types/components/Input/index.d.ts +5 -5
  55. package/dist/types/components/Link/index.d.ts +34 -0
  56. package/dist/types/components/Link/types.d.ts +10 -0
  57. package/dist/types/components/Loading/index.d.ts +25 -0
  58. package/dist/types/components/Loading/types.d.ts +9 -0
  59. package/dist/types/components/Message/types.d.ts +2 -2
  60. package/dist/types/components/MessageBox/types.d.ts +2 -2
  61. package/dist/types/components/Notification/index.d.ts +1 -1
  62. package/dist/types/components/Notification/methods.d.ts +3 -1
  63. package/dist/types/components/Notification/types.d.ts +2 -2
  64. package/dist/types/components/Select/constants.d.ts +2 -1
  65. package/dist/types/components/Select/index.d.ts +11 -11
  66. package/dist/types/components/Select/useKeyMap.d.ts +1 -1
  67. package/dist/types/components/index.d.ts +4 -0
  68. package/dist/types/hooks/vitest.setup.d.ts +4 -0
  69. package/dist/umd/index.css +1 -1
  70. package/dist/umd/index.css.gz +0 -0
  71. package/dist/umd/index.umd.cjs +5 -14
  72. package/dist/umd/index.umd.cjs.gz +0 -0
  73. package/package.json +59 -60
  74. package/dist/es/Badge-BG-vYP8Y.js +0 -13
  75. package/dist/es/Card-BCBnlVi_.js +0 -12
  76. package/dist/es/Collapse-B08VhCVq.js +0 -38
  77. package/dist/es/ConfigProvider-DZO1d5Eq.js +0 -44
  78. package/dist/es/Form-CGiTDSGI.js +0 -108
  79. package/dist/es/Loading-DlygqGOv.js +0 -88
  80. package/dist/es/Message-ganFfLeU.js +0 -123
  81. package/dist/es/Popconfirm-Cop44KwQ.js +0 -22
  82. package/dist/es/Select-TIoGsqKv.js +0 -133
  83. package/dist/es/Switch-CHjcLtHs.js +0 -34
  84. package/dist/es/hooks-CYdEHUVd.js +0 -105
  85. package/dist/theme/fonts/zpix.ttf +0 -0
@@ -75,14 +75,10 @@ hr {
75
75
  /**
76
76
  * zpix - A pixel font for retro UI
77
77
  * Source: https://github.com/SolidZORO/zpix-pixel-font
78
- *
79
- * Place zpix.ttf file in this directory (packages/theme/fonts/)
80
78
  */
81
79
  @font-face {
82
80
  font-family: "zpix";
83
- src:
84
- url("../theme/fonts/zpix.woff2") format("woff2"),
85
- url("../theme/fonts/zpix.ttf") format("truetype");
81
+ src: url("../theme/fonts/zpix.woff2") format("woff2");
86
82
  font-weight: normal;
87
83
  font-style: normal;
88
84
  font-display: swap;
@@ -0,0 +1,30 @@
1
+ export declare const PxAvatar: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').AvatarProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3
+ size: import('packages/core').AvatarSize;
4
+ shape: import('packages/core').AvatarShape;
5
+ border: boolean;
6
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLSpanElement, import('vue').ComponentProvideOptions, {
7
+ P: {};
8
+ B: {};
9
+ D: {};
10
+ C: {};
11
+ M: {};
12
+ Defaults: {};
13
+ }, Readonly<import('packages/core').AvatarProps> & Readonly<{}>, {}, {}, {}, {}, {
14
+ size: import('packages/core').AvatarSize;
15
+ shape: import('packages/core').AvatarShape;
16
+ border: boolean;
17
+ }>;
18
+ __isFragment?: never;
19
+ __isTeleport?: never;
20
+ __isSuspense?: never;
21
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').AvatarProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
22
+ size: import('packages/core').AvatarSize;
23
+ shape: import('packages/core').AvatarShape;
24
+ border: boolean;
25
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
26
+ $slots: {
27
+ default?(_: {}): any;
28
+ };
29
+ }) & import('vue').Plugin;
30
+ export * from './types';
@@ -0,0 +1,10 @@
1
+ export type AvatarSize = 'large' | 'default' | 'small';
2
+ export type AvatarShape = 'circle' | 'square';
3
+ export type AvatarStatus = 'online' | 'offline';
4
+ export interface AvatarProps {
5
+ size?: AvatarSize;
6
+ shape?: AvatarShape;
7
+ border?: boolean;
8
+ color?: string;
9
+ status?: AvatarStatus;
10
+ }
@@ -7,4 +7,5 @@ export interface BadgeProps {
7
7
  dash?: boolean;
8
8
  color?: string;
9
9
  round?: boolean;
10
+ icon?: string;
10
11
  }
@@ -0,0 +1,3 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { BreadcrumbContext } from './types';
3
+ export declare const BREADCRUMB_CTX_KEY: InjectionKey<BreadcrumbContext>;
@@ -0,0 +1,45 @@
1
+ export declare const PxBreadcrumb: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').BreadcrumbProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3
+ separator: string;
4
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLElement, import('vue').ComponentProvideOptions, {
5
+ P: {};
6
+ B: {};
7
+ D: {};
8
+ C: {};
9
+ M: {};
10
+ Defaults: {};
11
+ }, Readonly<import('packages/core').BreadcrumbProps> & Readonly<{}>, {}, {}, {}, {}, {
12
+ separator: string;
13
+ }>;
14
+ __isFragment?: never;
15
+ __isTeleport?: never;
16
+ __isSuspense?: never;
17
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').BreadcrumbProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
18
+ separator: string;
19
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
20
+ $slots: Readonly<{
21
+ default?(_: {}): any;
22
+ separator?(_: {}): any;
23
+ }> & {
24
+ default?(_: {}): any;
25
+ separator?(_: {}): any;
26
+ };
27
+ }) & import('vue').Plugin;
28
+ export declare const PxBreadcrumbItem: {
29
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').BreadcrumbItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLLIElement, import('vue').ComponentProvideOptions, {
30
+ P: {};
31
+ B: {};
32
+ D: {};
33
+ C: {};
34
+ M: {};
35
+ Defaults: {};
36
+ }, Readonly<import('packages/core').BreadcrumbItemProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
37
+ __isFragment?: never;
38
+ __isTeleport?: never;
39
+ __isSuspense?: never;
40
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').BreadcrumbItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
41
+ $slots: {
42
+ default?(_: {}): any;
43
+ };
44
+ }) & import('vue').Plugin;
45
+ export * from './types';
@@ -0,0 +1,13 @@
1
+ import { Slot } from 'vue';
2
+ export interface BreadcrumbProps {
3
+ separator?: string;
4
+ }
5
+ export interface BreadcrumbItemProps {
6
+ to?: string;
7
+ icon?: string;
8
+ disabled?: boolean;
9
+ }
10
+ export interface BreadcrumbContext {
11
+ separator: string;
12
+ separatorSlot?: Slot;
13
+ }
@@ -1,6 +1,12 @@
1
+ export type CardType = 'primary' | 'success' | 'info' | 'warning' | 'danger';
1
2
  export type CardShadow = 'always' | 'hover' | 'never';
2
3
  export interface CardProps {
4
+ type?: CardType;
5
+ color?: string;
3
6
  hoverable?: boolean;
4
7
  shadow?: boolean | CardShadow;
5
8
  size?: 'small' | 'large';
9
+ outline?: boolean;
10
+ dash?: boolean;
11
+ ghost?: boolean;
6
12
  }
@@ -1,3 +1,6 @@
1
+ import { ColorTemplate } from '@sakana-element/utils';
1
2
  import { InjectionKey } from 'vue';
2
3
  import { CollapseContext } from './types';
3
4
  export declare const COLLAPSE_CTX_KEY: InjectionKey<CollapseContext>;
5
+ export declare const PRESET_COLLAPSE_COLORS: Set<string>;
6
+ export declare const COLLAPSE_COLOR_TEMPLATES: Record<string, ColorTemplate>;
@@ -31,18 +31,24 @@ export declare const PxCollapse: {
31
31
  };
32
32
  }) & import('vue').Plugin;
33
33
  export declare const PxCollapseItem: {
34
- new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').CollapseItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
34
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').CollapseItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
35
+ showArrow: boolean;
36
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
35
37
  P: {};
36
38
  B: {};
37
39
  D: {};
38
40
  C: {};
39
41
  M: {};
40
42
  Defaults: {};
41
- }, Readonly<import('packages/core').CollapseItemProps> & Readonly<{}>, {}, {}, {}, {}, {}>;
43
+ }, Readonly<import('packages/core').CollapseItemProps> & Readonly<{}>, {}, {}, {}, {}, {
44
+ showArrow: boolean;
45
+ }>;
42
46
  __isFragment?: never;
43
47
  __isTeleport?: never;
44
48
  __isSuspense?: never;
45
- } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').CollapseItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
49
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').CollapseItemProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
50
+ showArrow: boolean;
51
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
46
52
  $slots: {
47
53
  title?(_: {}): any;
48
54
  default?(_: {}): any;
@@ -3,11 +3,19 @@ export type CollapseItemName = string | number;
3
3
  export interface CollapseProps {
4
4
  modelValue: CollapseItemName[];
5
5
  accordion?: boolean;
6
+ color?: string;
7
+ ghost?: boolean;
8
+ trigger?: 'click' | 'focus';
9
+ iconPlacement?: 'start' | 'end';
6
10
  }
7
11
  export interface CollapseItemProps {
8
12
  name: CollapseItemName;
9
13
  title?: string;
10
14
  disabled?: boolean;
15
+ showArrow?: boolean;
16
+ icon?: string;
17
+ forceOpen?: boolean;
18
+ forceClose?: boolean;
11
19
  }
12
20
  export interface CollapseEmits {
13
21
  (e: 'update:modelValue', value: CollapseItemName[]): void;
@@ -16,4 +24,8 @@ export interface CollapseEmits {
16
24
  export interface CollapseContext {
17
25
  activeNames: Ref<CollapseItemName[]>;
18
26
  handleItemClick(name: CollapseItemName): void;
27
+ color?: string;
28
+ ghost?: boolean;
29
+ trigger?: 'click' | 'focus';
30
+ iconPlacement?: 'start' | 'end';
19
31
  }
@@ -0,0 +1,3 @@
1
+ import { ColorTemplate } from '@sakana-element/utils';
2
+ export declare const PRESET_FILE_INPUT_COLORS: Set<string>;
3
+ export declare const FILE_INPUT_COLOR_TEMPLATES: Record<string, ColorTemplate>;
@@ -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
+ "onUpdate:modelValue"?: ((value: FileList | null) => any) | undefined;
5
+ onChange?: ((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
+ "update:modelValue": (value: FileList | null) => any;
13
+ change: (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
+ "onUpdate:modelValue"?: ((value: FileList | null) => any) | undefined;
28
+ onChange?: ((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
+ "onUpdate:modelValue"?: ((value: FileList | null) => any) | undefined;
42
+ onChange?: ((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
+ "update:modelValue": (value: FileList | null) => any;
50
+ change: (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;
@@ -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
+ onFocus?: ((value: FocusEvent) => any) | undefined;
5
6
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
6
7
  onChange?: ((value: string) => any) | undefined;
7
8
  onBlur?: ((value: FocusEvent) => any) | undefined;
8
- onFocus?: ((value: FocusEvent) => 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
+ focus: (value: FocusEvent) => any;
18
19
  "update:modelValue": (value: string) => any;
19
20
  change: (value: string) => any;
20
21
  blur: (value: FocusEvent) => any;
21
- focus: (value: FocusEvent) => 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
+ onFocus?: ((value: FocusEvent) => any) | undefined;
39
40
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
40
41
  onChange?: ((value: string) => any) | undefined;
41
42
  onBlur?: ((value: FocusEvent) => any) | undefined;
42
- onFocus?: ((value: FocusEvent) => 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
+ onFocus?: ((value: FocusEvent) => any) | undefined;
59
60
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
60
61
  onChange?: ((value: string) => any) | undefined;
61
62
  onBlur?: ((value: FocusEvent) => any) | undefined;
62
- onFocus?: ((value: FocusEvent) => 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
+ focus: (value: FocusEvent) => any;
72
73
  "update:modelValue": (value: string) => any;
73
74
  change: (value: string) => any;
74
75
  blur: (value: FocusEvent) => any;
75
- focus: (value: FocusEvent) => 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
+ }
@@ -26,7 +26,7 @@ export interface MessageProps {
26
26
  offset?: number;
27
27
  zIndex: number;
28
28
  transitionName?: string;
29
- onDestory(): void;
29
+ onDestroy(): void;
30
30
  }
31
31
  export type MessageOptions = Partial<Omit<MessageProps, 'id'>>;
32
32
  export type MessageParams = string | VNode | MessageOptions;
@@ -41,4 +41,4 @@ export interface MessageCompInstance {
41
41
  close(): void;
42
42
  bottomOffset: Ref<number>;
43
43
  }
44
- export type CreateMessageProps = Omit<MessageProps, 'onDestory' | 'id' | 'zIndex'>;
44
+ export type CreateMessageProps = Omit<MessageProps, 'onDestroy' | 'id' | 'zIndex'>;
@@ -11,7 +11,7 @@ export type MessageBoxInputData = {
11
11
  value: string;
12
12
  action: MessageBoxAction;
13
13
  };
14
- export type MessageBoxData = MessageBoxInputData & MessageBoxAction;
14
+ export type MessageBoxData = MessageBoxInputData | MessageBoxAction;
15
15
  export interface MessageBoxOptions {
16
16
  title?: string;
17
17
  message?: string | VNode | (() => VNode);
@@ -49,7 +49,7 @@ export interface MessageBoxProps extends MessageBoxOptions {
49
49
  }
50
50
  export type MessageBoxShortcutMethod = ((message: MessageBoxOptions['message'], title: MessageBoxOptions['title'], options?: MessageBoxOptions) => Promise<MessageBoxData>) & ((message: MessageBoxOptions['message'], options?: MessageBoxOptions) => Promise<MessageBoxData>);
51
51
  export interface IErMessageBox {
52
- (options: MessageBoxOptions | string | VNode): Promise<any>;
52
+ (options: MessageBoxOptions | string | VNode): Promise<MessageBoxData>;
53
53
  alert: MessageBoxShortcutMethod;
54
54
  confirm: MessageBoxShortcutMethod;
55
55
  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,8 +1,10 @@
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;
8
10
  };
@@ -17,7 +17,7 @@ export interface NotificationProps {
17
17
  icon?: string;
18
18
  onClick?(): void;
19
19
  onClose?(): void;
20
- onDestory(): void;
20
+ onDestroy(): void;
21
21
  }
22
22
  export interface NotificationInstance {
23
23
  id: string;
@@ -30,7 +30,7 @@ export interface NotificationCompInstance {
30
30
  close(): void;
31
31
  bottomOffset: Ref<number>;
32
32
  }
33
- export type CreateNotificationProps = Omit<NotificationProps, 'onDestory' | 'id' | 'zIndex'>;
33
+ export type CreateNotificationProps = Omit<NotificationProps, 'onDestroy' | 'id' | 'zIndex'>;
34
34
  export interface NotificationHandler {
35
35
  close(): void;
36
36
  }
@@ -1,7 +1,8 @@
1
+ import { Options } from '@popperjs/core';
1
2
  import { ColorTemplate } from '@sakana-element/utils';
2
3
  import { InjectionKey } from 'vue';
3
4
  import { SelectContext } from './types';
4
5
  export declare const SELECT_CTX_KEY: InjectionKey<SelectContext>;
5
- export declare const POPPER_OPTIONS: any;
6
+ export declare const POPPER_OPTIONS: Partial<Options>;
6
7
  export declare const PRESET_SELECT_COLORS: Set<string>;
7
8
  export declare const SELECT_COLOR_TEMPLATES: Record<string, ColorTemplate>;