@alfalab/core-components-table 3.0.1 → 3.0.2

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 (299) hide show
  1. package/component.js.map +1 -1
  2. package/components/pagination/Component.d.ts +2 -2
  3. package/components/pagination/Component.js.map +1 -1
  4. package/components/pagination/index.css +9 -9
  5. package/components/pagination/index.module.css.js +1 -1
  6. package/components/pagination/index.module.css.js.map +1 -1
  7. package/components/pagination/select-field/index.css +3 -3
  8. package/components/pagination/select-field/index.d.ts +1 -1
  9. package/components/pagination/select-field/index.js.map +1 -1
  10. package/components/pagination/select-field/index.module.css.js +1 -1
  11. package/components/pagination/select-field/index.module.css.js.map +1 -1
  12. package/components/table/Component.d.ts +1 -1
  13. package/components/table/Component.js.map +1 -1
  14. package/components/table/index.css +7 -7
  15. package/components/table/index.module.css.js +1 -1
  16. package/components/table/index.module.css.js.map +1 -1
  17. package/components/table/utils.d.ts +1 -1
  18. package/components/table/utils.js.map +1 -1
  19. package/components/table-context/index.d.ts +3 -3
  20. package/components/table-context/index.js +1 -5
  21. package/components/table-context/index.js.map +1 -1
  22. package/components/tbody/Component.d.ts +1 -1
  23. package/components/tbody/Component.js.map +1 -1
  24. package/components/tbody/index.css +1 -1
  25. package/components/tbody/index.module.css.js +1 -1
  26. package/components/tbody/index.module.css.js.map +1 -1
  27. package/components/tcell/Component.d.ts +1 -1
  28. package/components/tcell/Component.js.map +1 -1
  29. package/components/tcell/index.css +6 -6
  30. package/components/tcell/index.module.css.js +1 -1
  31. package/components/tcell/index.module.css.js.map +1 -1
  32. package/components/texpandable-row/Component.d.ts +2 -2
  33. package/components/texpandable-row/Component.js +1 -1
  34. package/components/texpandable-row/Component.js.map +1 -1
  35. package/components/texpandable-row/index.css +4 -4
  36. package/components/texpandable-row/index.module.css.js +1 -1
  37. package/components/texpandable-row/index.module.css.js.map +1 -1
  38. package/components/thead/Component.d.ts +1 -1
  39. package/components/thead/Component.js.map +1 -1
  40. package/components/thead/index.css +6 -6
  41. package/components/thead/index.module.css.js +1 -1
  42. package/components/thead/index.module.css.js.map +1 -1
  43. package/components/thead-cell/Component.d.ts +2 -2
  44. package/components/thead-cell/Component.js.map +1 -1
  45. package/components/thead-cell/index.css +9 -9
  46. package/components/thead-cell/index.module.css.js +1 -1
  47. package/components/thead-cell/index.module.css.js.map +1 -1
  48. package/components/trow/Component.d.ts +2 -2
  49. package/components/trow/Component.js.map +1 -1
  50. package/components/trow/index.css +10 -10
  51. package/components/trow/index.module.css.js +1 -1
  52. package/components/trow/index.module.css.js.map +1 -1
  53. package/components/tsortable-head-cell/Component.d.ts +1 -1
  54. package/components/tsortable-head-cell/Component.js.map +1 -1
  55. package/components/tsortable-head-cell/index.css +10 -10
  56. package/components/tsortable-head-cell/index.module.css.js +1 -1
  57. package/components/tsortable-head-cell/index.module.css.js.map +1 -1
  58. package/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
  59. package/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
  60. package/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
  61. package/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
  62. package/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
  63. package/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
  64. package/cssm/component.js.map +1 -1
  65. package/cssm/components/pagination/Component.d.ts +2 -2
  66. package/cssm/components/pagination/Component.js.map +1 -1
  67. package/cssm/components/pagination/index.module.css +1 -1
  68. package/cssm/components/pagination/select-field/index.d.ts +1 -1
  69. package/cssm/components/pagination/select-field/index.js.map +1 -1
  70. package/cssm/components/table/Component.d.ts +1 -1
  71. package/cssm/components/table/Component.js.map +1 -1
  72. package/cssm/components/table/index.module.css +1 -1
  73. package/cssm/components/table/utils.d.ts +1 -1
  74. package/cssm/components/table/utils.js.map +1 -1
  75. package/cssm/components/table-context/index.d.ts +3 -3
  76. package/cssm/components/table-context/index.js +1 -5
  77. package/cssm/components/table-context/index.js.map +1 -1
  78. package/cssm/components/tbody/Component.d.ts +1 -1
  79. package/cssm/components/tbody/Component.js.map +1 -1
  80. package/cssm/components/tcell/Component.d.ts +1 -1
  81. package/cssm/components/tcell/Component.js.map +1 -1
  82. package/cssm/components/tcell/index.module.css +1 -1
  83. package/cssm/components/texpandable-row/Component.d.ts +2 -2
  84. package/cssm/components/texpandable-row/Component.js +1 -1
  85. package/cssm/components/texpandable-row/Component.js.map +1 -1
  86. package/cssm/components/thead/Component.d.ts +1 -1
  87. package/cssm/components/thead/Component.js.map +1 -1
  88. package/cssm/components/thead/index.module.css +1 -1
  89. package/cssm/components/thead-cell/Component.d.ts +2 -2
  90. package/cssm/components/thead-cell/Component.js.map +1 -1
  91. package/cssm/components/thead-cell/index.module.css +1 -1
  92. package/cssm/components/trow/Component.d.ts +2 -2
  93. package/cssm/components/trow/Component.js.map +1 -1
  94. package/cssm/components/trow/index.module.css +3 -3
  95. package/cssm/components/tsortable-head-cell/Component.d.ts +1 -1
  96. package/cssm/components/tsortable-head-cell/Component.js.map +1 -1
  97. package/cssm/components/tsortable-head-cell/index.module.css +3 -3
  98. package/cssm/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
  99. package/cssm/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
  100. package/cssm/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
  101. package/cssm/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
  102. package/cssm/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
  103. package/cssm/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
  104. package/esm/component.js.map +1 -1
  105. package/esm/components/pagination/Component.d.ts +2 -2
  106. package/esm/components/pagination/Component.js.map +1 -1
  107. package/esm/components/pagination/index.css +9 -9
  108. package/esm/components/pagination/index.module.css.js +1 -1
  109. package/esm/components/pagination/index.module.css.js.map +1 -1
  110. package/esm/components/pagination/select-field/index.css +3 -3
  111. package/esm/components/pagination/select-field/index.d.ts +1 -1
  112. package/esm/components/pagination/select-field/index.js.map +1 -1
  113. package/esm/components/pagination/select-field/index.module.css.js +1 -1
  114. package/esm/components/pagination/select-field/index.module.css.js.map +1 -1
  115. package/esm/components/table/Component.d.ts +1 -1
  116. package/esm/components/table/Component.js.map +1 -1
  117. package/esm/components/table/index.css +7 -7
  118. package/esm/components/table/index.module.css.js +1 -1
  119. package/esm/components/table/index.module.css.js.map +1 -1
  120. package/esm/components/table/utils.d.ts +1 -1
  121. package/esm/components/table/utils.js.map +1 -1
  122. package/esm/components/table-context/index.d.ts +3 -3
  123. package/esm/components/table-context/index.js +2 -2
  124. package/esm/components/table-context/index.js.map +1 -1
  125. package/esm/components/tbody/Component.d.ts +1 -1
  126. package/esm/components/tbody/Component.js.map +1 -1
  127. package/esm/components/tbody/index.css +1 -1
  128. package/esm/components/tbody/index.module.css.js +1 -1
  129. package/esm/components/tbody/index.module.css.js.map +1 -1
  130. package/esm/components/tcell/Component.d.ts +1 -1
  131. package/esm/components/tcell/Component.js.map +1 -1
  132. package/esm/components/tcell/index.css +6 -6
  133. package/esm/components/tcell/index.module.css.js +1 -1
  134. package/esm/components/tcell/index.module.css.js.map +1 -1
  135. package/esm/components/texpandable-row/Component.d.ts +2 -2
  136. package/esm/components/texpandable-row/Component.js +1 -1
  137. package/esm/components/texpandable-row/Component.js.map +1 -1
  138. package/esm/components/texpandable-row/index.css +4 -4
  139. package/esm/components/texpandable-row/index.module.css.js +1 -1
  140. package/esm/components/texpandable-row/index.module.css.js.map +1 -1
  141. package/esm/components/thead/Component.d.ts +1 -1
  142. package/esm/components/thead/Component.js.map +1 -1
  143. package/esm/components/thead/index.css +6 -6
  144. package/esm/components/thead/index.module.css.js +1 -1
  145. package/esm/components/thead/index.module.css.js.map +1 -1
  146. package/esm/components/thead-cell/Component.d.ts +2 -2
  147. package/esm/components/thead-cell/Component.js.map +1 -1
  148. package/esm/components/thead-cell/index.css +9 -9
  149. package/esm/components/thead-cell/index.module.css.js +1 -1
  150. package/esm/components/thead-cell/index.module.css.js.map +1 -1
  151. package/esm/components/trow/Component.d.ts +2 -2
  152. package/esm/components/trow/Component.js.map +1 -1
  153. package/esm/components/trow/index.css +10 -10
  154. package/esm/components/trow/index.module.css.js +1 -1
  155. package/esm/components/trow/index.module.css.js.map +1 -1
  156. package/esm/components/tsortable-head-cell/Component.d.ts +1 -1
  157. package/esm/components/tsortable-head-cell/Component.js.map +1 -1
  158. package/esm/components/tsortable-head-cell/index.css +10 -10
  159. package/esm/components/tsortable-head-cell/index.module.css.js +1 -1
  160. package/esm/components/tsortable-head-cell/index.module.css.js.map +1 -1
  161. package/esm/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
  162. package/esm/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
  163. package/esm/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
  164. package/esm/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
  165. package/esm/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
  166. package/esm/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
  167. package/modern/component.js.map +1 -1
  168. package/modern/components/pagination/Component.d.ts +2 -2
  169. package/modern/components/pagination/Component.js.map +1 -1
  170. package/modern/components/pagination/index.css +9 -9
  171. package/modern/components/pagination/index.module.css.js +1 -1
  172. package/modern/components/pagination/index.module.css.js.map +1 -1
  173. package/modern/components/pagination/select-field/index.css +3 -3
  174. package/modern/components/pagination/select-field/index.d.ts +1 -1
  175. package/modern/components/pagination/select-field/index.js.map +1 -1
  176. package/modern/components/pagination/select-field/index.module.css.js +1 -1
  177. package/modern/components/pagination/select-field/index.module.css.js.map +1 -1
  178. package/modern/components/table/Component.d.ts +1 -1
  179. package/modern/components/table/Component.js.map +1 -1
  180. package/modern/components/table/index.css +7 -7
  181. package/modern/components/table/index.module.css.js +1 -1
  182. package/modern/components/table/index.module.css.js.map +1 -1
  183. package/modern/components/table/utils.d.ts +1 -1
  184. package/modern/components/table/utils.js.map +1 -1
  185. package/modern/components/table-context/index.d.ts +3 -3
  186. package/modern/components/table-context/index.js +2 -2
  187. package/modern/components/table-context/index.js.map +1 -1
  188. package/modern/components/tbody/Component.d.ts +1 -1
  189. package/modern/components/tbody/Component.js.map +1 -1
  190. package/modern/components/tbody/index.css +1 -1
  191. package/modern/components/tbody/index.module.css.js +1 -1
  192. package/modern/components/tbody/index.module.css.js.map +1 -1
  193. package/modern/components/tcell/Component.d.ts +1 -1
  194. package/modern/components/tcell/Component.js.map +1 -1
  195. package/modern/components/tcell/index.css +6 -6
  196. package/modern/components/tcell/index.module.css.js +1 -1
  197. package/modern/components/tcell/index.module.css.js.map +1 -1
  198. package/modern/components/texpandable-row/Component.d.ts +2 -2
  199. package/modern/components/texpandable-row/Component.js +1 -1
  200. package/modern/components/texpandable-row/Component.js.map +1 -1
  201. package/modern/components/texpandable-row/index.css +4 -4
  202. package/modern/components/texpandable-row/index.module.css.js +1 -1
  203. package/modern/components/texpandable-row/index.module.css.js.map +1 -1
  204. package/modern/components/thead/Component.d.ts +1 -1
  205. package/modern/components/thead/Component.js.map +1 -1
  206. package/modern/components/thead/index.css +6 -6
  207. package/modern/components/thead/index.module.css.js +1 -1
  208. package/modern/components/thead/index.module.css.js.map +1 -1
  209. package/modern/components/thead-cell/Component.d.ts +2 -2
  210. package/modern/components/thead-cell/Component.js.map +1 -1
  211. package/modern/components/thead-cell/index.css +9 -9
  212. package/modern/components/thead-cell/index.module.css.js +1 -1
  213. package/modern/components/thead-cell/index.module.css.js.map +1 -1
  214. package/modern/components/trow/Component.d.ts +2 -2
  215. package/modern/components/trow/Component.js.map +1 -1
  216. package/modern/components/trow/index.css +10 -10
  217. package/modern/components/trow/index.module.css.js +1 -1
  218. package/modern/components/trow/index.module.css.js.map +1 -1
  219. package/modern/components/tsortable-head-cell/Component.d.ts +1 -1
  220. package/modern/components/tsortable-head-cell/Component.js.map +1 -1
  221. package/modern/components/tsortable-head-cell/index.css +10 -10
  222. package/modern/components/tsortable-head-cell/index.module.css.js +1 -1
  223. package/modern/components/tsortable-head-cell/index.module.css.js.map +1 -1
  224. package/modern/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
  225. package/modern/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
  226. package/modern/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
  227. package/modern/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
  228. package/modern/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
  229. package/modern/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
  230. package/moderncssm/component.js.map +1 -1
  231. package/moderncssm/components/pagination/Component.d.ts +2 -2
  232. package/moderncssm/components/pagination/Component.js.map +1 -1
  233. package/moderncssm/components/pagination/index.module.css +3 -1
  234. package/moderncssm/components/pagination/select-field/index.d.ts +1 -1
  235. package/moderncssm/components/pagination/select-field/index.js.map +1 -1
  236. package/moderncssm/components/pagination/select-field/index.module.css +2 -1
  237. package/moderncssm/components/table/Component.d.ts +1 -1
  238. package/moderncssm/components/table/Component.js.map +1 -1
  239. package/moderncssm/components/table/index.module.css +3 -1
  240. package/moderncssm/components/table/utils.d.ts +1 -1
  241. package/moderncssm/components/table/utils.js.map +1 -1
  242. package/moderncssm/components/table-context/index.d.ts +3 -3
  243. package/moderncssm/components/table-context/index.js +2 -2
  244. package/moderncssm/components/table-context/index.js.map +1 -1
  245. package/moderncssm/components/tbody/Component.d.ts +1 -1
  246. package/moderncssm/components/tbody/Component.js.map +1 -1
  247. package/moderncssm/components/tbody/index.module.css +2 -0
  248. package/moderncssm/components/tcell/Component.d.ts +1 -1
  249. package/moderncssm/components/tcell/Component.js.map +1 -1
  250. package/moderncssm/components/tcell/index.module.css +3 -1
  251. package/moderncssm/components/texpandable-row/Component.d.ts +2 -2
  252. package/moderncssm/components/texpandable-row/Component.js +1 -1
  253. package/moderncssm/components/texpandable-row/Component.js.map +1 -1
  254. package/moderncssm/components/texpandable-row/index.module.css +2 -0
  255. package/moderncssm/components/thead/Component.d.ts +1 -1
  256. package/moderncssm/components/thead/Component.js.map +1 -1
  257. package/moderncssm/components/thead/index.module.css +3 -1
  258. package/moderncssm/components/thead-cell/Component.d.ts +2 -2
  259. package/moderncssm/components/thead-cell/Component.js.map +1 -1
  260. package/moderncssm/components/thead-cell/index.module.css +3 -1
  261. package/moderncssm/components/trow/Component.d.ts +2 -2
  262. package/moderncssm/components/trow/Component.js.map +1 -1
  263. package/moderncssm/components/trow/index.module.css +5 -3
  264. package/moderncssm/components/tsortable-head-cell/Component.d.ts +1 -1
  265. package/moderncssm/components/tsortable-head-cell/Component.js.map +1 -1
  266. package/moderncssm/components/tsortable-head-cell/index.module.css +5 -3
  267. package/moderncssm/components/tsortable-head-cell/sort-icon-asc.d.ts +1 -1
  268. package/moderncssm/components/tsortable-head-cell/sort-icon-asc.js.map +1 -1
  269. package/moderncssm/components/tsortable-head-cell/sort-icon-desc.d.ts +1 -1
  270. package/moderncssm/components/tsortable-head-cell/sort-icon-desc.js.map +1 -1
  271. package/moderncssm/components/tsortable-head-cell/sort-icon-unset.d.ts +1 -1
  272. package/moderncssm/components/tsortable-head-cell/sort-icon-unset.js.map +1 -1
  273. package/package.json +3 -3
  274. package/src/components/pagination/Component.tsx +4 -4
  275. package/src/components/pagination/index.module.css +1 -1
  276. package/src/components/pagination/select-field/index.module.css +1 -1
  277. package/src/components/pagination/select-field/index.tsx +2 -2
  278. package/src/components/table/Component.tsx +8 -2
  279. package/src/components/table/index.module.css +1 -1
  280. package/src/components/table/utils.ts +1 -1
  281. package/src/components/table-context/{index.tsx → index.ts} +3 -3
  282. package/src/components/tbody/Component.tsx +1 -1
  283. package/src/components/tbody/index.module.css +1 -1
  284. package/src/components/tcell/Component.tsx +1 -1
  285. package/src/components/tcell/index.module.css +1 -1
  286. package/src/components/texpandable-row/Component.tsx +3 -3
  287. package/src/components/texpandable-row/index.module.css +1 -1
  288. package/src/components/thead/Component.tsx +1 -1
  289. package/src/components/thead/index.module.css +1 -1
  290. package/src/components/thead-cell/Component.tsx +2 -2
  291. package/src/components/thead-cell/index.module.css +1 -1
  292. package/src/components/trow/Component.tsx +2 -2
  293. package/src/components/trow/index.module.css +1 -1
  294. package/src/components/tsortable-head-cell/Component.tsx +1 -1
  295. package/src/components/tsortable-head-cell/index.module.css +1 -1
  296. package/src/components/tsortable-head-cell/sort-icon-asc.tsx +1 -1
  297. package/src/components/tsortable-head-cell/sort-icon-desc.tsx +1 -1
  298. package/src/components/tsortable-head-cell/sort-icon-unset.tsx +1 -1
  299. /package/src/{component.tsx → component.ts} +0 -0
