sakana-element 2.1.2 → 2.1.4
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.
- package/README.md +81 -79
- package/dist/es/Alert-C76ZWSVk.js +19 -0
- package/dist/es/Badge-BG-vYP8Y.js +13 -0
- package/dist/es/Button-fW_ZOLmT.js +24 -0
- package/dist/es/Card-BCBnlVi_.js +12 -0
- package/dist/es/{Collapse-l_8qKOBG.js → Collapse-B08VhCVq.js} +2 -2
- package/dist/es/{ConfigProvider-BPm3h9RG.js → ConfigProvider-DZO1d5Eq.js} +1 -1
- package/dist/es/{Dropdown-ZjZ0qSn2.js → Dropdown-49nf6F8P.js} +11 -11
- package/dist/es/{Form-pxRZxseS.js → Form-CGiTDSGI.js} +2 -2
- package/dist/es/{Icon-UBaqO2nY.js → Icon-DpJyuj7c.js} +1 -1
- package/dist/es/Input-DBPpvf0Y.js +42 -0
- package/dist/es/{Loading-BJJBJhg3.js → Loading-DlygqGOv.js} +2 -2
- package/dist/es/{Message-CqBKW0c8.js → Message-ganFfLeU.js} +14 -14
- package/dist/es/{Notification-CVACM2cj.js → Notification-D4RYHV9o.js} +8 -8
- package/dist/es/{Overlay-C1k4Jcl7.js → Overlay-BRDSWspM.js} +1 -1
- package/dist/es/{Popconfirm-CW8oRycq.js → Popconfirm-Cop44KwQ.js} +4 -4
- package/dist/es/Select-TIoGsqKv.js +133 -0
- package/dist/es/Switch-CHjcLtHs.js +34 -0
- package/dist/es/{Tooltip-D9rQ4LEg.js → Tooltip-HWx_i2FA.js} +23 -23
- package/dist/es/{hooks-DNMt3QPi.js → hooks-CYdEHUVd.js} +6 -5
- package/dist/es/index.js +59 -55
- package/dist/es/utils-bsCscZfS.js +84 -0
- package/dist/index.css +1 -1
- package/dist/theme/Alert.css +114 -38
- package/dist/theme/Badge.css +208 -0
- package/dist/theme/Button.css +365 -105
- package/dist/theme/Card.css +112 -0
- package/dist/theme/Collapse.css +2 -2
- package/dist/theme/Dropdown.css +4 -4
- package/dist/theme/Input.css +213 -4
- package/dist/theme/Select.css +182 -38
- package/dist/theme/Switch.css +56 -0
- package/dist/theme/Tooltip.css +10 -10
- package/dist/theme/fonts/zpix.woff2 +0 -0
- package/dist/theme/index.css +21 -3
- package/dist/types/components/Alert/types.d.ts +3 -0
- package/dist/types/components/Badge/index.d.ts +27 -0
- package/dist/types/components/Badge/types.d.ts +10 -0
- package/dist/types/components/Button/constants.d.ts +2 -0
- package/dist/types/components/Button/types.d.ts +3 -0
- package/dist/types/components/Card/index.d.ts +26 -0
- package/dist/types/components/Card/types.d.ts +6 -0
- package/dist/types/components/Input/constants.d.ts +3 -0
- package/dist/types/components/Input/types.d.ts +2 -0
- package/dist/types/components/Select/constants.d.ts +3 -0
- package/dist/types/components/Select/index.d.ts +7 -5
- package/dist/types/components/Select/types.d.ts +4 -1
- package/dist/types/components/Select/useKeyMap.d.ts +1 -1
- package/dist/types/components/Switch/types.d.ts +6 -0
- package/dist/types/components/Tooltip/useEventsToTriggerNode.d.ts +4 -0
- package/dist/types/components/index.d.ts +2 -0
- package/dist/types/hooks/useSystemTheme.d.ts +1 -1
- package/dist/types/utils/color.d.ts +33 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +3 -3
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +1 -1
- package/dist/es/Alert-C5X-XFGJ.js +0 -15
- package/dist/es/Button-DTik2ZP6.js +0 -33
- package/dist/es/Input-BJoBaFXa.js +0 -38
- package/dist/es/Select-C7mwByXa.js +0 -126
- package/dist/es/Switch-CgFPFC3j.js +0 -22
- package/dist/es/utils-340oIQ8K.js +0 -59
- package/dist/types/components/Tooltip/useEventsToTiggerNode.d.ts +0 -4
|
@@ -3,7 +3,7 @@ export declare const PxSelect: {
|
|
|
3
3
|
onClear?: (() => any) | undefined;
|
|
4
4
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
5
5
|
onChange?: ((value: string) => any) | undefined;
|
|
6
|
-
"onVisible-change"?: ((
|
|
6
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
7
7
|
onBlur?: (() => any) | undefined;
|
|
8
8
|
onFocus?: (() => any) | undefined;
|
|
9
9
|
}>, {
|
|
@@ -13,7 +13,7 @@ export declare const PxSelect: {
|
|
|
13
13
|
clear: () => any;
|
|
14
14
|
"update:modelValue": (value: string) => any;
|
|
15
15
|
change: (value: string) => any;
|
|
16
|
-
"visible-change": (
|
|
16
|
+
"visible-change": (value: boolean) => any;
|
|
17
17
|
blur: () => any;
|
|
18
18
|
focus: () => any;
|
|
19
19
|
}, import('vue').PublicProps, {
|
|
@@ -121,6 +121,8 @@ export declare const PxSelect: {
|
|
|
121
121
|
readonly modelValue: string;
|
|
122
122
|
readonly type?: string | undefined;
|
|
123
123
|
readonly size?: "large" | "small" | undefined;
|
|
124
|
+
readonly color?: string | undefined;
|
|
125
|
+
readonly ghost?: boolean | undefined;
|
|
124
126
|
readonly disabled?: boolean | undefined;
|
|
125
127
|
readonly clearable?: boolean | undefined;
|
|
126
128
|
readonly showPassword?: boolean | undefined;
|
|
@@ -232,7 +234,7 @@ export declare const PxSelect: {
|
|
|
232
234
|
onClear?: (() => any) | undefined;
|
|
233
235
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
234
236
|
onChange?: ((value: string) => any) | undefined;
|
|
235
|
-
"onVisible-change"?: ((
|
|
237
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
236
238
|
onBlur?: (() => any) | undefined;
|
|
237
239
|
onFocus?: (() => any) | undefined;
|
|
238
240
|
}>, {
|
|
@@ -248,7 +250,7 @@ export declare const PxSelect: {
|
|
|
248
250
|
onClear?: (() => any) | undefined;
|
|
249
251
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
250
252
|
onChange?: ((value: string) => any) | undefined;
|
|
251
|
-
"onVisible-change"?: ((
|
|
253
|
+
"onVisible-change"?: ((value: boolean) => any) | undefined;
|
|
252
254
|
onBlur?: (() => any) | undefined;
|
|
253
255
|
onFocus?: (() => any) | undefined;
|
|
254
256
|
}>, {
|
|
@@ -258,7 +260,7 @@ export declare const PxSelect: {
|
|
|
258
260
|
clear: () => any;
|
|
259
261
|
"update:modelValue": (value: string) => any;
|
|
260
262
|
change: (value: string) => any;
|
|
261
|
-
"visible-change": (
|
|
263
|
+
"visible-change": (value: boolean) => any;
|
|
262
264
|
blur: () => any;
|
|
263
265
|
focus: () => any;
|
|
264
266
|
}, string, {
|
|
@@ -14,6 +14,9 @@ export interface SelectProps {
|
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
clearable?: boolean;
|
|
17
|
+
ghost?: boolean;
|
|
18
|
+
color?: string;
|
|
19
|
+
size?: 'large' | 'small';
|
|
17
20
|
renderLabel?: RenderLabelFunc;
|
|
18
21
|
filterable?: boolean;
|
|
19
22
|
filterMethod?: CustomFilterFunc;
|
|
@@ -30,7 +33,7 @@ export interface SelectStates {
|
|
|
30
33
|
export interface SelectEmits {
|
|
31
34
|
(e: 'update:modelValue', value: string): void;
|
|
32
35
|
(e: 'change', value: string): void;
|
|
33
|
-
(e: 'visible-change',
|
|
36
|
+
(e: 'visible-change', value: boolean): void;
|
|
34
37
|
(e: 'clear'): void;
|
|
35
38
|
(e: 'focus'): void;
|
|
36
39
|
(e: 'blur'): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
2
|
export type SwitchValueType = boolean | string | number;
|
|
3
|
+
export type SwitchType = 'primary' | 'success' | 'warning' | 'danger' | 'info';
|
|
3
4
|
export interface SwitchProps {
|
|
4
5
|
modelValue: SwitchValueType;
|
|
5
6
|
disabled?: boolean;
|
|
@@ -10,6 +11,11 @@ export interface SwitchProps {
|
|
|
10
11
|
name?: string;
|
|
11
12
|
id?: string;
|
|
12
13
|
size?: 'small' | 'large';
|
|
14
|
+
type?: SwitchType;
|
|
15
|
+
activeColor?: string;
|
|
16
|
+
inactiveColor?: string;
|
|
17
|
+
activeIcon?: string;
|
|
18
|
+
inactiveIcon?: string;
|
|
13
19
|
}
|
|
14
20
|
export interface SwitchEmits {
|
|
15
21
|
(e: 'update:modelValue', value: SwitchValueType): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
import { TooltipProps } from './types';
|
|
3
|
+
export declare function useEventsToTriggerNode(props: TooltipProps, triggerNode: ComputedRef<HTMLElement | undefined>, events: Ref<Record<string, EventListener>>, closeMethod: () => void): void;
|
|
4
|
+
export default useEventsToTriggerNode;
|
|
@@ -21,5 +21,5 @@ export declare function useSystemTheme(): {
|
|
|
21
21
|
/** Whether system prefers dark mode */
|
|
22
22
|
prefersDark: Ref<boolean, boolean>;
|
|
23
23
|
/** System color scheme preference */
|
|
24
|
-
prefers:
|
|
24
|
+
prefers: import('vue').ComputedRef<"dark" | "light">;
|
|
25
25
|
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Darken a hex color by a percentage (0-100)
|
|
3
|
+
*/
|
|
4
|
+
export declare function darken(hex: string, amount: number): string;
|
|
5
|
+
/**
|
|
6
|
+
* Lighten a hex color by a percentage (0-100)
|
|
7
|
+
*/
|
|
8
|
+
export declare function lighten(hex: string, amount: number): string;
|
|
9
|
+
/**
|
|
10
|
+
* Determine if text should be white or dark based on background luminance
|
|
11
|
+
*/
|
|
12
|
+
export declare function getTextColor(hex: string): string;
|
|
13
|
+
/** Mapping from CSS variable suffix → palette key */
|
|
14
|
+
export type ColorTemplate = Record<string, string>;
|
|
15
|
+
/**
|
|
16
|
+
* Build a standard color palette from a hex color.
|
|
17
|
+
* Components can extend this with additional derived colors.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createColorPalette(hex: string): Record<string, string>;
|
|
20
|
+
/**
|
|
21
|
+
* Resolve a color template into CSS custom properties.
|
|
22
|
+
*
|
|
23
|
+
* @param palette - Pre-computed color values (e.g. from createColorPalette)
|
|
24
|
+
* @param prefix - CSS variable prefix (e.g. 'px-alert', 'px-badge')
|
|
25
|
+
* @param template - Maps CSS variable suffix → palette key
|
|
26
|
+
* @returns Record to bind via :style
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolveColorVars(palette: Record<string, string>, prefix: string, template: ColorTemplate): Record<string, string>;
|
|
29
|
+
/**
|
|
30
|
+
* Shared variant templates for simple components (Alert, Badge).
|
|
31
|
+
* Each key maps a CSS variable suffix to a palette color key.
|
|
32
|
+
*/
|
|
33
|
+
export declare const SIMPLE_COLOR_TEMPLATES: Record<string, ColorTemplate>;
|
|
@@ -10,6 +10,7 @@ export declare const RenderVnode: import('vue').DefineComponent<import('vue').Ex
|
|
|
10
10
|
required: true;
|
|
11
11
|
};
|
|
12
12
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
export * from './color';
|
|
13
14
|
export * from './error';
|
|
14
15
|
export * from './icon-map';
|
|
15
16
|
export * from './icon-registry';
|