@blocklet/pages-kit 0.6.28 → 0.6.29
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 +1 -1
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/common.js +1 -1
- package/lib/esm/builtin/color-picker.js +1 -1
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/common.js +1 -1
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/lib/cjs/utils/common.js
CHANGED
|
@@ -16,6 +16,6 @@ function isMuiColorKey(value) {
|
|
|
16
16
|
if (value === 'transparent' || value === 'divider') {
|
|
17
17
|
return true;
|
|
18
18
|
}
|
|
19
|
-
return /^(primary|secondary|error|warning|info|success|grey|background|text|action|common)\.[a-
|
|
19
|
+
return /^(primary|secondary|error|warning|info|success|grey|background|text|action|common)\.[a-zA-Z0-9]+$/.test(value);
|
|
20
20
|
}
|
|
21
21
|
exports.nextId = (0, nanoid_1.customAlphabet)('abcdefghijklmnopqrstuvwxyz0123456789', 16);
|
|
@@ -293,7 +293,7 @@ export const ConfigColorDialog = function ConfigColorDialog({ ref, onSave, enabl
|
|
|
293
293
|
// 只有当前在 MUI Theme 标签页时才尝试自动转换为 MUI 色键
|
|
294
294
|
if (isActiveMuiTab) {
|
|
295
295
|
const muiKey = muiPalette.getMuiKeyByColor(state.value);
|
|
296
|
-
onSave({ value: muiKey || state.value }, handleClose);
|
|
296
|
+
onSave({ value: state.originalMuiKey || muiKey || state.value }, handleClose);
|
|
297
297
|
return;
|
|
298
298
|
}
|
|
299
299
|
}
|