@kdcloudjs/kdesign 1.8.26 → 1.8.27
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/dist/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +15 -15
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +2 -2
- package/dist/kdesign.min.js.map +1 -1
- package/es/color-picker/color-picker-panel.js +14 -14
- package/lib/color-picker/color-picker-panel.js +14 -14
- package/package.json +1 -1
|
@@ -131,8 +131,8 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
131
131
|
setInputColorValue(formatInputValue);
|
|
132
132
|
setCorrectColorValue(formatCorrectValue);
|
|
133
133
|
setColTypeArr(formatArr);
|
|
134
|
+
setClickedPresetColorIndex(index);
|
|
134
135
|
}
|
|
135
|
-
setClickedPresetColorIndex(index);
|
|
136
136
|
onChange === null || onChange === void 0 ? void 0 : onChange(formatInputValue, formatArr);
|
|
137
137
|
};
|
|
138
138
|
var historicalColorClick = function historicalColorClick(index, colorValue) {
|
|
@@ -147,8 +147,8 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
147
147
|
setInputColorValue(formatInputValue);
|
|
148
148
|
setCorrectColorValue(formatCorrectValue);
|
|
149
149
|
setColTypeArr(formatArr);
|
|
150
|
+
setClickedHistoricalColorIndex(index);
|
|
150
151
|
}
|
|
151
|
-
setClickedHistoricalColorIndex(index);
|
|
152
152
|
onChange === null || onChange === void 0 ? void 0 : onChange(formatInputValue, formatArr);
|
|
153
153
|
};
|
|
154
154
|
var handleTypeChange = function handleTypeChange(selectValue) {
|
|
@@ -167,7 +167,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
167
167
|
})) === null || _c === void 0 ? void 0 : _c.value, colTypeArr);
|
|
168
168
|
}
|
|
169
169
|
};
|
|
170
|
-
var
|
|
170
|
+
var handleAlphaBlur = function handleAlphaBlur(e) {
|
|
171
171
|
var regPercentage = /^(0|[1-9][0-9]?|100)%$/;
|
|
172
172
|
var regDot = /^(0(\.\d+)?|1(\.0+)?)$/;
|
|
173
173
|
var val = e.target.value;
|
|
@@ -193,17 +193,6 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
193
193
|
formatArr = _getColorFormat.formatArr,
|
|
194
194
|
outValue = _getColorFormat.outValue,
|
|
195
195
|
innerInput = _getColorFormat.innerInput;
|
|
196
|
-
if (value === undefined) {
|
|
197
|
-
setAlphaNoVerifyVal(val);
|
|
198
|
-
setPanelState(formatArr, innerInput, outValue, alphaValue);
|
|
199
|
-
setClickColorIndex(formatArr[0].value);
|
|
200
|
-
}
|
|
201
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(outValue, formatArr);
|
|
202
|
-
};
|
|
203
|
-
var handleAlphaBlur = function handleAlphaBlur(e) {
|
|
204
|
-
var regPercentage = /^(0|[1-9][0-9]?|100)%$/;
|
|
205
|
-
var regDot = /^(0(\.\d+)?|1(\.0+)?)$/;
|
|
206
|
-
var val = e.target.value;
|
|
207
196
|
if (regPercentage.test(val)) {
|
|
208
197
|
setAlphaNoVerifyVal(val);
|
|
209
198
|
} else if (regDot.test(val)) {
|
|
@@ -211,6 +200,17 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
211
200
|
} else {
|
|
212
201
|
setAlphaNoVerifyVal('100%');
|
|
213
202
|
}
|
|
203
|
+
if (value === undefined) {
|
|
204
|
+
setPanelState(formatArr, innerInput, outValue, alphaValue);
|
|
205
|
+
setClickColorIndex(formatArr[0].value);
|
|
206
|
+
}
|
|
207
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(outValue, formatArr);
|
|
208
|
+
};
|
|
209
|
+
var handleAlphaChange = function handleAlphaChange(e) {
|
|
210
|
+
if (value !== undefined && onChange === undefined) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
setAlphaNoVerifyVal(e.target.value);
|
|
214
214
|
};
|
|
215
215
|
var handleHEXInputChange = function handleHEXInputChange(e) {
|
|
216
216
|
setCorrectColorValue(e.target.value);
|
|
@@ -143,8 +143,8 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
143
143
|
setInputColorValue(formatInputValue);
|
|
144
144
|
setCorrectColorValue(formatCorrectValue);
|
|
145
145
|
setColTypeArr(formatArr);
|
|
146
|
+
setClickedPresetColorIndex(index);
|
|
146
147
|
}
|
|
147
|
-
setClickedPresetColorIndex(index);
|
|
148
148
|
onChange === null || onChange === void 0 ? void 0 : onChange(formatInputValue, formatArr);
|
|
149
149
|
};
|
|
150
150
|
var historicalColorClick = function historicalColorClick(index, colorValue) {
|
|
@@ -159,8 +159,8 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
159
159
|
setInputColorValue(formatInputValue);
|
|
160
160
|
setCorrectColorValue(formatCorrectValue);
|
|
161
161
|
setColTypeArr(formatArr);
|
|
162
|
+
setClickedHistoricalColorIndex(index);
|
|
162
163
|
}
|
|
163
|
-
setClickedHistoricalColorIndex(index);
|
|
164
164
|
onChange === null || onChange === void 0 ? void 0 : onChange(formatInputValue, formatArr);
|
|
165
165
|
};
|
|
166
166
|
var handleTypeChange = function handleTypeChange(selectValue) {
|
|
@@ -179,7 +179,7 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
179
179
|
})) === null || _c === void 0 ? void 0 : _c.value, colTypeArr);
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
|
-
var
|
|
182
|
+
var handleAlphaBlur = function handleAlphaBlur(e) {
|
|
183
183
|
var regPercentage = /^(0|[1-9][0-9]?|100)%$/;
|
|
184
184
|
var regDot = /^(0(\.\d+)?|1(\.0+)?)$/;
|
|
185
185
|
var val = e.target.value;
|
|
@@ -205,17 +205,6 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
205
205
|
formatArr = _getColorFormat.formatArr,
|
|
206
206
|
outValue = _getColorFormat.outValue,
|
|
207
207
|
innerInput = _getColorFormat.innerInput;
|
|
208
|
-
if (value === undefined) {
|
|
209
|
-
setAlphaNoVerifyVal(val);
|
|
210
|
-
setPanelState(formatArr, innerInput, outValue, alphaValue);
|
|
211
|
-
setClickColorIndex(formatArr[0].value);
|
|
212
|
-
}
|
|
213
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(outValue, formatArr);
|
|
214
|
-
};
|
|
215
|
-
var handleAlphaBlur = function handleAlphaBlur(e) {
|
|
216
|
-
var regPercentage = /^(0|[1-9][0-9]?|100)%$/;
|
|
217
|
-
var regDot = /^(0(\.\d+)?|1(\.0+)?)$/;
|
|
218
|
-
var val = e.target.value;
|
|
219
208
|
if (regPercentage.test(val)) {
|
|
220
209
|
setAlphaNoVerifyVal(val);
|
|
221
210
|
} else if (regDot.test(val)) {
|
|
@@ -223,6 +212,17 @@ var ColorPickerPanel = function ColorPickerPanel(props) {
|
|
|
223
212
|
} else {
|
|
224
213
|
setAlphaNoVerifyVal('100%');
|
|
225
214
|
}
|
|
215
|
+
if (value === undefined) {
|
|
216
|
+
setPanelState(formatArr, innerInput, outValue, alphaValue);
|
|
217
|
+
setClickColorIndex(formatArr[0].value);
|
|
218
|
+
}
|
|
219
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(outValue, formatArr);
|
|
220
|
+
};
|
|
221
|
+
var handleAlphaChange = function handleAlphaChange(e) {
|
|
222
|
+
if (value !== undefined && onChange === undefined) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
setAlphaNoVerifyVal(e.target.value);
|
|
226
226
|
};
|
|
227
227
|
var handleHEXInputChange = function handleHEXInputChange(e) {
|
|
228
228
|
setCorrectColorValue(e.target.value);
|