@inceptionbg/iui 2.0.5 → 2.0.7

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 (257) hide show
  1. package/dist/{NoAccessPage-C6nBt-PN.js → NoAccessPage-BozT_Suz.js} +2 -2
  2. package/dist/{NoAccessPage-C6nBt-PN.js.map → NoAccessPage-BozT_Suz.js.map} +1 -1
  3. package/dist/{NotFoundPage-DatmJOrr.js → NotFoundPage-WWiekDef.js} +2 -2
  4. package/dist/{NotFoundPage-DatmJOrr.js.map → NotFoundPage-WWiekDef.js.map} +1 -1
  5. package/dist/icons/index.d.ts +43 -0
  6. package/dist/icons/index.js +1 -0
  7. package/dist/index.d.ts +32 -20
  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/Menu/Menu.tsx +119 -0
  12. package/idea/Menu/MenuItem.tsx +74 -0
  13. package/idea/Menu/hooks/useMenuControl.ts +13 -0
  14. package/idea/Menu.tsx +132 -0
  15. package/idea/NoAccessInfo.tsx +193 -0
  16. package/idea/Notifications.tsx +245 -0
  17. package/idea/Table2/Components/Columns/ColumnsList.tsx +56 -0
  18. package/idea/Table2/Components/Columns/SetColumnsList.tsx +107 -0
  19. package/idea/Table2/Components/Edit/ItemActionsMenu.tsx +87 -0
  20. package/idea/Table2/Components/Edit/ItemEditOptionsButtons.tsx +32 -0
  21. package/idea/Table2/Components/Edit/TableEditRow.tsx +56 -0
  22. package/idea/Table2/Components/FilterItem.tsx +20 -0
  23. package/idea/Table2/Components/Header/TableHeader.tsx +35 -0
  24. package/idea/Table2/Components/Header/TableHeaderRow.tsx +37 -0
  25. package/idea/Table2/Components/Print/CustomTablePrint.tsx +119 -0
  26. package/idea/Table2/Components/Print/TablePrint.tsx +208 -0
  27. package/idea/Table2/Components/SetSortList.tsx +33 -0
  28. package/idea/Table2/Components/SetTableFilter.tsx +90 -0
  29. package/idea/Table2/Components/TableFooter.tsx +107 -0
  30. package/idea/Table2/Components/TableOptions.tsx +211 -0
  31. package/idea/Table2/Components/Templates/TemplateCreate.tsx +75 -0
  32. package/idea/Table2/Components/Templates/TemplateCreateDefault.tsx +45 -0
  33. package/idea/Table2/Components/Templates/TemplateList.tsx +167 -0
  34. package/idea/Table2/Components/Templates/repo/TemplateRepo.ts +51 -0
  35. package/idea/Table2/Table.tsx +657 -0
  36. package/idea/Table2/_table.scss +300 -0
  37. package/idea/Table2/hooks/useDefaultTemplate.ts +22 -0
  38. package/idea/Table2/hooks/useTableKeyboard.ts +115 -0
  39. package/package.json +9 -4
  40. package/rollup.config.js +80 -0
  41. package/src/assets/icons/duotone/faCircleUser.ts +17 -0
  42. package/src/assets/icons/index.ts +20 -0
  43. package/src/assets/icons/light/faArrowDownShortWide.ts +15 -0
  44. package/src/assets/icons/light/faArrowDownWideShort.ts +15 -0
  45. package/src/assets/icons/light/faArrowUpArrowDown.ts +15 -0
  46. package/src/assets/icons/light/faArrowUpRightFromSquare.ts +15 -0
  47. package/src/assets/icons/light/faArrowsToLine.ts +15 -0
  48. package/src/assets/icons/light/faArrowsUpDown.ts +15 -0
  49. package/src/assets/icons/light/faCalendarPlus.ts +15 -0
  50. package/src/assets/icons/light/faCheck.ts +15 -0
  51. package/src/assets/icons/light/faChevronDown.ts +15 -0
  52. package/src/assets/icons/light/faChevronRight.ts +15 -0
  53. package/src/assets/icons/light/faCircleInfo.ts +15 -0
  54. package/src/assets/icons/light/faCircleXmark.ts +15 -0
  55. package/src/assets/icons/light/faClockRotateLeft.ts +15 -0
  56. package/src/assets/icons/light/faEllipsisVertical.ts +15 -0
  57. package/src/assets/icons/light/faEye.ts +15 -0
  58. package/src/assets/icons/light/faEyeSlash.ts +15 -0
  59. package/src/assets/icons/light/faFilter.ts +15 -0
  60. package/src/assets/icons/light/faGear.ts +15 -0
  61. package/src/assets/icons/light/faHouse.ts +15 -0
  62. package/src/assets/icons/light/faIdBadge.ts +15 -0
  63. package/src/assets/icons/light/faLineColumns.ts +15 -0
  64. package/src/assets/icons/light/faLink.ts +15 -0
  65. package/src/assets/icons/light/faMagnifyingGlass.ts +15 -0
  66. package/src/assets/icons/light/faPenField.ts +15 -0
  67. package/src/assets/icons/light/faPrint.ts +15 -0
  68. package/src/assets/icons/light/faQuestion.ts +15 -0
  69. package/src/assets/icons/light/faRotateRight.ts +15 -0
  70. package/src/assets/icons/light/faTrashCan.ts +15 -0
  71. package/src/assets/icons/light/faTriangleExclamation.ts +15 -0
  72. package/src/assets/icons/light/faXmark.ts +15 -0
  73. package/src/assets/icons/regular/faArrowLeft.ts +15 -0
  74. package/src/assets/icons/regular/faArrowRightArrowLeft.ts +15 -0
  75. package/src/assets/icons/regular/faCircleCheck.ts +15 -0
  76. package/src/assets/icons/regular/faCircleExclamation.ts +15 -0
  77. package/src/assets/icons/regular/faCircleInfo.ts +15 -0
  78. package/src/assets/icons/regular/faFileArrowDown.ts +15 -0
  79. package/src/assets/icons/regular/faFilterCircleXmark.ts +15 -0
  80. package/src/assets/icons/regular/faTriangleExclamation.ts +15 -0
  81. package/src/assets/icons/solid/faAngleLeft.ts +15 -0
  82. package/src/assets/icons/solid/faAngleRight.ts +15 -0
  83. package/src/assets/icons/solid/faArrowDownWideShort.ts +15 -0
  84. package/src/assets/icons/solid/faCaretDown.ts +15 -0
  85. package/src/assets/icons/solid/faCheck.ts +15 -0
  86. package/src/assets/icons/solid/faEllipsisVertical.ts +15 -0
  87. package/src/assets/icons/solid/faFilter.ts +15 -0
  88. package/src/assets/icons/solid/faFloppyDisk.ts +15 -0
  89. package/src/assets/icons/solid/faGripDotsVertical.ts +15 -0
  90. package/src/assets/icons/solid/faListUl.ts +15 -0
  91. package/src/assets/icons/solid/faMagnifyingGlass.ts +15 -0
  92. package/src/assets/icons/solid/faMinus.ts +15 -0
  93. package/src/assets/icons/solid/faPlus.ts +15 -0
  94. package/src/assets/icons/solid/faPrint.ts +15 -0
  95. package/src/assets/icons/solid/faRotateRight.ts +15 -0
  96. package/src/assets/icons/solid/faXmark.ts +15 -0
  97. package/src/assets/images/logo/mts.svg +5703 -0
  98. package/src/assets/images/logo/paperless.svg +21 -0
  99. package/src/assets/images/logo/pismonosa.png +0 -0
  100. package/src/assets/images/not-found.svg +19 -0
  101. package/src/components/Accordions/Accordions.tsx +64 -0
  102. package/src/components/Alert/Alert.tsx +31 -0
  103. package/src/components/Badge/DotBadge.tsx +16 -0
  104. package/src/components/Badge/NotificationBadge.tsx +29 -0
  105. package/src/components/Badge/PillBadge.tsx +13 -0
  106. package/src/components/Button/Button.tsx +56 -0
  107. package/src/components/Button/IconButton.tsx +49 -0
  108. package/src/components/Dashboard/Dashboard.tsx +9 -0
  109. package/src/components/Dashboard/DashboardWidget.tsx +44 -0
  110. package/src/components/Dashboard/FastLinksWidget/FastLinksWidget.tsx +37 -0
  111. package/src/components/Dialog/DeleteItemDialog.tsx +52 -0
  112. package/src/components/Dialog/Dialog.tsx +226 -0
  113. package/src/components/Dialog/hooks/useDialogKeyboard.ts +41 -0
  114. package/src/components/Dialog/hooks/useDialogObserver.ts +21 -0
  115. package/src/components/Header/Components/ModuleSelect.tsx +55 -0
  116. package/src/components/Header/Components/UserMenu.tsx +52 -0
  117. package/src/components/Header/Header.tsx +31 -0
  118. package/src/components/Helper/Collapse.tsx +52 -0
  119. package/src/components/Inputs/Checkbox.tsx +53 -0
  120. package/src/components/Inputs/CurrencyInput.tsx +123 -0
  121. package/src/components/Inputs/DateInput/DateInput.tsx +177 -0
  122. package/src/components/Inputs/DateInput/components/DatePartInput.tsx +154 -0
  123. package/src/components/Inputs/InputWrapper.tsx +90 -0
  124. package/src/components/Inputs/NumberInput.tsx +83 -0
  125. package/src/components/Inputs/PasswordInput.tsx +38 -0
  126. package/src/components/Inputs/Radio.tsx +59 -0
  127. package/src/components/Inputs/RadioGroup.tsx +48 -0
  128. package/src/components/Inputs/RadioLarge.tsx +39 -0
  129. package/src/components/Inputs/SearchInput.tsx +40 -0
  130. package/src/components/Inputs/Select2/Select.tsx +224 -0
  131. package/src/components/Inputs/Select2/select.scss +43 -0
  132. package/src/components/Inputs/Selects/Select.tsx +17 -0
  133. package/src/components/Inputs/Selects/components/CustomSelectComponents.tsx +19 -0
  134. package/src/components/Inputs/Selects/components/SelectWrapper.tsx +126 -0
  135. package/src/components/Inputs/Selects/utils/selectStyles.ts +104 -0
  136. package/src/components/Inputs/TextAreaInput.tsx +67 -0
  137. package/src/components/Inputs/TextInput.tsx +98 -0
  138. package/src/components/Inputs/TimeInput/TimeInput.tsx +81 -0
  139. package/src/components/Loader/Loader.tsx +53 -0
  140. package/src/components/Menu/Menu.tsx +68 -0
  141. package/src/components/Menu/MenuItem.tsx +47 -0
  142. package/src/components/Menu/NewMenu.tsx +66 -0
  143. package/src/components/Menu/hooks/useMenuPosition.tsx +80 -0
  144. package/src/components/Pullover/Pullover.tsx +89 -0
  145. package/src/components/Router/Router.tsx +51 -0
  146. package/src/components/Sidebar/AddButton.tsx +22 -0
  147. package/src/components/Sidebar/Sidebar.tsx +81 -0
  148. package/src/components/Sidebar/SidebarItem.tsx +84 -0
  149. package/src/components/Sidebar/types/ISidebar.ts +28 -0
  150. package/src/components/Table/Components/Columns/ColumnsList.tsx +61 -0
  151. package/src/components/Table/Components/Columns/SetColumnsList.tsx +113 -0
  152. package/src/components/Table/Components/Edit/ItemActionsMenu.tsx +84 -0
  153. package/src/components/Table/Components/Edit/ItemEditOptionsButtons.tsx +31 -0
  154. package/src/components/Table/Components/Edit/TableEditRow.tsx +56 -0
  155. package/src/components/Table/Components/FilterItem.tsx +20 -0
  156. package/src/components/Table/Components/Header/TableHeader.tsx +45 -0
  157. package/src/components/Table/Components/Header/TableHeaderRow.tsx +37 -0
  158. package/src/components/Table/Components/Print/CustomTablePrint.tsx +114 -0
  159. package/src/components/Table/Components/Print/TablePrint.tsx +207 -0
  160. package/src/components/Table/Components/SetSortList.tsx +30 -0
  161. package/src/components/Table/Components/SetTableFilter.tsx +90 -0
  162. package/src/components/Table/Components/TableFooter.tsx +135 -0
  163. package/src/components/Table/Components/TableOptions.tsx +226 -0
  164. package/src/components/Table/Components/Templates/TemplateCreate.tsx +80 -0
  165. package/src/components/Table/Components/Templates/TemplateCreateDefault.tsx +45 -0
  166. package/src/components/Table/Components/Templates/TemplateList.tsx +167 -0
  167. package/src/components/Table/Components/Templates/repo/TemplateRepo.ts +53 -0
  168. package/src/components/Table/Table.tsx +527 -0
  169. package/src/components/Table/hooks/useDefaultTemplate.ts +20 -0
  170. package/src/components/Table/hooks/useTableKeyboard.ts +138 -0
  171. package/src/components/Table/hooks/useTableSelect.ts +11 -0
  172. package/src/components/Tabs/Tabs.tsx +66 -0
  173. package/src/components/Tooltip/Tooltip.tsx +133 -0
  174. package/src/components/Tree/Tree.tsx +22 -0
  175. package/src/components/Tree/TreeItem.tsx +56 -0
  176. package/src/components/Wrappers/AppLayout.tsx +17 -0
  177. package/src/components/Wrappers/ConditionalWrapper.tsx +10 -0
  178. package/src/components/Wrappers/FormWrapper.tsx +81 -0
  179. package/src/components/Wrappers/PageLayout.tsx +152 -0
  180. package/src/hooks/useBackgroundClose.ts +18 -0
  181. package/src/hooks/useIsMenuOpen.ts +11 -0
  182. package/src/hooks/useOnEsc.ts +14 -0
  183. package/src/hooks/useZendesk.ts +21 -0
  184. package/src/index.ts +324 -0
  185. package/src/pages/NoAccessPage.tsx +27 -0
  186. package/src/pages/NotFoundPage.tsx +26 -0
  187. package/src/styles/App.scss +43 -0
  188. package/src/styles/common/_animations.scss +64 -0
  189. package/src/styles/common/_typography.scss +88 -0
  190. package/src/styles/common/helpers/_base.scss +55 -0
  191. package/src/styles/common/helpers/_color.scss +7 -0
  192. package/src/styles/common/helpers/_display.scss +85 -0
  193. package/src/styles/common/helpers/_size.scss +25 -0
  194. package/src/styles/common/maps/_align.scss +21 -0
  195. package/src/styles/common/maps/_info-types.scss +1 -0
  196. package/src/styles/common/maps/_spacing.scss +78 -0
  197. package/src/styles/common/maps/_text.scss +14 -0
  198. package/src/styles/components/_accordions.scss +46 -0
  199. package/src/styles/components/_alert.scss +23 -0
  200. package/src/styles/components/_badge.scss +76 -0
  201. package/src/styles/components/_button.scss +138 -0
  202. package/src/styles/components/_card.scss +24 -0
  203. package/src/styles/components/_dialog.scss +111 -0
  204. package/src/styles/components/_form.scss +8 -0
  205. package/src/styles/components/_header.scss +109 -0
  206. package/src/styles/components/_input.scss +158 -0
  207. package/src/styles/components/_inputCheckbox.scss +105 -0
  208. package/src/styles/components/_inputDateTime.scss +161 -0
  209. package/src/styles/components/_inputRadio.scss +83 -0
  210. package/src/styles/components/_inputSelect.scss +6 -0
  211. package/src/styles/components/_loader.scss +44 -0
  212. package/src/styles/components/_menu-v2.scss +67 -0
  213. package/src/styles/components/_menu.scss +53 -0
  214. package/src/styles/components/_page.scss +62 -0
  215. package/src/styles/components/_portal.scss +8 -0
  216. package/src/styles/components/_print.scss +87 -0
  217. package/src/styles/components/_pullover.scss +43 -0
  218. package/src/styles/components/_scrollbar.scss +18 -0
  219. package/src/styles/components/_sidebar.scss +206 -0
  220. package/src/styles/components/_smallComponents.scss +23 -0
  221. package/src/styles/components/_table.scss +270 -0
  222. package/src/styles/components/_tabs.scss +33 -0
  223. package/src/styles/components/_tooltip.scss +48 -0
  224. package/src/styles/components/_tree.scss +21 -0
  225. package/src/styles/components/_widget.scss +90 -0
  226. package/src/styles/pages/_fullScreenPage.scss +64 -0
  227. package/src/styles/variables/_bp.scss +5 -0
  228. package/src/styles/variables/_variables.scss +130 -0
  229. package/src/types/Base/custom.d.ts +9 -0
  230. package/src/types/IBasic.ts +31 -0
  231. package/src/types/IError.ts +5 -0
  232. package/src/types/IHeader.ts +34 -0
  233. package/src/types/IInfo.ts +1 -0
  234. package/src/types/IKeyboard.ts +37 -0
  235. package/src/types/IMenu.ts +18 -0
  236. package/src/types/IRouter.ts +6 -0
  237. package/src/types/ISelect.ts +52 -0
  238. package/src/types/ITab.ts +10 -0
  239. package/src/types/ITable.ts +249 -0
  240. package/src/types/ITree.ts +6 -0
  241. package/src/utils/DateUtils.ts +32 -0
  242. package/src/utils/InputPatternValidation.ts +12 -0
  243. package/src/utils/LocalStorageHelper.ts +24 -0
  244. package/src/utils/NumberUtils.ts +21 -0
  245. package/src/utils/ObjectUtils.ts +85 -0
  246. package/src/utils/RootDir.ts +1 -0
  247. package/src/utils/StringUtils.ts +18 -0
  248. package/src/utils/TableUtils.ts +130 -0
  249. package/src/utils/Toasts.ts +6 -0
  250. package/src/utils/UrlUtils.ts +4 -0
  251. package/src/utils/fileUtils.ts +176 -0
  252. package/src/utils/i18n/i18nIUICyrilic.ts +90 -0
  253. package/src/utils/i18n/i18nIUILatin.ts +90 -0
  254. package/src/utils/i18n/i18nIUIMe.ts +88 -0
  255. package/src/utils/icons.ts +13 -0
  256. package/tsconfig.icons.json +5 -0
  257. package/tsconfig.json +19 -0
