@pnkx-lib/ui 1.9.477 → 1.9.480
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/es/fields/Input.js
CHANGED
|
@@ -1295,6 +1295,7 @@ const Input = (props) => {
|
|
|
1295
1295
|
subLabel,
|
|
1296
1296
|
classNameSubLabel,
|
|
1297
1297
|
maxValue,
|
|
1298
|
+
toLowerCaseSafe,
|
|
1298
1299
|
...restProps
|
|
1299
1300
|
} = props;
|
|
1300
1301
|
const { name, value, onChange, onBlur } = field || {};
|
|
@@ -1310,6 +1311,12 @@ const Input = (props) => {
|
|
|
1310
1311
|
(match) => match.toUpperCase()
|
|
1311
1312
|
);
|
|
1312
1313
|
};
|
|
1314
|
+
const handleToLowerCaseSafe = (value2) => {
|
|
1315
|
+
if (typeof value2 === "string") {
|
|
1316
|
+
return value2.toLowerCase();
|
|
1317
|
+
}
|
|
1318
|
+
return value2 || void 0;
|
|
1319
|
+
};
|
|
1313
1320
|
//! Function
|
|
1314
1321
|
const handleChange = useCallback(
|
|
1315
1322
|
(e) => {
|
|
@@ -1379,6 +1386,7 @@ const Input = (props) => {
|
|
|
1379
1386
|
const InputComponent = inputPassword ? Input$1.Password : Input$1;
|
|
1380
1387
|
const customValue = toLowerCaseValue ? capitalizeAfterPeriod(value) : value;
|
|
1381
1388
|
const upperValue = toUpperCaseValue ? value?.toUpperCase() : customValue;
|
|
1389
|
+
const toLowerCaseSafeValue = toLowerCaseSafe ? handleToLowerCaseSafe(value) : upperValue;
|
|
1382
1390
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1383
1391
|
/* @__PURE__ */ jsx(
|
|
1384
1392
|
InputComponent,
|
|
@@ -1386,7 +1394,7 @@ const Input = (props) => {
|
|
|
1386
1394
|
ref: inputRef,
|
|
1387
1395
|
onCompositionStart: handleCompositionStart,
|
|
1388
1396
|
onCompositionEnd: handleCompositionEnd,
|
|
1389
|
-
value:
|
|
1397
|
+
value: toLowerCaseSafeValue,
|
|
1390
1398
|
onChange: handleChange,
|
|
1391
1399
|
onBlur,
|
|
1392
1400
|
prefix: iconStartInput,
|
package/es/ui/Tabs.js
CHANGED
|
@@ -23,7 +23,7 @@ const createStoreImpl = (createState) => {
|
|
|
23
23
|
const initialState = state = createState(setState, getState, api);
|
|
24
24
|
return api;
|
|
25
25
|
};
|
|
26
|
-
const createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
|
|
26
|
+
const createStore = ((createState) => createState ? createStoreImpl(createState) : createStoreImpl);
|
|
27
27
|
|
|
28
28
|
const identity = (arg) => arg;
|
|
29
29
|
function useStore(api, selector = identity) {
|
|
@@ -41,7 +41,7 @@ const createImpl = (createState) => {
|
|
|
41
41
|
Object.assign(useBoundStore, api);
|
|
42
42
|
return useBoundStore;
|
|
43
43
|
};
|
|
44
|
-
const create = (createState) => createState ? createImpl(createState) : createImpl;
|
|
44
|
+
const create = ((createState) => createState ? createImpl(createState) : createImpl);
|
|
45
45
|
|
|
46
46
|
const useTabStore = create((set) => ({
|
|
47
47
|
activeTabKey: void 0,
|
package/package.json
CHANGED
|
@@ -26,6 +26,7 @@ export interface InputProps extends InputPropsAntd {
|
|
|
26
26
|
maxValue?: number;
|
|
27
27
|
thousandSeparator?: string;
|
|
28
28
|
decimalSeparator?: string;
|
|
29
|
+
toLowerCaseSafe?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export declare const Input: (props: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
32
|
export interface PropsNumberFormat extends Omit<InputProps, "onChange" | "afterOnChange" | "value" | "defaultValue" | "iconStartInput" | "iconEndInput"> {
|