karsten-design-system 1.2.87 → 1.2.89
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/index.js +45 -5
- package/dist/index.js.map +1 -1
- package/dist/stories/components/input.d.ts +1 -1
- package/dist/stories/components/table.d.ts +2 -2
- package/dist/types/stories/components/input.d.ts +1 -1
- package/dist/types/stories/components/table.d.ts +2 -2
- package/dist/types/utils/masks/index.d.ts +3 -0
- package/dist/utils/masks/index.d.ts +3 -0
- package/package.json +2 -1
|
@@ -8,7 +8,7 @@ export type InputProps = {
|
|
|
8
8
|
icon?: string;
|
|
9
9
|
iconColor?: keyof typeof variants;
|
|
10
10
|
label?: string;
|
|
11
|
-
mask?: 'cpf' | 'cnpj' | 'numbers' | 'cellphone' | 'cep' | 'decimal' | 'phone' | 'currency';
|
|
11
|
+
mask?: 'cpf' | 'cnpj' | 'numbers' | 'cellphone' | 'cep' | 'decimal' | 'phone' | 'currency' | 'integerOnly' | 'integerComma' | 'decimalBR';
|
|
12
12
|
isFloat?: boolean;
|
|
13
13
|
} & Omit<InputTextProps, 'onChange'>;
|
|
14
14
|
declare const variants: {
|
|
@@ -30,14 +30,14 @@ export type SubTableColumn<T> = {
|
|
|
30
30
|
tooltipText?: (value: T[keyof T], row: T) => string | null | undefined;
|
|
31
31
|
};
|
|
32
32
|
export type TableAction<T> = {
|
|
33
|
-
icon: React.ReactNode;
|
|
33
|
+
icon: React.ReactNode | ((item: T) => React.ReactNode);
|
|
34
34
|
onClick: (item: T) => void;
|
|
35
35
|
label?: string;
|
|
36
36
|
disabled?: boolean | ((item: T) => boolean);
|
|
37
37
|
ariaLabel?: string;
|
|
38
38
|
};
|
|
39
39
|
export type SubTableAction<S> = {
|
|
40
|
-
icon: React.ReactNode;
|
|
40
|
+
icon: React.ReactNode | ((item: S) => React.ReactNode);
|
|
41
41
|
onClick: (item: S) => void;
|
|
42
42
|
label?: string;
|
|
43
43
|
disabled?: boolean | ((item: S) => boolean);
|
|
@@ -8,7 +8,7 @@ export type InputProps = {
|
|
|
8
8
|
icon?: string;
|
|
9
9
|
iconColor?: keyof typeof variants;
|
|
10
10
|
label?: string;
|
|
11
|
-
mask?: 'cpf' | 'cnpj' | 'numbers' | 'cellphone' | 'cep' | 'decimal' | 'phone' | 'currency';
|
|
11
|
+
mask?: 'cpf' | 'cnpj' | 'numbers' | 'cellphone' | 'cep' | 'decimal' | 'phone' | 'currency' | 'integerOnly' | 'integerComma' | 'decimalBR';
|
|
12
12
|
isFloat?: boolean;
|
|
13
13
|
} & Omit<InputTextProps, 'onChange'>;
|
|
14
14
|
declare const variants: {
|
|
@@ -30,14 +30,14 @@ export type SubTableColumn<T> = {
|
|
|
30
30
|
tooltipText?: (value: T[keyof T], row: T) => string | null | undefined;
|
|
31
31
|
};
|
|
32
32
|
export type TableAction<T> = {
|
|
33
|
-
icon: React.ReactNode;
|
|
33
|
+
icon: React.ReactNode | ((item: T) => React.ReactNode);
|
|
34
34
|
onClick: (item: T) => void;
|
|
35
35
|
label?: string;
|
|
36
36
|
disabled?: boolean | ((item: T) => boolean);
|
|
37
37
|
ariaLabel?: string;
|
|
38
38
|
};
|
|
39
39
|
export type SubTableAction<S> = {
|
|
40
|
-
icon: React.ReactNode;
|
|
40
|
+
icon: React.ReactNode | ((item: S) => React.ReactNode);
|
|
41
41
|
onClick: (item: S) => void;
|
|
42
42
|
label?: string;
|
|
43
43
|
disabled?: boolean | ((item: S) => boolean);
|
|
@@ -6,3 +6,6 @@ export declare const maskCellphone: (value: string) => string;
|
|
|
6
6
|
export declare const maskPhone: (value: string) => string;
|
|
7
7
|
export declare const maskCEP: (value: string) => string;
|
|
8
8
|
export declare const maskMoneyBRL: (value: string) => string;
|
|
9
|
+
export declare const maskIntegerOnly: (value: string) => string;
|
|
10
|
+
export declare const maskIntegerComma: (value: string) => string;
|
|
11
|
+
export declare const maskDecimalBR: (value: string) => string;
|
|
@@ -6,3 +6,6 @@ export declare const maskCellphone: (value: string) => string;
|
|
|
6
6
|
export declare const maskPhone: (value: string) => string;
|
|
7
7
|
export declare const maskCEP: (value: string) => string;
|
|
8
8
|
export declare const maskMoneyBRL: (value: string) => string;
|
|
9
|
+
export declare const maskIntegerOnly: (value: string) => string;
|
|
10
|
+
export declare const maskIntegerComma: (value: string) => string;
|
|
11
|
+
export declare const maskDecimalBR: (value: string) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "karsten-design-system",
|
|
3
3
|
"description": "Karsten Design System Components",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.89",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"eslint-plugin-react-refresh": "^0.4.16",
|
|
75
75
|
"eslint-plugin-storybook": "^0.11.2",
|
|
76
76
|
"globals": "^15.13.0",
|
|
77
|
+
"patch-package": "^8.0.1",
|
|
77
78
|
"postcss": "^8.4.49",
|
|
78
79
|
"prettier": "^3.4.2",
|
|
79
80
|
"react-router-dom": "^7.1.4",
|