@onewelcome/react-lib-components 0.2.0 → 0.2.3

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 (282) hide show
  1. package/dist/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  2. package/dist/Button/BaseButton.d.ts +4 -4
  3. package/dist/Button/Button.d.ts +3 -3
  4. package/dist/Button/IconButton.d.ts +4 -4
  5. package/dist/ContextMenu/ContextMenu.d.ts +5 -5
  6. package/dist/ContextMenu/ContextMenuItem.d.ts +2 -2
  7. package/dist/DataGrid/DataGrid.d.ts +6 -6
  8. package/dist/DataGrid/DataGridActions/DataGridActions.d.ts +4 -4
  9. package/dist/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +3 -3
  10. package/dist/DataGrid/DataGridBody/DataGridBody.d.ts +3 -3
  11. package/dist/DataGrid/DataGridBody/DataGridCell.d.ts +2 -2
  12. package/dist/DataGrid/DataGridBody/DataGridRow.d.ts +3 -3
  13. package/dist/DataGrid/DataGridHeader/DataGridHeader.d.ts +3 -3
  14. package/dist/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +3 -3
  15. package/dist/DataGrid/datagrid.interfaces.d.ts +1 -1
  16. package/dist/Form/Checkbox/Checkbox.d.ts +5 -5
  17. package/dist/Form/Fieldset/Fieldset.d.ts +3 -3
  18. package/dist/Form/Form.d.ts +1 -1
  19. package/dist/Form/FormControl/FormControl.d.ts +3 -3
  20. package/dist/Form/FormGroup/FormGroup.d.ts +5 -5
  21. package/dist/Form/FormHelperText/FormHelperText.d.ts +3 -3
  22. package/dist/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +6 -6
  23. package/dist/Form/Input/Input.d.ts +5 -5
  24. package/dist/Form/Label/Label.d.ts +2 -2
  25. package/dist/Form/Radio/Radio.d.ts +5 -5
  26. package/dist/Form/Select/Option.d.ts +2 -2
  27. package/dist/Form/Select/Select.d.ts +5 -5
  28. package/dist/Form/Textarea/Textarea.d.ts +6 -6
  29. package/dist/Form/Toggle/Toggle.d.ts +3 -3
  30. package/dist/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +4 -4
  31. package/dist/Form/Wrapper/InputWrapper/InputWrapper.d.ts +4 -4
  32. package/dist/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +4 -4
  33. package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +4 -4
  34. package/dist/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +4 -4
  35. package/dist/Form/Wrapper/Wrapper/Wrapper.d.ts +6 -6
  36. package/dist/Form/form.interfaces.d.ts +1 -1
  37. package/dist/Icon/Icon.d.ts +3 -3
  38. package/dist/Link/Link.d.ts +7 -7
  39. package/dist/Notifications/BaseModal/BaseModal.d.ts +4 -4
  40. package/dist/Notifications/BaseModal/BaseModalActions/BaseModalActions.d.ts +2 -2
  41. package/dist/Notifications/BaseModal/BaseModalContent/BaseModalContent.d.ts +2 -2
  42. package/dist/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +2 -2
  43. package/dist/Notifications/Dialog/Dialog.d.ts +5 -5
  44. package/dist/Notifications/Dialog/DialogActions/DialogActions.d.ts +3 -3
  45. package/dist/Notifications/Dialog/DialogTitle/DialogTitle.d.ts +2 -2
  46. package/dist/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.d.ts +3 -3
  47. package/dist/Notifications/DiscardChangesModal/DiscardChangesModal.d.ts +7 -7
  48. package/dist/Notifications/Modal/Modal.d.ts +1 -1
  49. package/dist/Notifications/Modal/ModalActions/ModalActions.d.ts +1 -1
  50. package/dist/Notifications/Modal/ModalContent/ModalContent.d.ts +1 -1
  51. package/dist/Notifications/Modal/ModalHeader/ModalHeader.d.ts +1 -1
  52. package/dist/Notifications/SlideInModal/SlideInModal.d.ts +3 -3
  53. package/dist/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +3 -3
  54. package/dist/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +2 -2
  55. package/dist/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +3 -3
  56. package/dist/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +2 -2
  57. package/dist/Notifications/Snackbar/interfaces.d.ts +2 -2
  58. package/dist/Pagination/Pagination.d.ts +3 -3
  59. package/dist/Popover/Popover.d.ts +3 -3
  60. package/dist/Skeleton/Skeleton.d.ts +3 -3
  61. package/dist/StatusIndicator/StatusIndicator.d.ts +5 -5
  62. package/dist/Tabs/Tab.d.ts +1 -1
  63. package/dist/Tabs/TabButton.d.ts +2 -2
  64. package/dist/Tabs/TabPanel.d.ts +2 -2
  65. package/dist/Tabs/Tabs.d.ts +4 -4
  66. package/dist/TextEllipsis/TextEllipsis.d.ts +2 -2
  67. package/dist/Tiles/Tile.d.ts +5 -5
  68. package/dist/Tiles/Tiles.d.ts +2 -2
  69. package/dist/Tooltip/Tooltip.d.ts +3 -3
  70. package/dist/Typography/Typography.d.ts +3 -3
  71. package/dist/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +2 -2
  72. package/dist/Wizard/Wizard.d.ts +3 -3
  73. package/dist/Wizard/WizardActions/WizardActions.d.ts +2 -2
  74. package/dist/Wizard/WizardStateProvider.d.ts +2 -2
  75. package/dist/Wizard/WizardSteps/WizardSteps.d.ts +2 -2
  76. package/dist/Wizard/wizardStateReducer.d.ts +5 -5
  77. package/dist/_BaseStyling_/BaseStyling.d.ts +1 -1
  78. package/dist/hooks/usePosition.d.ts +4 -4
  79. package/dist/hooks/useRepeater.d.ts +1 -1
  80. package/dist/hooks/useScroll.d.ts +1 -1
  81. package/dist/hooks/useSpacing.d.ts +1 -1
  82. package/dist/hooks/useWrapper.d.ts +1 -1
  83. package/dist/index.d.ts +55 -55
  84. package/dist/react-lib-components.cjs.development.js +676 -578
  85. package/dist/react-lib-components.cjs.development.js.map +1 -1
  86. package/dist/react-lib-components.cjs.production.min.js +1 -1
  87. package/dist/react-lib-components.cjs.production.min.js.map +1 -1
  88. package/dist/react-lib-components.esm.js +676 -578
  89. package/dist/react-lib-components.esm.js.map +1 -1
  90. package/package.json +27 -16
  91. package/src/Breadcrumbs/Breadcrumbs.test.tsx +15 -15
  92. package/src/Breadcrumbs/Breadcrumbs.tsx +11 -11
  93. package/src/Button/BaseButton.module.scss +1 -1
  94. package/src/Button/BaseButton.test.tsx +27 -27
  95. package/src/Button/BaseButton.tsx +8 -8
  96. package/src/Button/Button.module.scss +5 -5
  97. package/src/Button/Button.test.tsx +39 -39
  98. package/src/Button/Button.tsx +10 -10
  99. package/src/Button/IconButton.module.scss +5 -5
  100. package/src/Button/IconButton.test.tsx +29 -29
  101. package/src/Button/IconButton.tsx +11 -11
  102. package/src/ContextMenu/ContextMenu.test.tsx +97 -76
  103. package/src/ContextMenu/ContextMenu.tsx +48 -42
  104. package/src/ContextMenu/ContextMenuItem.module.scss +1 -1
  105. package/src/ContextMenu/ContextMenuItem.tsx +7 -5
  106. package/src/DataGrid/DataGrid.test.tsx +193 -193
  107. package/src/DataGrid/DataGrid.tsx +26 -26
  108. package/src/DataGrid/DataGridActions/DataGridActions.test.tsx +63 -63
  109. package/src/DataGrid/DataGridActions/DataGridActions.tsx +15 -15
  110. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss +1 -1
  111. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.test.tsx +21 -21
  112. package/src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +20 -20
  113. package/src/DataGrid/DataGridBody/DataGridBody.test.tsx +40 -40
  114. package/src/DataGrid/DataGridBody/DataGridBody.tsx +10 -10
  115. package/src/DataGrid/DataGridBody/DataGridCell.module.scss +1 -1
  116. package/src/DataGrid/DataGridBody/DataGridCell.test.tsx +25 -25
  117. package/src/DataGrid/DataGridBody/DataGridCell.tsx +6 -6
  118. package/src/DataGrid/DataGridBody/DataGridRow.test.tsx +38 -38
  119. package/src/DataGrid/DataGridBody/DataGridRow.tsx +8 -8
  120. package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +1 -2
  121. package/src/DataGrid/DataGridHeader/DataGridHeader.test.tsx +119 -119
  122. package/src/DataGrid/DataGridHeader/DataGridHeader.tsx +13 -13
  123. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +2 -0
  124. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.test.tsx +51 -51
  125. package/src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +14 -14
  126. package/src/DataGrid/datagrid.interfaces.ts +1 -1
  127. package/src/Form/Checkbox/Checkbox.test.tsx +74 -74
  128. package/src/Form/Checkbox/Checkbox.tsx +27 -27
  129. package/src/Form/Fieldset/Fieldset.module.scss +1 -1
  130. package/src/Form/Fieldset/Fieldset.test.tsx +35 -35
  131. package/src/Form/Fieldset/Fieldset.tsx +27 -27
  132. package/src/Form/Form.test.tsx +18 -18
  133. package/src/Form/Form.tsx +3 -3
  134. package/src/Form/FormControl/FormControl.test.tsx +22 -22
  135. package/src/Form/FormControl/FormControl.tsx +10 -10
  136. package/src/Form/FormGroup/FormGroup.test.tsx +37 -37
  137. package/src/Form/FormGroup/FormGroup.tsx +16 -16
  138. package/src/Form/FormHelperText/FormHelperText.test.tsx +18 -18
  139. package/src/Form/FormHelperText/FormHelperText.tsx +7 -7
  140. package/src/Form/FormSelectorWrapper/FormSelectorWrapper.test.tsx +15 -15
  141. package/src/Form/FormSelectorWrapper/FormSelectorWrapper.tsx +14 -14
  142. package/src/Form/Input/Input.module.scss +20 -44
  143. package/src/Form/Input/Input.test.tsx +121 -73
  144. package/src/Form/Input/Input.tsx +96 -35
  145. package/src/Form/Label/Label.test.tsx +13 -13
  146. package/src/Form/Label/Label.tsx +6 -6
  147. package/src/Form/Radio/Radio.test.tsx +35 -35
  148. package/src/Form/Radio/Radio.tsx +17 -17
  149. package/src/Form/Select/Option.test.tsx +10 -10
  150. package/src/Form/Select/Option.tsx +8 -8
  151. package/src/Form/Select/Select.module.scss +7 -9
  152. package/src/Form/Select/Select.test.tsx +144 -141
  153. package/src/Form/Select/Select.tsx +79 -78
  154. package/src/Form/Textarea/Textarea.module.scss +8 -18
  155. package/src/Form/Textarea/Textarea.test.tsx +27 -27
  156. package/src/Form/Textarea/Textarea.tsx +33 -13
  157. package/src/Form/Toggle/Toggle.module.scss +1 -1
  158. package/src/Form/Toggle/Toggle.test.tsx +22 -22
  159. package/src/Form/Toggle/Toggle.tsx +10 -10
  160. package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.tsx +39 -39
  161. package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx +12 -12
  162. package/src/Form/Wrapper/InputWrapper/InputWrapper.module.scss +2 -8
  163. package/src/Form/Wrapper/InputWrapper/InputWrapper.test.tsx +55 -55
  164. package/src/Form/Wrapper/InputWrapper/InputWrapper.tsx +30 -35
  165. package/src/Form/Wrapper/RadioWrapper/RadioWrapper.test.tsx +35 -35
  166. package/src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx +12 -12
  167. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.test.tsx +55 -55
  168. package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +12 -12
  169. package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +2 -11
  170. package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.test.tsx +50 -50
  171. package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx +22 -22
  172. package/src/Form/Wrapper/Wrapper/Wrapper.module.scss +2 -2
  173. package/src/Form/Wrapper/Wrapper/Wrapper.test.tsx +11 -11
  174. package/src/Form/Wrapper/Wrapper/Wrapper.tsx +17 -17
  175. package/src/Form/form.interfaces.ts +1 -1
  176. package/src/Icon/Icon.module.scss +71 -71
  177. package/src/Icon/Icon.test.tsx +18 -18
  178. package/src/Icon/Icon.tsx +70 -70
  179. package/src/Link/Link.module.scss +5 -5
  180. package/src/Link/Link.test.tsx +76 -76
  181. package/src/Link/Link.tsx +27 -27
  182. package/src/Link/types.d.ts +1 -1
  183. package/src/Notifications/BaseModal/BaseModal.module.scss +1 -1
  184. package/src/Notifications/BaseModal/BaseModal.test.tsx +53 -53
  185. package/src/Notifications/BaseModal/BaseModal.tsx +16 -16
  186. package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.test.tsx +13 -13
  187. package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx +5 -5
  188. package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.test.tsx +16 -16
  189. package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.tsx +5 -5
  190. package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.test.tsx +19 -19
  191. package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx +10 -10
  192. package/src/Notifications/Dialog/Dialog.test.tsx +35 -35
  193. package/src/Notifications/Dialog/Dialog.tsx +19 -19
  194. package/src/Notifications/Dialog/DialogActions/DialogActions.test.tsx +14 -14
  195. package/src/Notifications/Dialog/DialogActions/DialogActions.tsx +6 -6
  196. package/src/Notifications/Dialog/DialogTitle/DialogTitle.test.tsx +12 -12
  197. package/src/Notifications/Dialog/DialogTitle/DialogTitle.tsx +6 -6
  198. package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.test.tsx +20 -20
  199. package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +7 -7
  200. package/src/Notifications/DiscardChangesModal/DiscardChangesModal.test.tsx +36 -36
  201. package/src/Notifications/DiscardChangesModal/DiscardChangesModal.tsx +8 -8
  202. package/src/Notifications/Modal/Modal.test.tsx +6 -6
  203. package/src/Notifications/Modal/Modal.tsx +1 -1
  204. package/src/Notifications/Modal/ModalActions/ModalActions.tsx +2 -2
  205. package/src/Notifications/Modal/ModalContent/ModalContent.tsx +2 -2
  206. package/src/Notifications/Modal/ModalHeader/ModalHeader.tsx +2 -2
  207. package/src/Notifications/SlideInModal/SlideInModal.test.tsx +16 -16
  208. package/src/Notifications/SlideInModal/SlideInModal.tsx +16 -11
  209. package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.tsx +16 -16
  210. package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +6 -6
  211. package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +2 -2
  212. package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.tsx +17 -17
  213. package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +23 -23
  214. package/src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.tsx +32 -32
  215. package/src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +18 -18
  216. package/src/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +3 -3
  217. package/src/Notifications/Snackbar/interfaces.ts +2 -2
  218. package/src/Notifications/Snackbar/useSnackbar.ts +2 -2
  219. package/src/Pagination/Pagination.module.scss +2 -0
  220. package/src/Pagination/Pagination.test.tsx +47 -47
  221. package/src/Pagination/Pagination.tsx +35 -35
  222. package/src/Popover/Popover.test.tsx +19 -19
  223. package/src/Popover/Popover.tsx +7 -7
  224. package/src/Skeleton/Skeleton.module.scss +2 -2
  225. package/src/Skeleton/Skeleton.test.tsx +29 -29
  226. package/src/Skeleton/Skeleton.tsx +10 -10
  227. package/src/StatusIndicator/StatusIndicator.test.tsx +38 -38
  228. package/src/StatusIndicator/StatusIndicator.tsx +9 -9
  229. package/src/Tabs/Tab.test.tsx +13 -13
  230. package/src/Tabs/Tab.tsx +1 -1
  231. package/src/Tabs/TabButton.test.tsx +28 -28
  232. package/src/Tabs/TabButton.tsx +7 -7
  233. package/src/Tabs/TabPanel.test.tsx +30 -30
  234. package/src/Tabs/TabPanel.tsx +4 -4
  235. package/src/Tabs/Tabs.test.tsx +93 -93
  236. package/src/Tabs/Tabs.tsx +25 -25
  237. package/src/TextEllipsis/TextEllipsis.test.tsx +22 -22
  238. package/src/TextEllipsis/TextEllipsis.tsx +6 -6
  239. package/src/Tiles/Tile.module.scss +1 -1
  240. package/src/Tiles/Tile.test.tsx +42 -42
  241. package/src/Tiles/Tile.tsx +22 -22
  242. package/src/Tiles/Tiles.test.tsx +30 -30
  243. package/src/Tiles/Tiles.tsx +9 -9
  244. package/src/Tooltip/Tooltip.test.tsx +35 -35
  245. package/src/Tooltip/Tooltip.tsx +21 -21
  246. package/src/Typography/Typography.module.scss +1 -1
  247. package/src/Typography/Typography.test.tsx +49 -49
  248. package/src/Typography/Typography.tsx +42 -42
  249. package/src/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +1 -1
  250. package/src/Wizard/BaseWizardSteps/BaseWizardSteps.test.tsx +26 -26
  251. package/src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +24 -24
  252. package/src/Wizard/Wizard.test.tsx +56 -56
  253. package/src/Wizard/Wizard.tsx +6 -6
  254. package/src/Wizard/WizardActions/WizardActions.test.tsx +34 -34
  255. package/src/Wizard/WizardActions/WizardActions.tsx +14 -14
  256. package/src/Wizard/WizardStateProvider.tsx +3 -3
  257. package/src/Wizard/WizardSteps/WizardSteps.test.tsx +27 -27
  258. package/src/Wizard/WizardSteps/WizardSteps.tsx +7 -7
  259. package/src/Wizard/wizardStateReducer.ts +9 -9
  260. package/src/_BaseStyling_/BaseStyling.test.tsx +14 -14
  261. package/src/_BaseStyling_/BaseStyling.tsx +50 -50
  262. package/src/hooks/useAnimation.test.tsx +12 -12
  263. package/src/hooks/useAnimation.ts +4 -4
  264. package/src/hooks/useBodyClick.test.tsx +8 -8
  265. package/src/hooks/useBodyClick.ts +3 -3
  266. package/src/hooks/useFormSelector.test.ts +17 -17
  267. package/src/hooks/useFormSelector.ts +4 -4
  268. package/src/hooks/usePosition.test.tsx +215 -215
  269. package/src/hooks/usePosition.ts +68 -68
  270. package/src/hooks/useRepeater.test.tsx +26 -26
  271. package/src/hooks/useRepeater.ts +5 -5
  272. package/src/hooks/useScroll.test.tsx +5 -5
  273. package/src/hooks/useScroll.ts +3 -3
  274. package/src/hooks/useSpacing.test.ts +40 -40
  275. package/src/hooks/useSpacing.ts +3 -3
  276. package/src/hooks/useWrapper.test.ts +12 -12
  277. package/src/hooks/useWrapper.ts +14 -7
  278. package/src/index.ts +67 -67
  279. package/src/mixins.module.scss +76 -27
  280. package/src/types.d.ts +1 -1
  281. package/src/util/helper.test.tsx +25 -25
  282. package/src/util/helper.tsx +64 -64
