@xinghunm/compass-ui 0.7.1 → 0.8.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/index.d.mts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +229 -223
- package/dist/index.mjs +216 -210
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -515,6 +515,10 @@ interface SelectProps {
|
|
|
515
515
|
* Custom selected icon in the dropdown menu
|
|
516
516
|
*/
|
|
517
517
|
menuItemSelectedIcon?: React__default.ReactNode;
|
|
518
|
+
/**
|
|
519
|
+
* Custom popup content renderer. Receives default menu node.
|
|
520
|
+
*/
|
|
521
|
+
popupRender?: (menu: React__default.ReactNode) => React__default.ReactNode;
|
|
518
522
|
}
|
|
519
523
|
interface OptionProps {
|
|
520
524
|
value: string | number;
|
|
@@ -1381,13 +1385,25 @@ interface SelectTheme {
|
|
|
1381
1385
|
hoverBorderColor: string;
|
|
1382
1386
|
activeBorderColor: string;
|
|
1383
1387
|
placeholderColor: string;
|
|
1388
|
+
dropdownBg: string;
|
|
1389
|
+
dropdownBoxShadow: string;
|
|
1390
|
+
dropdownPadding: string;
|
|
1391
|
+
dropdownZIndex: number;
|
|
1392
|
+
dropdownMaxHeight: string;
|
|
1384
1393
|
optionSelectedBg: string;
|
|
1385
1394
|
optionHoverBg: string;
|
|
1386
1395
|
optionColor: string;
|
|
1387
1396
|
optionSelectedColor: string;
|
|
1397
|
+
optionPadding: string;
|
|
1398
|
+
optionMinHeight: string;
|
|
1399
|
+
optionFontSize: string;
|
|
1388
1400
|
tagBg: string;
|
|
1389
1401
|
tagColor: string;
|
|
1390
1402
|
tagBorderColor: string;
|
|
1403
|
+
tagHeight: string;
|
|
1404
|
+
tagPadding: string;
|
|
1405
|
+
tagFontSize: string;
|
|
1406
|
+
tagBorderRadius: string;
|
|
1391
1407
|
padding: {
|
|
1392
1408
|
sm: string;
|
|
1393
1409
|
md: string;
|
|
@@ -1398,6 +1414,11 @@ interface SelectTheme {
|
|
|
1398
1414
|
md: string;
|
|
1399
1415
|
lg: string;
|
|
1400
1416
|
};
|
|
1417
|
+
minHeight: {
|
|
1418
|
+
sm: string;
|
|
1419
|
+
md: string;
|
|
1420
|
+
lg: string;
|
|
1421
|
+
};
|
|
1401
1422
|
}
|
|
1402
1423
|
interface DatePickerTheme {
|
|
1403
1424
|
cellWidth: string;
|
|
@@ -1707,6 +1728,7 @@ interface FieldEntity {
|
|
|
1707
1728
|
onStoreChange: () => void;
|
|
1708
1729
|
validateRules: (options?: {
|
|
1709
1730
|
triggerName?: string;
|
|
1731
|
+
validateOnly?: boolean;
|
|
1710
1732
|
}) => Promise<string[] | null>;
|
|
1711
1733
|
getNamePath: () => InternalNamePath;
|
|
1712
1734
|
getErrors: () => string[];
|
|
@@ -1729,6 +1751,9 @@ interface ValidateErrorEntity<Values = Record<string, unknown>> {
|
|
|
1729
1751
|
}[];
|
|
1730
1752
|
outOfDate: boolean;
|
|
1731
1753
|
}
|
|
1754
|
+
interface ValidateFieldsOptions {
|
|
1755
|
+
validateOnly?: boolean;
|
|
1756
|
+
}
|
|
1732
1757
|
interface InternalHooks {
|
|
1733
1758
|
registerField: (entity: FieldEntity) => () => void;
|
|
1734
1759
|
registerWatch: (callback: (namePath: InternalNamePath) => void) => () => void;
|
|
@@ -1749,7 +1774,7 @@ interface FormInstance<Values = Record<string, unknown>> {
|
|
|
1749
1774
|
setFields: (fields: FieldData[]) => void;
|
|
1750
1775
|
setFieldValue: (name: NamePath, value: unknown) => void;
|
|
1751
1776
|
setFieldsValue: (values: RecursivePartial<Values>) => void;
|
|
1752
|
-
validateFields: (nameList?: NamePath[]) => Promise<Values>;
|
|
1777
|
+
validateFields: (nameList?: NamePath[] | ValidateFieldsOptions, options?: ValidateFieldsOptions) => Promise<Values>;
|
|
1753
1778
|
submit: () => void;
|
|
1754
1779
|
getInternalHooks: (secret: string) => InternalHooks | null;
|
|
1755
1780
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -515,6 +515,10 @@ interface SelectProps {
|
|
|
515
515
|
* Custom selected icon in the dropdown menu
|
|
516
516
|
*/
|
|
517
517
|
menuItemSelectedIcon?: React__default.ReactNode;
|
|
518
|
+
/**
|
|
519
|
+
* Custom popup content renderer. Receives default menu node.
|
|
520
|
+
*/
|
|
521
|
+
popupRender?: (menu: React__default.ReactNode) => React__default.ReactNode;
|
|
518
522
|
}
|
|
519
523
|
interface OptionProps {
|
|
520
524
|
value: string | number;
|
|
@@ -1381,13 +1385,25 @@ interface SelectTheme {
|
|
|
1381
1385
|
hoverBorderColor: string;
|
|
1382
1386
|
activeBorderColor: string;
|
|
1383
1387
|
placeholderColor: string;
|
|
1388
|
+
dropdownBg: string;
|
|
1389
|
+
dropdownBoxShadow: string;
|
|
1390
|
+
dropdownPadding: string;
|
|
1391
|
+
dropdownZIndex: number;
|
|
1392
|
+
dropdownMaxHeight: string;
|
|
1384
1393
|
optionSelectedBg: string;
|
|
1385
1394
|
optionHoverBg: string;
|
|
1386
1395
|
optionColor: string;
|
|
1387
1396
|
optionSelectedColor: string;
|
|
1397
|
+
optionPadding: string;
|
|
1398
|
+
optionMinHeight: string;
|
|
1399
|
+
optionFontSize: string;
|
|
1388
1400
|
tagBg: string;
|
|
1389
1401
|
tagColor: string;
|
|
1390
1402
|
tagBorderColor: string;
|
|
1403
|
+
tagHeight: string;
|
|
1404
|
+
tagPadding: string;
|
|
1405
|
+
tagFontSize: string;
|
|
1406
|
+
tagBorderRadius: string;
|
|
1391
1407
|
padding: {
|
|
1392
1408
|
sm: string;
|
|
1393
1409
|
md: string;
|
|
@@ -1398,6 +1414,11 @@ interface SelectTheme {
|
|
|
1398
1414
|
md: string;
|
|
1399
1415
|
lg: string;
|
|
1400
1416
|
};
|
|
1417
|
+
minHeight: {
|
|
1418
|
+
sm: string;
|
|
1419
|
+
md: string;
|
|
1420
|
+
lg: string;
|
|
1421
|
+
};
|
|
1401
1422
|
}
|
|
1402
1423
|
interface DatePickerTheme {
|
|
1403
1424
|
cellWidth: string;
|
|
@@ -1707,6 +1728,7 @@ interface FieldEntity {
|
|
|
1707
1728
|
onStoreChange: () => void;
|
|
1708
1729
|
validateRules: (options?: {
|
|
1709
1730
|
triggerName?: string;
|
|
1731
|
+
validateOnly?: boolean;
|
|
1710
1732
|
}) => Promise<string[] | null>;
|
|
1711
1733
|
getNamePath: () => InternalNamePath;
|
|
1712
1734
|
getErrors: () => string[];
|
|
@@ -1729,6 +1751,9 @@ interface ValidateErrorEntity<Values = Record<string, unknown>> {
|
|
|
1729
1751
|
}[];
|
|
1730
1752
|
outOfDate: boolean;
|
|
1731
1753
|
}
|
|
1754
|
+
interface ValidateFieldsOptions {
|
|
1755
|
+
validateOnly?: boolean;
|
|
1756
|
+
}
|
|
1732
1757
|
interface InternalHooks {
|
|
1733
1758
|
registerField: (entity: FieldEntity) => () => void;
|
|
1734
1759
|
registerWatch: (callback: (namePath: InternalNamePath) => void) => () => void;
|
|
@@ -1749,7 +1774,7 @@ interface FormInstance<Values = Record<string, unknown>> {
|
|
|
1749
1774
|
setFields: (fields: FieldData[]) => void;
|
|
1750
1775
|
setFieldValue: (name: NamePath, value: unknown) => void;
|
|
1751
1776
|
setFieldsValue: (values: RecursivePartial<Values>) => void;
|
|
1752
|
-
validateFields: (nameList?: NamePath[]) => Promise<Values>;
|
|
1777
|
+
validateFields: (nameList?: NamePath[] | ValidateFieldsOptions, options?: ValidateFieldsOptions) => Promise<Values>;
|
|
1753
1778
|
submit: () => void;
|
|
1754
1779
|
getInternalHooks: (secret: string) => InternalHooks | null;
|
|
1755
1780
|
}
|