elseware-ui 2.17.0 → 2.17.1
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/build/components/data-entry/checkbox/Checkbox.d.ts +26 -3
- package/build/components/utils/glow-wrapper/GlowWrapper.d.ts +11 -0
- package/build/components/utils/glow-wrapper/index.d.ts +2 -0
- package/build/components/utils/index.d.ts +1 -0
- package/build/index.es.js +95 -26
- package/build/index.js +95 -25
- package/package.json +1 -1
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { FieldHookConfig } from "formik";
|
|
2
|
-
export interface
|
|
3
|
+
export interface CheckboxOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Shared props
|
|
9
|
+
*/
|
|
10
|
+
interface BaseCheckboxProps {
|
|
3
11
|
placeholder: string;
|
|
4
|
-
options: any[];
|
|
5
12
|
}
|
|
6
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Single boolean checkbox (confirmation)
|
|
15
|
+
*/
|
|
16
|
+
interface SingleCheckboxProps extends BaseCheckboxProps {
|
|
17
|
+
options?: never;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Multiple checkbox group
|
|
21
|
+
*/
|
|
22
|
+
interface MultiCheckboxProps extends BaseCheckboxProps {
|
|
23
|
+
options: CheckboxOption[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Final props type
|
|
27
|
+
*/
|
|
28
|
+
export type CheckboxProps = (SingleCheckboxProps & FieldHookConfig<boolean>) | (MultiCheckboxProps & FieldHookConfig<string[]>);
|
|
29
|
+
declare const Checkbox: React.FC<CheckboxProps>;
|
|
7
30
|
export default Checkbox;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, ReactNode } from "react";
|
|
2
|
+
export interface GlowWrapperProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
glowSize?: number;
|
|
5
|
+
glowColor?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
/** optional: when true, glow hides while mouse is outside */
|
|
8
|
+
hideOnLeave?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const GlowWrapper: FC<GlowWrapperProps>;
|
|
11
|
+
export default GlowWrapper;
|