@@ -1,17 +1,17 @@
1
1
  @font-face {
2
- font-family: 'icomoon';
3
- src: url('../../font/icomoon.eot?9c63pa');
4
- src: url('../../font/icomoon.eot?9c63pa#iefix') format('embedded-opentype'),
5
- url('../../font/icomoon.ttf?9c63pa') format('truetype'),
6
- url('../../font/icomoon.woff?9c63pa') format('woff'),
7
- url('../../font/icomoon.svg?9c63pa#icomoon') format('svg');
2
+ font-family: "icomoon";
3
+ src: url("../../font/icomoon.eot?9c63pa");
4
+ src: url("../../font/icomoon.eot?9c63pa#iefix") format("embedded-opentype"),
5
+ url("../../font/icomoon.ttf?9c63pa") format("truetype"),
6
+ url("../../font/icomoon.woff?9c63pa") format("woff"),
7
+ url("../../font/icomoon.svg?9c63pa#icomoon") format("svg");
8
8
  font-weight: normal;
9
9
  font-style: normal;
10
10
  font-display: block;
11
11
  }
12
12
 
13
13
  @mixin fontProperties() {
14
- font-family: 'icomoon', sans-serif !important;
14
+ font-family: "icomoon", sans-serif !important;
15
15
  speak: never;
16
16
  font-style: normal;
17
17
  font-weight: normal;
@@ -29,258 +29,258 @@
29
29
  }
