ui-beyable 1.0.14 → 1.0.15
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/lib/cjs/components/Checkbox/Checkbox.d.ts +8 -0
- package/lib/cjs/components/Checkbox/types.d.ts +29 -0
- package/lib/cjs/index.d.ts +3 -2
- package/lib/cjs/index.js +350 -153
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/components/Checkbox/Checkbox.d.ts +8 -0
- package/lib/esm/components/Checkbox/types.d.ts +29 -0
- package/lib/esm/index.d.ts +3 -2
- package/lib/esm/index.js +348 -155
- package/lib/esm/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ICheckbox, IRadio, ISwitch } from './types';
|
|
3
|
+
import { IList } from '../List/types';
|
|
4
|
+
declare function Checkbox({ children, type, label, description, tooltip, tooltipHTML, name, value, checked, forcedChecked, disabled, onChange, size, fullWidth }: ICheckbox): JSX.Element;
|
|
5
|
+
declare function Radio(props: IRadio): JSX.Element;
|
|
6
|
+
declare function Switch({ children, label, name, value, checked, onChange, disabled, forcedChecked, position, size, align, verticalSize, noMargin }: ISwitch): JSX.Element;
|
|
7
|
+
declare function CheckboxList(props: IList): JSX.Element;
|
|
8
|
+
export { Checkbox, Radio, Switch, CheckboxList };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ICommon {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
value?: string | number;
|
|
8
|
+
checked?: boolean;
|
|
9
|
+
forcedChecked?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
onChange?: any;
|
|
12
|
+
}
|
|
13
|
+
interface IRadio extends ICommon {
|
|
14
|
+
size?: 's' | 'm' | 'l';
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
tooltip?: string;
|
|
17
|
+
tooltipHTML?: any;
|
|
18
|
+
}
|
|
19
|
+
interface ICheckbox extends IRadio {
|
|
20
|
+
type?: 'checkbox' | 'radio' | undefined;
|
|
21
|
+
}
|
|
22
|
+
interface ISwitch extends ICommon {
|
|
23
|
+
size?: 'xs' | 's' | 'm';
|
|
24
|
+
verticalSize?: 'm' | 'l' | 'xl';
|
|
25
|
+
position?: 'left' | 'right';
|
|
26
|
+
align?: 'top' | 'middle';
|
|
27
|
+
noMargin?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export { ICheckbox, IRadio, ISwitch };
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AppRoot, AppHeader, AppLinkWrapper, AppLogo } from './components/App/App';
|
|
2
2
|
import { Article } from './components/Article/Article';
|
|
3
3
|
import { Btn } from './components/Btn/Btn';
|
|
4
|
+
import { Checkbox, Radio, Switch, CheckboxList } from './components/Checkbox/Checkbox';
|
|
4
5
|
import Collapse from './components/Collapse/Collapse';
|
|
5
6
|
import { IconBtn } from './components/IconBtn/IconBtn';
|
|
6
7
|
import { List, ListItem } from './components/List/List';
|
|
@@ -12,6 +13,6 @@ import { Portal } from './components/Portal/Portal';
|
|
|
12
13
|
import { Section } from './components/Section/Section';
|
|
13
14
|
import { Spinner } from './components/Spinner/Spinner';
|
|
14
15
|
declare const Theme: any;
|
|
15
|
-
export { Theme, AppRoot, AppHeader, AppLinkWrapper, AppLogo, Article, Btn, Collapse, // Not OK
|
|
16
|
+
export { Theme, AppRoot, AppHeader, AppLinkWrapper, AppLogo, Article, Btn, Checkbox, CheckboxList, Collapse, // Not OK
|
|
16
17
|
IconBtn, List, ListItem, Mask, Modal, // Not OK
|
|
17
|
-
Panel, PanelClose, PanelHeader, PanelBody, Picto, Portal, Section, Spinner };
|
|
18
|
+
Panel, PanelClose, PanelHeader, PanelBody, Picto, Portal, Radio, Section, Spinner, Switch, };
|