@pisell/materials 1.0.366 → 1.0.367

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.
@@ -126,6 +126,7 @@ var PisellCheckboxGroup = function PisellCheckboxGroup(props) {
126
126
  key: option[rowKey],
127
127
  gap: 10,
128
128
  onClick: function onClick() {
129
+ if (option.disabled) return;
129
130
  handleSelectItem(option[rowKey], option);
130
131
  },
131
132
  leftContent: iconPosition === 'left' && /*#__PURE__*/React.createElement(CheckBoxItem, {
@@ -5,7 +5,9 @@ import { getCurrentLocale } from "../utils/locale";
5
5
  var langMap = {
6
6
  "zh-CN": zhCN,
7
7
  "en-US": enUS,
8
- "zh-TW": zhTW
8
+ "zh-TW": zhTW,
9
+ "zh-HK": zhTW,
10
+ 'en': enUS
9
11
  };
10
12
  export var getText = function getText(id) {
11
13
  if (!id) {
@@ -1,5 +1,6 @@
1
+ import { globalConfig } from "../components/pisell-config-provider/context";
1
2
  export var getCurrentLocale = function getCurrentLocale() {
2
- var locale = localStorage.getItem('umi_locale') || 'en-US';
3
+ var locale = globalConfig.getConfig().locale || localStorage.getItem('umi_locale') || 'en-US';
3
4
  //@ts-ignore
4
5
  return locale;
5
6
  };
@@ -125,6 +125,8 @@ var PisellCheckboxGroup = (props) => {
125
125
  key: option[rowKey],
126
126
  gap: 10,
127
127
  onClick: () => {
128
+ if (option.disabled)
129
+ return;
128
130
  handleSelectItem(option[rowKey], option);
129
131
  },
130
132
  leftContent: iconPosition === "left" && /* @__PURE__ */ import_react.default.createElement(
@@ -39,7 +39,9 @@ var import_locale = require("../utils/locale");
39
39
  var langMap = {
40
40
  "zh-CN": import_zh_CN.default,
41
41
  "en-US": import_en_US.default,
42
- "zh-TW": import_zh_TW.default
42
+ "zh-TW": import_zh_TW.default,
43
+ "zh-HK": import_zh_TW.default,
44
+ "en": import_en_US.default
43
45
  };
44
46
  var getText = (id) => {
45
47
  if (!id) {
@@ -22,8 +22,9 @@ __export(locale_exports, {
22
22
  getCurrentLocale: () => getCurrentLocale
23
23
  });
24
24
  module.exports = __toCommonJS(locale_exports);
25
+ var import_context = require("../components/pisell-config-provider/context");
25
26
  var getCurrentLocale = () => {
26
- const locale = localStorage.getItem("umi_locale") || "en-US";
27
+ const locale = import_context.globalConfig.getConfig().locale || localStorage.getItem("umi_locale") || "en-US";
27
28
  return locale;
28
29
  };
29
30
  // Annotate the CommonJS export names for ESM import in node:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.366",
3
+ "version": "1.0.367",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -64,8 +64,8 @@
64
64
  "crypto-js": "^4.2.0",
65
65
  "@zxing/library": "0.21.2",
66
66
  "@pisell/utils": "1.0.30",
67
- "@pisell/date-picker": "1.0.92",
68
- "@pisell/icon": "0.0.10"
67
+ "@pisell/icon": "0.0.10",
68
+ "@pisell/date-picker": "1.0.92"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": "^18.0.0",