sakana-element 2.2.0 → 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 (130) hide show
  1. package/README.md +95 -22
  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-CoFWwBwv.js → Badge-BmxZXX8k.js} +2 -2
  5. package/dist/es/{Breadcrumb-BtrwTVKW.js → Breadcrumb-BP8MSklj.js} +2 -2
  6. package/dist/es/{Button-S_31-UWJ.js → Button-BJHtN7gh.js} +2 -2
  7. package/dist/es/{Card-DcW6nHYD.js → Card-DJHkCmsz.js} +2 -2
  8. package/dist/es/Checkbox-DX8L3fyp.js +51 -0
  9. package/dist/es/{Collapse-DsS7M-m3.js → Collapse-Ir3V9CuO.js} +2 -2
  10. package/dist/es/{ConfigProvider-BgIewHXP.js → ConfigProvider-CsbSqwwi.js} +1 -1
  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-BQ59woas.js → FileInput-BE26BmXm.js} +3 -3
  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-CiE4bPJN.js → Input-C5HuVehE.js} +6 -6
  19. package/dist/es/{Link-B9B2APZq.js → Link-Av9RdcFv.js} +1 -1
  20. package/dist/es/{Loading-BW99pE5N.js → Loading-CBNDUWQd.js} +12 -12
  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-Dwqv8isB.js → Select-7ZxUCS8z.js} +13 -13
  29. package/dist/es/{Switch-B1Gnv1tB.js → Switch-DiCsMJT3.js} +3 -3
  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 +90 -70
  34. package/dist/{theme → es/theme}/Avatar.css +13 -43
  35. package/dist/{theme → es/theme}/Breadcrumb.css +46 -4
  36. package/dist/es/theme/Card.css +347 -0
  37. package/dist/es/theme/Checkbox.css +484 -0
  38. package/dist/es/theme/Divider.css +111 -0
  39. package/dist/es/theme/Drawer.css +206 -0
  40. package/dist/es/theme/Dropdown.css +471 -0
  41. package/dist/es/theme/Indicator.css +159 -0
  42. package/dist/{theme → es/theme}/Input.css +1 -0
  43. package/dist/{theme → es/theme}/Link.css +22 -3
  44. package/dist/{theme → es/theme}/Loading.css +50 -12
  45. package/dist/{theme → es/theme}/Message.css +249 -40
  46. package/dist/es/theme/Notification.css +316 -0
  47. package/dist/es/theme/Popconfirm.css +46 -0
  48. package/dist/es/theme/Progress.css +278 -0
  49. package/dist/es/theme/Radio.css +426 -0
  50. package/dist/es/theme/Table.css +680 -0
  51. package/dist/es/theme/Tooltip.css +235 -0
  52. package/dist/es/utils-BS5vsvlM.js +101 -0
  53. package/dist/index.css +1 -1
  54. package/dist/types/components/Avatar/types.d.ts +0 -2
  55. package/dist/types/components/Checkbox/constants.d.ts +5 -0
  56. package/dist/types/components/Checkbox/index.d.ts +94 -0
  57. package/dist/types/components/Checkbox/types.d.ts +46 -0
  58. package/dist/types/components/Collapse/index.d.ts +5 -5
  59. package/dist/types/components/Divider/index.d.ts +30 -0
  60. package/dist/types/components/Divider/types.d.ts +10 -0
  61. package/dist/types/components/Drawer/constants.d.ts +1 -0
  62. package/dist/types/components/Drawer/index.d.ts +72 -0
  63. package/dist/types/components/Drawer/types.d.ts +20 -0
  64. package/dist/types/components/Dropdown/index.d.ts +11 -1
  65. package/dist/types/components/Dropdown/types.d.ts +3 -0
  66. package/dist/types/components/Dropdown/useDropdownKeyboard.d.ts +8 -0
  67. package/dist/types/components/FileInput/index.d.ts +5 -5
  68. package/dist/types/components/Indicator/constants.d.ts +2 -0
  69. package/dist/types/components/Indicator/index.d.ts +28 -0
  70. package/dist/types/components/Indicator/types.d.ts +10 -0
  71. package/dist/types/components/Input/index.d.ts +10 -10
  72. package/dist/types/components/Message/methods.d.ts +2 -0
  73. package/dist/types/components/Message/types.d.ts +7 -1
  74. package/dist/types/components/MessageBox/types.d.ts +14 -2
  75. package/dist/types/components/Notification/methods.d.ts +3 -0
  76. package/dist/types/components/Notification/types.d.ts +8 -2
  77. package/dist/types/components/Pixelate/constants.d.ts +2 -0
  78. package/dist/types/components/Pixelate/index.d.ts +71 -0
  79. package/dist/types/components/Pixelate/types.d.ts +23 -0
  80. package/dist/types/components/Popconfirm/index.d.ts +16 -7
  81. package/dist/types/components/Popconfirm/types.d.ts +2 -1
  82. package/dist/types/components/Progress/constants.d.ts +2 -0
  83. package/dist/types/components/Progress/index.d.ts +50 -0
  84. package/dist/types/components/Progress/types.d.ts +22 -0
  85. package/dist/types/components/Radio/constants.d.ts +5 -0
  86. package/dist/types/components/Radio/index.d.ts +88 -0
  87. package/dist/types/components/Radio/types.d.ts +43 -0
  88. package/dist/types/components/Select/index.d.ts +30 -21
  89. package/dist/types/components/Switch/index.d.ts +5 -5
  90. package/dist/types/components/Table/index.d.ts +27 -0
  91. package/dist/types/components/Table/types.d.ts +20 -0
  92. package/dist/types/components/Tooltip/index.d.ts +6 -0
  93. package/dist/types/components/Tooltip/types.d.ts +7 -0
  94. package/dist/types/components/index.d.ts +8 -0
  95. package/dist/types/hooks/index.d.ts +3 -1
  96. package/dist/types/hooks/useDraggable.d.ts +7 -0
  97. package/dist/types/hooks/useFocusTrap.d.ts +5 -0
  98. package/dist/types/utils/index.d.ts +1 -0
  99. package/dist/types/utils/instance-management.d.ts +40 -0
  100. package/dist/umd/index.css +1 -1
  101. package/dist/umd/index.css.gz +0 -0
  102. package/dist/umd/index.umd.cjs +4 -4
  103. package/dist/umd/index.umd.cjs.gz +0 -0
  104. package/package.json +59 -59
  105. package/dist/es/Avatar-CxsRW-wl.js +0 -9
  106. package/dist/es/Dropdown-GcomGMAI.js +0 -40
  107. package/dist/es/Form-j90EzLXU.js +0 -122
  108. package/dist/es/Message-DCNnTUje.js +0 -123
  109. package/dist/es/Notification-CBzY5904.js +0 -58
  110. package/dist/es/Popconfirm-DF6d2ORS.js +0 -23
  111. package/dist/es/Tooltip-k6gKnMyt.js +0 -74
  112. package/dist/es/hooks-BaG7l8K5.js +0 -116
  113. package/dist/es/utils-bsCscZfS.js +0 -84
  114. package/dist/theme/Card.css +0 -263
  115. package/dist/theme/Dropdown.css +0 -187
  116. package/dist/theme/Notification.css +0 -126
  117. package/dist/theme/Popconfirm.css +0 -30
  118. package/dist/theme/Tooltip.css +0 -111
  119. /package/dist/{theme → es/theme}/Alert.css +0 -0
  120. /package/dist/{theme → es/theme}/Badge.css +0 -0
  121. /package/dist/{theme → es/theme}/Button.css +0 -0
  122. /package/dist/{theme → es/theme}/Collapse.css +0 -0
  123. /package/dist/{theme → es/theme}/FileInput.css +0 -0
  124. /package/dist/{theme → es/theme}/Form.css +0 -0
  125. /package/dist/{theme → es/theme}/Icon.css +0 -0
  126. /package/dist/{theme → es/theme}/Overlay.css +0 -0
  127. /package/dist/{theme → es/theme}/Select.css +0 -0
  128. /package/dist/{theme → es/theme}/Switch.css +0 -0
  129. /package/dist/{theme → es/theme}/fonts/zpix.woff2 +0 -0
  130. /package/dist/{theme → es/theme}/index.css +0 -0