@@ -0,0 +1,300 @@
1
+ table {
2
+ border-spacing: 0px;
3
+ border-collapse: collapse;
4
+ }
5
+ // .iui-table {
6
+ // //// Header ////
7
+ // th {
8
+ // border-bottom: var(--table-border);
9
+ // font-size: var(--fs-m);
10
+ // &:last-child {
11
+ // .vertical-separator {
12
+ // display: none;
13
+ // }
14
+ // }
15
+ // }
16
+ // .table-container {
17
+ // overflow: auto;
18
+ // // scroll-snap-type: y mandatory;
19
+ // }
20
+ // .sticky-header {
21
+ // position: sticky;
22
+ // top: 0;
23
+ // background-color: white;
24
+ // }
25
+ // .vertical-separator {
26
+ // height: 14px;
27
+ // width: 2px;
28
+ // background-color: #00000030;
29
+ // }
30
+
31
+ // //// Body ////
32
+ // tbody.no-last-border tr:last-child td {
33
+ // border: none;
34
+ // }
35
+ // // Row
36
+ // tr {
37
+ // // scroll-snap-align: start;
38
+ // margin-bottom: 2px;
39
+ // &.clickable:hover,
40
+ // &.selected {
41
+ // background-color: rgba(0, 0, 0, 0.05);
42
+ // }
43
+ // &.focused {
44
+ // background-color: var(--primary-o10);
45
+ // }
46
+ // &.loading {
47
+ // opacity: 0.5;
48
+ // pointer-events: none;
49
+ // }
50
+ // }
51
+ // // Cell
52
+ // th,
53
+ // td {
54
+ // // Cell colors
55
+ // &.secondary {
56
+ // background-color: rgba(0, 0, 0, 0.04);
57
+ // border-bottom: 1px solid #d3d3d3;
58
+ // }
59
+ // }
60
+ // td {
61
+ // height: 52px;
62
+ // padding: 7px 16px;
63
+ // font-size: var(--fs-m);
64
+ // box-sizing: border-box;
65
+ // border-bottom: var(--table-border);
66
+ // }
67
+ // .clickable-column:hover {
68
+ // background-color: var(--primary-o10) !important;
69
+ // }
70
+
71
+ // //// Footer ////
72
+
73
+ // .table-footer {
74
+ // display: flex;
75
+ // align-items: center;
76
+ // width: 100%;
77
+ // height: 52px;
78
+ // padding: 7px 16px;
79
+ // font-size: var(--fs-m);
80
+ // box-sizing: border-box;
81
+ // }
82
+ // .pagination {
83
+ // display: flex;
84
+ // align-items: center;
85
+ // color: rgba(0, 0, 0, 0.8);
86
+ // @media #{$bp-mobile} {
87
+ // flex-direction: column;
88
+ // align-items: end;
89
+ // }
90
+ // select {
91
+ // color: rgba(0, 0, 0, 0.8);
92
+ // background: none;
93
+ // border: none;
94
+ // text-align: right;
95
+ // cursor: pointer;
96
+ // padding: 0 8px;
97
+ // user-select: none;
98
+ // margin-left: 8px;
99
+ // margin-right: 16px;
100
+ // }
101
+ // .offset-input {
102
+ // width: 30px;
103
+ // border: none;
104
+ // border-bottom: 1px solid rgba(0, 0, 0, 0.3);
105
+ // background: none;
106
+ // text-align: center;
107
+ // padding: 5px 0;
108
+ // }
109
+ // }
110
+
111
+ // @media #{$portrait} {
112
+ // tbody,
113
+ // tr {
114
+ // display: block;
115
+ // }
116
+ // tr {
117
+ // padding: 20px 0;
118
+ // }
119
+ // td {
120
+ // display: flex;
121
+ // align-items: center;
122
+ // height: unset !important;
123
+ // text-align: left;
124
+ // }
125
+ // thead {
126
+ // display: none;
127
+ // }
128
+ // tbody tr td {
129
+ // &:before {
130
+ // content: attr(data-th);
131
+ // font-weight: bold;
132
+ // text-align: left;
133
+ // padding-right: 10px;
134
+ // }
135
+ // }
136
+ // }
137
+ // }
138
+
139
+ .iui-table-filter {
140
+ .iui-dialog-content {
141
+ padding: 0;
142
+ margin: 8px 0;
143
+ }
144
+ .filters-search {
145
+ display: flex;
146
+ align-items: center;
147
+ justify-content: space-between;
148
+ gap: 8px;
149
+ .search-input {
150
+ max-width: 250px;
151
+ }
152
+ }
153
+ .table-filter-item {
154
+ display: flex;
155
+ align-items: center;
156
+ justify-content: space-between;
157
+ padding: 8px 16px;
158
+ .label {
159
+ width: 150px;
160
+ }
161
+ .field {
162
+ display: inline-flex;
163
+ margin: 0 8px;
164
+ width: 100%;
165
+ }
166
+ }
167
+ }
168
+
169
+ .dual-list-container {
170
+ .dual-list-content {
171
+ display: grid;
172
+ grid-template-columns: 1fr auto 1fr;
173
+ gap: 12px;
174
+ }
175
+ .list-box {
176
+ border: var(--table-border);
177
+ border-radius: 16px;
178
+ padding: 10px;
179
+ user-select: none;
180
+ & > .item {
181
+ display: flex;
182
+ justify-content: space-between;
183
+ align-items: center;
184
+ padding: 8px;
185
+ font-size: 12px;
186
+ svg {
187
+ color: rgba(0, 0, 0, 0.6);
188
+ margin-left: 1rem;
189
+ }
190
+ &:hover {
191
+ background-color: var(--primary-o10);
192
+ }
193
+ &:active {
194
+ background-color: var(--primary-o25);
195
+ }
196
+ }
197
+ }
198
+ .exchange-icon {
199
+ display: flex;
200
+ align-items: center;
201
+ svg {
202
+ height: 20px;
203
+ width: 20px;
204
+ }
205
+ }
206
+ }
207
+
208
+ .edit-row {
209
+ background: #3d497714;
210
+ }
211
+ .primary-row {
212
+ background-color: rgba(var(--primary-rgb), 0.15);
213
+ }
214
+ .secondary-row {
215
+ background-color: #f1f1f1;
216
+ }
217
+
218
+ .table-options {
219
+ display: flex;
220
+ align-items: center;
221
+ justify-content: space-between;
222
+ margin-bottom: 4px;
223
+ .table-options-btn {
224
+ background: var(--background-dark);
225
+ border-radius: 4px;
226
+ font-weight: 700;
227
+ &:hover {
228
+ background-color: #dfe1eb !important;
229
+ }
230
+ svg {
231
+ height: 12px;
232
+ width: 12px;
233
+ }
234
+ }
235
+ }
236
+
237
+ //
238
+
239
+ .grid-table {
240
+ display: grid;
241
+ // grid-template-rows: auto 1fr; /* Header auto height, body fills */
242
+ grid-template-columns: repeat(9, auto); /* Adjust based on columns */
243
+ thead,
244
+ tbody {
245
+ display: contents;
246
+ }
247
+
248
+ tbody {
249
+ max-height: 400px;
250
+ overflow-y: auto;
251
+ }
252
+ // thead {
253
+ // position: sticky;
254
+ // top: 0;
255
+ // background: #f9f9f9;
256
+ // z-index: 1;
257
+ // }
258
+
259
+ // tbody {
260
+ // display: grid;
261
+ // grid-template-columns: repeat(3, 1fr); /* Match columns */
262
+ // }
263
+
264
+ tr {
265
+ display: contents; /* Allows rows to use the grid structure */
266
+ }
267
+
268
+ th,
269
+ td {
270
+ box-sizing: border-box;
271
+ display: flex;
272
+ padding: 12px;
273
+ flex-grow: 1;
274
+ align-items: center;
275
+ min-height: 20px;
276
+ border: 1px solid #ddd; /* Apply borders to th and td */
277
+ }
278
+
279
+ // th:first-child,
280
+ // td:first-child {
281
+ // border-left: none; /* Remove left border for the first column */
282
+ // }
283
+
284
+ // tr:last-child .td {
285
+ // border-bottom: none; /* Remove bottom border from the last row */
286
+ // }
287
+
288
+ th {
289
+ background-color: #f4f4f4; /* Light background for the header */
290
+ }
291
+
292
+ tr:hover {
293
+ outline: 2px solid #007bff;
294
+ background: #6aa1ce;
295
+ }
296
+
297
+ tr + tr td {
298
+ border-top: none; /* Remove top border from subsequent rows */
299
+ }
300
+ }
@@ -0,0 +1,22 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { getDefaultReportTemplate } from '../Components/Templates/repo/TemplateRepo';
3
+ import { IReportTemplate } from '../../../types/ITable';
4
+
5
+ export const useDefaultTemplate = (identifier?: string) => {
6
+ const [template, setTemplate] = useState<IReportTemplate | null>(null);
7
+ const [isLoading, setIsLoading] = useState(true);
8
+
9
+ useEffect(() => {
10
+ if (identifier) {
11
+ getDefaultReportTemplate(identifier)
12
+ .then(setTemplate)
13
+ .catch(() => {})
14
+ .finally(() => setIsLoading(false));
15
+ }
16
+ }, [identifier]);
17
+
18
+ return {
19
+ defaultTemplate: template,
20
+ isLoadingDefaultTemplate: !!identifier && isLoading,
21
+ };
22
+ };
@@ -0,0 +1,115 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { ITableDataItem } from '../../../types/ITable';
3
+ import { IKeyboardAction, ITableKeyboardActionsProp } from '../../../types/IKeyboard';
4
+ import { useDialogObserver } from '../../Dialog/hooks/useDialogObserver';
5
+ import { scrollToRow } from '../../../utils/TableUtils';
6
+
7
+ export const useTableKeyboard = ({
8
+ enabled,
9
+ rows,
10
+ actions,
11
+ }: {
12
+ enabled: boolean;
13
+ rows: ITableDataItem[];
14
+ actions: ITableKeyboardActionsProp;
15
+ }) => {
16
+ const [focusedRow, setFocusedRow] = useState<ITableDataItem | null>(null);
17
+ const isDialogOpen = useDialogObserver();
18
+
19
+ useEffect(() => {
20
+ if (enabled && !isDialogOpen) {
21
+ const isEditing = !!actions.edit?.item;
22
+ const isAdding = !!actions.add?.isAdding;
23
+
24
+ const handleKeyDown = (event: KeyboardEvent) => {
25
+ const isControlKeyPressed = event.ctrlKey || event.metaKey;
26
+ const rowIndex = focusedRow
27
+ ? rows.findIndex(row => row.uuid === focusedRow.uuid)
28
+ : -1;
29
+
30
+ const allActions: IKeyboardAction[] = [
31
+ {
32
+ key: 'ArrowDown',
33
+ isActive: !isEditing && !actions.moveDisabled,
34
+ onAction: () => {
35
+ // Leave action enabled to prevent default scroll movement
36
+ const nextRow = rowIndex + 1;
37
+ if (nextRow < rows.length) {
38
+ // rowIndex will be -1 if no row is selected so the next row will be 0
39
+ setFocusedRow(rows[nextRow]);
40
+ scrollToRow(rows[nextRow].uuid);
41
+ }
42
+ },
43
+ },
44
+ {
45
+ key: 'ArrowUp',
46
+ isActive: !isEditing && !actions.moveDisabled,
47
+ onAction: () => {
48
+ if (rowIndex !== 0) {
49
+ const prevRow = rowIndex > 0 ? rowIndex - 1 : rows.length - 1;
50
+ setFocusedRow(rows[prevRow]);
51
+ scrollToRow(rows[prevRow].uuid);
52
+ }
53
+ },
54
+ },
55
+ {
56
+ key: 'e',
57
+ normalizedKey: true,
58
+ ctrl: true,
59
+ isActive: !!actions.edit?.enabled && !!focusedRow,
60
+ onAction: () => !isEditing && actions.edit?.setItem(focusedRow?.item ?? null),
61
+ },
62
+ {
63
+ key: 'Enter',
64
+ isActive: !isEditing && !isAdding && !!focusedRow?.onRowClick,
65
+ onAction: focusedRow?.onRowClick!,
66
+ },
67
+ {
68
+ key: 'Escape',
69
+ isActive: !!focusedRow || !!isAdding,
70
+ onAction: () =>
71
+ isAdding
72
+ ? actions.add?.setIsAdding(false)
73
+ : actions.edit?.item
74
+ ? actions.edit?.setItem(null)
75
+ : setFocusedRow(null),
76
+ },
77
+ {
78
+ key: 'Insert',
79
+ isActive: !!actions.add?.enabled && !isAdding,
80
+ onAction: () => {
81
+ actions.add?.setIsAdding(true);
82
+ setFocusedRow(null);
83
+ },
84
+ },
85
+ {
86
+ key: 'Delete',
87
+ isActive: !isEditing && !!actions.delete?.enabled && !!focusedRow,
88
+ onAction: () =>
89
+ actions.delete?.onAction ?? actions.delete?.setItemUuid(focusedRow!.uuid),
90
+ },
91
+ ...(actions?.additional?.({ focusedRow, isEditing, isAdding }) || []),
92
+ ];
93
+
94
+ allActions.forEach(item => {
95
+ if (
96
+ item.isActive &&
97
+ item.key === (item.normalizedKey ? event.key.toLowerCase() : event.key) &&
98
+ !!item.ctrl === isControlKeyPressed
99
+ ) {
100
+ event.preventDefault();
101
+ event.stopPropagation();
102
+ item.onAction();
103
+ }
104
+ });
105
+ };
106
+
107
+ window.addEventListener('keydown', handleKeyDown);
108
+ return () => {
109
+ window.removeEventListener('keydown', handleKeyDown);
110
+ };
111
+ }
112
+ }, [enabled, rows, focusedRow, actions, isDialogOpen]);
113
+
114
+ return focusedRow;
115
+ };
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@inceptionbg/iui",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "UI components, elements & utils for Inception ecosystem",
5
5
  "type": "module",
