@mertcankocak/core-project 1.2.0 → 1.3.0
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/components/FormikTextField/FormikTextField.d.ts +46 -0
- package/dist/components/FormikTextField/FormikTextField.d.ts.map +1 -0
- package/dist/components/FormikTextField/constants.d.ts +14 -0
- package/dist/components/FormikTextField/constants.d.ts.map +1 -0
- package/dist/components/FormikTextField/helpers.d.ts +9 -0
- package/dist/components/FormikTextField/helpers.d.ts.map +1 -0
- package/dist/components/FormikTextField/index.d.ts +5 -0
- package/dist/components/FormikTextField/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/core-project.es.js +1179 -336
- package/dist/core-project.umd.js +30 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/stringUtils.d.ts +5 -0
- package/dist/utils/stringUtils.d.ts.map +1 -0
- package/package.json +14 -3
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { TextFieldProps as MuiTextFieldProps, SxProps, Theme } from '@mui/material';
|
|
3
|
+
|
|
4
|
+
export interface FormikTextFieldProps extends Omit<MuiTextFieldProps, "name" | "value" | "onChange" | "onBlur" | "sx"> {
|
|
5
|
+
name: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
fieldToSearch?: string;
|
|
11
|
+
onSuggestionSearch?: (fieldName: string, searchTerm: string) => Promise<string[]>;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
step?: string | number;
|
|
14
|
+
min?: string | number;
|
|
15
|
+
max?: string | number;
|
|
16
|
+
startAdornment?: React.ReactNode;
|
|
17
|
+
endAdornment?: React.ReactNode;
|
|
18
|
+
disableUppercase?: boolean;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
fullWidth?: boolean;
|
|
21
|
+
debounceDelay?: number;
|
|
22
|
+
minSearchLength?: number;
|
|
23
|
+
helperText?: string;
|
|
24
|
+
autoFocus?: boolean;
|
|
25
|
+
multiline?: boolean;
|
|
26
|
+
rows?: number;
|
|
27
|
+
maxLength?: number;
|
|
28
|
+
errorMessageFormatter?: (error: string) => string;
|
|
29
|
+
"aria-label"?: string;
|
|
30
|
+
"aria-describedby"?: string;
|
|
31
|
+
/**
|
|
32
|
+
* MUI sx prop - TextField için özelleştirme
|
|
33
|
+
* @example sx={{ backgroundColor: 'red', '& .MuiInputBase-root': { borderRadius: 2 } }}
|
|
34
|
+
*/
|
|
35
|
+
sx?: SxProps<Theme>;
|
|
36
|
+
/**
|
|
37
|
+
* InputProps içindeki sx - Input root elementi için özelleştirme
|
|
38
|
+
*/
|
|
39
|
+
inputSx?: SxProps<Theme>;
|
|
40
|
+
/**
|
|
41
|
+
* InputProps içindeki input sx - Input elementi için özelleştirme
|
|
42
|
+
*/
|
|
43
|
+
inputElementSx?: SxProps<Theme>;
|
|
44
|
+
}
|
|
45
|
+
export declare const FormikTextField: React.FC<FormikTextFieldProps>;
|
|
46
|
+
//# sourceMappingURL=FormikTextField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormikTextField.d.ts","sourceRoot":"","sources":["../../../src/components/FormikTextField/FormikTextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAMN,MAAM,OAAO,CAAC;AAEf,OAAO,EAKL,cAAc,IAAI,iBAAiB,EACnC,OAAO,EACP,KAAK,EACN,MAAM,eAAe,CAAC;AAKvB,MAAM,WAAW,oBACf,SAAQ,IAAI,CACV,iBAAiB,EACjB,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,IAAI,CAChD;IACD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IA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CAAC;CACjC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4O1D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FormikTextField constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const DEFAULT_DEBOUNCE_DELAY = 300;
|
|
5
|
+
export declare const DEFAULT_MIN_SEARCH_LENGTH = 1;
|
|
6
|
+
/**
|
|
7
|
+
* Input types that should not be converted to uppercase
|
|
8
|
+
*/
|
|
9
|
+
export declare const NON_UPPERCASE_TYPES: readonly ["password", "email", "number", "tel", "url"];
|
|
10
|
+
/**
|
|
11
|
+
* Allowed keyboard keys for number input
|
|
12
|
+
*/
|
|
13
|
+
export declare const ALLOWED_NUMBER_KEYS: readonly ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab", "Enter", "Escape"];
|
|
14
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/FormikTextField/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAC1C,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,mBAAmB,wDAMtB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,mBAAmB,uFAQtB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Değeri büyük harfe çevirir (gerekirse)
|
|
3
|
+
*/
|
|
4
|
+
export declare function transformValue(value: string, type: string, disableUppercase: boolean): string;
|
|
5
|
+
/**
|
|
6
|
+
* Number input için geçerli tuş kontrolü
|
|
7
|
+
*/
|
|
8
|
+
export declare function isValidNumberKey(key: string): boolean;
|
|
9
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/FormikTextField/helpers.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,OAAO,GACxB,MAAM,CAKR;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { FormikTextField } from './FormikTextField';
|
|
2
|
+
export type { FormikTextFieldProps } from './FormikTextField';
|
|
3
|
+
export { transformValue, isValidNumberKey } from './helpers';
|
|
4
|
+
export { DEFAULT_DEBOUNCE_DELAY, DEFAULT_MIN_SEARCH_LENGTH, NON_UPPERCASE_TYPES, ALLOWED_NUMBER_KEYS, } from './constants';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FormikTextField/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7D,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|