30
30
 
31
31
  .icon-image:before {
32
- content: '\e900';
32
+ content: "\e900";
33
33
  @include fontProperties();
34
34
  }
35
35
  .icon-bookmark:before {
36
- content: '\e901';
36
+ content: "\e901";
37
37
  @include fontProperties();
38
38
  }
39
39
  .icon-bookmark-alt:before {
40
- content: '\e902';
40
+ content: "\e902";
41
41
  @include fontProperties();
42
42
  }
43
43
  .icon-equal:before {
44
- content: '\e903';
44
+ content: "\e903";
45
45
  @include fontProperties();
46
46
  }
47
47
  .icon-build:before {
48
- content: '\e904';
48
+ content: "\e904";
49
49
  @include fontProperties();
50
50
  }
51
51
  .icon-refresh:before {
52
- content: '\e905';
52
+ content: "\e905";
53
53
  @include fontProperties();
54
54
  }
55
55
  .icon-calendar:before {
56
- content: '\e906';
56
+ content: "\e906";
57
57
  @include fontProperties();
58
58
  }
59
59
  .icon-checkmark-circle:before {
60
- content: '\e907';
60
+ content: "\e907";
61
61
  @include fontProperties();
62
62
  }
63
63
  .icon-checkmark-circle-alt:before {
64
- content: '\e908';
64
+ content: "\e908";
65
65
  @include fontProperties();
66
66
  }