6
- "files": [
7
- "dist"
8
- ],
6
+ "exports": {
7
+ ".": "./dist/index.js",
8
+ "./icons": "./dist/icons/index.js",
9
+ "./styles": "./dist/iui.css",
10
+ "./src": "./src/index.ts"
11
+ },
9
12
  "main": "dist/index.js",
10
13
  "types": "dist/index.d.ts",
11
14
  "scripts": {
@@ -39,6 +42,8 @@
39
42
  "@types/react": "^19.1.8",
40
43
  "@types/react-beautiful-dnd": "^13.1.4",
41
44
  "@types/react-dom": "^19.1.6",
45
+ "react": "^19.1.0",
46
+ "react-dom": "^19.1.0",
42
47
  "rollup": "^4.44.2",
43
48
  "rollup-plugin-delete": "^3.0.1",
44
49
  "rollup-plugin-dts": "^6.2.1",
@@ -0,0 +1,80 @@
1
+ import del from 'rollup-plugin-delete';
2
+ // import resolve from "@rollup/plugin-node-resolve";
3
+ import typescript from '@rollup/plugin-typescript';
4
+ import postcss from 'rollup-plugin-postcss';
5
+ import dts from 'rollup-plugin-dts';
6
+ import commonjs from '@rollup/plugin-commonjs';
7
+ import terser from '@rollup/plugin-terser';
8
+ import image from '@rollup/plugin-image';
9
+
10
+ export default [
11
+ {
12
+ input: 'src/index.ts',
13
+ output: {
14
+ dir: 'dist',
15
+ format: 'esm',
16
+ exports: 'named',
17
+ sourcemap: true,
18
+ },
19
+ plugins: [
20
+ del({ targets: 'dist' }),
21
+ // peerDepsExternal(),
22
+ // resolve(),
23
+ typescript({
24
+ tsconfig: './tsconfig.json',
25
+ declaration: true,
26
+ declarationDir: 'dist/types',
27
+ }),
28
+ image(),
29
+ commonjs(),
30
+ terser(),
31
+ ],
32
+ },
33
+ {
34
+ input: 'src/assets/icons/index.ts',
35
+ output: {
36
+ dir: 'dist/icons',
37
+ format: 'esm',
38
+ exports: 'named',
39
+ sourcemap: false,
40
+ },
41
+ plugins: [
42
+ typescript({
43
+ tsconfig: './tsconfig.icons.json',
44
+ // include: ['src/assets/icons/index.ts'],
45
+ declaration: true,
46
+ declarationDir: 'dist/icons/types',
47
+ }),
48
+ commonjs(),
49
+ terser(),
50
+ ],
51
+ },
52
+ {
53
+ input: 'src/styles/App.scss',
54
+ output: {
55
+ file: 'dist/iui.css',
56
+ format: 'esm',
57
+ exports: 'named',
58
+ },
59
+ plugins: [
60
+ postcss({
61
+ extract: true,
62
+ minimize: true,
63
+ }),
64
+ ],
65
+ },
66
+ {
67
+ input: 'dist/types/index.d.ts',
68
+ output: [{ file: 'dist/index.d.ts', format: 'es' }],
69
+ plugins: [dts()],
70
+ },
71
+ {
72
+ input: 'dist/icons/types/assets/icons/index.d.ts',
73
+ output: [{ file: 'dist/icons/index.d.ts', format: 'es' }],
74
+ plugins: [dts()],
75
+ },
76
+ {
77
+ input: 'dist/index.js',
78
+ plugins: [del({ targets: ['dist/types', 'dist/icons/types'] })],
79
+ },
80
+ ];
@@ -0,0 +1,17 @@
1
+ import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
2
+
3
+ const prefix = "fad";
4
+ const iconName = "circle-user";
5
+ const width = 512;
6
+ const height = 512;
7
+ const unicode = "f2bd";
8
+ const svgPathData = [
9
+ "M256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 128c39.77 0 72 32.24 72 72S295.8 272 256 272c-39.76 0-72-32.24-72-72S216.2 128 256 128zM256 448c-52.93 0-100.9-21.53-135.7-56.29C136.5 349.9 176.5 320 224 320h64c47.54 0 87.54 29.88 103.7 71.71C356.9 426.5 308.9 448 256 448z",
10
+ "M256 272c39.77 0 72-32.24 72-72S295.8 128 256 128C216.2 128 184 160.2 184 200S216.2 272 256 272zM288 320H224c-47.54 0-87.54 29.88-103.7 71.71C155.1 426.5 203.1 448 256 448s100.9-21.53 135.7-56.29C375.5 349.9 335.5 320 288 320z",
11
+ ];
12
+
13
+ export const faCircleUser: IconDefinition = {
14
+ prefix,
15
+ iconName,
16
+ icon: [width, height, [], unicode, svgPathData],
17
+ };
@@ -0,0 +1,20 @@
1
+ export * from './light/faArrowsUpDown';
2
+ export * from './light/faCheck';
3
+ export * from './light/faChevronDown';
4
+ export * from './light/faChevronRight';
5
+ export * from './light/faCircleInfo';
6
+ export * from './light/faCircleXmark';
7
+ export * from './light/faClockRotateLeft';
8
+ export * from './light/faEllipsisVertical';
9
+ export * from './light/faGear';
10
+ export * from './light/faHouse';
11
+ export * from './light/faIdBadge';
12
+ export * from './light/faLink';
13
+ export * from './light/faMagnifyingGlass';
14
+ export * from './light/faPenField';
15
+ export * from './light/faPrint';
16
+ export * from './light/faQuestion';
17
+ export * from './light/faRotateRight';
18
+ export * from './light/faTrashCan';
19
+ export * from './light/faTriangleExclamation';
20
+ export * from './light/faXmark';
@@ -0,0 +1,15 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ const prefix = 'fal';
4
+ const iconName = 'arrow-down-short-wide';
5
+ const width = 576;
6
+ const height = 512;
7
+ const unicode = 'f884';
8
+ const svgPathData =
9
+ 'M304 208h128C440.8 208 448 200.8 448 192s-7.156-16-16-16h-128c-8.844 0-15.1 7.156-15.1 16S295.2 208 304 208zM304 336h192c8.844 0 16-7.156 16-16s-7.156-16-16-16h-192c-8.844 0-15.1 7.156-15.1 16S295.2 336 304 336zM304 80h64c8.844 0 16-7.156 16-16S376.8 48 368 48h-64c-8.844 0-15.1 7.156-15.1 16S295.2 80 304 80zM560 432h-256c-8.844 0-15.1 7.156-15.1 16S295.2 464 304 464h256c8.844 0 16-7.156 16-16S568.8 432 560 432zM224 352c-4.094 0-8.188 1.562-11.31 4.688L144 425.4V48C144 39.16 136.8 32 128 32S112 39.16 112 48v377.4l-68.69-68.69c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62l96 96c6.25 6.25 16.38 6.25 22.62 0l96-96c6.25-6.25 6.25-16.38 0-22.62C232.2 353.6 228.1 352 224 352z';
10
+
11
+ export const faArrowDownShortWide: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };
@@ -0,0 +1,15 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ const prefix = 'fal';
4
+ const iconName = 'arrow-down-wide-short';
5
+ const width = 576;
6
+ const height = 512;
7
+ const unicode = 'f160';
8
+ const svgPathData =
9
+ 'M368 432h-64c-8.844 0-15.1 7.156-15.1 16S295.2 464 304 464h64c8.844 0 16-7.156 16-16S376.8 432 368 432zM432 304h-128c-8.844 0-15.1 7.156-15.1 16S295.2 336 304 336h128c8.844 0 16-7.156 16-16S440.8 304 432 304zM496 176h-192c-8.844 0-15.1 7.156-15.1 16S295.2 208 304 208h192C504.8 208 512 200.8 512 192S504.8 176 496 176zM560 48h-256c-8.844 0-15.1 7.156-15.1 16S295.2 80 304 80h256C568.8 80 576 72.84 576 64S568.8 48 560 48zM224 352c-4.094 0-8.188 1.562-11.31 4.688L144 425.4V48C144 39.16 136.8 32 128 32S112 39.16 112 48v377.4l-68.69-68.69c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62l96 96c6.25 6.25 16.38 6.25 22.62 0l96-96c6.25-6.25 6.25-16.38 0-22.62C232.2 353.6 228.1 352 224 352z';
10
+
11
+ export const faArrowDownWideShort: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };
@@ -0,0 +1,15 @@
1
+ import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
2
+
3
+ const prefix = "fal";
4
+ const iconName = "arrow-up-arrow-down";
5
+ const width = 448;
6
+ const height = 512;
7
+ const unicode = "e099";
8
+ const svgPathData =
9
+ "M224 160c4.094 0 8.188-1.562 11.31-4.688c6.25-6.25 6.25-16.38 0-22.62l-96-96c-6.25-6.25-16.38-6.25-22.62 0l-96 96c-6.25 6.25-6.25 16.38 0 22.62s16.38 6.25 22.62 0L112 86.63V464C112 472.8 119.2 480 128 480s16-7.156 16-16V86.63l68.69 68.69C215.8 158.4 219.9 160 224 160zM427.3 356.7C424.2 353.6 420.1 352 416 352s-8.188 1.562-11.31 4.688L336 425.4V48C336 39.16 328.8 32 320 32s-16 7.156-16 16v377.4l-68.69-68.69c-6.25-6.25-16.38-6.25-22.62 0s-6.25 16.38 0 22.62l96 96c6.25 6.25 16.38 6.25 22.62 0l96-96C433.6 373.1 433.6 362.9 427.3 356.7z";
10
+
11
+ export const faArrowUpArrowDown: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };
@@ -0,0 +1,15 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ const prefix = 'fal';
4
+ const iconName = 'arrow-up-right-from-square';
5
+ const width = 384;
6
+ const height = 512;
7
+ const unicode = 'f08e';
8
+ const svgPathData =
9
+ 'M336 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l121.4 0L212.7 276.7c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0L480 54.6 480 176c0 8.8 7.2 16 16 16s16-7.2 16-16l0-160c0-8.8-7.2-16-16-16L336 0zM64 32C28.7 32 0 60.7 0 96L0 448c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-144c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 144c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32L32 96c0-17.7 14.3-32 32-32l144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L64 32z';
10
+
11
+ export const faArrowUpRightFromSquare: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };
@@ -0,0 +1,15 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ const prefix = 'fal';
4
+ const iconName = 'arrows-to-line';
5
+ const width = 448;
6
+ const height = 512;
7
+ const unicode = 'e0a7';
8
+ const svgPathData =
9
+ 'M235.3 324.7C231.3 320.7 226.5 320 224 320s-7.299 .6547-11.33 4.698l-79.98 79.98C129.6 407.8 128 411.9 128 416c0 8.523 6.865 16 16 16c4.094 0 8.188-1.562 11.31-4.688L208 374.6V496c0 8.844 7.156 16 16 16s16-7.156 16-16v-121.4l52.69 52.69C295.8 430.4 299.9 432 304 432c9.139 0 16-7.477 16-16c0-4.094-1.562-8.188-4.688-11.31L235.3 324.7zM212.7 187.3C214.4 189 218.3 192 224 192s9.609-2.98 11.33-4.707l79.98-79.98C318.4 104.2 320 100.1 320 96c0-8.527-6.865-16-16-16c-4.094 0-8.188 1.562-11.31 4.688L240 137.4V16C240 7.156 232.8 0 224 0S208 7.156 208 16v121.4L155.3 84.69C152.2 81.56 148.1 80 144 80C134.9 80 128 87.47 128 96c0 4.094 1.562 8.188 4.688 11.31L212.7 187.3zM432 240h-416C7.156 240 0 247.1 0 255.1S7.156 272 16 272h416c8.844 0 16-7.165 16-16.01S440.8 240 432 240z';
10
+
11
+ export const faArrowsToLine: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };
@@ -0,0 +1,15 @@
1
+ import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
2
+
3
+ const prefix = 'fal';
4
+ const iconName = 'arrows-up-down';
5
+ const width = 256;
6
+ const height = 512;
7
+ const unicode = 'f07d';
8
+ const svgPathData =
9
+ 'M139.3 4.688l112 112C254.4 119.8 256 123.9 256 128s-1.562 8.188-4.688 11.31c-6.25 6.25-16.38 6.25-22.62 0L144 54.63v402.8l84.69-84.69c6.25-6.25 16.38-6.25 22.62 0C254.4 375.8 256 379.9 256 384s-1.562 8.188-4.688 11.31l-112 112c-6.25 6.25-16.38 6.25-22.62 0l-112-112c-6.25-6.25-6.25-16.38 0-22.62s16.38-6.25 22.62 0L112 457.4V54.63L27.31 139.3c-6.25 6.25-16.38 6.25-22.62 0s-6.25-16.38 0-22.62l112-112C122.9-1.562 133.1-1.562 139.3 4.688z';
10
+
11
+ export const faArrowsUpDown: IconDefinition = {
12
+ prefix,
13
+ iconName,
14
+ icon: [width, height, [], unicode, svgPathData],
15
+ };