@@ -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,6 +15,9 @@ 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
23
  onDestroy(): void;
@@ -34,7 +37,9 @@ export type CreateNotificationProps = Omit<NotificationProps, 'onDestroy' | 'id'
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
+ }
@@ -1,10 +1,10 @@
1
1
  export declare const PxPopconfirm: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').PopconfirmProps> & Readonly<{
3
- onConfirm?: ((value: MouseEvent) => any) | undefined;
4
3
  onCancel?: ((value: MouseEvent) => any) | undefined;
4
+ onConfirm?: ((value: MouseEvent) => any) | undefined;
5
5
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
6
- confirm: (value: MouseEvent) => any;
7
6
  cancel: (value: MouseEvent) => any;
7
+ confirm: (value: MouseEvent) => any;
8
8
  }, import('vue').PublicProps, {
9
9
  title: string;
10
10
  icon: string;
@@ -28,6 +28,11 @@ export declare const PxPopconfirm: {
28
28
  readonly hideTimeout?: number | undefined;
29
29
  readonly virtualRef?: HTMLElement | undefined;
30
30
  readonly virtualTriggering?: boolean | undefined;
31
+ readonly effect?: import('packages/core').TooltipEffect | undefined;
32
+ readonly type?: import('packages/core').TooltipType | undefined;
33
+ readonly enterable?: boolean | undefined;
34
+ readonly maxWidth?: string | number | undefined;
35
+ readonly showArrow?: boolean | undefined;
31
36
  readonly "onVisible-change"?: ((value: boolean) => any) | undefined;
32
37
  readonly "onClick-outside"?: (() => any) | undefined;
33
38
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
@@ -60,11 +65,13 @@ export declare const PxPopconfirm: {
60
65
  "visible-change": (value: boolean) => any;
61
66
  "click-outside": () => any;
62
67
  }, string, {
68
+ effect: import('packages/core').TooltipEffect;
63
69
  transition: string;
64
70
  trigger: "hover" | "click" | "contextmenu";
65
71
  placement: import('@popperjs/core').Placement;
66
72
  showTimeout: number;
67
73
  hideTimeout: number;
74
+ enterable: boolean;
68
75
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
69
76
  beforeCreate?: (() => void) | (() => void)[];
70
77
  created?: (() => void) | (() => void)[];
@@ -86,15 +93,17 @@ export declare const PxPopconfirm: {
86
93
  $nextTick: typeof import('vue').nextTick;
87
94
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
88
95
  } & Readonly<{
96
+ effect: import('packages/core').TooltipEffect;
89
97
  transition: string;
90
98
  trigger: "hover" | "click" | "contextmenu";
91
99
  placement: import('@popperjs/core').Placement;
92
100
  showTimeout: number;
93
101
  hideTimeout: number;
102
+ enterable: boolean;
94
103
  }> & Omit<Readonly<import('packages/core').TooltipProps> & Readonly<{
95
104
  "onVisible-change"?: ((value: boolean) => any) | undefined;
96
105
  "onClick-outside"?: (() => any) | undefined;
97
- }>, "toggle" | "show" | "hide" | ("transition" | "trigger" | "placement" | "showTimeout" | "hideTimeout")> & import('vue').ShallowUnwrapRef<{
106
+ }>, "toggle" | "show" | "hide" | ("effect" | "transition" | "trigger" | "placement" | "showTimeout" | "hideTimeout" | "enterable")> & import('vue').ShallowUnwrapRef<{
98
107
  show(): void;
99
108
  hide(): void;
100
109
  toggle(): void;
@@ -113,8 +122,8 @@ export declare const PxPopconfirm: {
113
122
  M: {};
114
123
  Defaults: {};
115
124
  }, Readonly<import('packages/core').PopconfirmProps> & Readonly<{
116
- onConfirm?: ((value: MouseEvent) => any) | undefined;
117
125
  onCancel?: ((value: MouseEvent) => any) | undefined;
126
+ onConfirm?: ((value: MouseEvent) => any) | undefined;
118
127
  }>, {}, {}, {}, {}, {
119
128
  title: string;
120
129
  icon: string;
@@ -127,11 +136,11 @@ export declare const PxPopconfirm: {
127
136
  __isTeleport?: never;
128
137
  __isSuspense?: never;
129
138
  } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').PopconfirmProps> & Readonly<{
130
- onConfirm?: ((value: MouseEvent) => any) | undefined;
131
139
  onCancel?: ((value: MouseEvent) => any) | undefined;
140
+ onConfirm?: ((value: MouseEvent) => any) | undefined;
132
141
  }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
133
- confirm: (value: MouseEvent) => any;
134
142
  cancel: (value: MouseEvent) => any;
143
+ confirm: (value: MouseEvent) => any;
135
144
  }, string, {
136
145
  title: string;
137
146
  icon: string;
@@ -141,8 +150,8 @@ export declare const PxPopconfirm: {
141
150
  hideAfter: number;
142
151
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
143
152
  $slots: {
144
- default?(_: {}): any;
145
153
  reference?(_: {}): any;
154
+ default?(_: {}): any;
146
155
  };
147
156
  }) & import('vue').Plugin;
148
157
  export * from './types';
@@ -1,5 +1,6 @@
1
1
  import { ButtonType } from '../Button';
2
- export interface PopconfirmProps {
2
+ import { TooltipProps } from '../Tooltip/types';
3
+ export interface PopconfirmProps extends Pick<TooltipProps, 'disabled' | 'placement' | 'showArrow' | 'effect'> {
3
4
  title: string;
4
5
  confirmButtonText?: string;
5
6
  cancelButtonText?: string;
@@ -0,0 +1,2 @@
1
+ import { ColorTemplate } from '@sakana-element/utils';
2
+ export declare const PROGRESS_COLOR_TEMPLATE: ColorTemplate;
@@ -0,0 +1,50 @@
1
+ export declare const PxProgress: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').ProgressProps> & Readonly<{}>, {
3
+ clampedPercentage: import('vue').ComputedRef<number>;
4
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
5
+ size: import('packages/core').ProgressSize;
6
+ type: import('packages/core').ProgressType;
7
+ indeterminate: boolean;
8
+ variant: import('packages/core').ProgressVariant;
9
+ strokeWidth: number;
10
+ percentage: number;
11
+ stripedFlow: boolean;
12
+ showText: boolean;
13
+ textInside: boolean;
14
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
15
+ P: {};
16
+ B: {};
17
+ D: {};
18
+ C: {};
19
+ M: {};
20
+ Defaults: {};
21
+ }, Readonly<import('packages/core').ProgressProps> & Readonly<{}>, {
22
+ clampedPercentage: import('vue').ComputedRef<number>;
23
+ }, {}, {}, {}, {
24
+ size: import('packages/core').ProgressSize;
25
+ type: import('packages/core').ProgressType;
26
+ indeterminate: boolean;
27
+ variant: import('packages/core').ProgressVariant;
28
+ strokeWidth: number;
29
+ percentage: number;
30
+ stripedFlow: boolean;
31
+ showText: boolean;
32
+ textInside: boolean;
33
+ }>;
34
+ __isFragment?: never;
35
+ __isTeleport?: never;
36
+ __isSuspense?: never;
37
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').ProgressProps> & Readonly<{}>, {
38
+ clampedPercentage: import('vue').ComputedRef<number>;
39
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
40
+ size: import('packages/core').ProgressSize;
41
+ type: import('packages/core').ProgressType;
42
+ indeterminate: boolean;
43
+ variant: import('packages/core').ProgressVariant;
44
+ strokeWidth: number;
45
+ percentage: number;
46
+ stripedFlow: boolean;
47
+ showText: boolean;
48
+ textInside: boolean;
49
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & import('vue').Plugin;
50
+ export * from './types';
@@ -0,0 +1,22 @@
1
+ export type ProgressType = 'primary' | 'success' | 'info' | 'warning' | 'danger';
2
+ export type ProgressStatus = 'success' | 'warning' | 'danger';
3
+ export type ProgressSize = 'large' | 'default' | 'small';
4
+ export type ProgressVariant = 'solid' | 'striped' | 'checkered';
5
+ export interface ProgressProps {
6
+ percentage?: number;
7
+ type?: ProgressType;
8
+ size?: ProgressSize;
9
+ status?: ProgressStatus;
10
+ variant?: ProgressVariant;
11
+ stripedFlow?: boolean;
12
+ indeterminate?: boolean;
13
+ strokeWidth?: number;
14
+ showText?: boolean;
15
+ textInside?: boolean;
16
+ color?: string | ((percentage: number) => string);
17
+ format?: (percentage: number) => string;
18
+ }
19
+ export interface ProgressInstance {
20
+ /** The clamped percentage value (0-100) */
21
+ clampedPercentage: number;
22
+ }
@@ -0,0 +1,5 @@
1
+ import { ColorTemplate } from '@sakana-element/utils';
2
+ import { InjectionKey } from 'vue';
3
+ import { RadioGroupContext } from './types';
4
+ export declare const RADIO_GROUP_CTX_KEY: InjectionKey<RadioGroupContext>;
5
+ export declare const RADIO_COLOR_TEMPLATES: Record<string, ColorTemplate>;
@@ -0,0 +1,88 @@
1
+ export declare const PxRadio: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').RadioProps> & Readonly<{
3
+ onChange?: ((value: import('packages/core').RadioValueType) => any) | undefined;
4
+ "onUpdate:modelValue"?: ((value: import('packages/core').RadioValueType) => any) | undefined;
5
+ }>, {
6
+ focus(): void;
7
+ checked: import('vue').ComputedRef<boolean>;
8
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
9
+ change: (value: import('packages/core').RadioValueType) => any;
10
+ "update:modelValue": (value: import('packages/core').RadioValueType) => any;
11
+ }, import('vue').PublicProps, {
12
+ disabled: boolean;
13
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
14
+ inputRef: HTMLInputElement;
15
+ }, any, import('vue').ComponentProvideOptions, {
16
+ P: {};
17
+ B: {};
18
+ D: {};
19
+ C: {};
20
+ M: {};
21
+ Defaults: {};
22
+ }, Readonly<import('packages/core').RadioProps> & Readonly<{
23
+ onChange?: ((value: import('packages/core').RadioValueType) => any) | undefined;
24
+ "onUpdate:modelValue"?: ((value: import('packages/core').RadioValueType) => any) | undefined;
25
+ }>, {
26
+ focus(): void;
27
+ checked: import('vue').ComputedRef<boolean>;
28
+ }, {}, {}, {}, {
29
+ disabled: boolean;
30
+ }>;
31
+ __isFragment?: never;
32
+ __isTeleport?: never;
33
+ __isSuspense?: never;
34
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').RadioProps> & Readonly<{
35
+ onChange?: ((value: import('packages/core').RadioValueType) => any) | undefined;
36
+ "onUpdate:modelValue"?: ((value: import('packages/core').RadioValueType) => any) | undefined;
37
+ }>, {
38
+ focus(): void;
39
+ checked: import('vue').ComputedRef<boolean>;
40
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
41
+ change: (value: import('packages/core').RadioValueType) => any;
42
+ "update:modelValue": (value: import('packages/core').RadioValueType) => any;
43
+ }, string, {
44
+ disabled: boolean;
45
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
46
+ $slots: {
47
+ default?(_: {}): any;
48
+ };
49
+ }) & import('vue').Plugin;
50
+ export declare const PxRadioGroup: {
51
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').RadioGroupProps> & Readonly<{
52
+ onChange?: ((value: import('packages/core').RadioValueType) => any) | undefined;
53
+ "onUpdate:modelValue"?: ((value: import('packages/core').RadioValueType) => any) | undefined;
54
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
55
+ change: (value: import('packages/core').RadioValueType) => any;
56
+ "update:modelValue": (value: import('packages/core').RadioValueType) => any;
57
+ }, import('vue').PublicProps, {
58
+ disabled: boolean;
59
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
60
+ P: {};
61
+ B: {};
62
+ D: {};
63
+ C: {};
64
+ M: {};
65
+ Defaults: {};
66
+ }, Readonly<import('packages/core').RadioGroupProps> & Readonly<{
67
+ onChange?: ((value: import('packages/core').RadioValueType) => any) | undefined;
68
+ "onUpdate:modelValue"?: ((value: import('packages/core').RadioValueType) => any) | undefined;
69
+ }>, {}, {}, {}, {}, {
70
+ disabled: boolean;
71
+ }>;
72
+ __isFragment?: never;
73
+ __isTeleport?: never;
74
+ __isSuspense?: never;
75
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').RadioGroupProps> & Readonly<{
76
+ onChange?: ((value: import('packages/core').RadioValueType) => any) | undefined;
77
+ "onUpdate:modelValue"?: ((value: import('packages/core').RadioValueType) => any) | undefined;
78
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
79
+ change: (value: import('packages/core').RadioValueType) => any;
80
+ "update:modelValue": (value: import('packages/core').RadioValueType) => any;
81
+ }, string, {
82
+ disabled: boolean;
83
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
84
+ $slots: {
85
+ default?(_: {}): any;
86
+ };
87
+ }) & import('vue').Plugin;
88
+ export * from './types';
@@ -0,0 +1,43 @@
1
+ import { ComputedRef } from 'vue';
2
+ export type RadioValueType = string | number | boolean;
3
+ export type RadioType = 'primary' | 'success' | 'warning' | 'danger' | 'info';
4
+ export interface RadioProps {
5
+ modelValue?: RadioValueType;
6
+ value?: RadioValueType;
7
+ disabled?: boolean;
8
+ size?: 'small' | 'large';
9
+ type?: RadioType;
10
+ color?: string;
11
+ label?: string;
12
+ name?: string;
13
+ id?: string;
14
+ }
15
+ export interface RadioEmits {
16
+ (e: 'update:modelValue', value: RadioValueType): void;
17
+ (e: 'change', value: RadioValueType): void;
18
+ }
19
+ export interface RadioInstance {
20
+ focus(): void;
21
+ checked: ComputedRef<boolean>;
22
+ }
23
+ export interface RadioGroupProps {
24
+ modelValue: RadioValueType;
25
+ disabled?: boolean;
26
+ size?: 'small' | 'large';
27
+ type?: RadioType;
28
+ color?: string;
29
+ name?: string;
30
+ }
31
+ export interface RadioGroupEmits {
32
+ (e: 'update:modelValue', value: RadioValueType): void;
33
+ (e: 'change', value: RadioValueType): void;
34
+ }
35
+ export interface RadioGroupContext {
36
+ modelValue: ComputedRef<RadioValueType>;
37
+ disabled: ComputedRef<boolean>;
38
+ size: ComputedRef<'small' | 'large' | undefined>;
39
+ type: ComputedRef<RadioType | undefined>;
40
+ color: ComputedRef<string | undefined>;
41
+ name: ComputedRef<string | undefined>;
42
+ changeEvent(value: RadioValueType): void;
43
+ }
@@ -1,21 +1,21 @@
1
1
  export declare const PxSelect: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').SelectProps> & Readonly<{
