@inceptionbg/iui 2.0.22 → 2.0.24

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 (237) hide show
  1. package/dist/NoAccessPage-CJisyKrk.js +2 -0
  2. package/dist/{NoAccessPage-BmizYfw0.js.map → NoAccessPage-CJisyKrk.js.map} +1 -1
  3. package/dist/NotFoundPage-BeRit0kr.js +2 -0
  4. package/dist/{NotFoundPage-Cv544vAr.js.map → NotFoundPage-BeRit0kr.js.map} +1 -1
  5. package/dist/icons/index.d.ts +3 -1
  6. package/dist/icons/index.js +1 -1
  7. package/dist/index.d.ts +452 -408
  8. package/dist/index.js +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/iui.css +1 -1
  11. package/idea/GridTable/GridTable.tsx +1 -1
  12. package/idea/Menu/Menu.tsx +5 -3
  13. package/idea/Menu/MenuItem.tsx +3 -2
  14. package/idea/Menu/hooks/useMenuControl.ts +1 -1
  15. package/idea/Menu.tsx +3 -2
  16. package/idea/NoAccessInfo.tsx +1 -1
  17. package/idea/Table/Components/Edit/ItemActionsMenu.tsx +2 -1
  18. package/idea/Table/Components/Edit/ItemEditOptionsButtons.tsx +1 -1
  19. package/idea/Table/Components/Edit/TableEditRow.tsx +3 -2
  20. package/idea/Table/Components/FilterItem.tsx +2 -2
  21. package/idea/Table/Components/Header/TableHeader.tsx +3 -2
  22. package/idea/Table/Components/Header/TableHeaderRow.tsx +2 -2
  23. package/idea/Table/Components/Print/CustomTablePrint.tsx +3 -2
  24. package/idea/Table/Components/SetSortList.tsx +2 -2
  25. package/idea/Table/Components/SetTableFilter.tsx +3 -2
  26. package/idea/Table/Components/TableFooter.tsx +6 -4
  27. package/idea/Table/Components/TableOptions.tsx +3 -2
  28. package/idea/Table/Table.tsx +3 -2
  29. package/idea/Table/hooks/useTableKeyboard.ts +2 -2
  30. package/package.json +1 -1
  31. package/src/assets/icons/duotone/faBell.ts +17 -17
  32. package/src/assets/icons/duotone/faCircleUser.ts +17 -17
  33. package/src/assets/icons/index.ts +25 -24
  34. package/src/assets/icons/light/faArrowDownShortWide.ts +15 -15
  35. package/src/assets/icons/light/faArrowDownWideShort.ts +15 -15
  36. package/src/assets/icons/light/faArrowLeft.ts +5 -5
  37. package/src/assets/icons/light/faArrowRight.ts +5 -5
  38. package/src/assets/icons/light/faArrowUpArrowDown.ts +15 -15
  39. package/src/assets/icons/light/faArrowUpRightFromSquare.ts +15 -15
  40. package/src/assets/icons/light/faArrowsToLine.ts +15 -15
  41. package/src/assets/icons/light/faArrowsUpDown.ts +15 -15
  42. package/src/assets/icons/light/faBell.ts +15 -15
  43. package/src/assets/icons/light/faBookmark.ts +15 -15
  44. package/src/assets/icons/light/faBookmarkSlash.ts +15 -15
  45. package/src/assets/icons/light/faCalendarPlus.ts +15 -15
  46. package/src/assets/icons/light/faCheck.ts +15 -15
  47. package/src/assets/icons/light/faChevronDown.ts +15 -15
  48. package/src/assets/icons/light/faChevronRight.ts +15 -15
  49. package/src/assets/icons/light/faCircleInfo.ts +15 -15
  50. package/src/assets/icons/light/faCircleXmark.ts +15 -15
  51. package/src/assets/icons/light/faClipboardCheck.ts +15 -15
  52. package/src/assets/icons/light/faClockRotateLeft.ts +15 -15
  53. package/src/assets/icons/light/faEllipsisVertical.ts +15 -15
  54. package/src/assets/icons/light/faEnvelope.ts +15 -15
  55. package/src/assets/icons/light/faEye.ts +15 -15
  56. package/src/assets/icons/light/faEyeSlash.ts +15 -15
  57. package/src/assets/icons/light/faFilter.ts +15 -15
  58. package/src/assets/icons/light/faGear.ts +15 -15
  59. package/src/assets/icons/light/faHouse.ts +15 -15
  60. package/src/assets/icons/light/faIdBadge.ts +15 -15
  61. package/src/assets/icons/light/faLineColumns.ts +15 -15
  62. package/src/assets/icons/light/faLink.ts +15 -15
  63. package/src/assets/icons/light/faMagnifyingGlass.ts +15 -15
  64. package/src/assets/icons/light/faPen.ts +15 -15
  65. package/src/assets/icons/light/faPrint.ts +15 -15
  66. package/src/assets/icons/light/faQuestion.ts +15 -15
  67. package/src/assets/icons/light/faRotateRight.ts +15 -15
  68. package/src/assets/icons/light/faTrashCan.ts +15 -15
  69. package/src/assets/icons/light/faTriangleExclamation.ts +15 -15
  70. package/src/assets/icons/light/faXmark.ts +15 -15
  71. package/src/assets/icons/regular/faArrowLeft.ts +15 -15
  72. package/src/assets/icons/regular/faArrowRightArrowLeft.ts +15 -15
  73. package/src/assets/icons/regular/faCircleCheck.ts +15 -15
  74. package/src/assets/icons/regular/faCircleExclamation.ts +15 -15
  75. package/src/assets/icons/regular/faCircleInfo.ts +15 -15
  76. package/src/assets/icons/regular/faFileArrowDown.ts +15 -15
  77. package/src/assets/icons/regular/faFilterCircleXmark.ts +15 -15
  78. package/src/assets/icons/regular/faTriangleExclamation.ts +15 -15
  79. package/src/assets/icons/solid/faAngleLeft.ts +15 -15
  80. package/src/assets/icons/solid/faAngleRight.ts +15 -15
  81. package/src/assets/icons/solid/faArrowDownWideShort.ts +15 -15
  82. package/src/assets/icons/solid/faCaretDown.ts +15 -15
  83. package/src/assets/icons/solid/faCheck.ts +15 -15
  84. package/src/assets/icons/solid/faEllipsisVertical.ts +15 -15
  85. package/src/assets/icons/solid/faEnvelopeDot.ts +15 -15
  86. package/src/assets/icons/solid/faFilter.ts +15 -15
  87. package/src/assets/icons/solid/faFloppyDisk.ts +15 -15
  88. package/src/assets/icons/solid/faGripDotsVertical.ts +15 -15
  89. package/src/assets/icons/solid/faListUl.ts +15 -15
  90. package/src/assets/icons/solid/faMinus.ts +15 -15
  91. package/src/assets/icons/solid/faPlus.ts +15 -15
  92. package/src/assets/icons/solid/faPrint.ts +15 -15
  93. package/src/assets/icons/solid/faRotateRight.ts +15 -15
  94. package/src/assets/icons/solid/faXmark.ts +15 -15
  95. package/src/components/Accordions/Accordions.tsx +75 -74
  96. package/src/components/Alert/Alert.tsx +31 -31
  97. package/src/components/Badge/DotBadge.tsx +16 -16
  98. package/src/components/Badge/NotificationBadge.tsx +29 -29
  99. package/src/components/Badge/PillBadge.tsx +13 -13
  100. package/src/components/Button/Button.tsx +56 -56
  101. package/src/components/Button/IconButton.tsx +51 -51
  102. package/src/components/Button/SplitButton.tsx +91 -91
  103. package/src/components/Dashboard/Dashboard.tsx +9 -9
  104. package/src/components/Dashboard/DashboardWidget.tsx +44 -44
  105. package/src/components/Dashboard/FastLinksWidget/FastLinksWidget.tsx +37 -37
  106. package/src/components/Dialog/Dialog.tsx +166 -162
  107. package/src/components/Dialog/components/DialogFooter.tsx +100 -98
  108. package/src/components/Header/Components/EnvBadge.tsx +17 -17
  109. package/src/components/Header/Components/ModuleSelect.tsx +68 -68
  110. package/src/components/Header/Components/Notifications.tsx +202 -208
  111. package/src/components/Header/Components/UserMenu.tsx +52 -52
  112. package/src/components/Header/Header.tsx +37 -36
  113. package/src/components/Helper/Collapse.tsx +53 -52
  114. package/src/components/Inputs/Checkbox.tsx +53 -53
  115. package/src/components/Inputs/CurrencyInput.tsx +124 -123
  116. package/src/components/Inputs/DateInput/DateInput.tsx +184 -183
  117. package/src/components/Inputs/DateInput/components/DatePartInput.tsx +159 -158
  118. package/src/components/Inputs/InputWrapper.tsx +95 -95
  119. package/src/components/Inputs/NumberInput.tsx +86 -86
  120. package/src/components/Inputs/PasswordInput.tsx +40 -39
  121. package/src/components/Inputs/PhoneInput/PhoneInput.tsx +108 -0
  122. package/src/components/Inputs/PhoneInput/utils/countryCode.ts +20 -0
  123. package/src/components/Inputs/Radio.tsx +59 -59
  124. package/src/components/Inputs/RadioGroup.tsx +48 -48
  125. package/src/components/Inputs/RadioLarge.tsx +39 -39
  126. package/src/components/Inputs/SearchInput.tsx +46 -45
  127. package/src/components/Inputs/Selects/Select.tsx +17 -17
  128. package/src/components/Inputs/Selects/components/CustomSelectComponents.tsx +20 -19
  129. package/src/components/Inputs/Selects/components/SelectWrapper.tsx +118 -118
  130. package/src/components/Inputs/Selects/utils/selectStyles.ts +101 -101
  131. package/src/components/Inputs/TextAreaInput.tsx +68 -67
  132. package/src/components/Inputs/TextInput.tsx +100 -99
  133. package/src/components/Inputs/TimeInput/TimeInput.tsx +81 -81
  134. package/src/components/List/List.tsx +21 -20
  135. package/src/components/List/ListItem.tsx +70 -69
  136. package/src/components/Loader/Loader.tsx +59 -53
  137. package/src/components/Loader/ProgressBar.tsx +41 -41
  138. package/src/components/Menu/Menu.tsx +81 -80
  139. package/src/components/Menu/MenuItem.tsx +46 -46
  140. package/src/components/Menu/NewMenu.tsx +63 -63
  141. package/src/components/Menu/hooks/useMenuPosition.tsx +116 -115
  142. package/src/components/Pullover/Pullover.tsx +197 -196
  143. package/src/components/Router/Router.tsx +52 -51
  144. package/src/components/Sidebar/AddButton.tsx +22 -22
  145. package/src/components/Sidebar/Sidebar.tsx +85 -83
  146. package/src/components/Sidebar/SidebarItem.tsx +84 -84
  147. package/src/components/Sidebar/types/ISidebar.ts +28 -28
  148. package/src/components/Table/Table.tsx +259 -258
  149. package/src/components/Table/components/columns/ColumnsList.tsx +60 -59
  150. package/src/components/Table/components/columns/TableColumnsEdit.tsx +114 -112
  151. package/src/components/Table/components/edit/TableEditRow.tsx +78 -77
  152. package/src/components/Table/components/filters/FilterItem.tsx +15 -15
  153. package/src/components/Table/components/filters/TableFilters.tsx +126 -125
  154. package/src/components/Table/components/footer/TableFooter.tsx +126 -124
  155. package/src/components/Table/components/header/TableHeader.tsx +40 -40
  156. package/src/components/Table/components/header/TableHeaderRow.tsx +57 -57
  157. package/src/components/Table/components/items/TableItemActions.tsx +78 -78
  158. package/src/components/Table/components/print/TablePrint.tsx +200 -199
  159. package/src/components/Table/components/select/TableSelect.tsx +50 -49
  160. package/src/components/Table/components/sort/TableSort.tsx +73 -72
  161. package/src/components/Table/components/templates/CreateTemplateDialog.tsx +58 -48
  162. package/src/components/Table/components/templates/TableTemplates.tsx +65 -112
  163. package/src/components/Table/components/templates/TemplatesPullover.tsx +88 -0
  164. package/src/components/Table/contexts/TableContext.tsx +116 -123
  165. package/src/components/Table/hooks/localHooks/useLocalTableColumns.tsx +70 -70
  166. package/src/components/Table/hooks/localHooks/useLocalTableData.tsx +84 -84
  167. package/src/components/Table/hooks/localHooks/useLocalTableKeyboard.ts +176 -177
  168. package/src/components/Table/hooks/localHooks/useLocalTablePagination.ts +12 -12
  169. package/src/components/Table/hooks/useTableColumns.ts +34 -34
  170. package/src/components/Table/hooks/useTableEdit.tsx +140 -140
  171. package/src/components/Table/hooks/useTableFilterFields.tsx +150 -150
  172. package/src/components/Table/hooks/useTablePagination.ts +19 -19
  173. package/src/components/Table/hooks/useTablePrint.ts +83 -83
  174. package/src/components/Table/hooks/useTableSearch.ts +31 -30
  175. package/src/components/Table/hooks/useTableSelect.ts +19 -19
  176. package/src/components/Table/hooks/useTableSort.ts +8 -8
  177. package/src/components/Tabs/Tabs.tsx +68 -67
  178. package/src/components/Tooltip/Tooltip.tsx +191 -200
  179. package/src/components/Tree/Tree.tsx +22 -22
  180. package/src/components/Tree/TreeItem.tsx +57 -56
  181. package/src/components/Wrappers/AppLayout.tsx +17 -17
  182. package/src/components/Wrappers/ConditionalWrapper.tsx +10 -10
  183. package/src/components/Wrappers/FormWrapper.tsx +84 -83
  184. package/src/components/Wrappers/PageLayout.tsx +156 -155
  185. package/src/hooks/useBackgroundClose.ts +19 -18
  186. package/src/hooks/useGetFocusableElements.ts +43 -42
  187. package/src/hooks/useIsMenuOpen.ts +11 -11
  188. package/src/hooks/useLocalPopoverControl.ts +32 -32
  189. package/src/hooks/useOnEsc.ts +14 -14
  190. package/src/hooks/usePopupControl.ts +22 -22
  191. package/src/hooks/useZendesk.ts +21 -21
  192. package/src/index.ts +379 -382
  193. package/src/pages/NoAccessPage.tsx +27 -27
  194. package/src/pages/NotFoundPage.tsx +26 -26
  195. package/src/styles/common/helpers/_size.scss +0 -3
  196. package/src/styles/components/_accordions.scss +2 -1
  197. package/src/styles/components/_buttonSplit.scss +4 -29
  198. package/src/styles/components/_dialog.scss +2 -2
  199. package/src/styles/components/_input.scss +9 -0
  200. package/src/styles/components/_page.scss +2 -3
  201. package/src/types/IBasic.ts +32 -31
  202. package/src/types/ICountryCode.ts +5 -0
  203. package/src/types/IError.ts +5 -5
  204. package/src/types/IHeader.ts +40 -40
  205. package/src/types/IInfo.ts +1 -1
  206. package/src/types/IKeyboard.ts +33 -33
  207. package/src/types/IMenu.ts +19 -19
  208. package/src/types/INotifications.ts +15 -15
  209. package/src/types/IPopup.ts +17 -17
  210. package/src/types/IRouter.ts +6 -6
  211. package/src/types/ISelect.ts +54 -54
  212. package/src/types/ITab.ts +1 -1
  213. package/src/types/ITable.ts +290 -279
  214. package/src/types/ITree.ts +6 -6
  215. package/src/utils/InputPatternValidation.ts +12 -12
  216. package/src/utils/dateUtils.ts +32 -32
  217. package/src/utils/fileUtils.ts +177 -177
  218. package/src/utils/i18n/i18nIUICyrilic.ts +119 -116
  219. package/src/utils/i18n/i18nIUILatin.ts +120 -117
  220. package/src/utils/i18n/i18nIUIMe.ts +118 -115
  221. package/src/utils/icons.ts +13 -13
  222. package/src/utils/localStorageHelper.ts +24 -24
  223. package/src/utils/logoUtils.ts +7 -7
  224. package/src/utils/numberUtils.ts +21 -21
  225. package/src/utils/objectUtils.ts +114 -114
  226. package/src/utils/popupUtils.ts +82 -82
  227. package/src/utils/rootDir.ts +1 -1
  228. package/src/utils/stringUtils.ts +18 -18
  229. package/src/utils/tableUtils.ts +130 -130
  230. package/src/utils/toasts.ts +6 -6
  231. package/src/utils/urlUtils.ts +4 -4
  232. package/tsconfig.json +1 -0
  233. package/dist/NoAccessPage-BmizYfw0.js +0 -2
  234. package/dist/NotFoundPage-Cv544vAr.js +0 -2
  235. package/src/components/Dialog/hooks/useDialogKeyboard.ts +0 -42
  236. package/src/components/Inputs/Select2/Select.tsx +0 -258
  237. package/src/components/Inputs/Select2/select.scss +0 -42