67
67
  .icon-clock:before {
68
- content: '\e909';
68
+ content: "\e909";
69
69
  @include fontProperties();
70
70
  }
71
71
  .icon-trash:before {
72
- content: '\e90a';
72
+ content: "\e90a";
73
73
  @include fontProperties();
74
74
  }
75
75
  .icon-heart:before {
76
- content: '\e90b';
76
+ content: "\e90b";
77
77
  @include fontProperties();
78
78
  }
79
79
  .icon-search:before {
80
- content: '\e90c';
80
+ content: "\e90c";
81
81
  @include fontProperties();
82
82
  }
83
83
  .icon-gearwheel:before {
84
- content: '\e90d';
84
+ content: "\e90d";
85
85
  @include fontProperties();
86
86
  }
87
87
  .icon-star:before {
88
- content: '\e90e';
88
+ content: "\e90e";
89
89
  @include fontProperties();
90
90
  }
91
91
  .icon-star-alt:before {
92
- content: '\e90f';
92
+ content: "\e90f";
93
93
  @include fontProperties();
94
94
  }
95
95
  .icon-undo:before {
96
- content: '\e910';
96
+ content: "\e910";
97
97
  @include fontProperties();
98
98
  }
99
99
  .icon-eye:before {
100
- content: '\e911';
100
+ content: "\e911";
101
101
  @include fontProperties();
102
102
  }