3
3
  onClear?: (() => any) | undefined;
4
+ onBlur?: (() => any) | undefined;
5
+ onChange?: ((value: string) => any) | undefined;
4
6
  onFocus?: (() => any) | undefined;
5
7
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
6
- onChange?: ((value: string) => any) | undefined;
7
8
  "onVisible-change"?: ((value: boolean) => any) | undefined;
8
- onBlur?: (() => any) | undefined;
9
9
  }>, {
10
10
  focus(): void;
11
11
  blur(): void;
12
12
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
13
13
  clear: () => any;
14
+ blur: () => any;
15
+ change: (value: string) => any;
14
16
  focus: () => any;
15
17
  "update:modelValue": (value: string) => any;
16
- change: (value: string) => any;
17
18
  "visible-change": (value: boolean) => any;
18
- blur: () => any;
19
19
  }, import('vue').PublicProps, {
20
20
  options: import('packages/core').SelectOptionProps[];
21
21
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
@@ -35,6 +35,11 @@ export declare const PxSelect: {
35
35
  readonly hideTimeout?: number | undefined;
36
36
  readonly virtualRef?: HTMLElement | undefined;
37
37
  readonly virtualTriggering?: boolean | undefined;
38
+ readonly effect?: import('packages/core').TooltipEffect | undefined;
39
+ readonly type?: import('packages/core').TooltipType | undefined;
40
+ readonly enterable?: boolean | undefined;
41
+ readonly maxWidth?: string | number | undefined;
42
+ readonly showArrow?: boolean | undefined;
38
43
  readonly "onVisible-change"?: ((value: boolean) => any) | undefined;
39
44
  readonly "onClick-outside"?: (() => any) | undefined;
40
45
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
@@ -67,11 +72,13 @@ export declare const PxSelect: {
67
72
  "visible-change": (value: boolean) => any;
68
73
  "click-outside": () => any;
69
74
  }, string, {
75
+ effect: import('packages/core').TooltipEffect;
70
76
  transition: string;
71
77
  trigger: "hover" | "click" | "contextmenu";
72
78
  placement: import('@popperjs/core').Placement;
73
79
  showTimeout: number;
74
80
  hideTimeout: number;
81
+ enterable: boolean;
75
82
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
76
83
  beforeCreate?: (() => void) | (() => void)[];
77
84
  created?: (() => void) | (() => void)[];
@@ -93,15 +100,17 @@ export declare const PxSelect: {
93
100
  $nextTick: typeof import('vue').nextTick;
94
101
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
95
102
  } & Readonly<{
103
+ effect: import('packages/core').TooltipEffect;
96
104
  transition: string;
97
105
  trigger: "hover" | "click" | "contextmenu";
98
106
  placement: import('@popperjs/core').Placement;
99
107
  showTimeout: number;
100
108
  hideTimeout: number;
109
+ enterable: boolean;
101
110
  }> & Omit<Readonly<import('packages/core').TooltipProps> & Readonly<{
102
111
  "onVisible-change"?: ((value: boolean) => any) | undefined;
103
112
  "onClick-outside"?: (() => any) | undefined;
104
- }>, "toggle" | "show" | "hide" | ("transition" | "trigger" | "placement" | "showTimeout" | "hideTimeout")> & import('vue').ShallowUnwrapRef<{
113
+ }>, "toggle" | "show" | "hide" | ("effect" | "transition" | "trigger" | "placement" | "showTimeout" | "hideTimeout" | "enterable")> & import('vue').ShallowUnwrapRef<{
105
114
  show(): void;
106
115
  hide(): void;
107
116
  toggle(): void;
@@ -133,10 +142,10 @@ export declare const PxSelect: {
133
142
  readonly form?: string | undefined;
134
143
  readonly onInput?: ((value: string) => any) | undefined;
135
144
  readonly onClear?: (() => any) | undefined;
145
+ readonly onBlur?: ((value: FocusEvent) => any) | undefined;
146
+ readonly onChange?: ((value: string) => any) | undefined;
136
147
  readonly onFocus?: ((value: FocusEvent) => any) | undefined;
137
148
  readonly "onUpdate:modelValue"?: ((value: string) => any) | undefined;
138
- readonly onChange?: ((value: string) => any) | undefined;
139
- readonly onBlur?: ((value: FocusEvent) => any) | undefined;
140
149
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
141
150
  $attrs: {
142
151
  [x: string]: unknown;
@@ -154,15 +163,15 @@ export declare const PxSelect: {
154
163
  $root: import('vue').ComponentPublicInstance | null;
155
164
  $parent: import('vue').ComponentPublicInstance | null;
156
165
  $host: Element | null;
157
- $emit: ((event: "input", value: string) => void) & ((event: "clear") => void) & ((event: "focus", value: FocusEvent) => void) & ((event: "update:modelValue", value: string) => void) & ((event: "change", value: string) => void) & ((event: "blur", value: FocusEvent) => void);
166
+ $emit: ((event: "input", value: string) => void) & ((event: "clear") => void) & ((event: "blur", value: FocusEvent) => void) & ((event: "change", value: string) => void) & ((event: "focus", value: FocusEvent) => void) & ((event: "update:modelValue", value: string) => void);
158
167
  $el: any;
159
168
  $options: import('vue').ComponentOptionsBase<Readonly<import('packages/core').InputProps> & Readonly<{
160
169
  onInput?: ((value: string) => any) | undefined;
161
170
  onClear?: (() => any) | undefined;
171
+ onBlur?: ((value: FocusEvent) => any) | undefined;
172
+ onChange?: ((value: string) => any) | undefined;
162
173
  onFocus?: ((value: FocusEvent) => any) | undefined;
163
174
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
164
- onChange?: ((value: string) => any) | undefined;
165
- onBlur?: ((value: FocusEvent) => any) | undefined;
166
175
  }>, {
167
176
  ref: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | undefined>;
168
177
  focus(): Promise<void>;
@@ -172,10 +181,10 @@ export declare const PxSelect: {
172
181
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
173
182
  input: (value: string) => any;
174
183
  clear: () => any;
184
+ blur: (value: FocusEvent) => any;
185
+ change: (value: string) => any;
175
186
  focus: (value: FocusEvent) => any;
176
187
  "update:modelValue": (value: string) => any;
177
- change: (value: string) => any;
178
- blur: (value: FocusEvent) => any;
179
188
  }, string, {
180
189
  type: string;
181
190
  autocomplete: string;
@@ -205,11 +214,11 @@ export declare const PxSelect: {
205
214
  }> & Omit<Readonly<import('packages/core').InputProps> & Readonly<{
206
215
  onInput?: ((value: string) => any) | undefined;
207
216
  onClear?: (() => any) | undefined;
217
+ onBlur?: ((value: FocusEvent) => any) | undefined;
218
+ onChange?: ((value: string) => any) | undefined;
208
219
  onFocus?: ((value: FocusEvent) => any) | undefined;
209
220
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
210
- onChange?: ((value: string) => any) | undefined;
211
- onBlur?: ((value: FocusEvent) => any) | undefined;
212
- }>, "select" | "clear" | "ref" | "focus" | "blur" | ("type" | "autocomplete")> & import('vue').ShallowUnwrapRef<{
221
+ }>, "select" | "clear" | "blur" | "focus" | "ref" | ("type" | "autocomplete")> & import('vue').ShallowUnwrapRef<{
213
222
  ref: import('vue').Ref<HTMLInputElement | HTMLTextAreaElement | undefined>;
214
223
  focus(): Promise<void>;
215
224
  blur(): void;
@@ -232,11 +241,11 @@ export declare const PxSelect: {
232
241
  Defaults: {};
233
242
  }, Readonly<import('packages/core').SelectProps> & Readonly<{
234
243
  onClear?: (() => any) | undefined;
244
+ onBlur?: (() => any) | undefined;
245
+ onChange?: ((value: string) => any) | undefined;
235
246
  onFocus?: (() => any) | undefined;
236
247
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
237
- onChange?: ((value: string) => any) | undefined;
238
248
  "onVisible-change"?: ((value: boolean) => any) | undefined;
239
- onBlur?: (() => any) | undefined;
240
249
  }>, {
241
250
  focus(): void;
242
251
  blur(): void;
@@ -248,21 +257,21 @@ export declare const PxSelect: {
248
257
  __isSuspense?: never;
249
258
  } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').SelectProps> & Readonly<{
250
259
  onClear?: (() => any) | undefined;
260
+ onBlur?: (() => any) | undefined;
261
+ onChange?: ((value: string) => any) | undefined;
251
262
  onFocus?: (() => any) | undefined;
252
263
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
253
- onChange?: ((value: string) => any) | undefined;
254
264
  "onVisible-change"?: ((value: boolean) => any) | undefined;
255
- onBlur?: (() => any) | undefined;
256
265
  }>, {
257
266
  focus(): void;
258
267
  blur(): void;
259
268
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
260
269
  clear: () => any;
270
+ blur: () => any;
271
+ change: (value: string) => any;
261
272
  focus: () => any;
262
273
  "update:modelValue": (value: string) => any;
263
- change: (value: string) => any;
264
274
  "visible-change": (value: boolean) => any;
265
- blur: () => any;
266
275
  }, string, {
267
276
  options: import('packages/core').SelectOptionProps[];
268
277
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {