@bodynarf/react.components 1.6.3 → 1.7.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/dist/bbr-components.js +1040 -0
- package/dist/bbr-components.umd.cjs +27 -0
- package/dist/components/accordion/component/index.d.ts +4 -0
- package/{components/anchor/index.js → dist/components/accordion/index.d.ts} +2 -2
- package/dist/components/accordion/types.d.ts +16 -0
- package/dist/components/anchor/component/index.d.ts +3 -0
- package/{components → dist/components}/anchor/components/anchorWithIcon/index.d.ts +3 -5
- package/{components → dist/components}/anchor/components/simpleAnchor/index.d.ts +3 -5
- package/{components/dropdown/index.js → dist/components/anchor/index.d.ts} +2 -2
- package/{components → dist/components}/anchor/types.d.ts +38 -39
- package/{components → dist/components}/button/component/index.d.ts +6 -9
- package/{components → dist/components}/button/components/buttonWithIcon/index.d.ts +3 -5
- package/{components → dist/components}/button/components/simpleButton/index.d.ts +3 -5
- package/{components/button/index.js → dist/components/button/index.d.ts} +2 -2
- package/{components → dist/components}/button/types.d.ts +36 -37
- package/dist/components/dropdown/component/index.d.ts +4 -0
- package/{components → dist/components}/dropdown/components/compact/index.d.ts +3 -5
- package/{components → dist/components}/dropdown/components/item/index.d.ts +13 -15
- package/{components → dist/components}/dropdown/components/label/index.d.ts +17 -18
- package/{components → dist/components}/dropdown/components/withLabel/index.d.ts +3 -5
- package/{components/icon/index.js → dist/components/dropdown/index.d.ts} +2 -2
- package/{components → dist/components}/dropdown/types.d.ts +45 -46
- package/{components → dist/components}/icon/component/index.d.ts +5 -8
- package/dist/components/icon/index.d.ts +2 -0
- package/{components → dist/components}/icon/types.d.ts +15 -16
- package/{components/index.js → dist/components/index.d.ts} +11 -10
- package/{components → dist/components}/paginator/component/index.d.ts +6 -8
- package/{components/paginator/index.js → dist/components/paginator/index.d.ts} +3 -3
- package/{components → dist/components}/paginator/types.d.ts +27 -28
- package/{components → dist/components}/paginator/utils.d.ts +9 -10
- package/{components → dist/components}/primitives/checkbox/component/index.d.ts +4 -7
- package/dist/components/primitives/checkbox/index.d.ts +2 -0
- package/{components → dist/components}/primitives/checkbox/types.d.ts +24 -25
- package/{components → dist/components}/primitives/date/component/index.d.ts +4 -6
- package/dist/components/primitives/date/index.d.ts +2 -0
- package/{components → dist/components}/primitives/date/types.d.ts +8 -9
- package/{components/primitives/index.js → dist/components/primitives/index.d.ts} +7 -7
- package/dist/components/primitives/multiline/component/index.d.ts +4 -0
- package/{components → dist/components}/primitives/multiline/components/multilineWithLabel/index.d.ts +4 -6
- package/{components → dist/components}/primitives/multiline/components/multilineWithoutLabel/index.d.ts +4 -6
- package/dist/components/primitives/multiline/index.d.ts +2 -0
- package/{components → dist/components}/primitives/multiline/types.d.ts +10 -11
- package/{components → dist/components}/primitives/number/component/index.d.ts +4 -6
- package/{components → dist/components}/primitives/number/components/withLabel/index.d.ts +4 -6
- package/{components → dist/components}/primitives/number/components/withoutLabel/index.d.ts +4 -6
- package/dist/components/primitives/number/index.d.ts +2 -0
- package/{components → dist/components}/primitives/number/types.d.ts +12 -13
- package/dist/components/primitives/password/component/index.d.ts +4 -0
- package/{components → dist/components}/primitives/password/components/withLabel/index.d.ts +3 -5
- package/{components → dist/components}/primitives/password/components/withoutLabel/index.d.ts +3 -5
- package/dist/components/primitives/password/index.d.ts +2 -0
- package/{components → dist/components}/primitives/password/types.d.ts +9 -10
- package/dist/components/primitives/text/component/index.d.ts +4 -0
- package/{components → dist/components}/primitives/text/components/textWithLabel/index.d.ts +4 -6
- package/{components → dist/components}/primitives/text/components/textWithoutLabel/index.d.ts +4 -6
- package/dist/components/primitives/text/index.d.ts +2 -0
- package/{components → dist/components}/primitives/text/types.d.ts +6 -7
- package/{components → dist/components}/primitives/types/baseProps.d.ts +29 -30
- package/{components/primitives/types/index.js → dist/components/primitives/types/index.d.ts} +3 -3
- package/{components → dist/components}/primitives/types/label.d.ts +13 -14
- package/{components/primitives/types/validation/index.js → dist/components/primitives/types/validation/index.d.ts} +2 -2
- package/{components → dist/components}/primitives/types/validation/state.d.ts +8 -9
- package/{components → dist/components}/primitives/types/validation/status.d.ts +9 -10
- package/{components → dist/components}/search/component/index.d.ts +3 -6
- package/dist/components/search/index.d.ts +2 -0
- package/{components → dist/components}/search/types.d.ts +26 -27
- package/{components → dist/components}/tabs/component/index.d.ts +31 -34
- package/{components → dist/components}/tabs/components/item/index.d.ts +11 -13
- package/dist/components/tabs/index.d.ts +2 -0
- package/{components → dist/components}/tabs/types.d.ts +42 -43
- package/{components → dist/components}/tag/component/index.d.ts +4 -7
- package/dist/components/tag/index.d.ts +2 -0
- package/{components → dist/components}/tag/types.d.ts +26 -27
- package/{components → dist/components}/types.d.ts +66 -67
- package/{hooks/index.js → dist/hooks/index.d.ts} +2 -2
- package/{hooks → dist/hooks}/useComponentOutsideClick.d.ts +10 -11
- package/{hooks → dist/hooks}/usePagination.d.ts +19 -20
- package/{index.js → dist/index.d.ts} +3 -3
- package/dist/style.css +1 -0
- package/{utils → dist/utils}/dataAttributes.d.ts +7 -8
- package/{utils → dist/utils}/formValidation.d.ts +15 -16
- package/{utils/index.js → dist/utils/index.d.ts} +2 -2
- package/package.json +45 -38
- package/common.scss +0 -3
- package/components/anchor/component/index.d.ts +0 -6
- package/components/anchor/component/index.d.ts.map +0 -1
- package/components/anchor/component/index.js +0 -20
- package/components/anchor/component/style.scss +0 -15
- package/components/anchor/components/anchorWithIcon/index.d.ts.map +0 -1
- package/components/anchor/components/anchorWithIcon/index.js +0 -16
- package/components/anchor/components/simpleAnchor/index.d.ts.map +0 -1
- package/components/anchor/components/simpleAnchor/index.js +0 -5
- package/components/anchor/index.d.ts +0 -3
- package/components/anchor/index.d.ts.map +0 -1
- package/components/anchor/types.d.ts.map +0 -1
- package/components/anchor/types.js +0 -1
- package/components/button/component/index.d.ts.map +0 -1
- package/components/button/component/index.js +0 -36
- package/components/button/component/style.scss +0 -12
- package/components/button/components/buttonWithIcon/index.d.ts.map +0 -1
- package/components/button/components/buttonWithIcon/index.js +0 -19
- package/components/button/components/simpleButton/index.d.ts.map +0 -1
- package/components/button/components/simpleButton/index.js +0 -5
- package/components/button/index.d.ts +0 -3
- package/components/button/index.d.ts.map +0 -1
- package/components/button/types.d.ts.map +0 -1
- package/components/button/types.js +0 -4
- package/components/dropdown/component/index.d.ts +0 -7
- package/components/dropdown/component/index.d.ts.map +0 -1
- package/components/dropdown/component/index.js +0 -15
- package/components/dropdown/component/style.scss +0 -120
- package/components/dropdown/components/compact/index.d.ts.map +0 -1
- package/components/dropdown/components/compact/index.js +0 -62
- package/components/dropdown/components/item/index.d.ts.map +0 -1
- package/components/dropdown/components/item/index.js +0 -6
- package/components/dropdown/components/label/index.d.ts.map +0 -1
- package/components/dropdown/components/label/index.js +0 -22
- package/components/dropdown/components/withLabel/index.d.ts.map +0 -1
- package/components/dropdown/components/withLabel/index.js +0 -83
- package/components/dropdown/index.d.ts +0 -3
- package/components/dropdown/index.d.ts.map +0 -1
- package/components/dropdown/types.d.ts.map +0 -1
- package/components/dropdown/types.js +0 -1
- package/components/icon/component/index.d.ts.map +0 -1
- package/components/icon/component/index.js +0 -23
- package/components/icon/component/style.scss +0 -21
- package/components/icon/index.d.ts +0 -3
- package/components/icon/index.d.ts.map +0 -1
- package/components/icon/types.d.ts.map +0 -1
- package/components/icon/types.js +0 -1
- package/components/index.d.ts +0 -11
- package/components/index.d.ts.map +0 -1
- package/components/paginator/component/index.d.ts.map +0 -1
- package/components/paginator/component/index.js +0 -47
- package/components/paginator/index.d.ts +0 -4
- package/components/paginator/index.d.ts.map +0 -1
- package/components/paginator/types.d.ts.map +0 -1
- package/components/paginator/types.js +0 -1
- package/components/paginator/utils.d.ts.map +0 -1
- package/components/paginator/utils.js +0 -18
- package/components/primitives/checkbox/component/index.d.ts.map +0 -1
- package/components/primitives/checkbox/component/index.js +0 -37
- package/components/primitives/checkbox/component/style.scss +0 -10
- package/components/primitives/checkbox/index.d.ts +0 -3
- package/components/primitives/checkbox/index.d.ts.map +0 -1
- package/components/primitives/checkbox/index.js +0 -2
- package/components/primitives/checkbox/types.d.ts.map +0 -1
- package/components/primitives/checkbox/types.js +0 -1
- package/components/primitives/date/component/index.d.ts.map +0 -1
- package/components/primitives/date/component/index.js +0 -48
- package/components/primitives/date/index.d.ts +0 -3
- package/components/primitives/date/index.d.ts.map +0 -1
- package/components/primitives/date/index.js +0 -2
- package/components/primitives/date/types.d.ts.map +0 -1
- package/components/primitives/date/types.js +0 -1
- package/components/primitives/index.d.ts +0 -8
- package/components/primitives/index.d.ts.map +0 -1
- package/components/primitives/multiline/component/index.d.ts +0 -7
- package/components/primitives/multiline/component/index.d.ts.map +0 -1
- package/components/primitives/multiline/component/index.js +0 -15
- package/components/primitives/multiline/components/multilineWithLabel/index.d.ts.map +0 -1
- package/components/primitives/multiline/components/multilineWithLabel/index.js +0 -45
- package/components/primitives/multiline/components/multilineWithoutLabel/index.d.ts.map +0 -1
- package/components/primitives/multiline/components/multilineWithoutLabel/index.js +0 -27
- package/components/primitives/multiline/index.d.ts +0 -3
- package/components/primitives/multiline/index.d.ts.map +0 -1
- package/components/primitives/multiline/index.js +0 -2
- package/components/primitives/multiline/types.d.ts.map +0 -1
- package/components/primitives/multiline/types.js +0 -1
- package/components/primitives/number/component/index.d.ts.map +0 -1
- package/components/primitives/number/component/index.js +0 -14
- package/components/primitives/number/components/withLabel/index.d.ts.map +0 -1
- package/components/primitives/number/components/withLabel/index.js +0 -44
- package/components/primitives/number/components/withoutLabel/index.d.ts.map +0 -1
- package/components/primitives/number/components/withoutLabel/index.js +0 -26
- package/components/primitives/number/index.d.ts +0 -3
- package/components/primitives/number/index.d.ts.map +0 -1
- package/components/primitives/number/index.js +0 -2
- package/components/primitives/number/types.d.ts.map +0 -1
- package/components/primitives/number/types.js +0 -1
- package/components/primitives/password/component/index.d.ts +0 -7
- package/components/primitives/password/component/index.d.ts.map +0 -1
- package/components/primitives/password/component/index.js +0 -13
- package/components/primitives/password/component/style.scss +0 -16
- package/components/primitives/password/components/withLabel/index.d.ts.map +0 -1
- package/components/primitives/password/components/withLabel/index.js +0 -51
- package/components/primitives/password/components/withoutLabel/index.d.ts.map +0 -1
- package/components/primitives/password/components/withoutLabel/index.js +0 -33
- package/components/primitives/password/index.d.ts +0 -3
- package/components/primitives/password/index.d.ts.map +0 -1
- package/components/primitives/password/index.js +0 -2
- package/components/primitives/password/types.d.ts.map +0 -1
- package/components/primitives/password/types.js +0 -1
- package/components/primitives/text/component/index.d.ts +0 -7
- package/components/primitives/text/component/index.d.ts.map +0 -1
- package/components/primitives/text/component/index.js +0 -15
- package/components/primitives/text/components/textWithLabel/index.d.ts.map +0 -1
- package/components/primitives/text/components/textWithLabel/index.js +0 -44
- package/components/primitives/text/components/textWithoutLabel/index.d.ts.map +0 -1
- package/components/primitives/text/components/textWithoutLabel/index.js +0 -26
- package/components/primitives/text/index.d.ts +0 -3
- package/components/primitives/text/index.d.ts.map +0 -1
- package/components/primitives/text/index.js +0 -2
- package/components/primitives/text/types.d.ts.map +0 -1
- package/components/primitives/text/types.js +0 -1
- package/components/primitives/types/baseProps.d.ts.map +0 -1
- package/components/primitives/types/baseProps.js +0 -1
- package/components/primitives/types/index.d.ts +0 -4
- package/components/primitives/types/index.d.ts.map +0 -1
- package/components/primitives/types/label.d.ts.map +0 -1
- package/components/primitives/types/label.js +0 -1
- package/components/primitives/types/validation/index.d.ts +0 -3
- package/components/primitives/types/validation/index.d.ts.map +0 -1
- package/components/primitives/types/validation/state.d.ts.map +0 -1
- package/components/primitives/types/validation/state.js +0 -2
- package/components/primitives/types/validation/status.d.ts.map +0 -1
- package/components/primitives/types/validation/status.js +0 -11
- package/components/search/component/index.d.ts.map +0 -1
- package/components/search/component/index.js +0 -37
- package/components/search/component/style.scss +0 -24
- package/components/search/index.d.ts +0 -3
- package/components/search/index.d.ts.map +0 -1
- package/components/search/index.js +0 -2
- package/components/search/types.d.ts.map +0 -1
- package/components/search/types.js +0 -1
- package/components/tabs/component/index.d.ts.map +0 -1
- package/components/tabs/component/index.js +0 -68
- package/components/tabs/component/style.scss +0 -12
- package/components/tabs/components/item/index.d.ts.map +0 -1
- package/components/tabs/components/item/index.js +0 -27
- package/components/tabs/index.d.ts +0 -3
- package/components/tabs/index.d.ts.map +0 -1
- package/components/tabs/index.js +0 -2
- package/components/tabs/types.d.ts.map +0 -1
- package/components/tabs/types.js +0 -34
- package/components/tag/component/index.d.ts.map +0 -1
- package/components/tag/component/index.js +0 -28
- package/components/tag/component/style.scss +0 -27
- package/components/tag/index.d.ts +0 -3
- package/components/tag/index.d.ts.map +0 -1
- package/components/tag/index.js +0 -2
- package/components/tag/types.d.ts.map +0 -1
- package/components/tag/types.js +0 -1
- package/components/types.d.ts.map +0 -1
- package/components/types.js +0 -31
- package/hooks/index.d.ts +0 -3
- package/hooks/index.d.ts.map +0 -1
- package/hooks/useComponentOutsideClick.d.ts.map +0 -1
- package/hooks/useComponentOutsideClick.js +0 -32
- package/hooks/usePagination.d.ts.map +0 -1
- package/hooks/usePagination.js +0 -28
- package/index.d.ts +0 -4
- package/index.d.ts.map +0 -1
- package/readme.md +0 -56
- package/tsconfig.tsbuildinfo +0 -1
- package/utils/dataAttributes.d.ts.map +0 -1
- package/utils/dataAttributes.js +0 -19
- package/utils/formValidation.d.ts.map +0 -1
- package/utils/formValidation.js +0 -35
- package/utils/index.d.ts +0 -3
- package/utils/index.d.ts.map +0 -1
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { ElementSize } from
|
|
2
|
-
/** Search component props type */
|
|
3
|
-
export interface SearchProps {
|
|
4
|
-
/**
|
|
5
|
-
* Search type: by typing, starts from minimum characters to search
|
|
6
|
-
* or by clicking on button next to search bar.
|
|
7
|
-
* Default `is byTyping`
|
|
8
|
-
*/
|
|
9
|
-
searchType: "byTyping" | "byButton";
|
|
10
|
-
/** Search caption */
|
|
11
|
-
caption: string;
|
|
12
|
-
/** Search handler */
|
|
13
|
-
onSearch: (searchPattern: string) => void;
|
|
14
|
-
/** Initial search value */
|
|
15
|
-
defaultValue?: string;
|
|
16
|
-
/** Control name. If empty - will be replaced by random guid */
|
|
17
|
-
name?: string;
|
|
18
|
-
/** Size of search bar */
|
|
19
|
-
size?: ElementSize;
|
|
20
|
-
/** Should search bar be rounded */
|
|
21
|
-
rounded?: boolean;
|
|
22
|
-
/** Is search bar disabled */
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
/** Should loading icon be displayed in search bar */
|
|
25
|
-
isLoading?: boolean;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
import { ElementSize } from '../../components';
|
|
2
|
+
/** Search component props type */
|
|
3
|
+
export interface SearchProps {
|
|
4
|
+
/**
|
|
5
|
+
* Search type: by typing, starts from minimum characters to search
|
|
6
|
+
* or by clicking on button next to search bar.
|
|
7
|
+
* Default `is byTyping`
|
|
8
|
+
*/
|
|
9
|
+
searchType: "byTyping" | "byButton";
|
|
10
|
+
/** Search caption */
|
|
11
|
+
caption: string;
|
|
12
|
+
/** Search handler */
|
|
13
|
+
onSearch: (searchPattern: string) => void;
|
|
14
|
+
/** Initial search value */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/** Control name. If empty - will be replaced by random guid */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Size of search bar */
|
|
19
|
+
size?: ElementSize;
|
|
20
|
+
/** Should search bar be rounded */
|
|
21
|
+
rounded?: boolean;
|
|
22
|
+
/** Is search bar disabled */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Should loading icon be displayed in search bar */
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
}
|
|
@@ -1,34 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/** Tabs
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/** Component
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
declare const Tabs: ({ items, onActiveItemChange, defaultActive, size, position, style, fullWidth, className, title, data, }: TabsProps) => JSX.Element;
|
|
33
|
-
export default Tabs;
|
|
34
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { BaseElementProps, ElementSize } from '../../../components';
|
|
2
|
+
import { TabItem, TabsPosition, TabsStyle } from '../../../components/tabs';
|
|
3
|
+
/** Tabs component props type */
|
|
4
|
+
export interface TabsProps extends BaseElementProps {
|
|
5
|
+
/** Tabs */
|
|
6
|
+
items: Array<TabItem>;
|
|
7
|
+
/** Handler of changing current active item */
|
|
8
|
+
onActiveItemChange: (item: TabItem) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Active item by default.
|
|
11
|
+
* If not set - first item will be active
|
|
12
|
+
*/
|
|
13
|
+
defaultActive?: TabItem;
|
|
14
|
+
/**
|
|
15
|
+
* Component size.
|
|
16
|
+
* Default is `normal`
|
|
17
|
+
*/
|
|
18
|
+
size?: ElementSize;
|
|
19
|
+
/** Component position */
|
|
20
|
+
position?: TabsPosition;
|
|
21
|
+
/** Component style */
|
|
22
|
+
style?: TabsStyle;
|
|
23
|
+
/** Is component tabs should take all width of parent */
|
|
24
|
+
fullWidth?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Tabs panel
|
|
28
|
+
* @throws Items are empty
|
|
29
|
+
*/
|
|
30
|
+
declare const Tabs: ({ items, onActiveItemChange, defaultActive, size, position, style, fullWidth, className, title, data, }: TabsProps) => JSX.Element;
|
|
31
|
+
export default Tabs;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
item
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export default TabItem;
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { TabItem as Item } from '../../../../components/tabs';
|
|
2
|
+
/** Tabs panel single tab item component props type */
|
|
3
|
+
export interface TabItemProps {
|
|
4
|
+
/** Tab item */
|
|
5
|
+
item: Item;
|
|
6
|
+
/** Active item identifier */
|
|
7
|
+
activeItem: string;
|
|
8
|
+
}
|
|
9
|
+
/** Tabs panel single tab item component */
|
|
10
|
+
declare const TabItem: ({ item, activeItem }: TabItemProps) => JSX.Element;
|
|
11
|
+
export default TabItem;
|
|
@@ -1,43 +1,42 @@
|
|
|
1
|
-
import { ElementIcon } from
|
|
2
|
-
/** Tabs component style */
|
|
3
|
-
export declare enum TabsStyle {
|
|
4
|
-
/**
|
|
5
|
-
* Default style.
|
|
6
|
-
* Single border at the bottom
|
|
7
|
-
*/
|
|
8
|
-
default = "",
|
|
9
|
-
/**
|
|
10
|
-
* Classic style with borders.
|
|
11
|
-
* Borders all except bottom
|
|
12
|
-
*/
|
|
13
|
-
boxed = "is-boxed",
|
|
14
|
-
/**
|
|
15
|
-
* Styled as buttons
|
|
16
|
-
*/
|
|
17
|
-
radioButton = "is-toggle",
|
|
18
|
-
/**
|
|
19
|
-
* Styled as rounded buttons
|
|
20
|
-
*/
|
|
21
|
-
radioButtonRounded = "is-toggle is-toggle-rounded"
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Tabs items position on component
|
|
25
|
-
*/
|
|
26
|
-
export declare enum TabsPosition {
|
|
27
|
-
/** On the left side. Default value */
|
|
28
|
-
"left" = "",
|
|
29
|
-
/** Center*/
|
|
30
|
-
"center" = "is-centered",
|
|
31
|
-
/** Pulled to right */
|
|
32
|
-
"right" = "is-right"
|
|
33
|
-
}
|
|
34
|
-
/** Tab item */
|
|
35
|
-
export interface TabItem {
|
|
36
|
-
/** Unique identifier across all tab items */
|
|
37
|
-
id: string;
|
|
38
|
-
/** Displayable caption */
|
|
39
|
-
caption: string;
|
|
40
|
-
/** Icon configuration */
|
|
41
|
-
icon?: ElementIcon;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
import { ElementIcon } from '../../components';
|
|
2
|
+
/** Tabs component style */
|
|
3
|
+
export declare enum TabsStyle {
|
|
4
|
+
/**
|
|
5
|
+
* Default style.
|
|
6
|
+
* Single border at the bottom
|
|
7
|
+
*/
|
|
8
|
+
default = "",
|
|
9
|
+
/**
|
|
10
|
+
* Classic style with borders.
|
|
11
|
+
* Borders all except bottom
|
|
12
|
+
*/
|
|
13
|
+
boxed = "is-boxed",
|
|
14
|
+
/**
|
|
15
|
+
* Styled as buttons
|
|
16
|
+
*/
|
|
17
|
+
radioButton = "is-toggle",
|
|
18
|
+
/**
|
|
19
|
+
* Styled as rounded buttons
|
|
20
|
+
*/
|
|
21
|
+
radioButtonRounded = "is-toggle is-toggle-rounded"
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Tabs items position on component
|
|
25
|
+
*/
|
|
26
|
+
export declare enum TabsPosition {
|
|
27
|
+
/** On the left side. Default value */
|
|
28
|
+
"left" = "",
|
|
29
|
+
/** Center*/
|
|
30
|
+
"center" = "is-centered",
|
|
31
|
+
/** Pulled to right */
|
|
32
|
+
"right" = "is-right"
|
|
33
|
+
}
|
|
34
|
+
/** Tab item */
|
|
35
|
+
export interface TabItem {
|
|
36
|
+
/** Unique identifier across all tab items */
|
|
37
|
+
id: string;
|
|
38
|
+
/** Displayable caption */
|
|
39
|
+
caption: string;
|
|
40
|
+
/** Icon configuration */
|
|
41
|
+
icon?: ElementIcon;
|
|
42
|
+
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare const Tag: ({ content, size, style, rounded, lightColor, customColor, onClick, className, title, }: TagProps) => JSX.Element;
|
|
6
|
-
export default Tag;
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { TagProps } from '../../../components/tag';
|
|
2
|
+
/** Single tag item */
|
|
3
|
+
declare const Tag: ({ content, size, style, rounded, lightColor, customColor, onClick, className, title, }: TagProps) => JSX.Element;
|
|
4
|
+
export default Tag;
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
import { BaseElementProps, ElementColor, ElementSize } from
|
|
2
|
-
/** Tag item prop types */
|
|
3
|
-
export interface TagProps extends BaseElementProps {
|
|
4
|
-
/** Tag
|
|
5
|
-
content: string;
|
|
6
|
-
/**
|
|
7
|
-
* Element size.
|
|
8
|
-
* `Small` isn"t allowed
|
|
9
|
-
*/
|
|
10
|
-
size?: ElementSize;
|
|
11
|
-
/** Element color */
|
|
12
|
-
style?: ElementColor;
|
|
13
|
-
/** Is element with rounded border */
|
|
14
|
-
rounded?: boolean;
|
|
15
|
-
/** Is element has light color */
|
|
16
|
-
lightColor?: boolean;
|
|
17
|
-
/** Click handler */
|
|
18
|
-
onClick?: () => void;
|
|
19
|
-
/** Manual color scheme */
|
|
20
|
-
customColor?: {
|
|
21
|
-
/** Text color */
|
|
22
|
-
color: string;
|
|
23
|
-
/** Background color */
|
|
24
|
-
backgroundColor: string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
import { BaseElementProps, ElementColor, ElementSize } from '../../components';
|
|
2
|
+
/** Tag item prop types */
|
|
3
|
+
export interface TagProps extends BaseElementProps {
|
|
4
|
+
/** Tag content */
|
|
5
|
+
content: string;
|
|
6
|
+
/**
|
|
7
|
+
* Element size.
|
|
8
|
+
* `Small` isn"t allowed
|
|
9
|
+
*/
|
|
10
|
+
size?: ElementSize;
|
|
11
|
+
/** Element color */
|
|
12
|
+
style?: ElementColor;
|
|
13
|
+
/** Is element with rounded border */
|
|
14
|
+
rounded?: boolean;
|
|
15
|
+
/** Is element has light color */
|
|
16
|
+
lightColor?: boolean;
|
|
17
|
+
/** Click handler */
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
/** Manual color scheme */
|
|
20
|
+
customColor?: {
|
|
21
|
+
/** Text color */
|
|
22
|
+
color: string;
|
|
23
|
+
/** Background color */
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -1,67 +1,66 @@
|
|
|
1
|
-
/** Base interface for component props */
|
|
2
|
-
export interface BaseElementProps {
|
|
3
|
-
/** Additional class names */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** Title */
|
|
6
|
-
title?: string;
|
|
7
|
-
/** Extra data-* attributes */
|
|
8
|
-
data?: DataAttributes;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Html data-* attributes
|
|
12
|
-
* @description All keys with defined values will be mapped injected into html element as data-{key} attributes
|
|
13
|
-
*/
|
|
14
|
-
export interface DataAttributes {
|
|
15
|
-
/** Single data-* attribute value */
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}
|
|
18
|
-
/** Input component size variety */
|
|
19
|
-
export declare enum ElementSize {
|
|
20
|
-
/** Font size is 0.75rem */
|
|
21
|
-
Small = "small",
|
|
22
|
-
/** Font size is 1rem. Default */
|
|
23
|
-
Normal = "normal",
|
|
24
|
-
/** Font size is 1.25rem */
|
|
25
|
-
Medium = "medium",
|
|
26
|
-
/** Font size is 1.5rem */
|
|
27
|
-
Large = "large"
|
|
28
|
-
}
|
|
29
|
-
/** Input component border-color type */
|
|
30
|
-
export declare enum ElementColor {
|
|
31
|
-
/** color: transparent */
|
|
32
|
-
Default = "default",
|
|
33
|
-
/** color: seawave green */
|
|
34
|
-
Primary = "primary",
|
|
35
|
-
/** color: blue-violet */
|
|
36
|
-
Link = "link",
|
|
37
|
-
/** color: sky-blue */
|
|
38
|
-
Info = "info",
|
|
39
|
-
/** color: green */
|
|
40
|
-
Success = "success",
|
|
41
|
-
/** color: yellow */
|
|
42
|
-
Warning = "warning",
|
|
43
|
-
/** color: red */
|
|
44
|
-
Danger = "danger"
|
|
45
|
-
}
|
|
46
|
-
/** Allowed icon position */
|
|
47
|
-
export
|
|
48
|
-
/** Icon for component */
|
|
49
|
-
export interface ElementIcon {
|
|
50
|
-
/**
|
|
51
|
-
* Icon name. Must be without `bi-`
|
|
52
|
-
* @example ["Arrow repeat", "arrow-repeat"]
|
|
53
|
-
* // Icon name to icon class name.
|
|
54
|
-
* // For class name check bootstrap icons website
|
|
55
|
-
*/
|
|
56
|
-
name: string;
|
|
57
|
-
/** Additional classname */
|
|
58
|
-
className?: string;
|
|
59
|
-
/** Icon size */
|
|
60
|
-
size?: ElementSize;
|
|
61
|
-
/**
|
|
62
|
-
* Position
|
|
63
|
-
* Works only with other content
|
|
64
|
-
*/
|
|
65
|
-
position?: IconPosition;
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=types.d.ts.map
|
|
1
|
+
/** Base interface for component props */
|
|
2
|
+
export interface BaseElementProps {
|
|
3
|
+
/** Additional class names */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Title */
|
|
6
|
+
title?: string;
|
|
7
|
+
/** Extra data-* attributes */
|
|
8
|
+
data?: DataAttributes;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Html data-* attributes
|
|
12
|
+
* @description All keys with defined values will be mapped injected into html element as data-{key} attributes
|
|
13
|
+
*/
|
|
14
|
+
export interface DataAttributes {
|
|
15
|
+
/** Single data-* attribute value */
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
}
|
|
18
|
+
/** Input component size variety */
|
|
19
|
+
export declare enum ElementSize {
|
|
20
|
+
/** Font size is 0.75rem */
|
|
21
|
+
Small = "small",
|
|
22
|
+
/** Font size is 1rem. Default */
|
|
23
|
+
Normal = "normal",
|
|
24
|
+
/** Font size is 1.25rem */
|
|
25
|
+
Medium = "medium",
|
|
26
|
+
/** Font size is 1.5rem */
|
|
27
|
+
Large = "large"
|
|
28
|
+
}
|
|
29
|
+
/** Input component border-color type */
|
|
30
|
+
export declare enum ElementColor {
|
|
31
|
+
/** color: transparent */
|
|
32
|
+
Default = "default",
|
|
33
|
+
/** color: seawave green */
|
|
34
|
+
Primary = "primary",
|
|
35
|
+
/** color: blue-violet */
|
|
36
|
+
Link = "link",
|
|
37
|
+
/** color: sky-blue */
|
|
38
|
+
Info = "info",
|
|
39
|
+
/** color: green */
|
|
40
|
+
Success = "success",
|
|
41
|
+
/** color: yellow */
|
|
42
|
+
Warning = "warning",
|
|
43
|
+
/** color: red */
|
|
44
|
+
Danger = "danger"
|
|
45
|
+
}
|
|
46
|
+
/** Allowed icon position */
|
|
47
|
+
export type IconPosition = "left" | "right";
|
|
48
|
+
/** Icon for component */
|
|
49
|
+
export interface ElementIcon {
|
|
50
|
+
/**
|
|
51
|
+
* Icon name. Must be without `bi-`
|
|
52
|
+
* @example ["Arrow repeat", "arrow-repeat"]
|
|
53
|
+
* // Icon name to icon class name.
|
|
54
|
+
* // For class name check bootstrap icons website
|
|
55
|
+
*/
|
|
56
|
+
name: string;
|
|
57
|
+
/** Additional classname */
|
|
58
|
+
className?: string;
|
|
59
|
+
/** Icon size */
|
|
60
|
+
size?: ElementSize;
|
|
61
|
+
/**
|
|
62
|
+
* Position
|
|
63
|
+
* Works only with other content
|
|
64
|
+
*/
|
|
65
|
+
position?: IconPosition;
|
|
66
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./useComponentOutsideClick";
|
|
2
|
-
export * from "./usePagination";
|
|
1
|
+
export * from "./useComponentOutsideClick";
|
|
2
|
+
export * from "./usePagination";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { DependencyList } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Subscribe to component outside click
|
|
4
|
-
* @param selector Component root selector
|
|
5
|
-
* @param clickHandleCondition Condition to handle document click
|
|
6
|
-
* @param clickHandleChange Handler of outside component click
|
|
7
|
-
* @param clickListenCondition Condition to start listening document clicks
|
|
8
|
-
* @param dependencies Additional dependencies to update hook
|
|
9
|
-
*/
|
|
10
|
-
export declare const useComponentOutsideClick: (selector: string, clickHandleCondition: boolean, clickHandleChange: () => void, clickListenCondition?: boolean, dependencies?: DependencyList) => void;
|
|
11
|
-
//# sourceMappingURL=useComponentOutsideClick.d.ts.map
|
|
1
|
+
import { DependencyList } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Subscribe to component outside click
|
|
4
|
+
* @param selector Component root selector
|
|
5
|
+
* @param clickHandleCondition Condition to handle document click
|
|
6
|
+
* @param clickHandleChange Handler of outside component click
|
|
7
|
+
* @param clickListenCondition Condition to start listening document clicks
|
|
8
|
+
* @param dependencies Additional dependencies to update hook
|
|
9
|
+
*/
|
|
10
|
+
export declare const useComponentOutsideClick: (selector: string, clickHandleCondition: boolean, clickHandleChange: () => void, clickListenCondition?: boolean, dependencies?: DependencyList) => void;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import { DependencyList } from "react";
|
|
2
|
-
/** Paginator hook state */
|
|
3
|
-
export interface PaginationState {
|
|
4
|
-
/** Number of current page */
|
|
5
|
-
currentPage: number;
|
|
6
|
-
/** Amount of pages */
|
|
7
|
-
pagesCount: number;
|
|
8
|
-
/** Handler of page change */
|
|
9
|
-
onPageChange: (page: number) => void;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Hook to pagination state, return hooked values and handler for pagination
|
|
13
|
-
* @param length Pagionation items count
|
|
14
|
-
* @param size Page size. Default is 30
|
|
15
|
-
* @param initPage Initial page. Default is 1
|
|
16
|
-
* @param dependencies List of dependencies. On any dependency update current page will be set to 1
|
|
17
|
-
* @returns Pair of hook-stored state and handler for slicing current page items
|
|
18
|
-
*/
|
|
19
|
-
export declare const usePagination: (length: number, size?: number, initPage?: number, dependencies?: DependencyList) => [PaginationState, (data: Array<any>) => Array<any>];
|
|
20
|
-
//# sourceMappingURL=usePagination.d.ts.map
|
|
1
|
+
import { DependencyList } from "react";
|
|
2
|
+
/** Paginator hook state */
|
|
3
|
+
export interface PaginationState {
|
|
4
|
+
/** Number of current page */
|
|
5
|
+
currentPage: number;
|
|
6
|
+
/** Amount of pages */
|
|
7
|
+
pagesCount: number;
|
|
8
|
+
/** Handler of page change */
|
|
9
|
+
onPageChange: (page: number) => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Hook to pagination state, return hooked values and handler for pagination
|
|
13
|
+
* @param length Pagionation items count
|
|
14
|
+
* @param size Page size. Default is 30
|
|
15
|
+
* @param initPage Initial page. Default is 1
|
|
16
|
+
* @param dependencies List of dependencies. On any dependency update current page will be set to 1
|
|
17
|
+
* @returns Pair of hook-stored state and handler for slicing current page items
|
|
18
|
+
*/
|
|
19
|
+
export declare const usePagination: (length: number, size?: number, initPage?: number, dependencies?: DependencyList) => [PaginationState, (data: Array<any>) => Array<any>];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./components";
|
|
2
|
-
export * from "./hooks";
|
|
3
|
-
export * from "./utils";
|
|
1
|
+
export * from "./components";
|
|
2
|
+
export * from "./hooks";
|
|
3
|
+
export * from "./utils";
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.bbr-icon{transition:.15s ease-in-out color;font-size:1rem}.bbr-icon--size-small{font-size:.85rem}.bbr-icon--size-medium{font-size:1.25rem}.bbr-icon--size-large{font-size:2rem}.bbr-icon--right{margin-left:.5rem}.bbr-icon--left{margin-right:.5rem}.bbr-anchor{text-decoration:none;color:inherit;transition:.15s ease-in-out color}.bbr-anchor:not(.bbr-anchor--unhoverable):hover{text-decoration:underline;color:#3273dc}.bbr-anchor .bbr-icon{transition:none}.bbr-button{transition:.15s ease-in-out;transition-property:background-color,border-color}.bbr-button--icon-only{padding:.55rem!important}.bbr-button.is-warning.is-outlined:not([disabled]):hover{color:#000!important}.bbr-dropdown{min-width:7.5rem}.bbr-dropdown:not(.bbr-dropdown--compact){display:block}.bbr-dropdown:not(.bbr-dropdown--compact) .dropdown-menu{min-width:100%}.bbr-dropdown .dropdown-menu .dropdown-content{overflow:auto}.bbr-dropdown__label{cursor:pointer;user-select:none;display:flex;justify-content:flex-start}.bbr-dropdown__label span{white-space:nowrap;text-overflow:ellipsis;overflow-x:hidden;max-width:15rem}.bbr-dropdown__label--default span{color:gray;font-style:italic}.bbr-dropdown__label .bbr-icon:hover{color:#0d6efd}.bbr-dropdown__label .bbr-icon.bi-arrow-down{margin-left:auto}.bbr-dropdown__label .bbr-icon.bi-arrow-down:before{transition:.25s ease-in-out transform}.bbr-dropdown__label .bbr-icon.bi-plus-lg:before{transform:rotate(45deg)}.bbr-dropdown__label.is-success--md{border-color:#48c78e}.bbr-dropdown__label.is-danger--md{border-color:#f14668}.bbr-dropdown-item{cursor:pointer;user-select:none;white-space:normal;transition:.25s ease-in-out;transition-property:color,background-color}.bbr-dropdown-item:hover{background-color:#0000000d;color:#0a0a0a}.bbr-dropdown-item:active{background-color:#00000026;color:#0a0a0a}.bbr-dropdown-item.is-active{background-color:#485fc7;color:#fff}.bbr-dropdown.is-active .bbr-dropdown__label .bbr-icon.bi-arrow-down:before{transform:rotate(180deg)}.bbr-dropdown--height-default .dropdown-menu .dropdown-content{max-height:15vw}.bbr-dropdown--compact{width:fit-content}.bbr-dropdown--compact .dropdown-menu{min-width:11.75rem}.bbr-dropdown--disabled .bbr-dropdown__label{background-color:#f5f5f5;border-color:#f5f5f5;box-shadow:none;color:#7a7a7a;cursor:not-allowed}.bbr-dropdown--disabled .bbr-dropdown__label .bbr-icon{pointer-events:none}.bbr-search input[type=search]{transition:.15s ease-out;transition-property:border-color,color,background-color}.bbr-search input[type=search]::placeholder{user-select:none}.bbr-search input[type=search]::-webkit-input-placeholder{transition:.15s ease-out color}.bbr-search input[type=search]::-webkit-search-cancel-button{cursor:pointer;font-size:1.25rem}.bbr-search.is-loading:after{right:1rem;top:.725rem}.bbr-tabs__tab .bbr-icon:first-child{margin-right:.5rem}.bbr-tabs__tab .bbr-icon:last-child{margin-left:.5rem}.bbr-tag{border:1px solid transparent;transition:border-color .15s ease-in-out}.bbr-tag--clickable{cursor:pointer}.bbr-tag--clickable.is-light:hover{border-color:#00000040}.bbr-tag--clickable.is-light:focus,.bbr-tag--clickable.is-light:active{border-color:#00000080}.bbr-tag--clickable:not(.is-light):hover{border-color:#00000059}.bbr-tag--clickable:not(.is-light):focus,.bbr-tag--clickable:not(.is-light):active{border-color:#000000bf}.is-checkradio.m-check-radio[type=checkbox].has-background-color.m-has-background-color:not(:checked)+label:before{border-color:#dbdbdb!important;background-color:transparent!important}.is-checkradio.m-check-radio[type=checkbox]+label:before{top:.125rem}.help.m-help{white-space:pre-line}.bbr-password:focus~.icon:not(:hover){color:#dbdbdb!important}.bbr-password__wrapper .icon{pointer-events:inherit!important;cursor:pointer}.bbr-password__wrapper .icon:hover{color:#4a4a4a}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { DataAttributes } from
|
|
2
|
-
/**
|
|
3
|
-
* Map object with key-value pairs to html data attributes format
|
|
4
|
-
* @param dataAttributes Object with data attribute values
|
|
5
|
-
* @returns Object that could be injected into react html element as data-* attribute values
|
|
6
|
-
*/
|
|
7
|
-
export declare const mapDataAttributes: (dataAttributes: DataAttributes) => object;
|
|
8
|
-
//# sourceMappingURL=dataAttributes.d.ts.map
|
|
1
|
+
import { DataAttributes } from '..';
|
|
2
|
+
/**
|
|
3
|
+
* Map object with key-value pairs to html data attributes format
|
|
4
|
+
* @param dataAttributes Object with data attribute values
|
|
5
|
+
* @returns Object that could be injected into react html element as data-* attribute values
|
|
6
|
+
*/
|
|
7
|
+
export declare const mapDataAttributes: (dataAttributes: DataAttributes) => object;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { ElementColor, ValidationState } from
|
|
2
|
-
/**
|
|
3
|
-
* Get current validation state values
|
|
4
|
-
* @param style Component style color
|
|
5
|
-
* @param validationState Current form item validation state
|
|
6
|
-
* @returns [Is validation applicable; classname attribute value; validation messages]
|
|
7
|
-
*/
|
|
8
|
-
export declare const getValidationValues: (style?: ElementColor, validationState?: ValidationState) => [boolean, string, Array<string>];
|
|
9
|
-
/**
|
|
10
|
-
* Get classname attribute value based on current validation state and form item component style prop
|
|
11
|
-
* @param style Component style color
|
|
12
|
-
* @param validationState Current form item validation state
|
|
13
|
-
* @returns Classname attribute value
|
|
14
|
-
*/
|
|
15
|
-
export declare const getStyleClassName: (style?: ElementColor, validationState?: ValidationState) => string;
|
|
16
|
-
//# sourceMappingURL=formValidation.d.ts.map
|
|
1
|
+
import { ElementColor, ValidationState } from '../components';
|
|
2
|
+
/**
|
|
3
|
+
* Get current validation state values
|
|
4
|
+
* @param style Component style color
|
|
5
|
+
* @param validationState Current form item validation state
|
|
6
|
+
* @returns [Is validation applicable; classname attribute value; validation messages]
|
|
7
|
+
*/
|
|
8
|
+
export declare const getValidationValues: (style?: ElementColor, validationState?: ValidationState) => [boolean, string, Array<string>];
|
|
9
|
+
/**
|
|
10
|
+
* Get classname attribute value based on current validation state and form item component style prop
|
|
11
|
+
* @param style Component style color
|
|
12
|
+
* @param validationState Current form item validation state
|
|
13
|
+
* @returns Classname attribute value
|
|
14
|
+
*/
|
|
15
|
+
export declare const getStyleClassName: (style?: ElementColor, validationState?: ValidationState) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./formValidation";
|
|
2
|
-
export * from "./dataAttributes";
|
|
1
|
+
export * from "./formValidation";
|
|
2
|
+
export * from "./dataAttributes";
|