@@ -1,15 +1,15 @@
1
- import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
-
3
- const prefix = 'fas';
4
- const iconName = 'print';
5
- const width = 512;
6
- const height = 512;
7
- const unicode = 'f02f';
8
- const svgPathData =
9
- 'M448 192H64C28.65 192 0 220.7 0 256v96c0 17.67 14.33 32 32 32h32v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h32c17.67 0 32-14.33 32-32V256C512 220.7 483.3 192 448 192zM384 448H128v-96h256V448zM432 296c-13.25 0-24-10.75-24-24c0-13.27 10.75-24 24-24s24 10.73 24 24C456 285.3 445.3 296 432 296zM128 64h229.5L384 90.51V160h64V77.25c0-8.484-3.375-16.62-9.375-22.62l-45.25-45.25C387.4 3.375 379.2 0 370.8 0H96C78.34 0 64 14.33 64 32v128h64V64z';
10
-
11
- export const faPrint: IconDefinition = {
12
- prefix,
13
- iconName,
14
- icon: [width, height, [], unicode, svgPathData],
15
- };
1
+ import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ const prefix = 'fas';
4
+ const iconName = 'print';
5
+ const width = 512;
6
+ const height = 512;
7
+ const unicode = 'f02f';
8
+ const svgPathData =
9
+ 'M448 192H64C28.65 192 0 220.7 0 256v96c0 17.67 14.33 32 32 32h32v96c0 17.67 14.33 32 32 32h320c17.67 0 32-14.33 32-32v-96h32c17.67 0 32-14.33 32-32V256C512 220.7 483.3 192 448 192zM384 448H128v-96h256V448zM432 296c-13.25 0-24-10.75-24-24c0-13.27 10.75-24 24-24s24 10.73 24 24C456 285.3 445.3 296 432 296zM128 64h229.5L384 90.51V160h64V77.25c0-8.484-3.375-16.62-9.375-22.62l-45.25-45.25C387.4 3.375 379.2 0 370.8 0H96C78.34 0 64 14.33 64 32v128h64V64z';
10
+
11
+ export const faPrint: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };
@@ -1,15 +1,15 @@
1
- import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
-
3
- const prefix = 'fas';
4
- const iconName = 'rotate-right';
5
- const width = 512;
6
- const height = 512;
7
- const unicode = 'f2f9';
8
- const svgPathData =
9
- 'M468.9 32.11c13.87 0 27.18 10.77 27.18 27.04v145.9c0 10.59-8.584 19.17-19.17 19.17h-145.7c-16.28 0-27.06-13.32-27.06-27.2c0-6.634 2.461-13.4 7.96-18.9l45.12-45.14c-28.22-23.14-63.85-36.64-101.3-36.64c-88.09 0-159.8 71.69-159.8 159.8S167.8 415.9 255.9 415.9c73.14 0 89.44-38.31 115.1-38.31c18.48 0 31.97 15.04 31.97 31.96c0 35.04-81.59 70.41-147 70.41c-123.4 0-223.9-100.5-223.9-223.9S132.6 32.44 256 32.44c54.6 0 106.2 20.39 146.4 55.26l47.6-47.63C455.5 34.57 462.3 32.11 468.9 32.11z';
10
-
11
- export const faRotateRight: IconDefinition = {
12
- prefix,
13
- iconName,
14
- icon: [width, height, [], unicode, svgPathData],
15
- };
1
+ import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ const prefix = 'fas';
4
+ const iconName = 'rotate-right';
5
+ const width = 512;
6
+ const height = 512;
7
+ const unicode = 'f2f9';
8
+ const svgPathData =
9
+ 'M468.9 32.11c13.87 0 27.18 10.77 27.18 27.04v145.9c0 10.59-8.584 19.17-19.17 19.17h-145.7c-16.28 0-27.06-13.32-27.06-27.2c0-6.634 2.461-13.4 7.96-18.9l45.12-45.14c-28.22-23.14-63.85-36.64-101.3-36.64c-88.09 0-159.8 71.69-159.8 159.8S167.8 415.9 255.9 415.9c73.14 0 89.44-38.31 115.1-38.31c18.48 0 31.97 15.04 31.97 31.96c0 35.04-81.59 70.41-147 70.41c-123.4 0-223.9-100.5-223.9-223.9S132.6 32.44 256 32.44c54.6 0 106.2 20.39 146.4 55.26l47.6-47.63C455.5 34.57 462.3 32.11 468.9 32.11z';
10
+
11
+ export const faRotateRight: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };
@@ -1,15 +1,15 @@
1
- import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
-
3
- const prefix = 'fas';
4
- const iconName = 'xmark';
5
- const width = 320;
6
- const height = 512;
7
- const unicode = 'f00d';
8
- const svgPathData =
9
- 'M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z';
10
-
11
- export const faXmark: IconDefinition = {
12
- prefix,
13
- iconName,
14
- icon: [width, height, [], unicode, svgPathData],
15
- };
1
+ import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ const prefix = 'fas';
4
+ const iconName = 'xmark';
5
+ const width = 320;
6
+ const height = 512;
7
+ const unicode = 'f00d';
8
+ const svgPathData =
9
+ 'M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25C304.4 412.9 296.2 416 288 416s-16.38-3.125-22.62-9.375L160 301.3L54.63 406.6C48.38 412.9 40.19 416 32 416S15.63 412.9 9.375 406.6c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z';
10
+
11
+ export const faXmark: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };
@@ -1,74 +1,75 @@
1
- import { FC, useState } from 'react';
2
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3
- import clsx from 'clsx';
4
- import { ITab } from '../../types/ITab';
5
- import { Collapse } from '../Helper/Collapse';
6
- import { faArrowsToLine } from '../../assets/icons/light/faArrowsToLine';
7
- import { faArrowsUpDown } from '../../assets/icons/light/faArrowsUpDown';
8
-
9
- interface Props {
10
- tabs: ITab[];
11
- initialValue?: string;
12
- compact?: boolean;
13
- keepContentInDom?: boolean;
14
- control?: {
15
- value: string;
16
- setValue: (value: string) => void;
17
- };
18
- className?: string;
19
- classNameContent?: string;
20
- }
21
- export const Accordions: FC<Props> = ({
22
- tabs: allTabs,
23
- initialValue,
24
- compact,
25
- keepContentInDom,
26
- control,
27
- className,
28
- classNameContent,
29
- }) => {
30
- const tabs = allTabs.filter(tab => !tab.hidden);
31
- const [selected, setSelected] = useState(initialValue || '');
32
-
33
- return tabs.length > 0 ? (
34
- <div className={clsx('iui-accordions', className)}>
35
- {tabs.map(tab => {
36
- const isOpen = (control?.value ?? selected) === tab.value;
37
- return (
38
- <div
39
- key={tab.value}
40
- className={clsx('iui-accordion', {
41
- selected: isOpen,
42
- compact,
43
- })}
44
- >
45
- <div
46
- className={clsx('summary clickable', {
47
- disabled: tab.disabled,
48
- })}
49
- onClick={
50
- tab.disabled
51
- ? undefined
52
- : () => (control?.setValue ?? setSelected)(isOpen ? '' : tab.value)
53
- }
54
- >
55
- <div className="flex center">
56
- {tab.icon && <FontAwesomeIcon icon={tab.icon} className="iui-icon" />}
57
- {tab.label}
58
- </div>
59
- <FontAwesomeIcon
60
- icon={isOpen ? faArrowsToLine : faArrowsUpDown}
61
- className="collapse-icon"
62
- />
63
- </div>
64
- <Collapse isOpen={isOpen} keepContentInDom={keepContentInDom}>
65
- <div className={clsx('iui-accordion-content', classNameContent)}>
66
- {tab.component}
67
- </div>
68
- </Collapse>
69
- </div>
70
- );
71
- })}
72
- </div>
73
- ) : null;
74
- };
1
+ import type { FC } from 'react';
2
+ import type { ITab } from '../../types/ITab';
3
+ import { useState } from 'react';
4
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
+ import clsx from 'clsx';
6
+ import { faArrowsToLine } from '../../assets/icons/light/faArrowsToLine';
7
+ import { faArrowsUpDown } from '../../assets/icons/light/faArrowsUpDown';
8
+ import { Collapse } from '../Helper/Collapse';
9
+
10
+ interface Props {
11
+ tabs: ITab[];
12
+ initialValue?: string;
13
+ compact?: boolean;
14
+ keepContentInDom?: boolean;
15
+ control?: {
16
+ value: string;
17
+ setValue: (value: string) => void;
18
+ };
19
+ className?: string;
20
+ classNameContent?: string;
21
+ }
22
+ export const Accordions: FC<Props> = ({
23
+ tabs: allTabs,
24
+ initialValue,
25
+ compact,
26
+ keepContentInDom,
27
+ control,
28
+ className,
29
+ classNameContent,
30
+ }) => {
31
+ const tabs = allTabs.filter(tab => !tab.hidden);
32
+ const [selected, setSelected] = useState(initialValue || '');
33
+
34
+ return tabs.length > 0 ? (
35
+ <div className={clsx('iui-accordions', className)}>
36
+ {tabs.map(tab => {
37
+ const isOpen = (control?.value ?? selected) === tab.value;
38
+ return (
39
+ <div
40
+ key={tab.value}
41
+ className={clsx('iui-accordion', {
42
+ selected: isOpen,
43
+ compact,
44
+ })}
45
+ >
46
+ <div
47
+ className={clsx('summary clickable', {
48
+ disabled: tab.disabled,
49
+ })}
50
+ onClick={
51
+ tab.disabled
52
+ ? undefined
53
+ : () => (control?.setValue ?? setSelected)(isOpen ? '' : tab.value)
54
+ }
55
+ >
56
+ <div className="flex center">
57
+ {tab.icon && <FontAwesomeIcon icon={tab.icon} className="iui-icon" />}
58
+ {tab.label}
59
+ </div>
60
+ <FontAwesomeIcon
61
+ icon={isOpen ? faArrowsToLine : faArrowsUpDown}
62
+ className="collapse-icon"
63
+ />
64
+ </div>
65
+ <Collapse isOpen={isOpen} keepContentInDom={keepContentInDom}>
66
+ <div className={clsx('iui-accordion-content', classNameContent)}>
67
+ {tab.component}
68
+ </div>
69
+ </Collapse>
70
+ </div>
71
+ );
72
+ })}
73
+ </div>
74
+ ) : null;
75
+ };
@@ -1,31 +1,31 @@
1
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
2
- import clsx from 'clsx';
3
- import { FC, ReactNode } from 'react';
4
- import { infoIcons } from '../../utils/icons';
5
- import { IInfoType } from '../../types/IInfo';
6
-
7
- export interface IAlertProps {
8
- text?: string;
9
- severity: IInfoType;
10
- fitContent?: boolean;
11
- className?: string;
12
- children?: ReactNode;
13
- }
14
-
15
- export const Alert: FC<IAlertProps> = ({
16
- text,
17
- severity,
18
- fitContent,
19
- className,
20
- children,
21
- }) => (
22
- <div
23
- className={clsx('iui-alert', severity, className, {
24
- 'width-fit': fitContent,
25
- })}
26
- >
27
- <FontAwesomeIcon icon={infoIcons[severity]} />
28
- {text && <p>{text}</p>}
29
- {children}
30
- </div>
31
- );
1
+ import type { FC, ReactNode } from 'react';
2
+ import type { IInfoType } from '../../types/IInfo';
3
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
+ import clsx from 'clsx';
5
+ import { infoIcons } from '../../utils/icons';
6
+
7
+ export interface IAlertProps {
8
+ text?: string;
9
+ severity: IInfoType;
10
+ fitContent?: boolean;
11
+ className?: string;
12
+ children?: ReactNode;
13
+ }
14
+
15
+ export const Alert: FC<IAlertProps> = ({
16
+ text,
17
+ severity,
18
+ fitContent,
19
+ className,
20
+ children,
21
+ }) => (
22
+ <div
23
+ className={clsx('iui-alert', severity, className, {
24
+ 'width-fit': fitContent,
25
+ })}
26
+ >
27
+ <FontAwesomeIcon icon={infoIcons[severity]} />
28
+ {text && <p>{text}</p>}
29
+ {children}
30
+ </div>
31
+ );
@@ -1,16 +1,16 @@
1
- import clsx from 'clsx';
2
- import { FC } from 'react';
3
- import { IInfoType } from '../../types/IInfo';
4
-
5
- interface Props {
6
- label: string;
7
- color: IInfoType | 'gray';
8
- className?: string;
9
- }
10
-
11
- export const DotBadge: FC<Props> = ({ label, color, className }) => (
12
- <div className="flex align-center gap-2">
13
- <div className={clsx('iui-dot-badge', color, className)} />
14
- {label}
15
- </div>
16
- );
1
+ import type { FC } from 'react';
2
+ import type { IInfoType } from '../../types/IInfo';
3
+ import clsx from 'clsx';
4
+
5
+ interface Props {
6
+ label: string;
7
+ color: IInfoType | 'gray';
8
+ className?: string;
9
+ }
10
+
11
+ export const DotBadge: FC<Props> = ({ label, color, className }) => (
12
+ <div className="flex align-center gap-2">
13
+ <div className={clsx('iui-dot-badge', color, className)} />
14
+ {label}
15
+ </div>
16
+ );
@@ -1,29 +1,29 @@
1
- import clsx from 'clsx';
2
- import { FC, ReactNode } from 'react';
3
- import { IInfoType } from '../../types/IInfo';
4
-
5
- interface Props {
6
- number?: number;
7
- className?: string;
8
- size?: 's' | 'm';
9
- children?: ReactNode;
10
- color?: IInfoType | 'primary';
11
- }
12
-
13
- export const NotificationBadge: FC<Props> = ({
14
- number,
15
- className,
16
- size = 'm',
17
- children,
18
- color = 'primary',
19
- }) =>
20
- !!number && number > 0 ? (
21
- <div className="iui-badge-parent">
22
- {children}
23
- <div className={clsx('iui-badge', color, className, size)}>
24
- {number > 99 ? '99+' : number}
25
- </div>
26
- </div>
27
- ) : (
28
- children
29
- );
1
+ import type { FC, ReactNode } from 'react';
2
+ import type { IInfoType } from '../../types/IInfo';
3
+ import clsx from 'clsx';
4
+
5
+ interface Props {
6
+ number?: number;
7
+ className?: string;
8
+ size?: 's' | 'm';
9
+ children?: ReactNode;
10
+ color?: IInfoType | 'primary';
11
+ }
12
+
13
+ export const NotificationBadge: FC<Props> = ({
14
+ number,
15
+ className,
16
+ size = 'm',
17
+ children,
18
+ color = 'primary',
19
+ }) =>
20
+ !!number && number > 0 ? (
21
+ <div className="iui-badge-parent">
22
+ {children}
23
+ <div className={clsx('iui-badge', color, className, size)}>
24
+ {number > 99 ? '99+' : number}
25
+ </div>
26
+ </div>
27
+ ) : (
28
+ children
29
+ );
@@ -1,13 +1,13 @@
1
- import clsx from 'clsx';
2
- import { IInfoType } from '../../types/IInfo';
3
- import { FC } from 'react';
4
-
5
- interface Props {
6
- label: string;
7
- color: IInfoType | 'gray';
8
- className?: string;
9
- }
10
-
11
- export const PillBadge: FC<Props> = ({ label, color, className }) => (
12
- <div className={clsx('iui-pill-badge', color, className)}>{label}</div>
13
- );
1
+ import type { FC } from 'react';
2
+ import type { IInfoType } from '../../types/IInfo';
3
+ import clsx from 'clsx';
4
+
5
+ interface Props {
6
+ label: string;
7
+ color: IInfoType | 'gray';
8
+ className?: string;
9
+ }
10
+
11
+ export const PillBadge: FC<Props> = ({ label, color, className }) => (
12
+ <div className={clsx('iui-pill-badge', color, className)}>{label}</div>
13
+ );
@@ -1,56 +1,56 @@
1
- import type { ButtonHTMLAttributes, FC, MouseEventHandler, Ref } from 'react';
2
- import clsx from 'clsx';
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
- import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
5
-
6
- export type IButtonColor = 'primary' | 'neutral' | 'danger';
7
- export type IButtonVariant = 'solid' | 'outlined' | 'simple';
8
-
9
- export interface IButtonProps {
10
- label: string;
11
- icon?: IconDefinition;
12
- iconEnd?: IconDefinition;
13
- onClick?: MouseEventHandler<HTMLButtonElement>;
14
- variant?: IButtonVariant;
15
- color?: IButtonColor;
16
- size?: 'xs' | 's' | 'm' | 'l';
17
- disabled?: boolean;
18
- active?: boolean;
19
- type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
20
- className?: string;
21
- buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
22
- ref?: Ref<HTMLButtonElement>;
23
- }
24
-
25
- export const Button: FC<IButtonProps> = ({
26
- label,
27
- icon,
28
- iconEnd,
29
- onClick,
30
- variant = 'solid',
31
- color,
32
- size = 'm',
33
- disabled,
34
- active,
35
- type = 'button',
36
- className,
37
- buttonProps,
38
- ref,
39
- }) => (
40
- <button
41
- ref={ref}
42
- disabled={disabled}
43
- className={clsx('iui-btn iui-text-btn', variant, color, size, className, {
44
- active,
45
- primary: !color && variant === 'solid',
46
- neutral: !color && variant !== 'solid',
47
- })}
48
- onClick={onClick}
49
- type={type}
50
- {...buttonProps}
51
- >
52
- {icon && <FontAwesomeIcon icon={icon} />}
53
- <div className="iui-btn-label">{label}</div>
54
- {iconEnd && <FontAwesomeIcon icon={iconEnd} />}
55
- </button>
56
- );
1
+ import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import type { ButtonHTMLAttributes, FC, MouseEventHandler, Ref } from 'react';
3
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
+ import clsx from 'clsx';
5
+
6
+ export type IButtonColor = 'primary' | 'neutral' | 'danger';
7
+ export type IButtonVariant = 'solid' | 'outlined' | 'simple';
8
+
9
+ export interface IButtonProps {
10
+ label: string;
11
+ icon?: IconDefinition;
12
+ iconEnd?: IconDefinition;
13
+ onClick?: MouseEventHandler<HTMLButtonElement>;
14
+ variant?: IButtonVariant;
15
+ color?: IButtonColor;
16
+ size?: 'xs' | 's' | 'm' | 'l';
17
+ disabled?: boolean;
18
+ active?: boolean;
19
+ type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
20
+ className?: string;
21
+ buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
22
+ ref?: Ref<HTMLButtonElement>;
23
+ }
24
+
25
+ export const Button: FC<IButtonProps> = ({
26
+ label,
27
+ icon,
28
+ iconEnd,
29
+ onClick,
30
+ variant = 'solid',
31
+ color,
32
+ size = 'm',
33
+ disabled,
34
+ active,
35
+ type = 'button',
36
+ className,
37
+ buttonProps,
38
+ ref,
39
+ }) => (
40
+ <button
41
+ ref={ref}
42
+ disabled={disabled}
43
+ className={clsx('iui-btn iui-text-btn', variant, color, size, className, {
44
+ active,
45
+ primary: !color && variant === 'solid',
46
+ neutral: !color && variant !== 'solid',
47
+ })}
48
+ onClick={onClick}
49
+ type={type}
50
+ {...buttonProps}
51
+ >
52
+ {icon && <FontAwesomeIcon icon={icon} />}
53
+ <div className="iui-btn-label">{label}</div>
54
+ {iconEnd && <FontAwesomeIcon icon={iconEnd} />}
55
+ </button>
56
+ );
@@ -1,51 +1,51 @@
1
- import { ButtonHTMLAttributes, FC, MouseEventHandler, Ref } from 'react';
2
- import clsx from 'clsx';
3
- import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
4
- import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
5
- import { IButtonColor, IButtonVariant } from './Button';
6
- import { Tooltip } from '../Tooltip/Tooltip';
7
-
8
- export interface IIconButtonProps {
9
- icon: IconDefinition;
10
- onClick?: MouseEventHandler<HTMLButtonElement>;
11
- variant?: IButtonVariant;
12
- color?: IButtonColor;
13
- size?: 's' | 'm' | 'l';
14
- disabled?: boolean;
15
- active?: boolean;
16
- tooltip?: string;
17
- type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
18
- className?: string;
19
- buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
20
- ref?: Ref<HTMLButtonElement>;
21
- }
22
-
23
- export const IconButton: FC<IIconButtonProps> = ({
24
- icon,
25
- onClick,
26
- variant = 'simple',
27
- color = 'primary',
28
- size = 'm',
29
- disabled,
30
- active,
31
- tooltip,
32
- type = 'button',
33
- className,
34
- buttonProps,
35
- ref,
36
- }) => (
37
- <Tooltip label={tooltip} disabled={disabled}>
38
- <button
39
- ref={ref}
40
- disabled={disabled}
41
- className={clsx('iui-btn iui-icon-btn', variant, color, size, className, {
42
- active,
43
- })}
44
- onClick={onClick}
45
- type={type}
46
- {...buttonProps}
47
- >
48
- <FontAwesomeIcon icon={icon} />
49
- </button>
50
- </Tooltip>
51
- );
1
+ import type { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+ import type { ButtonHTMLAttributes, FC, MouseEventHandler, Ref } from 'react';
3
+ import type { IButtonColor, IButtonVariant } from './Button';
4
+ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
5
+ import clsx from 'clsx';
6
+ import { Tooltip } from '../Tooltip/Tooltip';
7
+
8
+ export interface IIconButtonProps {
9
+ icon: IconDefinition;
10
+ onClick?: MouseEventHandler<HTMLButtonElement>;
11
+ variant?: IButtonVariant;
12
+ color?: IButtonColor;
13
+ size?: 's' | 'm' | 'l';
14
+ disabled?: boolean;
15
+ active?: boolean;
16
+ tooltip?: string;
17
+ type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];
18
+ className?: string;
19
+ buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
20
+ ref?: Ref<HTMLButtonElement>;
21
+ }
22
+
23
+ export const IconButton: FC<IIconButtonProps> = ({
24
+ icon,
25
+ onClick,
26
+ variant = 'simple',
27
+ color = 'primary',
28
+ size = 'm',
29
+ disabled,
30
+ active,
31
+ tooltip,
32
+ type = 'button',
33
+ className,
34
+ buttonProps,
35
+ ref,
36
+ }) => (
37
+ <Tooltip label={tooltip} disabled={disabled}>
38
+ <button
39
+ ref={ref}
40
+ disabled={disabled}
41
+ className={clsx('iui-btn iui-icon-btn', variant, color, size, className, {
42
+ active,
43
+ })}
44
+ onClick={onClick}
45
+ type={type}
46
+ {...buttonProps}
47
+ >
48
+ <FontAwesomeIcon icon={icon} />
49
+ </button>
50
+ </Tooltip>
51
+ );