@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.
Files changed (261) hide show
  1. package/dist/bbr-components.js +1040 -0
  2. package/dist/bbr-components.umd.cjs +27 -0
  3. package/dist/components/accordion/component/index.d.ts +4 -0
  4. package/{components/anchor/index.js → dist/components/accordion/index.d.ts} +2 -2
  5. package/dist/components/accordion/types.d.ts +16 -0
  6. package/dist/components/anchor/component/index.d.ts +3 -0
  7. package/{components → dist/components}/anchor/components/anchorWithIcon/index.d.ts +3 -5
  8. package/{components → dist/components}/anchor/components/simpleAnchor/index.d.ts +3 -5
  9. package/{components/dropdown/index.js → dist/components/anchor/index.d.ts} +2 -2
  10. package/{components → dist/components}/anchor/types.d.ts +38 -39
  11. package/{components → dist/components}/button/component/index.d.ts +6 -9
  12. package/{components → dist/components}/button/components/buttonWithIcon/index.d.ts +3 -5
  13. package/{components → dist/components}/button/components/simpleButton/index.d.ts +3 -5
  14. package/{components/button/index.js → dist/components/button/index.d.ts} +2 -2
  15. package/{components → dist/components}/button/types.d.ts +36 -37
  16. package/dist/components/dropdown/component/index.d.ts +4 -0
  17. package/{components → dist/components}/dropdown/components/compact/index.d.ts +3 -5
  18. package/{components → dist/components}/dropdown/components/item/index.d.ts +13 -15
  19. package/{components → dist/components}/dropdown/components/label/index.d.ts +17 -18
  20. package/{components → dist/components}/dropdown/components/withLabel/index.d.ts +3 -5
  21. package/{components/icon/index.js → dist/components/dropdown/index.d.ts} +2 -2
  22. package/{components → dist/components}/dropdown/types.d.ts +45 -46
  23. package/{components → dist/components}/icon/component/index.d.ts +5 -8
  24. package/dist/components/icon/index.d.ts +2 -0
  25. package/{components → dist/components}/icon/types.d.ts +15 -16
  26. package/{components/index.js → dist/components/index.d.ts} +11 -10
  27. package/{components → dist/components}/paginator/component/index.d.ts +6 -8
  28. package/{components/paginator/index.js → dist/components/paginator/index.d.ts} +3 -3
  29. package/{components → dist/components}/paginator/types.d.ts +27 -28
  30. package/{components → dist/components}/paginator/utils.d.ts +9 -10
  31. package/{components → dist/components}/primitives/checkbox/component/index.d.ts +4 -7
  32. package/dist/components/primitives/checkbox/index.d.ts +2 -0
  33. package/{components → dist/components}/primitives/checkbox/types.d.ts +24 -25
  34. package/{components → dist/components}/primitives/date/component/index.d.ts +4 -6
  35. package/dist/components/primitives/date/index.d.ts +2 -0
  36. package/{components → dist/components}/primitives/date/types.d.ts +8 -9
  37. package/{components/primitives/index.js → dist/components/primitives/index.d.ts} +7 -7
  38. package/dist/components/primitives/multiline/component/index.d.ts +4 -0
  39. package/{components → dist/components}/primitives/multiline/components/multilineWithLabel/index.d.ts +4 -6
  40. package/{components → dist/components}/primitives/multiline/components/multilineWithoutLabel/index.d.ts +4 -6
  41. package/dist/components/primitives/multiline/index.d.ts +2 -0
  42. package/{components → dist/components}/primitives/multiline/types.d.ts +10 -11
  43. package/{components → dist/components}/primitives/number/component/index.d.ts +4 -6
  44. package/{components → dist/components}/primitives/number/components/withLabel/index.d.ts +4 -6
  45. package/{components → dist/components}/primitives/number/components/withoutLabel/index.d.ts +4 -6
  46. package/dist/components/primitives/number/index.d.ts +2 -0
  47. package/{components → dist/components}/primitives/number/types.d.ts +12 -13
  48. package/dist/components/primitives/password/component/index.d.ts +4 -0
  49. package/{components → dist/components}/primitives/password/components/withLabel/index.d.ts +3 -5
  50. package/{components → dist/components}/primitives/password/components/withoutLabel/index.d.ts +3 -5
  51. package/dist/components/primitives/password/index.d.ts +2 -0
  52. package/{components → dist/components}/primitives/password/types.d.ts +9 -10
  53. package/dist/components/primitives/text/component/index.d.ts +4 -0
  54. package/{components → dist/components}/primitives/text/components/textWithLabel/index.d.ts +4 -6
  55. package/{components → dist/components}/primitives/text/components/textWithoutLabel/index.d.ts +4 -6
  56. package/dist/components/primitives/text/index.d.ts +2 -0
  57. package/{components → dist/components}/primitives/text/types.d.ts +6 -7
  58. package/{components → dist/components}/primitives/types/baseProps.d.ts +29 -30
  59. package/{components/primitives/types/index.js → dist/components/primitives/types/index.d.ts} +3 -3
  60. package/{components → dist/components}/primitives/types/label.d.ts +13 -14
  61. package/{components/primitives/types/validation/index.js → dist/components/primitives/types/validation/index.d.ts} +2 -2
  62. package/{components → dist/components}/primitives/types/validation/state.d.ts +8 -9
  63. package/{components → dist/components}/primitives/types/validation/status.d.ts +9 -10
  64. package/{components → dist/components}/search/component/index.d.ts +3 -6
  65. package/dist/components/search/index.d.ts +2 -0
  66. package/{components → dist/components}/search/types.d.ts +26 -27
  67. package/{components → dist/components}/tabs/component/index.d.ts +31 -34
  68. package/{components → dist/components}/tabs/components/item/index.d.ts +11 -13
  69. package/dist/components/tabs/index.d.ts +2 -0
  70. package/{components → dist/components}/tabs/types.d.ts +42 -43
  71. package/{components → dist/components}/tag/component/index.d.ts +4 -7
  72. package/dist/components/tag/index.d.ts +2 -0
  73. package/{components → dist/components}/tag/types.d.ts +26 -27
  74. package/{components → dist/components}/types.d.ts +66 -67
  75. package/{hooks/index.js → dist/hooks/index.d.ts} +2 -2
  76. package/{hooks → dist/hooks}/useComponentOutsideClick.d.ts +10 -11
  77. package/{hooks → dist/hooks}/usePagination.d.ts +19 -20
  78. package/{index.js → dist/index.d.ts} +3 -3
  79. package/dist/style.css +1 -0
  80. package/{utils → dist/utils}/dataAttributes.d.ts +7 -8
  81. package/{utils → dist/utils}/formValidation.d.ts +15 -16
  82. package/{utils/index.js → dist/utils/index.d.ts} +2 -2
  83. package/package.json +45 -38
  84. package/common.scss +0 -3
  85. package/components/anchor/component/index.d.ts +0 -6
  86. package/components/anchor/component/index.d.ts.map +0 -1
  87. package/components/anchor/component/index.js +0 -20
  88. package/components/anchor/component/style.scss +0 -15
  89. package/components/anchor/components/anchorWithIcon/index.d.ts.map +0 -1
  90. package/components/anchor/components/anchorWithIcon/index.js +0 -16
  91. package/components/anchor/components/simpleAnchor/index.d.ts.map +0 -1
  92. package/components/anchor/components/simpleAnchor/index.js +0 -5
  93. package/components/anchor/index.d.ts +0 -3
  94. package/components/anchor/index.d.ts.map +0 -1
  95. package/components/anchor/types.d.ts.map +0 -1
  96. package/components/anchor/types.js +0 -1
  97. package/components/button/component/index.d.ts.map +0 -1
  98. package/components/button/component/index.js +0 -36
  99. package/components/button/component/style.scss +0 -12
  100. package/components/button/components/buttonWithIcon/index.d.ts.map +0 -1
  101. package/components/button/components/buttonWithIcon/index.js +0 -19
  102. package/components/button/components/simpleButton/index.d.ts.map +0 -1
  103. package/components/button/components/simpleButton/index.js +0 -5
  104. package/components/button/index.d.ts +0 -3
  105. package/components/button/index.d.ts.map +0 -1
  106. package/components/button/types.d.ts.map +0 -1
  107. package/components/button/types.js +0 -4
  108. package/components/dropdown/component/index.d.ts +0 -7
  109. package/components/dropdown/component/index.d.ts.map +0 -1
  110. package/components/dropdown/component/index.js +0 -15
  111. package/components/dropdown/component/style.scss +0 -120
  112. package/components/dropdown/components/compact/index.d.ts.map +0 -1
  113. package/components/dropdown/components/compact/index.js +0 -62
  114. package/components/dropdown/components/item/index.d.ts.map +0 -1
  115. package/components/dropdown/components/item/index.js +0 -6
  116. package/components/dropdown/components/label/index.d.ts.map +0 -1
  117. package/components/dropdown/components/label/index.js +0 -22
  118. package/components/dropdown/components/withLabel/index.d.ts.map +0 -1
  119. package/components/dropdown/components/withLabel/index.js +0 -83
  120. package/components/dropdown/index.d.ts +0 -3
  121. package/components/dropdown/index.d.ts.map +0 -1
  122. package/components/dropdown/types.d.ts.map +0 -1
  123. package/components/dropdown/types.js +0 -1
  124. package/components/icon/component/index.d.ts.map +0 -1
  125. package/components/icon/component/index.js +0 -23
  126. package/components/icon/component/style.scss +0 -21
  127. package/components/icon/index.d.ts +0 -3
  128. package/components/icon/index.d.ts.map +0 -1
  129. package/components/icon/types.d.ts.map +0 -1
  130. package/components/icon/types.js +0 -1
  131. package/components/index.d.ts +0 -11
  132. package/components/index.d.ts.map +0 -1
  133. package/components/paginator/component/index.d.ts.map +0 -1
  134. package/components/paginator/component/index.js +0 -47
  135. package/components/paginator/index.d.ts +0 -4
  136. package/components/paginator/index.d.ts.map +0 -1
  137. package/components/paginator/types.d.ts.map +0 -1
  138. package/components/paginator/types.js +0 -1
  139. package/components/paginator/utils.d.ts.map +0 -1
  140. package/components/paginator/utils.js +0 -18
  141. package/components/primitives/checkbox/component/index.d.ts.map +0 -1
  142. package/components/primitives/checkbox/component/index.js +0 -37
  143. package/components/primitives/checkbox/component/style.scss +0 -10
  144. package/components/primitives/checkbox/index.d.ts +0 -3
  145. package/components/primitives/checkbox/index.d.ts.map +0 -1
  146. package/components/primitives/checkbox/index.js +0 -2
  147. package/components/primitives/checkbox/types.d.ts.map +0 -1
  148. package/components/primitives/checkbox/types.js +0 -1
  149. package/components/primitives/date/component/index.d.ts.map +0 -1
  150. package/components/primitives/date/component/index.js +0 -48
  151. package/components/primitives/date/index.d.ts +0 -3
  152. package/components/primitives/date/index.d.ts.map +0 -1
  153. package/components/primitives/date/index.js +0 -2
  154. package/components/primitives/date/types.d.ts.map +0 -1
  155. package/components/primitives/date/types.js +0 -1
  156. package/components/primitives/index.d.ts +0 -8
  157. package/components/primitives/index.d.ts.map +0 -1
  158. package/components/primitives/multiline/component/index.d.ts +0 -7
  159. package/components/primitives/multiline/component/index.d.ts.map +0 -1
  160. package/components/primitives/multiline/component/index.js +0 -15
  161. package/components/primitives/multiline/components/multilineWithLabel/index.d.ts.map +0 -1
  162. package/components/primitives/multiline/components/multilineWithLabel/index.js +0 -45
  163. package/components/primitives/multiline/components/multilineWithoutLabel/index.d.ts.map +0 -1
  164. package/components/primitives/multiline/components/multilineWithoutLabel/index.js +0 -27
  165. package/components/primitives/multiline/index.d.ts +0 -3
  166. package/components/primitives/multiline/index.d.ts.map +0 -1
  167. package/components/primitives/multiline/index.js +0 -2
  168. package/components/primitives/multiline/types.d.ts.map +0 -1
  169. package/components/primitives/multiline/types.js +0 -1
  170. package/components/primitives/number/component/index.d.ts.map +0 -1
  171. package/components/primitives/number/component/index.js +0 -14
  172. package/components/primitives/number/components/withLabel/index.d.ts.map +0 -1
  173. package/components/primitives/number/components/withLabel/index.js +0 -44
  174. package/components/primitives/number/components/withoutLabel/index.d.ts.map +0 -1
  175. package/components/primitives/number/components/withoutLabel/index.js +0 -26
  176. package/components/primitives/number/index.d.ts +0 -3
  177. package/components/primitives/number/index.d.ts.map +0 -1
  178. package/components/primitives/number/index.js +0 -2
  179. package/components/primitives/number/types.d.ts.map +0 -1
  180. package/components/primitives/number/types.js +0 -1
  181. package/components/primitives/password/component/index.d.ts +0 -7
  182. package/components/primitives/password/component/index.d.ts.map +0 -1
  183. package/components/primitives/password/component/index.js +0 -13
  184. package/components/primitives/password/component/style.scss +0 -16
  185. package/components/primitives/password/components/withLabel/index.d.ts.map +0 -1
  186. package/components/primitives/password/components/withLabel/index.js +0 -51
  187. package/components/primitives/password/components/withoutLabel/index.d.ts.map +0 -1
  188. package/components/primitives/password/components/withoutLabel/index.js +0 -33
  189. package/components/primitives/password/index.d.ts +0 -3
  190. package/components/primitives/password/index.d.ts.map +0 -1
  191. package/components/primitives/password/index.js +0 -2
  192. package/components/primitives/password/types.d.ts.map +0 -1
  193. package/components/primitives/password/types.js +0 -1
  194. package/components/primitives/text/component/index.d.ts +0 -7
  195. package/components/primitives/text/component/index.d.ts.map +0 -1
  196. package/components/primitives/text/component/index.js +0 -15
  197. package/components/primitives/text/components/textWithLabel/index.d.ts.map +0 -1
  198. package/components/primitives/text/components/textWithLabel/index.js +0 -44
  199. package/components/primitives/text/components/textWithoutLabel/index.d.ts.map +0 -1
  200. package/components/primitives/text/components/textWithoutLabel/index.js +0 -26
  201. package/components/primitives/text/index.d.ts +0 -3
  202. package/components/primitives/text/index.d.ts.map +0 -1
  203. package/components/primitives/text/index.js +0 -2
  204. package/components/primitives/text/types.d.ts.map +0 -1
  205. package/components/primitives/text/types.js +0 -1
  206. package/components/primitives/types/baseProps.d.ts.map +0 -1
  207. package/components/primitives/types/baseProps.js +0 -1
  208. package/components/primitives/types/index.d.ts +0 -4
  209. package/components/primitives/types/index.d.ts.map +0 -1
  210. package/components/primitives/types/label.d.ts.map +0 -1
  211. package/components/primitives/types/label.js +0 -1
  212. package/components/primitives/types/validation/index.d.ts +0 -3
  213. package/components/primitives/types/validation/index.d.ts.map +0 -1
  214. package/components/primitives/types/validation/state.d.ts.map +0 -1
  215. package/components/primitives/types/validation/state.js +0 -2
  216. package/components/primitives/types/validation/status.d.ts.map +0 -1
  217. package/components/primitives/types/validation/status.js +0 -11
  218. package/components/search/component/index.d.ts.map +0 -1
  219. package/components/search/component/index.js +0 -37
  220. package/components/search/component/style.scss +0 -24
  221. package/components/search/index.d.ts +0 -3
  222. package/components/search/index.d.ts.map +0 -1
  223. package/components/search/index.js +0 -2
  224. package/components/search/types.d.ts.map +0 -1
  225. package/components/search/types.js +0 -1
  226. package/components/tabs/component/index.d.ts.map +0 -1
  227. package/components/tabs/component/index.js +0 -68
  228. package/components/tabs/component/style.scss +0 -12
  229. package/components/tabs/components/item/index.d.ts.map +0 -1
  230. package/components/tabs/components/item/index.js +0 -27
  231. package/components/tabs/index.d.ts +0 -3
  232. package/components/tabs/index.d.ts.map +0 -1
  233. package/components/tabs/index.js +0 -2
  234. package/components/tabs/types.d.ts.map +0 -1
  235. package/components/tabs/types.js +0 -34
  236. package/components/tag/component/index.d.ts.map +0 -1
  237. package/components/tag/component/index.js +0 -28
  238. package/components/tag/component/style.scss +0 -27
  239. package/components/tag/index.d.ts +0 -3
  240. package/components/tag/index.d.ts.map +0 -1
  241. package/components/tag/index.js +0 -2
  242. package/components/tag/types.d.ts.map +0 -1
  243. package/components/tag/types.js +0 -1
  244. package/components/types.d.ts.map +0 -1
  245. package/components/types.js +0 -31
  246. package/hooks/index.d.ts +0 -3
  247. package/hooks/index.d.ts.map +0 -1
  248. package/hooks/useComponentOutsideClick.d.ts.map +0 -1
  249. package/hooks/useComponentOutsideClick.js +0 -32
  250. package/hooks/usePagination.d.ts.map +0 -1
  251. package/hooks/usePagination.js +0 -28
  252. package/index.d.ts +0 -4
  253. package/index.d.ts.map +0 -1
  254. package/readme.md +0 -56
  255. package/tsconfig.tsbuildinfo +0 -1
  256. package/utils/dataAttributes.d.ts.map +0 -1
  257. package/utils/dataAttributes.js +0 -19
  258. package/utils/formValidation.d.ts.map +0 -1
  259. package/utils/formValidation.js +0 -35
  260. package/utils/index.d.ts +0 -3
  261. 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
