@blocklet/pages-kit 0.4.121 → 0.4.123
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/lib/cjs/builtin/color-picker.js +35 -25
- package/lib/cjs/contexts/color.js +4 -2
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/style.js +4 -0
- package/lib/esm/builtin/color-picker.js +37 -28
- package/lib/esm/contexts/color.js +5 -3
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/style.js +3 -0
- package/lib/types/builtin/color-picker.d.ts +9 -5
- package/lib/types/contexts/color.d.ts +1 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/utils/style.d.ts +1 -0
- package/package.json +1 -1
package/lib/esm/utils/style.js
CHANGED
|
@@ -161,3 +161,6 @@ if (isBrowserEnv()) {
|
|
|
161
161
|
// @ts-ignore inject colorConvert to globalThis
|
|
162
162
|
globalThis[COLOR_CONVERT_FUNCTION_NAME] = colorConvert;
|
|
163
163
|
}
|
|
164
|
+
export function getTransparentBackground() {
|
|
165
|
+
return 'repeating-conic-gradient(#CCCCCC 0% 25%, #FFFFFF 0% 50%) 50% / 10px 10px';
|
|
166
|
+
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ColorPickerProps {
|
|
2
2
|
value: string;
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
sx?: object;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export interface ColorItemProps {
|
|
8
8
|
color: string;
|
|
9
9
|
sx?: object;
|
|
10
10
|
[key: string]: any;
|
|
11
|
-
}
|
|
12
|
-
export declare function ColorPicker({ value, onChange, style, sx }: ConfigColorProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default ColorPicker;
|
|
11
|
+
}
|
|
14
12
|
export interface ConfigColorDialogRef {
|
|
15
13
|
open: (data?: {
|
|
16
14
|
value: string;
|
|
@@ -23,4 +21,10 @@ export interface ConfigColorDialogProps {
|
|
|
23
21
|
}, close: () => void) => void;
|
|
24
22
|
enableMuiPalette?: boolean;
|
|
25
23
|
}
|
|
24
|
+
export declare function BlockletThemeProvider({ children }: {
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function ColorItem({ color, sx, ...props }: ColorItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
28
|
export declare const ConfigColorDialog: import("react").ForwardRefExoticComponent<ConfigColorDialogProps & import("react").RefAttributes<ConfigColorDialogRef>>;
|
|
29
|
+
export declare function ColorPicker({ value, onChange, style, sx }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export default ColorPicker;
|
|
@@ -16,7 +16,7 @@ export declare function useMuiColorPalette(): {
|
|
|
16
16
|
getMuiKeyByColor: (colorValue: string) => string | null;
|
|
17
17
|
getColorByMuiKey: (muiKey: string) => string | null;
|
|
18
18
|
isMuiColorKey: (value: string) => boolean;
|
|
19
|
-
theme: import("@mui/material
|
|
19
|
+
theme: import("@mui/material").Theme;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
22
|
* React Hook,用于实时转换颜色值(包括MUI主题色键)
|