@@ -12,7 +12,7 @@
12
12
  --gap-12: var(--gap-s);
13
13
  --gap-16: var(--gap-m);
14
14
  --gap-32: var(--gap-2xl);
15
- } .table__component_1aoq9 {
15
+ } .table__component_1e1mi {
16
16
  font-size: 12px;
17
17
  line-height: 16px;
18
18
  font-weight: 500;
@@ -26,24 +26,24 @@
26
26
  border-bottom: 1px solid var(--color-light-neutral-400);
27
27
  background: var(--color-light-base-bg-primary);
28
28
  vertical-align: top;
29
- box-sizing: border-box
30
- } .table__component_1aoq9:first-child {
29
+ box-sizing: border-box;
30
+ } .table__component_1e1mi:first-child {
31
31
  padding-left: var(--gap-16);
32
- } .table__component_1aoq9:last-child {
32
+ } .table__component_1e1mi:last-child {
33
33
  padding-right: var(--gap-16);
34
- } .table__component_1aoq9:not(.table__stickyHeader_1aoq9) {
34
+ } .table__component_1e1mi:not(.table__stickyHeader_1e1mi) {
35
35
  position: relative;
36
- } .table__sortable_1aoq9 {
36
+ } .table__sortable_1e1mi {
37
37
  cursor: pointer;
38
- } .table__sorted_1aoq9 {
38
+ } .table__sorted_1e1mi {
39
39
  color: var(--color-light-text-primary);
40
- } .table__stickyHeader_1aoq9 {
40
+ } .table__stickyHeader_1e1mi {
41
41
  top: var(--gap-0);
42
42
  position: sticky;
43
43
  box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);
44
44
  border: none;
45
45
  z-index: 1;