103
103
  .icon-times-circle-alt:before {
104
- content: '\e912';
104
+ content: "\e912";
105
105
  @include fontProperties();
106
106
  }
107
107
  .icon-info-circle:before {
108
- content: '\e913';
108
+ content: "\e913";
109
109
  @include fontProperties();
110
110
  }
111
111
  .icon-info-bell:before {
112
- content: '\e914';
112
+ content: "\e914";
113
113
  @include fontProperties();
114
114
  }
115
115
  .icon-checkmark-circle-breakout:before {
116
- content: '\e915';
116
+ content: "\e915";
117
117
  @include fontProperties();
118
118
  }
119
119
  .icon-warning:before {
120
- content: '\e916';
120
+ content: "\e916";
121
121
  @include fontProperties();
122
122
  }
123
123
  .icon-plus:before {
124
- content: '\e917';
124
+ content: "\e917";
125
125
  @include fontProperties();
126
126
  }
127
127
  .icon-copy:before {
128
- content: '\e918';
128
+ content: "\e918";
129
129
  @include fontProperties();
130
130
  }
131
131
  .icon-edit:before {
132
- content: '\e919';
132
+ content: "\e919";
133
133
  @include fontProperties();
134
134
  }
135
135
  .icon-filter:before {
136
- content: '\e91a';
136
+ content: "\e91a";
137
137
  @include fontProperties();
138
138
  }
139
139
  .icon-link:before {
140
- content: '\e91b';
140
+ content: "\e91b";
141
141
  @include fontProperties();
142
142
  }
143
143
  .icon-change:before {
144
- content: '\e91c';
144
+ content: "\e91c";
145
145
  @include fontProperties();
146
146
  }
147
147
  .icon-filter-alt-arrow:before {
148
- content: '\e91d';
148
+ content: "\e91d";
149
149
  @include fontProperties();
150
150
  }
151
151
  .icon-filter-alt:before {
152
- content: '\e91e';
152
+ content: "\e91e";
153
153
  @include fontProperties();
154
154
  }
155
155
  .icon-filter-alt-times:before {
156
- content: '\e91f';
156
+ content: "\e91f";
157
157
  @include fontProperties();
158
158
  }
159
159
  .icon-grid:before {
160
- content: '\e920';
160
+ content: "\e920";
161
161
  @include fontProperties();
162
162
  }
163
163
  .icon-triangle-down:before {
164
- content: '\e921';
164
+ content: "\e921";
165
165
  @include fontProperties();
166
166
  }
167
167
  .icon-triangle-down-circle:before {
168
- content: '\e922';
168
+ content: "\e922";
169
169
  @include fontProperties();
170
170
  }
