@pisell/materials 1.0.366 → 1.0.368

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.
@@ -74,32 +74,12 @@ var Page = function Page(props) {
74
74
  contentBg: '#101828'
75
75
  },
76
76
  Button: {
77
- borderRadiusSM: 6,
78
- borderRadiusLG: 9,
77
+ controlHeight: 48,
79
78
  borderRadius: 8,
80
- controlHeight: 36,
81
- colorBgContainerDisabled: '#F2F4F7',
82
- colorBgTextHover: '#F9FAFB',
83
- colorBorder: '#D0D5DD',
84
- colorError: '#D92D20',
85
- colorErrorActive: '#D92D20',
86
- colorErrorHover: '#B42318',
87
- colorErrorBg: '#FEF3F2',
88
- colorErrorBorderHover: '#FDA29B',
89
- colorErrorOutline: 'rgba(217, 45, 32, 0.06)',
90
- colorLink: '#175CD3',
91
- colorLinkActive: '#194185',
92
- colorLinkHover: '#1849A9',
93
- // colorPrimaryActive: '#7f56d9',
94
- // colorPrimaryBorder: '#E9D7FE',
95
- colorText: '#344054',
96
- colorTextDisabled: '#D0D5DD',
97
- colorTextLightSolid: '#fff',
98
- colorBgTextActive: '#D0D5DD',
99
- controlOutline: 'rgba(127, 86, 217, 0.04)',
100
- controlTmpOutline: '#F9FAFB',
101
- paddingContentHorizontal: 14,
102
- marginXS: 8
79
+ fontWeight: 600,
80
+ contentFontSize: 16,
81
+ paddingInline: 20,
82
+ paddingBlock: 12
103
83
  },
104
84
  Divider: {
105
85
  colorSplit: '#EAECF0'
@@ -127,16 +107,30 @@ var Page = function Page(props) {
127
107
  colorIcon: '#667085',
128
108
  colorTextQuaternary: '#D0D5DD',
129
109
  colorBgContainerDisabled: '#F9FAFB',
130
- colorTextDisabled: '#98A2B3'
110
+ colorTextDisabled: '#98A2B3',
111
+ controlHeight: 48,
112
+ colorBorder: 'rgb(208,213,221)'
113
+ },
114
+ InputNumber: {
115
+ controlHeight: 48,
116
+ borderRadius: 8,
117
+ colorBorder: 'rgb(208,213,221)'
131
118
  },
132
119
  Input: {
133
120
  fontSizeIcon: 16,
134
- addonBg: '#fff'
121
+ addonBg: '#fff',
122
+ borderRadius: 8,
123
+ colorBorder: 'rgb(208,213,221)',
124
+ controlHeight: 48,
125
+ paddingInline: 16
135
126
  // "lineHeight": 1
136
127
  },
137
128
 
138
129
  Select: {
139
- fontSizeIcon: 16
130
+ fontSizeIcon: 16,
131
+ controlHeight: 48,
132
+ borderRadius: 8,
133
+ colorBorder: 'rgb(208,213,221)'
140
134
  // "lineHeight": 1
141
135
  }
142
136
  },
@@ -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
  };
@@ -93,32 +93,12 @@ var Page = (props) => {
93
93
  contentBg: "#101828"
94
94
  },
95
95
  Button: {
96
- borderRadiusSM: 6,
97
- borderRadiusLG: 9,
96
+ controlHeight: 48,
98
97
  borderRadius: 8,
99
- controlHeight: 36,
100
- colorBgContainerDisabled: "#F2F4F7",
101
- colorBgTextHover: "#F9FAFB",
102
- colorBorder: "#D0D5DD",
103
- colorError: "#D92D20",
104
- colorErrorActive: "#D92D20",
105
- colorErrorHover: "#B42318",
106
- colorErrorBg: "#FEF3F2",
107
- colorErrorBorderHover: "#FDA29B",
108
- colorErrorOutline: "rgba(217, 45, 32, 0.06)",
109
- colorLink: "#175CD3",
110
- colorLinkActive: "#194185",
111
- colorLinkHover: "#1849A9",
112
- // colorPrimaryActive: '#7f56d9',
113
- // colorPrimaryBorder: '#E9D7FE',
114
- colorText: "#344054",
115
- colorTextDisabled: "#D0D5DD",
116
- colorTextLightSolid: "#fff",
117
- colorBgTextActive: "#D0D5DD",
118
- controlOutline: "rgba(127, 86, 217, 0.04)",
119
- controlTmpOutline: "#F9FAFB",
120
- paddingContentHorizontal: 14,
121
- marginXS: 8
98
+ fontWeight: 600,
99
+ contentFontSize: 16,
100
+ paddingInline: 20,
101
+ paddingBlock: 12
122
102
  },
123
103
  Divider: {
124
104
  colorSplit: "#EAECF0"
@@ -146,15 +126,29 @@ var Page = (props) => {
146
126
  colorIcon: "#667085",
147
127
  colorTextQuaternary: "#D0D5DD",
148
128
  colorBgContainerDisabled: "#F9FAFB",
149
- colorTextDisabled: "#98A2B3"
129
+ colorTextDisabled: "#98A2B3",
130
+ controlHeight: 48,
131
+ colorBorder: "rgb(208,213,221)"
132
+ },
133
+ InputNumber: {
134
+ controlHeight: 48,
135
+ borderRadius: 8,
136
+ colorBorder: "rgb(208,213,221)"
150
137
  },
151
138
  Input: {
152
139
  fontSizeIcon: 16,
153
- addonBg: "#fff"
140
+ addonBg: "#fff",
141
+ borderRadius: 8,
142
+ colorBorder: "rgb(208,213,221)",
143
+ controlHeight: 48,
144
+ paddingInline: 16
154
145
  // "lineHeight": 1
155
146
  },
156
147
  Select: {
157
- fontSizeIcon: 16
148
+ fontSizeIcon: 16,
149
+ controlHeight: 48,
150
+ borderRadius: 8,
151
+ colorBorder: "rgb(208,213,221)"
158
152
  // "lineHeight": 1
159
153
  }
160
154
  },
@@ -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.368",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -63,9 +63,9 @@
63
63
  "react-virtualized-auto-sizer": "^1.0.20",
64
64
  "crypto-js": "^4.2.0",
65
65
  "@zxing/library": "0.21.2",
66
+ "@pisell/icon": "0.0.10",
66
67
  "@pisell/utils": "1.0.30",
67
- "@pisell/date-picker": "1.0.92",
68
- "@pisell/icon": "0.0.10"
68
+ "@pisell/date-picker": "1.0.92"
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": "^18.0.0",