- /// <reference types="react" />
2
- import "./style.scss";
3
- import { BaseElementProps, ElementSize } from "../..";
4
- import { TabItem, TabsPosition, TabsStyle } from "..";
5
- /** Tabs component props type */
6
- export interface TabsProps extends BaseElementProps {
7
- /** Tabs */
8
- items: Array<TabItem>;
9
- /** Handler of changing current active item */
10
- onActiveItemChange: (item: TabItem) => void;
11
- /**
12
- * Active item by default.
13
- * If not set - first item will be active
14
- */
15
- defaultActive?: TabItem;
16
- /**
17
- * Component size.
18
- * Default is `normal`
19
- */
20
- size?: ElementSize;
21
- /** Component position */
22
- position?: TabsPosition;
23
- /** Component style */
24
- style?: TabsStyle;
25
- /** Is component tabs should take all width of parent */
26
- fullWidth?: boolean;
27
- }
28
- /**
29
- * Tabs panel
30
- * @throws Items are empty
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
- /// <reference types="react" />
2
- import { TabItem as Item } from "../..";
3
- /** Tabs panel single tab item component props type */
4
- export interface TabItemProps {
5
- /** Tab item */
6
- item: Item;
7
- /** Active item identifier */
8
- activeItem: string;
9
- }
10
- /** Tabs panel single tab item component */
11
- declare const TabItem: ({ item, activeItem }: TabItemProps) => JSX.Element;
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;
@@ -0,0 +1,2 @@
1
+ export { default } from "./component";
2
+ export * from "./types";
@@ -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
- /// <reference types="react" />
2
- import { TagProps } from "../..";
3
- import "./style.scss";
4
- /** Single tag item */
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;
@@ -0,0 +1,2 @@
1
+ export { default } from "./component";
2
+ export * from "./types";
@@ -1,27 +1,26 @@
1
- import { BaseElementProps, ElementColor, ElementSize } from "..";
2
- /** Tag item prop types */
3
- export interface TagProps extends BaseElementProps {
4
- /** Tag contnet*/
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 declare 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
- }
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 "../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;
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";