171
171
  .icon-triangle-up:before {
172
- content: '\e923';
172
+ content: "\e923";
173
173
  @include fontProperties();
174
174
  }
175
175
  .icon-triangle-right:before {
176
- content: '\e924';
176
+ content: "\e924";
177
177
  @include fontProperties();
178
178
  }
179
179
  .icon-chevron-left:before {
180
- content: '\e925';
180
+ content: "\e925";
181
181
  @include fontProperties();
182
182
  }
183
183
  .icon-chevron-right:before {
184
- content: '\e926';
184
+ content: "\e926";
185
185
  @include fontProperties();
186
186
  }
187
187
  .icon-times:before {
188
- content: '\e927';
188
+ content: "\e927";
189
189
  @include fontProperties();
190
190
  }
191
191
  .icon-times-circle:before {
192
- content: '\e928';
192
+ content: "\e928";
193
193
  @include fontProperties();
194
194
  }
195
195
  .icon-times-thin:before {
196
- content: '\e929';
196
+ content: "\e929";
197
197
  @include fontProperties();
198
198
  }
199
199
  .icon-chevron-up:before {
200
- content: '\e92a';
200
+ content: "\e92a";
201
201
  @include fontProperties();
202
202
  }
203
203
  .icon-chevron-down:before {
204
- content: '\e92b';
204
+ content: "\e92b";
205
205
  @include fontProperties();
206
206
  }
207
207
  .icon-navigation-first:before {
208
- content: '\e92c';
208
+ content: "\e92c";
209
209
  @include fontProperties();
210
210
  }
211
211
  .icon-fullscreen:before {
212
- content: '\e92d';
212
+ content: "\e92d";
213
213
  @include fontProperties();
214
214
  }
215
215
  .icon-fullscreen-exit:before {
216
- content: '\e92e';
216
+ content: "\e92e";
217
217
  @include fontProperties();
218
218
  }
219
219
  .icon-navigation-last:before {
220
- content: '\e92f';
220
+ content: "\e92f";
221
221
  @include fontProperties();
222
222
  }
223
223
  .icon-hamburger:before {
224
- content: '\e930';
224
+ content: "\e930";
225
225
  @include fontProperties();
226
226
  }
227
227
  .icon-ellipsis:before {
228
- content: '\e931';
228
+ content: "\e931";
229
229
  @include fontProperties();
230
230
  }
231
231
  .icon-triangle-left:before {
232
- content: '\e932';
232
+ content: "\e932";
233
233
  @include fontProperties();
234
234
  }
235
235
  .icon-ellipsis-alt:before {
236
- content: '\e933';
236
+ content: "\e933";
237
237
  @include fontProperties();
238
238
  }
239
239
  .icon-bell:before {
240
- content: '\e934';
240
+ content: "\e934";
241
241
  @include fontProperties();
242
242
  }
243
243
  .icon-bell-alt:before {
244
- content: '\e935';
244
+ content: "\e935";
245
245
  @include fontProperties();
246
246
  }
247
247
  .icon-share:before {
248
- content: '\e936';
248
+ content: "\e936";
249
249
  @include fontProperties();
250
250
  }
251
251
  .icon-forbidden:before {
252
- content: '\e937';
252
+ content: "\e937";
253
253
  @include fontProperties();
254
254
  }
255
255
  .icon-checkmark:before {
256
- content: '\e938';
256
+ content: "\e938";
257
257
  @include fontProperties();
258
258
  }
259
259
  .icon-checkmark-square:before {
260
- content: '\e939';
260
+ content: "\e939";
261
261
  @include fontProperties();
262
262
  }
263
263
  .icon-square:before {
264
- content: '\e93a';
264
+ content: "\e93a";
265
265
  @include fontProperties();
266
266
  }
267
267
  .icon-minus-square:before {
268
- content: '\e93b';
268
+ content: "\e93b";
269
269
  @include fontProperties();
270
270
  }
271
271
  .icon-radio:before {
272
- content: '\e93c';
272
+ content: "\e93c";
273
273
  @include fontProperties();
274
274
  }
275
275
  .icon-error-circle:before {
276
- content: '\e93d';
276
+ content: "\e93d";
277
277
  @include fontProperties();
278
278
  }
279
279
  .icon-circle:before {
280
- content: '\e93e';
280
+ content: "\e93e";
281
281
  @include fontProperties();
282
282
  }
283
283
  .icon-table-search:before {
284
- content: '\e93f';
284
+ content: "\e93f";
285
285
  @include fontProperties();
286
286
  }
@@ -1,38 +1,38 @@
1
- import React, { useEffect, useRef } from 'react';
2
- import { Icon, Props, Icons } from './Icon';
3
- import { render } from '@testing-library/react';
1
+ import React, { useEffect, useRef } from "react";
2
+ import { Icon, Props, Icons } from "./Icon";
3
+ import { render } from "@testing-library/react";
4
4
 
5
- interface PartialProps extends Omit<Props, 'ref'> {}
5
+ interface PartialProps extends Omit<Props, "ref"> {}
6
6
 
7
7
  const initParams: PartialProps = {
8
8
  icon: Icons.Calendar,
9
- color: 'rgb(26, 153, 60)',
9
+ color: "rgb(26, 153, 60)"
10
10
  };