46
- } .table__compactHorizontal_1aoq9 {
46
+ } .table__compactHorizontal_1e1mi {
47
47
  padding-left: 6px;
48
48
  padding-right: 6px;
49
49
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"table__component_1aoq9","stickyHeader":"table__stickyHeader_1aoq9","compactHorizontal":"table__compactHorizontal_1aoq9"};
5
+ var styles = {"component":"table__component_1e1mi","stickyHeader":"table__stickyHeader_1e1mi","compactHorizontal":"table__compactHorizontal_1e1mi"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/thead-cell/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n @mixin paragraph_caps;\n\n line-height: 20px;\n text-align: left;\n color: var(--color-light-text-primary);\n padding: var(--gap-32) var(--gap-12) var(--gap-4);\n border-bottom: 1px solid var(--color-light-neutral-400);\n background: var(--color-light-base-bg-primary);\n vertical-align: top;\n box-sizing: border-box;\n\n &:first-child {\n padding-left: var(--gap-16);\n }\n\n &:last-child {\n padding-right: var(--gap-16);\n }\n\n &:not(.stickyHeader) {\n position: relative;\n }\n}\n\n.sortable {\n cursor: pointer;\n}\n\n.sorted {\n color: var(--color-light-text-primary);\n}\n\n.stickyHeader {\n top: var(--gap-0);\n position: sticky;\n box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);\n border: none;\n z-index: 1;\n}\n\n.compactHorizontal {\n padding-left: 6px;\n padding-right: 6px;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,cAAc,CAAC,2BAA2B,CAAmE,mBAAmB,CAAC,gCAAgC,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/thead-cell/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n @mixin paragraph_caps;\n\n line-height: 20px;\n text-align: left;\n color: var(--color-light-text-primary);\n padding: var(--gap-32) var(--gap-12) var(--gap-4);\n border-bottom: 1px solid var(--color-light-neutral-400);\n background: var(--color-light-base-bg-primary);\n vertical-align: top;\n box-sizing: border-box;\n\n &:first-child {\n padding-left: var(--gap-16);\n }\n\n &:last-child {\n padding-right: var(--gap-16);\n }\n\n &:not(.stickyHeader) {\n position: relative;\n }\n}\n\n.sortable {\n cursor: pointer;\n}\n\n.sorted {\n color: var(--color-light-text-primary);\n}\n\n.stickyHeader {\n top: var(--gap-0);\n position: sticky;\n box-shadow: inset 0 -1px 0 0 rgba(11, 31, 53, 0.16);\n border: none;\n z-index: 1;\n}\n\n.compactHorizontal {\n padding-left: 6px;\n padding-right: 6px;\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,cAAc,CAAC,2BAA2B,CAAmE,mBAAmB,CAAC,gCAAgC,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
- import React, { HTMLAttributes } from 'react';
2
- import { TCell, TCellProps } from '../tcell';
1
+ import React, { type HTMLAttributes } from 'react';
2
+ import { type TCell, type TCellProps } from '../tcell';
3
3
  declare type TCellElement = React.ReactElement<TCellProps, typeof TCell>;
4
4
  export declare type TRowProps = HTMLAttributes<HTMLTableRowElement> & {
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../src/components/trow/Component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport { TCell, TCellProps } from '../tcell';\n\nimport styles from './index.module.css';\n\ntype TCellElement = React.ReactElement<TCellProps, typeof TCell>;\n\nexport type TRowProps = HTMLAttributes<HTMLTableRowElement> & {\n /**\n * Компоненты ячеек\n */\n children: TCellElement | TCellElement[];\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Стиль выбранной строки\n */\n selected?: boolean;\n\n /**\n * Убирает нижнюю границу\n */\n withoutBorder?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const TRow = forwardRef<HTMLTableRowElement, TRowProps>(\n ({ children, className, selected, withoutBorder, dataTestId, ...restProps }, ref) => (\n <tr\n className={cn(styles.component, className, {\n [styles.clickable]: typeof restProps.onClick !== 'undefined',\n [styles.selected]: selected,\n [styles.withoutBorder]: withoutBorder,\n })}\n data-test-id={dataTestId}\n ref={ref}\n {...restProps}\n >\n {React.Children.map(children, (child, index) => React.cloneElement(child, { index }))}\n </tr>\n ),\n);\n\nTRow.displayName = 'TRow';\n"],"names":["forwardRef","__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;IAoCa,IAAI,GAAGA,gBAAU,CAC1B,UAAC,EAA0E,EAAE,GAAG,EAAA;;AAA7E,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,aAAa,GAAA,EAAA,CAAA,aAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAK,SAAS,GAAAC,YAAA,CAAA,EAAA,EAAxE,oEAA0E,CAAF;IAAY,QACjFC,sBACI,CAAA,aAAA,CAAA,IAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,YAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;YACrC,EAAC,CAAAA,YAAM,CAAC,SAAS,CAAA,GAAG,OAAO,SAAS,CAAC,OAAO,KAAK,WAAW;AAC5D,YAAA,EAAA,CAACA,YAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,YAAA,EAAA,CAACA,YAAM,CAAC,aAAa,CAAA,GAAG,aAAa;AACvC,YAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EACxB,GAAG,EAAE,GAAG,IACJ,SAAS,CAAA,EAEZH,sBAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAE,KAAK,EAAA,EAAK,OAAAA,sBAAK,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,KAAK,EAAA,KAAA,EAAE,CAAC,CAAA,EAAA,CAAC,CACpF;AACR,CAAA;AAGL,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../src/components/trow/Component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport { type TCell, type TCellProps } from '../tcell';\n\nimport styles from './index.module.css';\n\ntype TCellElement = React.ReactElement<TCellProps, typeof TCell>;\n\nexport type TRowProps = HTMLAttributes<HTMLTableRowElement> & {\n /**\n * Компоненты ячеек\n */\n children: TCellElement | TCellElement[];\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Стиль выбранной строки\n */\n selected?: boolean;\n\n /**\n * Убирает нижнюю границу\n */\n withoutBorder?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const TRow = forwardRef<HTMLTableRowElement, TRowProps>(\n ({ children, className, selected, withoutBorder, dataTestId, ...restProps }, ref) => (\n <tr\n className={cn(styles.component, className, {\n [styles.clickable]: typeof restProps.onClick !== 'undefined',\n [styles.selected]: selected,\n [styles.withoutBorder]: withoutBorder,\n })}\n data-test-id={dataTestId}\n ref={ref}\n {...restProps}\n >\n {React.Children.map(children, (child, index) => React.cloneElement(child, { index }))}\n </tr>\n ),\n);\n\nTRow.displayName = 'TRow';\n"],"names":["forwardRef","__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;IAoCa,IAAI,GAAGA,gBAAU,CAC1B,UAAC,EAA0E,EAAE,GAAG,EAAA;;AAA7E,IAAA,IAAA,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,aAAa,GAAA,EAAA,CAAA,aAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAK,SAAS,GAAAC,YAAA,CAAA,EAAA,EAAxE,oEAA0E,CAAF;IAAY,QACjFC,sBACI,CAAA,aAAA,CAAA,IAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,YAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;YACrC,EAAC,CAAAA,YAAM,CAAC,SAAS,CAAA,GAAG,OAAO,SAAS,CAAC,OAAO,KAAK,WAAW;AAC5D,YAAA,EAAA,CAACA,YAAM,CAAC,QAAQ,CAAA,GAAG,QAAQ;AAC3B,YAAA,EAAA,CAACA,YAAM,CAAC,aAAa,CAAA,GAAG,aAAa;AACvC,YAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EACxB,GAAG,EAAE,GAAG,IACJ,SAAS,CAAA,EAEZH,sBAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAE,KAAK,EAAA,EAAK,OAAAA,sBAAK,CAAC,YAAY,CAAC,KAAK,EAAE,EAAE,KAAK,EAAA,KAAA,EAAE,CAAC,CAAA,EAAA,CAAC,CACpF;AACR,CAAA;AAGL,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
@@ -3,22 +3,22 @@
3
3
  --color-light-base-bg-secondary: #f2f3f5;
4
4
  } :root {
5
5
  --color-static-graphic-solitude: #e8f2fe;
6
- } .table__component_1p5uy {
6
+ } .table__component_5osfn {
7
7
  padding-top: 1px;
8
8
  width: 100%;
9
9
  transition: background-color 0.2s;
10
10
  box-sizing: border-box;
11
- background: var(--color-light-base-bg-primary)
12
- } .table__component_1p5uy:first-child td {
11
+ background: var(--color-light-base-bg-primary);
12
+ } .table__component_5osfn:first-child td {
13
13
  border-top: 0;
14
- } .table__withoutBorder_1p5uy td {
14
+ } .table__withoutBorder_5osfn td {
15
15
  border: none;
16
- } .table__clickable_1p5uy {
17
- cursor: pointer
18
- } .table__clickable_1p5uy:hover {
16
+ } .table__clickable_5osfn {
17
+ cursor: pointer;
18
+ } .table__clickable_5osfn:hover {
19
19
  background-color: var(--color-light-base-bg-secondary);
20
- } .table__selected_1p5uy {
21
- background-color: #f2f8ff
22
- } .table__selected_1p5uy:hover {
20
+ } .table__selected_5osfn {
21
+ background-color: #f2f8ff;
22
+ } .table__selected_5osfn:hover {
23
23
  background-color: var(--color-static-graphic-solitude);
24
24
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"component":"table__component_1p5uy","withoutBorder":"table__withoutBorder_1p5uy","clickable":"table__clickable_1p5uy","selected":"table__selected_1p5uy"};
5
+ var styles = {"component":"table__component_5osfn","withoutBorder":"table__withoutBorder_5osfn","clickable":"table__clickable_5osfn","selected":"table__selected_5osfn"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/trow/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.component {\n padding-top: 1px;\n width: 100%;\n transition: background-color 0.2s;\n box-sizing: border-box;\n background: var(--color-light-base-bg-primary);\n\n &:first-child td {\n border-top: 0;\n }\n}\n\n.withoutBorder {\n & td {\n border: none;\n }\n}\n\n.clickable {\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-light-base-bg-secondary);\n }\n}\n\n.selected {\n background-color: #f2f8ff; /* нет цвета в палитре */\n\n &:hover {\n background-color: var(--color-static-graphic-solitude);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,eAAe,CAAC,4BAA4B,CAAC,WAAW,CAAC,wBAAwB,CAAC,UAAU,CAAC,uBAAuB,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/trow/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.component {\n padding-top: 1px;\n width: 100%;\n transition: background-color 0.2s;\n box-sizing: border-box;\n background: var(--color-light-base-bg-primary);\n\n &:first-child td {\n border-top: 0;\n }\n}\n\n.withoutBorder {\n & td {\n border: none;\n }\n}\n\n.clickable {\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-light-base-bg-secondary);\n }\n}\n\n.selected {\n background-color: #f2f8ff; /* нет цвета в палитре */\n\n &:hover {\n background-color: var(--color-static-graphic-solitude);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,WAAW,CAAC,wBAAwB,CAAC,eAAe,CAAC,4BAA4B,CAAC,WAAW,CAAC,wBAAwB,CAAC,UAAU,CAAC,uBAAuB,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { THeadCellProps } from '../thead-cell';
2
+ import { type THeadCellProps } from '../thead-cell';
3
3
  export declare type TSortableHeadCellProps = THeadCellProps & {
4
4
  isSortedDesc?: boolean;
5
5
  defaultIsSortedDesc?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../src/components/tsortable-head-cell/Component.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport cn from 'classnames';\n\nimport { THeadCell, THeadCellProps } from '../thead-cell';\n\nimport { SortIconAsc } from './sort-icon-asc';\nimport { SortIconDesc } from './sort-icon-desc';\nimport { SortIconUnset } from './sort-icon-unset';\n\nimport styles from './index.module.css';\n\nexport type TSortableHeadCellProps = THeadCellProps & {\n isSortedDesc?: boolean;\n defaultIsSortedDesc?: boolean;\n onSort?: () => void;\n};\n\nexport const TSortableHeadCell = ({\n children,\n className,\n defaultIsSortedDesc,\n isSortedDesc,\n textAlign,\n onSort,\n ...restProps\n}: TSortableHeadCellProps) => {\n const SortIcon = useMemo(() => {\n let value = isSortedDesc;\n\n if (value === undefined) value = defaultIsSortedDesc;\n\n if (typeof value === 'boolean') return value ? SortIconDesc : SortIconAsc;\n\n return SortIconUnset;\n }, [defaultIsSortedDesc, isSortedDesc]);\n\n return (\n <THeadCell className={className} textAlign={textAlign} {...restProps}>\n <div className={cn(styles.content, { [styles.reverse]: textAlign === 'right' })}>\n {children}\n <SortIcon\n onClick={onSort}\n className={cn(styles.icon, {\n [styles.sorted]: isSortedDesc !== undefined,\n })}\n />\n </div>\n </THeadCell>\n );\n};\n"],"names":["__rest","useMemo","SortIconDesc","SortIconAsc","SortIconUnset","React","THeadCell","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;;AAiBO,IAAM,iBAAiB,GAAG,UAAC,EAQT,EAAA;;IAPrB,IAAA,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,mBAAmB,yBAAA,EACnB,YAAY,kBAAA,EACZ,SAAS,eAAA,EACT,MAAM,YAAA,EACH,SAAS,GAPkBA,YAAA,CAAA,EAAA,EAAA,CAAA,UAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,cAAA,EAAA,WAAA,EAAA,QAAA,CAQjC,CADe;IAEZ,IAAM,QAAQ,GAAGC,aAAO,CAAC,YAAA;QACrB,IAAI,KAAK,GAAG,YAAY;QAExB,IAAI,KAAK,KAAK,SAAS;YAAE,KAAK,GAAG,mBAAmB;QAEpD,IAAI,OAAO,KAAK,KAAK,SAAS;YAAE,OAAO,KAAK,GAAGC,yBAAY,GAAGC,uBAAW;AAEzE,QAAA,OAAOC,2BAAa;AACxB,KAAC,EAAE,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;AAEvC,IAAA,QACIC,sBAAA,CAAA,aAAA,CAACC,mBAAS,EAAAC,cAAA,CAAA,EAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAA,EAAM,SAAS,CAAA;AAChE,QAAAF,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAEG,mBAAE,CAACC,YAAM,CAAC,OAAO,GAAA,EAAA,GAAA,EAAA,EAAI,EAAC,CAAAA,YAAM,CAAC,OAAO,CAAA,GAAG,SAAS,KAAK,OAAO,EAAG,EAAA,EAAA,EAAA;YAC1E,QAAQ;AACT,YAAAJ,sBAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EACL,OAAO,EAAE,MAAM,EACf,SAAS,EAAEG,mBAAE,CAACC,YAAM,CAAC,IAAI,GAAA,EAAA,GAAA,EAAA;AACrB,oBAAA,EAAA,CAACA,YAAM,CAAC,MAAM,CAAG,GAAA,YAAY,KAAK,SAAS;wBAC7C,EACJ,CAAA,CACA,CACE;AAEpB;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../src/components/tsortable-head-cell/Component.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport cn from 'classnames';\n\nimport { THeadCell, type THeadCellProps } from '../thead-cell';\n\nimport { SortIconAsc } from './sort-icon-asc';\nimport { SortIconDesc } from './sort-icon-desc';\nimport { SortIconUnset } from './sort-icon-unset';\n\nimport styles from './index.module.css';\n\nexport type TSortableHeadCellProps = THeadCellProps & {\n isSortedDesc?: boolean;\n defaultIsSortedDesc?: boolean;\n onSort?: () => void;\n};\n\nexport const TSortableHeadCell = ({\n children,\n className,\n defaultIsSortedDesc,\n isSortedDesc,\n textAlign,\n onSort,\n ...restProps\n}: TSortableHeadCellProps) => {\n const SortIcon = useMemo(() => {\n let value = isSortedDesc;\n\n if (value === undefined) value = defaultIsSortedDesc;\n\n if (typeof value === 'boolean') return value ? SortIconDesc : SortIconAsc;\n\n return SortIconUnset;\n }, [defaultIsSortedDesc, isSortedDesc]);\n\n return (\n <THeadCell className={className} textAlign={textAlign} {...restProps}>\n <div className={cn(styles.content, { [styles.reverse]: textAlign === 'right' })}>\n {children}\n <SortIcon\n onClick={onSort}\n className={cn(styles.icon, {\n [styles.sorted]: isSortedDesc !== undefined,\n })}\n />\n </div>\n </THeadCell>\n );\n};\n"],"names":["__rest","useMemo","SortIconDesc","SortIconAsc","SortIconUnset","React","THeadCell","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;;AAiBO,IAAM,iBAAiB,GAAG,UAAC,EAQ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8px;
7
7
  --gap-0: 0px;
8
8
  --gap-8: var(--gap-xs);
9
- } .table__content_1mbnt {
9
+ } .table__content_x3rxx {
10
10
  display: flex;
11
11
  align-items: flex-start;
12
- } .table__icon_1mbnt {
12
+ } .table__icon_x3rxx {
13
13
  cursor: pointer;
14
14
  margin-left: var(--gap-8);
15
15
  margin-top: 1px;
16
16
  color: var(--color-light-neutral-700);
17
17
  transition: color 0.2s ease;
18
- flex-shrink: 0
19
- } .table__icon_1mbnt:hover {
18
+ flex-shrink: 0;
19
+ } .table__icon_x3rxx:hover {
20
20
  color: var(--color-light-neutral-translucent-1300);
21
- } .table__reverse_1mbnt {
22
- flex-direction: row-reverse
23
- } .table__reverse_1mbnt .table__icon_1mbnt {
21
+ } .table__reverse_x3rxx {
22
+ flex-direction: row-reverse;
23
+ } .table__reverse_x3rxx .table__icon_x3rxx {
24
24
  margin-left: var(--gap-0);
25
25
  margin-right: var(--gap-8);
26
- } .table__sorted_1mbnt {
27
- color: var(--color-light-status-info)
28
- } .table__sorted_1mbnt:hover {
26
+ } .table__sorted_x3rxx {
27
+ color: var(--color-light-status-info);
28
+ } .table__sorted_x3rxx:hover {
29
29
  color: var(--color-light-status-info);
30
30
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  require('./index.css');
4
4
 
5
- var styles = {"content":"table__content_1mbnt","icon":"table__icon_1mbnt","reverse":"table__reverse_1mbnt","sorted":"table__sorted_1mbnt"};
5
+ var styles = {"content":"table__content_x3rxx","icon":"table__icon_x3rxx","reverse":"table__reverse_x3rxx","sorted":"table__sorted_x3rxx"};
6
6
 
7
7
  module.exports = styles;
8
8
  //# sourceMappingURL=index.module.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.module.css.js","sources":["../../src/components/tsortable-head-cell/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/index.css';\n\n.content {\n display: flex;\n align-items: flex-start;\n}\n\n.icon {\n cursor: pointer;\n margin-left: var(--gap-8);\n\n /**\n * иконка сортировки должна быть выровнена по верхнему краю,\n * т.к. текст может быть в две строки\n */\n margin-top: 1px;\n color: var(--color-light-neutral-700);\n transition: color 0.2s ease;\n flex-shrink: 0;\n\n &:hover {\n color: var(--color-light-neutral-translucent-1300);\n }\n}\n\n.reverse {\n flex-direction: row-reverse;\n\n & .icon {\n margin-left: var(--gap-0);\n margin-right: var(--gap-8);\n }\n}\n\n.sorted {\n color: var(--color-light-status-info);\n\n &:hover {\n color: var(--color-light-status-info);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,qBAAqB,CAAC;;;;"}
1
+ {"version":3,"file":"index.module.css.js","sources":["../../src/components/tsortable-head-cell/index.module.css"],"sourcesContent":["@import '@alfalab/core-components-vars/src/no-typography-index.css';\n\n.content {\n display: flex;\n align-items: flex-start;\n}\n\n.icon {\n cursor: pointer;\n margin-left: var(--gap-8);\n\n /**\n * иконка сортировки должна быть выровнена по верхнему краю,\n * т.к. текст может быть в две строки\n */\n margin-top: 1px;\n color: var(--color-light-neutral-700);\n transition: color 0.2s ease;\n flex-shrink: 0;\n\n &:hover {\n color: var(--color-light-neutral-translucent-1300);\n }\n}\n\n.reverse {\n flex-direction: row-reverse;\n\n & .icon {\n margin-left: var(--gap-0);\n margin-right: var(--gap-8);\n }\n}\n\n.sorted {\n color: var(--color-light-status-info);\n\n &:hover {\n color: var(--color-light-status-info);\n }\n}\n"],"names":[],"mappings":";;;;AAEgB,aAAe,CAAC,SAAS,CAAC,sBAAsB,CAAC,MAAM,CAAC,mBAAmB,CAAC,SAAS,CAAC,sBAAsB,CAAC,QAAQ,CAAC,qBAAqB,CAAC;;;;"}
@@ -1,2 +1,2 @@
1
- import React, { SVGProps } from 'react';
1
+ import React, { type SVGProps } from 'react';
2
2
  export declare const SortIconAsc: React.FC<SVGProps<SVGSVGElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"sort-icon-asc.js","sources":["../../src/components/tsortable-head-cell/sort-icon-asc.tsx"],"sourcesContent":["import React, { SVGProps } from 'react';\n\nexport const SortIconAsc: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3.00004 10C3.00004 10 11.4477 10 12 10C12 9.33333 12.0001 8.16667 12.0001 7.5H3.0001C3.00006 8 3.0001 9.5 3.00004 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H9C9 5.33333 9 4.16667 9 3.5C9 3.5 3.55238 3.5 3.0001 3.5ZM3.00009 14C3.21041 14 15 14 15 14C15 13.5 15 12 15 11.5C15 11.5 3.55238 11.5 3.00009 11.5C3 12 3 13.5 3.00009 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,WAAW,GAAsC,UAAC,KAAK,EAAK,EAAA,QACrEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,6UAA6U,EAAA,CAAG,CACtV,EACT;;;;"}
1
+ {"version":3,"file":"sort-icon-asc.js","sources":["../../src/components/tsortable-head-cell/sort-icon-asc.tsx"],"sourcesContent":["import React, { type SVGProps } from 'react';\n\nexport const SortIconAsc: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3.00004 10C3.00004 10 11.4477 10 12 10C12 9.33333 12.0001 8.16667 12.0001 7.5H3.0001C3.00006 8 3.0001 9.5 3.00004 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H9C9 5.33333 9 4.16667 9 3.5C9 3.5 3.55238 3.5 3.0001 3.5ZM3.00009 14C3.21041 14 15 14 15 14C15 13.5 15 12 15 11.5C15 11.5 3.55238 11.5 3.00009 11.5C3 12 3 13.5 3.00009 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,WAAW,GAAsC,UAAC,KAAK,EAAK,EAAA,QACrEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,6UAA6U,EAAA,CAAG,CACtV,EACT;;;;"}
@@ -1,2 +1,2 @@
1
- import React, { SVGProps } from 'react';
1
+ import React, { type SVGProps } from 'react';
2
2
  export declare const SortIconDesc: React.FC<SVGProps<SVGSVGElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"sort-icon-desc.js","sources":["../../src/components/tsortable-head-cell/sort-icon-desc.tsx"],"sourcesContent":["import React, { SVGProps } from 'react';\n\nexport const SortIconDesc: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3.00004 10C3.00004 10 11.4477 10 12 10C12 9.33333 12.0001 8.16667 12.0001 7.5H3.0001C3.00006 8 3.0001 9.5 3.00004 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H15C15 5.33333 15 4.16667 15 3.5C15 3.5 3.55238 3.5 3.0001 3.5ZM3.00009 14C3.21041 14 9 14 9 14C9 13.5 9 12 9 11.5C9 11.5 3.55238 11.5 3.00009 11.5C3 12 3 13.5 3.00009 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,YAAY,GAAsC,UAAC,KAAK,EAAK,EAAA,QACtEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4UAA4U,EAAA,CAAG,CACrV,EACT;;;;"}
1
+ {"version":3,"file":"sort-icon-desc.js","sources":["../../src/components/tsortable-head-cell/sort-icon-desc.tsx"],"sourcesContent":["import React, { type SVGProps } from 'react';\n\nexport const SortIconDesc: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3.00004 10C3.00004 10 11.4477 10 12 10C12 9.33333 12.0001 8.16667 12.0001 7.5H3.0001C3.00006 8 3.0001 9.5 3.00004 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H15C15 5.33333 15 4.16667 15 3.5C15 3.5 3.55238 3.5 3.0001 3.5ZM3.00009 14C3.21041 14 9 14 9 14C9 13.5 9 12 9 11.5C9 11.5 3.55238 11.5 3.00009 11.5C3 12 3 13.5 3.00009 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,YAAY,GAAsC,UAAC,KAAK,EAAK,EAAA,QACtEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4UAA4U,EAAA,CAAG,CACrV,EACT;;;;"}
@@ -1,2 +1,2 @@
1
- import React, { SVGProps } from 'react';
1
+ import React, { type SVGProps } from 'react';
2
2
  export declare const SortIconUnset: React.FC<SVGProps<SVGSVGElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"sort-icon-unset.js","sources":["../../src/components/tsortable-head-cell/sort-icon-unset.tsx"],"sourcesContent":["import React, { SVGProps } from 'react';\n\nexport const SortIconUnset: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3 10C3 10 10.4477 10 11 10C11 9.33333 11.0001 8.16667 11.0001 7.5H3.00006C3.00002 8 3.00006 9.5 3 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H15C15 5.33333 15 4.16667 15 3.5C15 3.5 3.55238 3.5 3.0001 3.5ZM3 14C3.21032 14 14 14 14 14C14 13.5 14 12 14 11.5C14 11.5 3.55228 11.5 3 11.5C2.99991 12 2.99991 13.5 3 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,aAAa,GAAsC,UAAC,KAAK,EAAK,EAAA,QACvEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4TAA4T,EAAA,CAAG,CACrU,EACT;;;;"}
1
+ {"version":3,"file":"sort-icon-unset.js","sources":["../../src/components/tsortable-head-cell/sort-icon-unset.tsx"],"sourcesContent":["import React, { type SVGProps } from 'react';\n\nexport const SortIconUnset: React.FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width='18'\n height='18'\n viewBox='0 0 18 18'\n fill='currentColor'\n xmlns='http://www.w3.org/2000/svg'\n focusable='false'\n role='img'\n {...props}\n >\n <path d='M3 10C3 10 10.4477 10 11 10C11 9.33333 11.0001 8.16667 11.0001 7.5H3.00006C3.00002 8 3.00006 9.5 3 10ZM3.0001 3.5C3.00003 4.16667 3 5.33333 3 6H15C15 5.33333 15 4.16667 15 3.5C15 3.5 3.55238 3.5 3.0001 3.5ZM3 14C3.21032 14 14 14 14 14C14 13.5 14 12 14 11.5C14 11.5 3.55228 11.5 3 11.5C2.99991 12 2.99991 13.5 3 14Z' />\n </svg>\n);\n"],"names":["React","__assign"],"mappings":";;;;;;;;;;;AAEa,IAAA,aAAa,GAAsC,UAAC,KAAK,EAAK,EAAA,QACvEA,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAAC,cAAA,CAAA,EACI,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAC,OAAO,EACjB,IAAI,EAAC,KAAK,IACN,KAAK,CAAA;IAETD,sBAAM,CAAA,aAAA,CAAA,MAAA,EAAA,EAAA,CAAC,EAAC,4TAA4T,EAAA,CAAG,CACrU,EACT;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"component.js","sources":["../src/component.tsx"],"sourcesContent":["import {\n Pagination,\n Table as TableComponent,\n TBody,\n TCell,\n TExpandableRow,\n THead,\n THeadCell,\n TRow,\n TSortableHeadCell,\n} from './components';\n\nexport const Table = Object.assign(TableComponent, {\n TBody,\n THead,\n THeadCell,\n TSortableHeadCell,\n TCell,\n TRow,\n TExpandableRow,\n Pagination,\n});\n\nexport {\n TableComponent,\n TBody,\n THead,\n THeadCell,\n TSortableHeadCell,\n TCell,\n TRow,\n TExpandableRow,\n Pagination,\n};\n"],"names":["TableComponent","TBody","THead","THeadCell","TSortableHeadCell","TCell","TRow","TExpandableRow","Pagination"],"mappings":";;;;;;;;;;;;;;IAYa,KAAK,GAAG,MAAM,CAAC,MAAM,CAACA,eAAc,EAAE;AAC/C,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,SAAS,EAAAC,qBAAA;AACT,IAAA,iBAAiB,EAAAC,6BAAA;AACjB,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,IAAI,EAAAC,gBAAA;AACJ,IAAA,cAAc,EAAAC,0BAAA;AACd,IAAA,UAAU,EAAAC,sBAAA;AACb,CAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"component.js","sources":["../src/component.ts"],"sourcesContent":["import {\n Pagination,\n Table as TableComponent,\n TBody,\n TCell,\n TExpandableRow,\n THead,\n THeadCell,\n TRow,\n TSortableHeadCell,\n} from './components';\n\nexport const Table = Object.assign(TableComponent, {\n TBody,\n THead,\n THeadCell,\n TSortableHeadCell,\n TCell,\n TRow,\n TExpandableRow,\n Pagination,\n});\n\nexport {\n TableComponent,\n TBody,\n THead,\n THeadCell,\n TSortableHeadCell,\n TCell,\n TRow,\n TExpandableRow,\n Pagination,\n};\n"],"names":["TableComponent","TBody","THead","THeadCell","TSortableHeadCell","TCell","TRow","TExpandableRow","Pagination"],"mappings":";;;;;;;;;;;;;;IAYa,KAAK,GAAG,MAAM,CAAC,MAAM,CAACA,eAAc,EAAE;AAC/C,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,SAAS,EAAAC,qBAAA;AACT,IAAA,iBAAiB,EAAAC,6BAAA;AACjB,IAAA,KAAK,EAAAC,iBAAA;AACL,IAAA,IAAI,EAAAC,gBAAA;AACJ,IAAA,cAAc,EAAAC,0BAAA;AACd,IAAA,UAAU,EAAAC,sBAAA;AACb,CAAA;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import { PaginationProps as CorePaginationProps } from '@alfalab/core-components-pagination/cssm';
1
+ import { type FC } from 'react';
2
+ import { type PaginationProps as CorePaginationProps } from '@alfalab/core-components-pagination/cssm';
3
3
  export declare type PaginationProps = CorePaginationProps & {
4
4
  /**
5
5
  * Количество строк на страницу
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/pagination/Component.tsx"],"sourcesContent":["import React, { FC, useCallback, useContext, useMemo } from 'react';\nimport cn from 'classnames';\n\nimport {\n Pagination as CorePagination,\n PaginationProps as CorePaginationProps,\n} from '@alfalab/core-components-pagination';\nimport { SelectDesktop, SelectDesktopProps } from '@alfalab/core-components-select/desktop';\nimport { BaseSelectChangePayload } from '@alfalab/core-components-select/shared';\n\nimport { TableContext } from '../table-context';\n\nimport { CustomSelectField } from './select-field';\n\nimport styles from './index.module.css';\n\nexport type PaginationProps = CorePaginationProps & {\n /**\n * Количество строк на страницу\n */\n perPage?: number;\n\n /**\n * Возможные варианты разбивки\n */\n possiblePerPage?: number[];\n\n /**\n * Обработчик переключения perPage\n */\n onPerPageChange?: (perPage: number) => void;\n\n /**\n * Скрывает переключатель количества строк на страницу\n */\n hidePerPageSelect?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const Pagination: FC<PaginationProps> = ({\n perPage = 25,\n possiblePerPage = [25, 50, 100],\n onPerPageChange = () => null,\n hidePerPageSelect = false,\n pagesCount,\n onPageChange = () => null,\n className,\n dataTestId,\n ...restPaginationProps\n}) => {\n const { wrapperRef } = useContext(TableContext);\n\n const options = useMemo(\n () =>\n Array.from(new Set<number>(possiblePerPage.concat(perPage)))\n .sort((a, b) => a - b)\n .map((value) => ({\n key: value.toString(),\n content: `Показывать по ${value}`,\n })),\n [perPage, possiblePerPage],\n );\n\n const handlePerPageChange: SelectDesktopProps['onChange'] = useCallback(\n ({ selected }: BaseSelectChangePayload) => {\n onPerPageChange(Number(selected?.key));\n },\n [onPerPageChange],\n );\n\n const handlePageChange = useCallback(\n (pageIndex: number) => {\n onPageChange(pageIndex);\n\n setTimeout(() => {\n if (wrapperRef.current) {\n wrapperRef.current.scrollIntoView();\n }\n }, 0);\n },\n [onPageChange, wrapperRef],\n );\n\n return (\n <div className={cn(styles.component, className)} data-test-id={dataTestId}>\n {hidePerPageSelect === false && (\n <SelectDesktop\n options={options}\n selected={perPage.toString()}\n onChange={handlePerPageChange}\n preventFlip={false}\n size='s'\n className={styles.select}\n optionsListClassName={styles.menu}\n optionClassName={styles.option}\n Field={CustomSelectField}\n />\n )}\n\n {pagesCount > 1 && (\n <CorePagination\n pagesCount={pagesCount}\n onPageChange={handlePageChange}\n className={styles.pagination}\n {...restPaginationProps}\n />\n )}\n </div>\n );\n};\n"],"names":["__rest","useContext","TableContext","useMemo","useCallback","React","cn","styles","SelectDesktop","CustomSelectField","CorePagination","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;AA2CO,IAAM,UAAU,GAAwB,UAAC,EAU/C,EAAA;AATG,IAAA,IAAA,EAAY,GAAA,EAAA,CAAA,OAAA,EAAZ,OAAO,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACZ,EAAA,GAAA,EAAA,CAAA,eAA+B,EAA/B,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,EAAE,EAAE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":["../../../src/components/pagination/Component.tsx"],"sourcesContent":["import React, { type FC, useCallback, useContext, useMemo } from 'react';\nimport cn from 'classnames';\n\nimport {\n Pagination as CorePagination,\n type PaginationProps as CorePaginationProps,\n} from '@alfalab/core-components-pagination';\nimport { SelectDesktop, type SelectDesktopProps } from '@alfalab/core-components-select/desktop';\nimport { type BaseSelectChangePayload } from '@alfalab/core-components-select/shared';\n\nimport { TableContext } from '../table-context';\n\nimport { CustomSelectField } from './select-field';\n\nimport styles from './index.module.css';\n\nexport type PaginationProps = CorePaginationProps & {\n /**\n * Количество строк на страницу\n */\n perPage?: number;\n\n /**\n * Возможные варианты разбивки\n */\n possiblePerPage?: number[];\n\n /**\n * Обработчик переключения perPage\n */\n onPerPageChange?: (perPage: number) => void;\n\n /**\n * Скрывает переключатель количества строк на страницу\n */\n hidePerPageSelect?: boolean;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const Pagination: FC<PaginationProps> = ({\n perPage = 25,\n possiblePerPage = [25, 50, 100],\n onPerPageChange = () => null,\n hidePerPageSelect = false,\n pagesCount,\n onPageChange = () => null,\n className,\n dataTestId,\n ...restPaginationProps\n}) => {\n const { wrapperRef } = useContext(TableContext);\n\n const options = useMemo(\n () =>\n Array.from(new Set<number>(possiblePerPage.concat(perPage)))\n .sort((a, b) => a - b)\n .map((value) => ({\n key: value.toString(),\n content: `Показывать по ${value}`,\n })),\n [perPage, possiblePerPage],\n );\n\n const handlePerPageChange: SelectDesktopProps['onChange'] = useCallback(\n ({ selected }: BaseSelectChangePayload) => {\n onPerPageChange(Number(selected?.key));\n },\n [onPerPageChange],\n );\n\n const handlePageChange = useCallback(\n (pageIndex: number) => {\n onPageChange(pageIndex);\n\n setTimeout(() => {\n if (wrapperRef.current) {\n wrapperRef.current.scrollIntoView();\n }\n }, 0);\n },\n [onPageChange, wrapperRef],\n );\n\n return (\n <div className={cn(styles.component, className)} data-test-id={dataTestId}>\n {hidePerPageSelect === false && (\n <SelectDesktop\n options={options}\n selected={perPage.toString()}\n onChange={handlePerPageChange}\n preventFlip={false}\n size='s'\n className={styles.select}\n optionsListClassName={styles.menu}\n optionClassName={styles.option}\n Field={CustomSelectField}\n />\n )}\n\n {pagesCount > 1 && (\n <CorePagination\n pagesCount={pagesCount}\n onPageChange={handlePageChange}\n className={styles.pagination}\n {...restPaginationProps}\n />\n )}\n </div>\n );\n};\n"],"names":["__rest","useContext","TableContext","useMemo","useCallback","React","cn","styles","SelectDesktop","CustomSelectField","CorePagination","__assign"],"mappings":";;;;;;;;;;;;;;;;;;;AA2CO,IAAM,UAAU,GAAwB,UAAC,EAU/C,EAAA;AATG,IAAA,IAAA,EAAY,GAAA,EAAA,CAAA,OAAA,EAAZ,OAAO,GAAA,EAAA,KAAA,MAAA,GAAG,EAAE,GAAA,EAAA,EACZ,EAAA,GAAA,EAAA,CAAA,eAA+B,EAA/B,eAAe,GAAG,EAAA,KAAA,MAAA,GAAA,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,GAAA,EAAA,EAC/B,EAA4B,GAAA,EAAA,CAAA,eAAA,EAA5B,eAAe,GAAA,EAAA,KAAA,MAAA,GAAG,YAAM,EAAA,OAAA,IAAI,CAAA,EAAA,GAAA,EAAA,EAC5B,EAAA,GAAA,EAAA,CAAA,iBAAyB,EAAzB,iBAAiB,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,GAAA,EAAA,EACzB,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,EAAA,GAAA,EAAA,CAAA,YAAyB,EAAzB,YAAY,GAAG,EAAA,KAAA,MAAA,GAAA,YAAA,EAAM,OAAA,IAAI,CAAJ,EAAI,GAAA,EAAA,EACzB,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,UAAU,GAAA,EAAA,CAAA,UAAA,EACP,mBAAmB,GAAAA,YAAA,CAAA,EAAA,EATsB,+HAU/C,CADyB;AAEd,IAAA,IAAA,UAAU,GAAKC,gBAAU,CAACC,kBAAY,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K,KAAK,KACxBF,sBAAA,CAAA,aAAA,CAACG,qBAAa,EACV,EAAA,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,EAC5B,QAAQ,EAAE,mBAAmB,EAC7B,WAAW,EAAE,KAAK,EAClB,IAAI,EAAC,GAAG,EACR,SAAS,EAAED,uBAAM,CAAC,MAAM,EACxB,oBAAoB,EAAEA,uBAAM,CAAC,IAAI,EACjC,eAAe,EAAEA,uBAAM,CAAC,MAAM,EAC9B,KAAK,EAAEE,yBAAiB,EAAA,CAC1B,CACL;QAEA,UAAU,GAAG,CAAC,KACXJ,sBAAA,CAAA,aAAA,CAACK,eAAc,EAAAC,cAAA,CAAA,EACX,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,gBAAgB,EAC9B,SAAS,EAAEJ,uBAAM,CAAC,UAAU,EACxB,EAAA,mBAAmB,CACzB,CAAA,CACL,CACC;AAEd;;;;"}
@@ -28,7 +28,7 @@
28
28
  flex-shrink: 0;
29
29
  margin-right: var(--gap-8);
30
30
  padding: var(--gap-0) var(--gap-8);
31
- min-width: 32px
31
+ min-width: 32px;
32
32
  } .tag.tag:last-child {
33
33
  margin-right: var(--gap-0);
34
34
  } .tag.tag.tagActive {
@@ -1,2 +1,2 @@
1
- import { SelectProps } from '@alfalab/core-components-select/cssm';
1
+ import { type SelectProps } from '@alfalab/core-components-select/cssm';
2
2
  export declare const CustomSelectField: SelectProps['Field'];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/pagination/select-field/index.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { Button, ButtonProps } from '@alfalab/core-components-button';\nimport { SelectProps } from '@alfalab/core-components-select';\n\nimport styles from './index.module.css';\n\nexport const CustomSelectField: SelectProps['Field'] = ({ selected, innerProps, Arrow, open }) => {\n const { ref, ...restInnerProps } = innerProps;\n\n return (\n <div ref={ref}>\n <Button\n {...(restInnerProps as ButtonProps)}\n size='xxs'\n view='transparent'\n className={cn(styles.field, { [styles.open]: open })}\n rightAddons={Arrow}\n >\n {selected?.content}\n </Button>\n </div>\n );\n};\n"],"names":["__rest","React","Button","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAQO,IAAM,iBAAiB,GAAyB,UAAC,EAAqC,EAAA;;QAAnC,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA;IAC/E,IAAA,GAAG,GAAwB,UAAU,CAAlC,GAAA,EAAK,cAAc,GAAAA,YAAA,CAAK,UAAU,EAAvC,CAA0B,KAAA,CAAA,CAAF;AAE9B,IAAA,QACIC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,GAAG,EAAA;AACT,QAAAA,sBAAA,CAAA,aAAA,CAACC,WAAM,EACEC,cAAA,CAAA,EAAA,EAAA,cAA8B,IACnC,IAAI,EAAC,KAAK,EACV,IAAI,EAAC,aAAa,EAClB,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,KAAK,GAAI,EAAA,GAAA,EAAA,EAAA,EAAA,CAACA,uBAAM,CAAC,IAAI,CAAG,GAAA,IAAI,MAAG,EACpD,WAAW,EAAE,KAAK,EAAA,CAAA,EAEjB,QAAQ,KAAR,IAAA,IAAA,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CACb,CACP;AAEd;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/pagination/select-field/index.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nimport { Button, type ButtonProps } from '@alfalab/core-components-button';\nimport { type SelectProps } from '@alfalab/core-components-select';\n\nimport styles from './index.module.css';\n\nexport const CustomSelectField: SelectProps['Field'] = ({ selected, innerProps, Arrow, open }) => {\n const { ref, ...restInnerProps } = innerProps;\n\n return (\n <div ref={ref}>\n <Button\n {...(restInnerProps as ButtonProps)}\n size='xxs'\n view='transparent'\n className={cn(styles.field, { [styles.open]: open })}\n rightAddons={Arrow}\n >\n {selected?.content}\n </Button>\n </div>\n );\n};\n"],"names":["__rest","React","Button","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAQO,IAAM,iBAAiB,GAAyB,UAAC,EAAqC,EAAA;;QAAnC,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAE,KAAK,GAAA,EAAA,CAAA,KAAA,EAAE,IAAI,GAAA,EAAA,CAAA,IAAA;IAC/E,IAAA,GAAG,GAAwB,UAAU,CAAlC,GAAA,EAAK,cAAc,GAAAA,YAAA,CAAK,UAAU,EAAvC,CAA0B,KAAA,CAAA,CAAF;AAE9B,IAAA,QACIC,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,GAAG,EAAA;AACT,QAAAA,sBAAA,CAAA,aAAA,CAACC,WAAM,EACEC,cAAA,CAAA,EAAA,EAAA,cAA8B,IACnC,IAAI,EAAC,KAAK,EACV,IAAI,EAAC,aAAa,EAClB,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,KAAK,GAAI,EAAA,GAAA,EAAA,EAAA,EAAA,CAACA,uBAAM,CAAC,IAAI,CAAG,GAAA,IAAI,MAAG,EACpD,WAAW,EAAE,KAAK,EAAA,CAAA,EAEjB,QAAQ,KAAR,IAAA,IAAA,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CACb,CACP;AAEd;;;;"}
@@ -1,4 +1,4 @@
1
- import React, { ReactNode, TableHTMLAttributes } from 'react';
1
+ import React, { type ReactNode, type TableHTMLAttributes } from 'react';
2
2
  export declare type TableProps = TableHTMLAttributes<HTMLTableElement> & {
3
3
  /**
4
4
  * Компактный вид
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/table/Component.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode, TableHTMLAttributes, useMemo, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { ColumnConfiguration, TableContext } from '../table-context';\n\nimport { findAllHeadCellsProps } from './utils';\n\nimport styles from './index.module.css';\n\nexport type TableProps = TableHTMLAttributes<HTMLTableElement> & {\n /**\n * Компактный вид\n */\n compactView?: boolean;\n\n /**\n * Уменьшение горизонтальных паддингов\n */\n compactHorizontal?: boolean;\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дочерние компоненты\n */\n children: React.ReactElement | React.ReactElement[];\n\n /**\n * Оборачивает таблицу в стилизованный контейнер\n */\n wrapper?: boolean;\n\n /**\n * Слот для пагинации\n */\n pagination?: ReactNode;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n\n /**\n * Если true то заголовок будет фиксироваться при скроле\n */\n stickyHeader?: boolean;\n};\n\nexport const Table = forwardRef<HTMLTableElement, TableProps>(\n (\n {\n className,\n children,\n compactView = false,\n compactHorizontal = false,\n wrapper = true,\n pagination,\n dataTestId,\n stickyHeader = false,\n ...restProps\n },\n ref,\n ) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const columnsConfiguration: ColumnConfiguration[] = useMemo(\n () =>\n findAllHeadCellsProps(children).map((columnProps, index) => ({\n width: columnProps.width,\n textAlign: columnProps.textAlign,\n hidden: columnProps.hidden,\n index,\n })),\n [children],\n );\n\n /* eslint-disable react/jsx-no-constructed-context-values */\n return (\n <TableContext.Provider\n value={{\n stickyHeader,\n columnsConfiguration,\n compactView,\n compactHorizontal,\n wrapperRef,\n }}\n >\n <div\n ref={wrapperRef}\n className={cn(styles.component, className, {\n [styles.wrapper]: wrapper,\n [styles.hasPagination]: !!pagination,\n [styles.stickyHeader]: stickyHeader,\n })}\n data-test-id={dataTestId}\n >\n <table ref={ref} className={styles.table} {...restProps}>\n {children}\n </table>\n\n {pagination}\n </div>\n </TableContext.Provider>\n );\n },\n);\n"],"names":["forwardRef","__rest","useRef","useMemo","findAllHeadCellsProps","React","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AA,iBAAA;AACjB,YAAA,UAAU,EAAA,UAAA;AACb,SAAA,EAAA;AAED,QAAAD,sBAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EACI,GAAG,EAAE,UAAU,EACf,SAAS,EAAEE,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,GAAA,EAAA,GAAA,EAAA;AACrC,gBAAA,EAAA,CAACA,uBAAM,CAAC,OAAO,CAAA,GAAG,OAAO;AACzB,gBAAA,EAAA,CAACA,uBAAM,CAAC,aAAa,CAAG,GAAA,CAAC,CAAC,UAAU;AACpC,gBAAA,EAAA,CAACA,uBAAM,CAAC,YAAY,CAAA,GAAG,YAAY;AACrC,gBAAA,EAAA,EAAA,EAAA,cAAA,EACY,UAAU,EAAA;AAExB,YAAAH,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAAI,cAAA,CAAA,EAAO,GAAG,EAAE,GAAG,EAAE,SAAS,EAAED,uBAAM,CAAC,KAAK,EAAA,EAAM,SAAS,CAAA,EAClD,QAAQ,CACL;YAEP,UAAU,CACT,CACc;AAEhC,CAAC;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/table/Component.tsx"],"sourcesContent":["import React, {\n forwardRef,\n type ReactNode,\n type TableHTMLAttributes,\n useMemo,\n useRef,\n} from 'react';\nimport cn from 'classnames';\n\nimport { type ColumnConfiguration, TableContext } from '../table-context';\n\nimport { findAllHeadCellsProps } from './utils';\n\nimport styles from './index.module.css';\n\nexport type TableProps = TableHTMLAttributes<HTMLTableElement> & {\n /**\n * Компактный вид\n */\n compactView?: boolean;\n\n /**\n * Уменьшение горизонтальных паддингов\n */\n compactHorizontal?: boolean;\n\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дочерние компоненты\n */\n children: React.ReactElement | React.ReactElement[];\n\n /**\n * Оборачивает таблицу в стилизованный контейнер\n */\n wrapper?: boolean;\n\n /**\n * Слот для пагинации\n */\n pagination?: ReactNode;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n\n /**\n * Если true то заголовок будет фиксироваться при скроле\n */\n stickyHeader?: boolean;\n};\n\nexport const Table = forwardRef<HTMLTableElement, TableProps>(\n (\n {\n className,\n children,\n compactView = false,\n compactHorizontal = false,\n wrapper = true,\n pagination,\n dataTestId,\n stickyHeader = false,\n ...restProps\n },\n ref,\n ) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const columnsConfiguration: ColumnConfiguration[] = useMemo(\n () =>\n findAllHeadCellsProps(children).map((columnProps, index) => ({\n width: columnProps.width,\n textAlign: columnProps.textAlign,\n hidden: columnProps.hidden,\n index,\n })),\n [children],\n );\n\n /* eslint-disable react/jsx-no-constructed-context-values */\n return (\n <TableContext.Provider\n value={{\n stickyHeader,\n columnsConfiguration,\n compactView,\n compactHorizontal,\n wrapperRef,\n }}\n >\n <div\n ref={wrapperRef}\n className={cn(styles.component, className, {\n [styles.wrapper]: wrapper,\n [styles.hasPagination]: !!pagination,\n [styles.stickyHeader]: stickyHeader,\n })}\n data-test-id={dataTestId}\n >\n <table ref={ref} className={styles.table} {...restProps}>\n {children}\n </table>\n\n {pagination}\n </div>\n </TableContext.Provider>\n );\n },\n);\n"],"names":["forwardRef","__rest","useRef","useMemo","findAllHeadCellsProps","React","TableContext","cn","styles","__assign"],"mappings":";;;;;;;;;;;;;;;;;IAyDa,KAAK,GAAGA,gBAAU,CAC3B,UACI,EAUC,EACD,GAAG,EAAA;;AAVC,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,mBAAmB,EAAnB,WAAW,mBAAG,KAAK,GAAA,EAAA,EACnB,EAAyB,GAAA,EAAA,CAAA,iBAAA,EAAzB,iBAAiB,GAAG,EAAA,KAAA,MAAA,GAAA,KAAK,KAAA,EACzB,EAAA,GAAA,EAAA,CAAA,OAAc,EAAd,OAAO,GAAA,EAAA,KAAA,MAAA,GAAG,IAAI,GAAA,EAAA,EAC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,EAAA,cAAA,EACY,UAAU,EAAA;AAExB,YAAAH,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAAI,cAAA,CAAA,EAAO,GAAG,EAAE,GAAG,EAAE,SAAS,EAAED,uBAAM,CAAC,KAAK,EAAA,EAAM,SAAS,CAAA,EAClD,QAAQ,CACL;YAEP,UAAU,CACT,CACc;AAEhC,CAAC;;;;"}
@@ -24,7 +24,7 @@
24
24
  } .table {
25
25
  width: 100%;
26
26
  border-collapse: collapse;
27
- box-sizing: border-box
27
+ box-sizing: border-box;
28
28
  } .table td:first-child label > *[class^='box'], .table th:first-child label > *[class^='box'] {
29
29
  margin-top: var(--gap-0);
30
30
  }
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- import { THeadCellProps } from '../thead-cell';
2
+ import { type THeadCellProps } from '../thead-cell';
3
3
  export declare function findAllHeadCellsProps(children: React.ReactElement | React.ReactElement[]): THeadCellProps[];
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/components/table/utils.ts"],"sourcesContent":["import React from 'react';\n\nimport { isChildInstanceOf } from '../../utils';\nimport { THead } from '../thead';\nimport { THeadCellProps } from '../thead-cell';\n\nexport function findAllHeadCellsProps(children: React.ReactElement | React.ReactElement[]) {\n const result: THeadCellProps[] = [];\n\n React.Children.forEach(children, (child) => {\n if (isChildInstanceOf(child, THead)) {\n React.Children.forEach(child.props.children, (headChild) => {\n result.push(headChild.props);\n });\n }\n });\n\n return result;\n}\n"],"names":["React","isChildInstanceOf","THead"],"mappings":";;;;;;;;;;;;AAMM,SAAU,qBAAqB,CAAC,QAAmD,EAAA;IACrF,IAAM,MAAM,GAAqB,EAAE;IAEnCA,sBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAA;AACnC,QAAA,IAAIC,uBAAiB,CAAC,KAAK,EAAEC,eAAK,CAAC,EAAE;AACjC,YAAAF,sBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAC,SAAS,EAAA;AACnD,gBAAA,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AAChC,aAAC,CAAC;AACL;AACL,KAAC,CAAC;AAEF,IAAA,OAAO,MAAM;AACjB;;;;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/components/table/utils.ts"],"sourcesContent":["import React from 'react';\n\nimport { isChildInstanceOf } from '../../utils';\nimport { THead } from '../thead';\nimport { type THeadCellProps } from '../thead-cell';\n\nexport function findAllHeadCellsProps(children: React.ReactElement | React.ReactElement[]) {\n const result: THeadCellProps[] = [];\n\n React.Children.forEach(children, (child) => {\n if (isChildInstanceOf(child, THead)) {\n React.Children.forEach(child.props.children, (headChild) => {\n result.push(headChild.props);\n });\n }\n });\n\n return result;\n}\n"],"names":["React","isChildInstanceOf","THead"],"mappings":";;;;;;;;;;;;AAMM,SAAU,qBAAqB,CAAC,QAAmD,EAAA;IACrF,IAAM,MAAM,GAAqB,EAAE;IAEnCA,sBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,UAAC,KAAK,EAAA;AACnC,QAAA,IAAIC,uBAAiB,CAAC,KAAK,EAAEC,eAAK,CAAC,EAAE;AACjC,YAAAF,sBAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,UAAC,SAAS,EAAA;AACnD,gBAAA,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;AAChC,aAAC,CAAC;AACL;AACL,KAAC,CAAC;AAEF,IAAA,OAAO,MAAM;AACjB;;;;"}
@@ -1,5 +1,5 @@
1
- import React, { RefObject } from 'react';
2
- import { TextAlignProperty } from '../../typings';
1
+ import { type RefObject } from 'react';
2
+ import { type TextAlignProperty } from '../../typings';
3
3
  export declare type ColumnConfiguration = {
4
4
  width?: string | number;
5
5
  textAlign?: TextAlignProperty;
@@ -14,4 +14,4 @@ export declare type TableContextType = {
14
14
  wrapperRef: RefObject<HTMLDivElement>;
15
15
  };
16
16
  export declare const DEFAULT_TABLE_CONTEXT: TableContextType;
17
- export declare const TableContext: React.Context<TableContextType>;
17
+ export declare const TableContext: import("react").Context<TableContextType>;
@@ -4,10 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var React = require('react');
6
6
 
7
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
-
9
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
-
11
7
  var DEFAULT_TABLE_CONTEXT = {
12
8
  columnsConfiguration: [],
13
9
  compactView: false,
@@ -15,7 +11,7 @@ var DEFAULT_TABLE_CONTEXT = {
15
11
  compactHorizontal: false,
16
12
  wrapperRef: { current: null },
17
13
  };
18
- var TableContext = React__default.default.createContext(DEFAULT_TABLE_CONTEXT);
14
+ var TableContext = React.createContext(DEFAULT_TABLE_CONTEXT);
19
15
 
20
16
  exports.DEFAULT_TABLE_CONTEXT = DEFAULT_TABLE_CONTEXT;
21
17
  exports.TableContext = TableContext;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/table-context/index.tsx"],"sourcesContent":["import React, { RefObject } from 'react';\n\nimport { TextAlignProperty } from '../../typings';\n\nexport type ColumnConfiguration = {\n width?: string | number;\n textAlign?: TextAlignProperty;\n hidden?: boolean;\n index: number;\n};\n\nexport type TableContextType = {\n columnsConfiguration: ColumnConfiguration[];\n stickyHeader: boolean;\n compactView: boolean;\n compactHorizontal: boolean;\n wrapperRef: RefObject<HTMLDivElement>;\n};\n\nexport const DEFAULT_TABLE_CONTEXT: TableContextType = {\n columnsConfiguration: [],\n compactView: false,\n stickyHeader: false,\n compactHorizontal: false,\n wrapperRef: { current: null },\n};\n\nexport const TableContext = React.createContext<TableContextType>(DEFAULT_TABLE_CONTEXT);\n"],"names":["React"],"mappings":";;;;;;;;;;AAmBa,IAAA,qBAAqB,GAAqB;AACnD,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,iBAAiB,EAAE,KAAK;AACxB,IAAA,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;;AAGpB,IAAA,YAAY,GAAGA,sBAAK,CAAC,aAAa,CAAmB,qBAAqB;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/table-context/index.ts"],"sourcesContent":["import { createContext, type RefObject } from 'react';\n\nimport { type TextAlignProperty } from '../../typings';\n\nexport type ColumnConfiguration = {\n width?: string | number;\n textAlign?: TextAlignProperty;\n hidden?: boolean;\n index: number;\n};\n\nexport type TableContextType = {\n columnsConfiguration: ColumnConfiguration[];\n stickyHeader: boolean;\n compactView: boolean;\n compactHorizontal: boolean;\n wrapperRef: RefObject<HTMLDivElement>;\n};\n\nexport const DEFAULT_TABLE_CONTEXT: TableContextType = {\n columnsConfiguration: [],\n compactView: false,\n stickyHeader: false,\n compactHorizontal: false,\n wrapperRef: { current: null },\n};\n\nexport const TableContext = createContext<TableContextType>(DEFAULT_TABLE_CONTEXT);\n"],"names":["createContext"],"mappings":";;;;;;AAmBa,IAAA,qBAAqB,GAAqB;AACnD,IAAA,oBAAoB,EAAE,EAAE;AACxB,IAAA,WAAW,EAAE,KAAK;AAClB,IAAA,YAAY,EAAE,KAAK;AACnB,IAAA,iBAAiB,EAAE,KAAK;AACxB,IAAA,UAAU,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;;IAGpB,YAAY,GAAGA,mBAAa,CAAmB,qBAAqB;;;;;"}
@@ -1,4 +1,4 @@
1
- import React, { HTMLAttributes } from 'react';
1
+ import React, { type HTMLAttributes } from 'react';
2
2
  export declare type TBodyProps = HTMLAttributes<HTMLTableSectionElement> & {
3
3
  /**
4
4
  * Дополнительный класс
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/tbody/Component.tsx"],"sourcesContent":["import React, { forwardRef, HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nexport type TBodyProps = HTMLAttributes<HTMLTableSectionElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const TBody = forwardRef<HTMLTableSectionElement, TBodyProps>(\n ({ className, children, dataTestId, ...restProps }, ref) => (\n <tbody\n className={cn(styles.component, className)}\n data-test-id={dataTestId}\n ref={ref}\n {...restProps}\n >\n {children}\n </tbody>\n ),\n);\n\nTBody.displayName = 'TBody';\n"],"names":["forwardRef","__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;IAiBa,KAAK,GAAGA,gBAAU,CAC3B,UAAC,EAAiD,EAAE,GAAG,EAAA;AAApD,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAK,SAAS,GAA/CC,YAAA,CAAA,EAAA,EAAA,CAAA,WAAA,EAAA,UAAA,EAAA,YAAA,CAAiD,CAAF;IAAY,QACxDC,sBACI,CAAA,aAAA,CAAA,OAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,kBAC5B,UAAU,EACxB,GAAG,EAAE,GAAG,EAAA,EACJ,SAAS,CAEZ,EAAA,QAAQ,CACL;AACX,CAAA;AAGL,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/tbody/Component.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nexport type TBodyProps = HTMLAttributes<HTMLTableSectionElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const TBody = forwardRef<HTMLTableSectionElement, TBodyProps>(\n ({ className, children, dataTestId, ...restProps }, ref) => (\n <tbody\n className={cn(styles.component, className)}\n data-test-id={dataTestId}\n ref={ref}\n {...restProps}\n >\n {children}\n </tbody>\n ),\n);\n\nTBody.displayName = 'TBody';\n"],"names":["forwardRef","__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;IAiBa,KAAK,GAAGA,gBAAU,CAC3B,UAAC,EAAiD,EAAE,GAAG,EAAA;AAApD,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,QAAA,EAAE,UAAU,GAAA,EAAA,CAAA,UAAA,EAAK,SAAS,GAA/CC,YAAA,CAAA,EAAA,EAAA,CAAA,WAAA,EAAA,UAAA,EAAA,YAAA,CAAiD,CAAF;IAAY,QACxDC,sBACI,CAAA,aAAA,CAAA,OAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,kBAC5B,UAAU,EACxB,GAAG,EAAE,GAAG,EAAA,EACJ,SAAS,CAEZ,EAAA,QAAQ,CACL;AACX,CAAA;AAGL,KAAK,CAAC,WAAW,GAAG,OAAO;;;;"}
@@ -1,4 +1,4 @@
1
- import React, { TdHTMLAttributes } from 'react';
1
+ import React, { type TdHTMLAttributes } from 'react';
2
2
  export declare type TCellProps = TdHTMLAttributes<HTMLTableCellElement> & {
3
3
  /**
4
4
  * Дополнительный класс
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/tcell/Component.tsx"],"sourcesContent":["import React, { TdHTMLAttributes, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TableContext } from '../table-context';\n\nimport styles from './index.module.css';\n\nexport type TCellProps = TdHTMLAttributes<HTMLTableCellElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n\n /**\n * Устанавливается автоматически и позволяет использовать конфиг для соответствующего индекса\n */\n index?: number;\n};\n\nexport const TCell = ({\n className,\n style,\n dataTestId,\n children,\n index,\n ...restProps\n}: TCellProps) => {\n const { columnsConfiguration, compactView, compactHorizontal } = useContext(TableContext);\n const column = index === undefined ? null : columnsConfiguration[index];\n const width = column?.width;\n const textAlign = column?.textAlign;\n const hidden = column?.hidden || false;\n\n if (hidden) return null;\n\n return (\n <td\n className={cn(\n styles.component,\n className,\n compactView && styles.compact,\n compactHorizontal && styles.compactHorizontal,\n )}\n style={{ ...style, width, textAlign }}\n data-test-id={dataTestId}\n {...restProps}\n >\n {children}\n </td>\n );\n};\n"],"names":["index","__rest","useContext","TableContext","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAwBO,IAAM,KAAK,GAAG,UAAC,EAOT,EAAA;AANT,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,QAAQ,GAAA,EAAA,CAAA,QAAA,EACRA,OAAK,GAAA,EAAA,CAAA,KAAA,EACF,SAAS,GAAAC,YAAA,CAAA,EAAA,EANM,yDAOrB,CADe;AAEN,IAAA,IAAA,EAA2D,GAAAC,gBAAU,CAACC,kBAAY,CAAC,EAAjF,oBAAoB,GAAA,EAAA,CAAA,oBAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,iBAAiB,uBAA6B;AACzF,IAAA,IAAM,MAAM,GAAGH,OAAK,KAAK,SAAS,GAAG,IAAI,GAAG,oBAAoB,CAACA,OAAK,CAAC;IACvE,IAAM,KAAK,GAAG,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,KAAK;IAC3B,IAAM,SAAS,GAAG,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,SAAS;AACnC,IAAA,IAAM,MAAM,GAAG,CAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,MAAM,KAAI,KAAK;AAEtC,IAAA,IAAI,MAAM;AAAE,QAAA,OAAO,IAAI;AAEvB,IAAA,QACII,sBACI,CAAA,aAAA,CAAA,IAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CACTC,uBAAM,CAAC,SAAS,EAChB,SAAS,EACT,WAAW,IAAIA,uBAAM,CAAC,OAAO,EAC7B,iBAAiB,IAAIA,uBAAM,CAAC,iBAAiB,CAChD,EACD,KAAK,oCAAO,KAAK,CAAA,EAAA,EAAE,KAAK,EAAA,KAAA,EAAE,SAAS,EAAA,SAAA,EAAA,CAAA,EAAA,cAAA,EACrB,UAAU,EACpB,EAAA,SAAS,GAEZ,QAAQ,CACR;AAEb;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/tcell/Component.tsx"],"sourcesContent":["import React, { type TdHTMLAttributes, useContext } from 'react';\nimport cn from 'classnames';\n\nimport { TableContext } from '../table-context';\n\nimport styles from './index.module.css';\n\nexport type TCellProps = TdHTMLAttributes<HTMLTableCellElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n\n /**\n * Устанавливается автоматически и позволяет использовать конфиг для соответствующего индекса\n */\n index?: number;\n};\n\nexport const TCell = ({\n className,\n style,\n dataTestId,\n children,\n index,\n ...restProps\n}: TCellProps) => {\n const { columnsConfiguration, compactView, compactHorizontal } = useContext(TableContext);\n const column = index === undefined ? null : columnsConfiguration[index];\n const width = column?.width;\n const textAlign = column?.textAlign;\n const hidden = column?.hidden || false;\n\n if (hidden) return null;\n\n return (\n <td\n className={cn(\n styles.component,\n className,\n compactView && styles.compact,\n compactHorizontal && styles.compactHorizontal,\n )}\n style={{ ...style, width, textAlign }}\n data-test-id={dataTestId}\n {...restProps}\n >\n {children}\n </td>\n );\n};\n"],"names":["index","__rest","useContext","TableContext","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;AAwBO,IAAM,KAAK,GAAG,UAAC,EAOT,EAAA;AANT,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,UAAU,GAAA,EAAA,CAAA,UAAA,EACV,QAAQ,GAAA,EAAA,CAAA,QAAA,EACRA,OAAK,GAAA,EAAA,CAAA,KAAA,EACF,SAAS,GAAAC,YAAA,CAAA,EAAA,EANM,yDAOrB,CADe;AAEN,IAAA,IAAA,EAA2D,GAAAC,gBAAU,CAACC,kBAAY,CAAC,EAAjF,oBAAoB,GAAA,EAAA,CAAA,oBAAA,EAAE,WAAW,GAAA,EAAA,CAAA,WAAA,EAAE,iBAAiB,uBAA6B;AACzF,IAAA,IAAM,MAAM,GAAGH,OAAK,KAAK,SAAS,GAAG,IAAI,GAAG,oBAAoB,CAACA,OAAK,CAAC;IACvE,IAAM,KAAK,GAAG,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,KAAK;IAC3B,IAAM,SAAS,GAAG,MAAM,KAAA,IAAA,IAAN,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,SAAS;AACnC,IAAA,IAAM,MAAM,GAAG,CAAA,MAAM,KAAN,IAAA,IAAA,MAAM,KAAN,MAAA,GAAA,MAAA,GAAA,MAAM,CAAE,MAAM,KAAI,KAAK;AAEtC,IAAA,IAAI,MAAM;AAAE,QAAA,OAAO,IAAI;AAEvB,IAAA,QACII,sBACI,CAAA,aAAA,CAAA,IAAA,EAAAC,cAAA,CAAA,EAAA,SAAS,EAAEC,mBAAE,CACTC,uBAAM,CAAC,SAAS,EAChB,SAAS,EACT,WAAW,IAAIA,uBAAM,CAAC,OAAO,EAC7B,iBAAiB,IAAIA,uBAAM,CAAC,iBAAiB,CAChD,EACD,KAAK,oCAAO,KAAK,CAAA,EAAA,EAAE,KAAK,EAAA,KAAA,EAAE,SAAS,EAAA,SAAA,EAAA,CAAA,EAAA,cAAA,EACrB,UAAU,EACpB,EAAA,SAAS,GAEZ,QAAQ,CACR;AAEb;;;;"}
@@ -20,7 +20,7 @@
20
20
  height: 72px;
21
21
  border-top: 1px solid var(--color-light-neutral-400);
22
22
  vertical-align: top;
23
- box-sizing: border-box
23
+ box-sizing: border-box;
24
24
  } .component:first-child {
25
25
  padding-left: var(--gap-16);
26
26
  } .component:last-child {
@@ -1,5 +1,5 @@
1
- import React, { ReactNode, Ref } from 'react';
2
- import { TRowProps } from '../trow';
1
+ import React, { type ReactNode, type Ref } from 'react';
2
+ import { type TRowProps } from '../trow';
3
3
  export declare type TExpandableRowProps = TRowProps & {
4
4
  defaultExpanded?: boolean;
5
5
  expanded?: boolean;
@@ -19,7 +19,7 @@ var TExpandableRow = React.forwardRef(function (_a, ref) {
19
19
  var className = _a.className, selected = _a.selected, expanded = _a.expanded, _d = _a.defaultExpanded, defaultExpanded = _d === void 0 ? false : _d, _e = _a.onToggle, onToggle = _e === void 0 ? function () { return null; } : _e, _f = _a.renderContent, renderContent = _f === void 0 ? function () { return null; } : _f, rowRef = _a.rowRef, restProps = tslib.__rest(_a, ["className", "selected", "expanded", "defaultExpanded", "onToggle", "renderContent", "rowRef"]);
20
20
  var _g = React.useState(defaultExpanded), expandedState = _g[0], setExpandedState = _g[1];
21
21
  var uncontrolled = expanded === undefined;
22
- var isExpanded = (uncontrolled ? expandedState : expanded);
22
+ var isExpanded = uncontrolled ? expandedState : expanded;
23
23
  var handleToggle = function () {
24
24
  if (uncontrolled) {
25
25
  setExpandedState(!isExpanded);
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/texpandable-row/Component.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode, Ref, useState } from 'react';\nimport cn from 'classnames';\n\nimport { TRow, TRowProps } from '../trow';\n\nimport styles from './index.module.css';\n\nexport type TExpandableRowProps = TRowProps & {\n defaultExpanded?: boolean;\n\n expanded?: boolean;\n\n onToggle?: (expanded: boolean) => void;\n\n renderContent: (expanded: boolean) => ReactNode;\n\n rowRef?: Ref<HTMLTableRowElement>;\n};\n\nexport const TExpandableRow = forwardRef<HTMLTableRowElement, TExpandableRowProps>(\n (\n {\n className,\n selected,\n expanded,\n defaultExpanded = false,\n onToggle = () => null,\n renderContent = () => null,\n rowRef,\n ...restProps\n }: TExpandableRowProps,\n ref,\n ) => {\n const [expandedState, setExpandedState] = useState<boolean>(defaultExpanded);\n\n const uncontrolled = expanded === undefined;\n\n const isExpanded = (uncontrolled ? expandedState : expanded) as boolean;\n\n const handleToggle = () => {\n if (uncontrolled) {\n setExpandedState(!isExpanded);\n }\n\n onToggle(isExpanded);\n };\n\n return (\n <React.Fragment>\n <TRow\n className={cn(styles.row, className, {\n [styles.selected]: selected,\n [styles.expanded]: isExpanded,\n })}\n selected={selected}\n onClick={handleToggle}\n ref={rowRef}\n {...restProps}\n />\n\n <tr ref={ref} className={cn(styles.expandable, { [styles.expanded]: isExpanded })}>\n {renderContent(isExpanded)}\n </tr>\n </React.Fragment>\n );\n },\n);\n\nTExpandableRow.displayName = 'TExpandableRow';\n"],"names":["forwardRef","__rest","useState","React","TRow","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;IAmBa,cAAc,GAAGA,gBAAU,CACpC,UACI,EASsB,EACtB,GAAG,EAAA;;IATC,IAAA,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,QAAQ,cAAA,EACR,EAAA,GAAA,EAAA,CAAA,eAAuB,EAAvB,eAAe,GAAA,EAAA,KAAA,MAAA,GAAG,KAAK,GAAA,EAAA,EACvB,gBAAqB,EAArB,QAAQ,mBAAG,YAAM,EAAA,OAAA,IAAI,CAAJ,EAAI,KAAA,EACrB,EAAA,GAAA,EAAA,CAAA,aAA0B,EAA1B,aAAa,GAAA,EAAA,KAAA,MAAA,GAAG,cA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,EAAG,EAC5E,EAAA,aAAa,CAAC,UAAU,CAAC,CACzB,CACQ;AAEzB,CAAC;AAGL,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/texpandable-row/Component.tsx"],"sourcesContent":["import React, { forwardRef, type ReactNode, type Ref, useState } from 'react';\nimport cn from 'classnames';\n\nimport { TRow, type TRowProps } from '../trow';\n\nimport styles from './index.module.css';\n\nexport type TExpandableRowProps = TRowProps & {\n defaultExpanded?: boolean;\n\n expanded?: boolean;\n\n onToggle?: (expanded: boolean) => void;\n\n renderContent: (expanded: boolean) => ReactNode;\n\n rowRef?: Ref<HTMLTableRowElement>;\n};\n\nexport const TExpandableRow = forwardRef<HTMLTableRowElement, TExpandableRowProps>(\n (\n {\n className,\n selected,\n expanded,\n defaultExpanded = false,\n onToggle = () => null,\n renderContent = () => null,\n rowRef,\n ...restProps\n }: TExpandableRowProps,\n ref,\n ) => {\n const [expandedState, setExpandedState] = useState<boolean>(defaultExpanded);\n\n const uncontrolled = expanded === undefined;\n\n const isExpanded = uncontrolled ? expandedState : expanded;\n\n const handleToggle = () => {\n if (uncontrolled) {\n setExpandedState(!isExpanded);\n }\n\n onToggle(isExpanded);\n };\n\n return (\n <React.Fragment>\n <TRow\n className={cn(styles.row, className, {\n [styles.selected]: selected,\n [styles.expanded]: isExpanded,\n })}\n selected={selected}\n onClick={handleToggle}\n ref={rowRef}\n {...restProps}\n />\n\n <tr ref={ref} className={cn(styles.expandable, { [styles.expanded]: isExpanded })}>\n {renderContent(isExpanded)}\n </tr>\n </React.Fragment>\n );\n },\n);\n\nTExpandableRow.displayName = 'TExpandableRow';\n"],"names":["forwardRef","__rest","useState","React","TRow","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;IAmBa,cAAc,GAAGA,gBAAU,CACpC,UACI,EASsB,EACtB,GAAG,EAAA;;IATC,IAAA,SAAS,eAAA,EACT,QAAQ,cAAA,EACR,QAAQ,cAAA,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MAAM,EAAA,EACP,SAAS,CACf,CAAA;QAEFJ,sBAAI,CAAA,aAAA,CAAA,IAAA,EAAA,EAAA,GAAG,EAAE,GAAG,EAAE,SAAS,EAAEG,mBAAE,CAACC,uBAAM,CAAC,UAAU,GAAI,EAAA,GAAA,EAAA,EAAA,EAAA,CAACA,uBAAM,CAAC,QAAQ,CAAA,GAAG,UAAU,EAAA,EAAA,EAAG,EAC5E,EAAA,aAAa,CAAC,UAAU,CAAC,CACzB,CACQ;AAEzB,CAAC;AAGL,cAAc,CAAC,WAAW,GAAG,gBAAgB;;;;"}
@@ -1,4 +1,4 @@
1
- import React, { HTMLAttributes } from 'react';
1
+ import React, { type HTMLAttributes } from 'react';
2
2
  export declare type THeadProps = HTMLAttributes<HTMLTableSectionElement> & {
3
3
  /**
4
4
  * Дополнительный класс
@@ -1 +1 @@
1
- {"version":3,"file":"Component.js","sources":["../../../src/components/thead/Component.tsx"],"sourcesContent":["import React, { HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nexport type THeadProps = HTMLAttributes<HTMLTableSectionElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для tr\n */\n rowClassName?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const THead: React.FC<THeadProps> = ({\n className,\n rowClassName,\n children,\n dataTestId,\n ...restProps\n}) => (\n <thead className={cn(styles.component, className)} data-test-id={dataTestId} {...restProps}>\n <tr className={cn(styles.row, rowClassName)}>{children}</tr>\n </thead>\n);\n"],"names":["__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;AAsBO,IAAM,KAAK,GAAyB,UAAC,EAM3C,EAAA;AALG,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,YAAY,kBAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,UAAU,GAAA,EAAA,CAAA,UAAA,EACP,SAAS,GAAAA,YAAA,CAAA,EAAA,EAL4B,uDAM3C,CADe;AACV,IAAA,QACFC,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAAC,cAAA,CAAA,EAAO,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAgB,cAAA,EAAA,UAAU,IAAM,SAAS,CAAA;AACtF,QAAAH,sBAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAEE,mBAAE,CAACC,uBAAM,CAAC,GAAG,EAAE,YAAY,CAAC,EAAG,EAAA,QAAQ,CAAM,CACxD;;;;;"}
1
+ {"version":3,"file":"Component.js","sources":["../../../src/components/thead/Component.tsx"],"sourcesContent":["import React, { type HTMLAttributes } from 'react';\nimport cn from 'classnames';\n\nimport styles from './index.module.css';\n\nexport type THeadProps = HTMLAttributes<HTMLTableSectionElement> & {\n /**\n * Дополнительный класс\n */\n className?: string;\n\n /**\n * Дополнительный класс для tr\n */\n rowClassName?: string;\n\n /**\n * Идентификатор для систем автоматизированного тестирования\n */\n dataTestId?: string;\n};\n\nexport const THead: React.FC<THeadProps> = ({\n className,\n rowClassName,\n children,\n dataTestId,\n ...restProps\n}) => (\n <thead className={cn(styles.component, className)} data-test-id={dataTestId} {...restProps}>\n <tr className={cn(styles.row, rowClassName)}>{children}</tr>\n </thead>\n);\n"],"names":["__rest","React","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;AAsBO,IAAM,KAAK,GAAyB,UAAC,EAM3C,EAAA;AALG,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,YAAY,kBAAA,EACZ,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,UAAU,GAAA,EAAA,CAAA,UAAA,EACP,SAAS,GAAAA,YAAA,CAAA,EAAA,EAL4B,uDAM3C,CADe;AACV,IAAA,QACFC,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAAC,cAAA,CAAA,EAAO,SAAS,EAAEC,mBAAE,CAACC,uBAAM,CAAC,SAAS,EAAE,SAAS,CAAC,EAAgB,cAAA,EAAA,UAAU,IAAM,SAAS,CAAA;AACtF,QAAAH,sBAAA,CAAA,aAAA,CAAA,IAAA,EAAA,EAAI,SAAS,EAAEE,mBAAE,CAACC,uBAAM,CAAC,GAAG,EAAE,YAAY,CAAC,EAAG,EAAA,QAAQ,CAAM,CACxD;;;;;"}
@@ -7,7 +7,7 @@
7
7
  } .component {
8
8
  position: relative;
9
9
  width: 100%;
10
- box-sizing: border-box
10
+ box-sizing: border-box;
11
11
  } .component th:not(:last-child):not(:empty):after {
12
12
  transition: opacity 0.2s;
13
13
  position: absolute;
@@ -1,5 +1,5 @@
1
- import React, { ThHTMLAttributes } from 'react';
2
- import { TextAlignProperty } from '../../typings';
1
+ import React, { type ThHTMLAttributes } from 'react';
2
+ import { type TextAlignProperty } from '../../typings';
3
3
  export declare type THeadCellProps = ThHTMLAttributes<HTMLHeadingElement> & {
4
4
  /**
5
5
  * Дополнительный класс