koval-ui 0.12.28 → 0.12.29
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.ts +15 -0
- package/dist/index.js +1312 -1298
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -2
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -468,6 +468,7 @@ id?: string | undefined;
|
|
|
468
468
|
role?: AriaRole | undefined;
|
|
469
469
|
className?: string | undefined;
|
|
470
470
|
} & NativeProps_2 & CallbackPropsInteractive & ValidationProps & {
|
|
471
|
+
/** Set a text for checkbox label */
|
|
471
472
|
label?: string | undefined;
|
|
472
473
|
} & RefAttributes<HTMLInputElement>>;
|
|
473
474
|
|
|
@@ -582,6 +583,9 @@ type?: "search" | "text" | "tel" | "url" | "email" | "password" | undefined;
|
|
|
582
583
|
* Define the width of the input in characters
|
|
583
584
|
*/
|
|
584
585
|
size?: InputHTMLAttributes<HTMLInputElement>['size'];
|
|
586
|
+
/**
|
|
587
|
+
* Provide an icon to prepend to the input
|
|
588
|
+
*/
|
|
585
589
|
prefix?: FC | undefined;
|
|
586
590
|
} & RefAttributes<HTMLInputElement>>;
|
|
587
591
|
|
|
@@ -1628,8 +1632,19 @@ declare type ValidationProps = {
|
|
|
1628
1632
|
* @see https://koval.support/inputs/input-validation
|
|
1629
1633
|
*/
|
|
1630
1634
|
validatorFn?: (value: unknown, validityState: ValidityState, formState: FormState_2) => string | Promise<string>;
|
|
1635
|
+
/**
|
|
1636
|
+
* Set external validation state for input. NB! On change validation takes preference over this.
|
|
1637
|
+
* @see ValidationState
|
|
1638
|
+
*/
|
|
1639
|
+
validationState?: keyof typeof ValidationState;
|
|
1631
1640
|
};
|
|
1632
1641
|
|
|
1642
|
+
declare enum ValidationState {
|
|
1643
|
+
error = "error",
|
|
1644
|
+
valid = "valid",
|
|
1645
|
+
inProgress = "inProgress"
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1633
1648
|
declare enum Variants {
|
|
1634
1649
|
bordered = "bordered",
|
|
1635
1650
|
plain = "plain"
|