11
11
 
12
12
  const createIcon = (params = initParams) => {
13
13
  const queries = render(
14
14
  <Icon {...params} data-testid="icon-component" color={params.color} icon={params.icon} />
15
15
  );
16
- const icon = queries.getByTestId('icon-component');
16
+ const icon = queries.getByTestId("icon-component");
17
17
 
18
18
  return {
19
19
  ...queries,
20
- icon,
20
+ icon
21
21
  };
22
22
  };
23
23
 
24
- describe('Icon', () => {
25
- it('renders without crashing', () => {
24
+ describe("Icon", () => {
25
+ it("renders without crashing", () => {
26
26
  const { icon } = createIcon();
27
27
 
28
28
  expect(icon).toBeDefined();
29
- expect(icon).toHaveClass('icon-calendar');
30
- expect(icon.tagName.toLowerCase()).toBe('span');
31
- expect(icon.getAttribute('style')).toBe('color: rgb(26, 153, 60);');
29
+ expect(icon).toHaveClass("icon-calendar");
30
+ expect(icon.tagName.toLowerCase()).toBe("span");
31
+ expect(icon.getAttribute("style")).toBe("color: rgb(26, 153, 60);");
32
32
  });
33
33
 
34
- it('should render icon with within div tag', () => {
35
- const tag = 'div';
34
+ it("should render icon with within div tag", () => {
35
+ const tag = "div";
36
36
  const { icon } = createIcon({ ...initParams, tag });
37
37
 
38
38
  expect(icon).toBeDefined();
@@ -40,10 +40,10 @@ describe('Icon', () => {
40
40
  });
41
41
  });
42
42
 
43
- describe('ref should work', () => {
44
- it('should give back the proper data prop, this also checks if the component propagates ...rest properly', () => {
43
+ describe("ref should work", () => {
44
+ it("should give back the proper data prop, this also checks if the component propagates ...rest properly", () => {
45
45
  const ExampleComponent = ({
46
- propagateRef,
46
+ propagateRef
47
47
  }: {
48
48
  propagateRef?: (ref: React.RefObject<HTMLElement>) => void;
49
49
  }) => {
@@ -59,7 +59,7 @@ describe('ref should work', () => {
59
59
  };
60
60
 
61
61
  const refCheck = (ref: React.RefObject<HTMLElement>) => {
62
- expect(ref.current).toHaveAttribute('data-ref', 'testing');
62
+ expect(ref.current).toHaveAttribute("data-ref", "testing");
63
63
  };
64
64
 
65
65
  render(<ExampleComponent propagateRef={refCheck} />);
package/src/Icon/Icon.tsx CHANGED
@@ -1,76 +1,76 @@
1
- import React, { ComponentPropsWithRef } from 'react';
2
- import classes from './Icon.module.scss';
1
+ import React, { ComponentPropsWithRef } from "react";
2
+ import classes from "./Icon.module.scss";
3
3
 
4
4
  export enum Icons {
5
- Bell = 'bell',
6
- BellAlt = 'bell-alt',
7
- Bookmark = 'bookmark',
8
- BookmarkAlt = 'bookmark-alt',
9
- Build = 'build',
10
- Calendar = 'calendar',
11
- Change = 'change',
12
- Checkmark = 'checkmark',
13
- CheckmarkCircle = 'checkmark-circle',
14
- CheckmarkCircleAlt = 'checkmark-circle-alt',
15
- CheckmarkCircleBreakout = 'checkmark-circle-breakout',
16
- CheckmarkSquare = 'checkmark-square',
17
- ChevronUp = 'chevron-up',
18
- ChevronDown = 'chevron-down',
19
- ChevronLeft = 'chevron-left',
20
- ChevronRight = 'chevron-right',
21
- Circle = 'circle',
22
- Clock = 'clock',
23
- Copy = 'copy',
24
- Edit = 'edit',
25
- Ellipsis = 'ellipsis',
26
- EllipsisAlt = 'ellipsis-alt',
27
- Equal = 'equal',
28
- Error = 'error-circle',
29
- Eye = 'eye',
30
- Filter = 'filter',
31
- FilterAlt = 'filter-alt',
32
- FilterAltArrow = 'filter-alt-arrow',
33
- FilterAltTimes = 'filter-alt-times',
34
- Forbidden = 'forbidden',
35
- Fullscreen = 'fullscreen',
36
- FullscreenExit = 'fullscreen-exit',
37
- Gearwheel = 'gearwheel',
38
- Grid = 'grid',
39
- Hamburger = 'hamburger',
40
- Heart = 'heart',
41
- Image = 'image',
42
- InfoBell = 'info-bell',
43
- InfoCircle = 'info-circle',
44
- Link = 'link',
45
- MinusSquare = 'minus-square',
46
- NavigationFirst = 'navigation-first',
47
- NavigationLast = 'navigation-last',
48
- Plus = 'plus',
49
- Radio = 'radio',
50
- Refresh = 'refresh',
51
- Search = 'search',
52
- Share = 'share',
53
- Square = 'square',
54
- Star = 'star',
55
- StarAlt = 'star-alt',
56
- TableSearch = 'table-search',
57
- Times = 'times',
58
- TimesCircle = 'times-circle',
59
- TimesCircleAlt = 'times-circle-alt',
60
- TimesThin = 'times-thin',
61
- Trash = 'trash',
62
- TriangleDown = 'triangle-down',
63
- TriangleDownCircle = 'triangle-down-circle',
64
- TriangleLeft = 'triangle-left',
65
- TriangleRight = 'triangle-right',
66
- TriangleUp = 'triangle-up',
67
- Undo = 'undo',
68
- Warning = 'warning',
5
+ Bell = "bell",
6
+ BellAlt = "bell-alt",
7
+ Bookmark = "bookmark",
8
+ BookmarkAlt = "bookmark-alt",
9
+ Build = "build",
10
+ Calendar = "calendar",
11
+ Change = "change",
12
+ Checkmark = "checkmark",
13
+ CheckmarkCircle = "checkmark-circle",
14
+ CheckmarkCircleAlt = "checkmark-circle-alt",
15
+ CheckmarkCircleBreakout = "checkmark-circle-breakout",
16
+ CheckmarkSquare = "checkmark-square",
17
+ ChevronUp = "chevron-up",
18
+ ChevronDown = "chevron-down",
19
+ ChevronLeft = "chevron-left",
20
+ ChevronRight = "chevron-right",
21
+ Circle = "circle",
22
+ Clock = "clock",
23
+ Copy = "copy",
24
+ Edit = "edit",
25
+ Ellipsis = "ellipsis",
26
+ EllipsisAlt = "ellipsis-alt",
27
+ Equal = "equal",
28
+ Error = "error-circle",
29
+ Eye = "eye",
30
+ Filter = "filter",
31
+ FilterAlt = "filter-alt",
32
+ FilterAltArrow = "filter-alt-arrow",
33
+ FilterAltTimes = "filter-alt-times",
34
+ Forbidden = "forbidden",
35
+ Fullscreen = "fullscreen",
36
+ FullscreenExit = "fullscreen-exit",
37
+ Gearwheel = "gearwheel",
38
+ Grid = "grid",
39
+ Hamburger = "hamburger",
40
+ Heart = "heart",
41
+ Image = "image",
42
+ InfoBell = "info-bell",
43
+ InfoCircle = "info-circle",
44
+ Link = "link",
45
+ MinusSquare = "minus-square",
46
+ NavigationFirst = "navigation-first",
47
+ NavigationLast = "navigation-last",
48
+ Plus = "plus",
49
+ Radio = "radio",
50
+ Refresh = "refresh",
51
+ Search = "search",
52
+ Share = "share",
53
+ Square = "square",
54
+ Star = "star",
55
+ StarAlt = "star-alt",
56
+ TableSearch = "table-search",
57
+ Times = "times",
58
+ TimesCircle = "times-circle",
59
+ TimesCircleAlt = "times-circle-alt",
60
+ TimesThin = "times-thin",
61
+ Trash = "trash",
62
+ TriangleDown = "triangle-down",
63
+ TriangleDownCircle = "triangle-down-circle",
64
+ TriangleLeft = "triangle-left",
65
+ TriangleRight = "triangle-right",
66
+ TriangleUp = "triangle-up",
67
+ Undo = "undo",
68
+ Warning = "warning"
69
69
  }
70
70
 
71
- type Tag = 'span' | 'div' | 'i';
71
+ type Tag = "span" | "div" | "i";
72
72
 
73
- export interface Props extends ComponentPropsWithRef<'div'> {
73
+ export interface Props extends ComponentPropsWithRef<"div"> {
74
74
  icon: Icons;
75
75
  color?: string;
76
76
  size?: string;
@@ -78,7 +78,7 @@ export interface Props extends ComponentPropsWithRef<'div'> {
78
78
  }
79
79
 
80
80
  export const Icon = React.forwardRef<HTMLDivElement, Props>(
81
- ({ icon, color, className, style, size, tag = 'span', ...rest }: Props, ref) => {
81
+ ({ icon, color, className, style, size, tag = "span", ...rest }: Props, ref) => {
82
82
  const Component = tag;
83
83
 
84
84
  return (
@@ -88,7 +88,7 @@ export const Icon = React.forwardRef<HTMLDivElement, Props>(
88
88
  style={{ color: color, ...style, fontSize: size }}
89
89
  data-icon
90
90
  aria-hidden="true"
91
- className={`${classes['icon']} ${classes['icon-' + icon]} ${className ? className : ''}`}
91
+ className={`${classes["icon"]} ${classes["icon-" + icon]} ${className ? className : ""}`}
92
92
  />
93
93
  );
94
94
  }
@@ -1,4 +1,4 @@
1
- @import '../mixins.module.scss';
1
+ @import "../mixins.module.scss";
2
2
 
3
3
  .link {
4
4
  font-family: var(--font-family);
@@ -48,19 +48,19 @@
48
48
  }
49
49
 
50
50
  .button {
51
- @include buttonBase('link');
51
+ @include buttonBase("link");
52
52
 
53
53
  text-decoration: none;
54
54
 
55
55
  &.fill {
56
- @include button('fill', 'link');
56
+ @include button("fill", "link");
57
57
  }
58
58
 
59
59
  &.outline {
60
- @include button('outline', 'link');
60
+ @include button("outline", "link");
61
61
  }
62
62
 
63
63
  &.text {
64
- @include button('text', 'link');
64
+ @include button("text", "link");
65
65
  }
66
66
  }