@sberbusiness/triplex-next 1.1.0 → 1.2.0

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 (347) hide show
  1. package/README.md +8 -8
  2. package/chunks/{AlertProcessSpoiler-Dp7FRT9y.js → AlertProcessSpoiler-B3Xzh0I2.js} +13 -13
  3. package/chunks/Card.module-Dh5vP2zv.js +17 -0
  4. package/chunks/DropdownListItem-B1GkU8rn.js +57 -0
  5. package/chunks/DropdownMobile.module-CYlB98Oc.js +21 -0
  6. package/chunks/Footer.module-Bk8QkaWN.js +11 -0
  7. package/chunks/{FormFieldInput-apk1b0w6.js → FormFieldInput-n8Ee4EcP.js} +23 -23
  8. package/chunks/HeaderLayoutSidebar.module-CDNHX5_G.js +9 -0
  9. package/chunks/HeaderTabs.module-yaGpurOU.js +9 -0
  10. package/chunks/HeaderTitle.module-XzB-YndL.js +9 -0
  11. package/chunks/{ListItemControlsButton-Cn3Vmrsn.js → ListItemControlsButton-BdtSkcyn.js} +10 -10
  12. package/chunks/ListItemTail.module-D_m5pMsh.js +12 -0
  13. package/chunks/ListMasterFooter.module-DXrsYZZo.js +10 -0
  14. package/chunks/Overlay.module-BghrPKKn.js +18 -0
  15. package/chunks/Page.module-D6xCdUbr.js +12 -0
  16. package/chunks/RightBorderArrow-BA2_2Ry3.js +146 -0
  17. package/chunks/SuggestFieldMobileDropdownHint-Dz-VDDoR.js +15 -0
  18. package/chunks/TableFooter.module-BzfTOGS_.js +13 -0
  19. package/chunks/TabsExtended.module-B3nvdhKr.js +16 -0
  20. package/chunks/TabsLine.module-Dlj__Yjk.js +23 -0
  21. package/chunks/TooltipDesktop.module-TiWl3v5C.js +19 -0
  22. package/chunks/{UploadZoneInput-R9729LZY.js → UploadZoneInput-CioKsqkV.js} +10 -10
  23. package/chunks/utils-B5p23Ple.js +26 -0
  24. package/chunks/utils-BtcCJ4_U.js +20 -0
  25. package/chunks/utils-D7E_PKCe.js +36 -0
  26. package/chunks/utils-DPXynVs1.js +72 -0
  27. package/chunks/utils-DjxtOr-n.js +48 -0
  28. package/chunks/vendor-CehxOAkM.js +11907 -0
  29. package/components/Alert/AlertContext/AlertContext.js +6 -6
  30. package/components/Alert/AlertProcess/AlertProcess.js +3 -3
  31. package/components/Alert/AlertProcess/components/AlertProcessSpoiler.js +2 -2
  32. package/components/Amount/Amount.js +37 -0
  33. package/components/Amount/index.js +5 -0
  34. package/components/AmountField/AmountBaseInputCore.js +46 -0
  35. package/components/AmountField/AmountBaseInputFormatter.js +57 -0
  36. package/components/AmountField/AmountBaseInputParser.js +110 -0
  37. package/components/AmountField/AmountField.js +76 -0
  38. package/components/AmountField/index.js +5 -0
  39. package/components/AmountField/utils.js +38 -0
  40. package/components/Body/Body.js +6 -6
  41. package/components/Button/Button.js +73 -72
  42. package/components/Button/ButtonBase.js +1 -1
  43. package/components/Button/ButtonDropdown.js +113 -127
  44. package/components/Button/ButtonDropdownExtended.js +2 -2
  45. package/components/Button/ButtonIcon.js +2 -2
  46. package/components/Card/CardAction.js +10 -10
  47. package/components/Card/CardStatic.js +3 -3
  48. package/components/Card/components/CardContent/CardContent.js +2 -2
  49. package/components/Card/components/CardContent/components/CardContentBody.js +2 -2
  50. package/components/Card/components/CardContent/components/CardContentFooter.js +2 -2
  51. package/components/Card/components/CardContent/components/CardContentHeader.js +2 -2
  52. package/components/Card/components/CardMedia.js +2 -2
  53. package/components/Card/utils.js +1 -1
  54. package/components/CarouselExtended/CarouselExtended.js +48 -0
  55. package/components/Checkbox/Checkbox.js +46 -30
  56. package/components/Checkbox/CheckboxXGroup.js +14 -14
  57. package/components/Checkbox/CheckboxYGroup.js +4 -4
  58. package/components/Checkbox/index.js +4 -6
  59. package/components/Chip/Chip.js +86 -0
  60. package/components/Chip/ChipClearButton.js +28 -0
  61. package/components/Chip/ChipDropdownArrow.js +18 -0
  62. package/components/Chip/ChipIcon.js +9 -0
  63. package/components/Chip/ChipOptions.js +27 -0
  64. package/components/Chip/enums.js +5 -0
  65. package/components/Chip/index.js +15 -0
  66. package/components/ChipGroup/ChipGroup.js +32 -0
  67. package/components/ChipGroup/index.js +5 -0
  68. package/components/Col/Col.js +142 -142
  69. package/components/DesignTokens/DesignTokenUtils.js +2 -2
  70. package/components/DesignTokens/DesignTokensComponents.js +89 -69
  71. package/components/DesignTokens/DesignTokensComponentsThemeDark.js +92 -77
  72. package/components/DesignTokens/components/Card.js +23 -20
  73. package/components/DesignTokens/components/Checkbox.js +32 -14
  74. package/components/DesignTokens/components/Chip.js +59 -0
  75. package/components/DesignTokens/components/Divider.js +9 -0
  76. package/components/DesignTokens/components/Dropdown.js +1 -1
  77. package/components/DesignTokens/components/DropdownList.js +2 -2
  78. package/components/DesignTokens/components/DropdownMobile.js +3 -3
  79. package/components/DesignTokens/components/FooterPage.js +3 -3
  80. package/components/DesignTokens/components/HeaderPage.js +4 -4
  81. package/components/DesignTokens/components/ListItemControlsButton.js +20 -5
  82. package/components/DesignTokens/components/Marker.js +20 -0
  83. package/components/DesignTokens/components/MarkerStatus.js +9 -0
  84. package/components/DesignTokens/components/Radio.js +22 -13
  85. package/components/DesignTokens/components/Stepper.js +71 -0
  86. package/components/DesignTokens/components/TableBasic.js +41 -0
  87. package/components/DesignTokens/components/Tabs.js +45 -15
  88. package/components/DesignTokens/components/TabsLine.js +32 -0
  89. package/components/DesignTokens/components/index.js +100 -79
  90. package/components/Divider/Divider.js +34 -0
  91. package/components/Divider/index.js +5 -0
  92. package/components/Dropdown/desktop/DropdownDesktop.js +52 -51
  93. package/components/Dropdown/desktop/DropdownList.js +66 -53
  94. package/components/Dropdown/desktop/DropdownListItem.js +2 -2
  95. package/components/Dropdown/desktop/index.js +9 -0
  96. package/components/Dropdown/index.js +33 -29
  97. package/components/Dropdown/mobile/DropdownMobile.js +2 -2
  98. package/components/Dropdown/mobile/DropdownMobileBody.js +2 -2
  99. package/components/Dropdown/mobile/DropdownMobileClose.js +2 -2
  100. package/components/Dropdown/mobile/DropdownMobileFooter.js +2 -2
  101. package/components/Dropdown/mobile/DropdownMobileHeader.js +2 -2
  102. package/components/Dropdown/mobile/DropdownMobileInner.js +2 -2
  103. package/components/Dropdown/mobile/DropdownMobileInput.js +9 -8
  104. package/components/Dropdown/mobile/DropdownMobileList.js +26 -17
  105. package/components/Dropdown/mobile/DropdownMobileListItem.js +2 -2
  106. package/components/Dropdown/mobile/DropdownMobileLoader.js +20 -0
  107. package/components/Dropdown/mobile/index.js +5 -3
  108. package/components/Ellipsis/Ellipsis.js +27 -0
  109. package/components/Ellipsis/index.js +5 -0
  110. package/components/ExpandAnimation/ExpandAnimation.js +72 -0
  111. package/components/Footer/Footer.js +3 -3
  112. package/components/Footer/components/FooterDescription.js +2 -2
  113. package/components/Footer/components/FooterDescriptionContent.js +2 -2
  114. package/components/Footer/components/FooterDescriptionControls.js +2 -2
  115. package/components/FormField/FormField.js +34 -33
  116. package/components/FormField/FormFieldContext.js +8 -7
  117. package/components/FormField/components/FormFieldClear.js +24 -20
  118. package/components/FormField/components/FormFieldCounter.js +5 -5
  119. package/components/FormField/components/FormFieldDescription.js +5 -5
  120. package/components/FormField/components/FormFieldInput.js +2 -2
  121. package/components/FormField/components/FormFieldLabel.js +14 -14
  122. package/components/FormField/components/FormFieldMaskedInput.js +12 -12
  123. package/components/FormField/components/FormFieldPostfix.js +6 -6
  124. package/components/FormField/components/FormFieldPrefix.js +7 -7
  125. package/components/FormField/components/FormFieldTarget.js +22 -22
  126. package/components/FormField/components/FormFieldTextarea.js +6 -6
  127. package/components/FormField/index.js +1 -1
  128. package/components/Header/Header.js +12 -12
  129. package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebar.js +2 -2
  130. package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarContent.js +2 -2
  131. package/components/Header/components/HeaderLayoutSidebar/HeaderLayoutSidebarSidebar.js +2 -2
  132. package/components/Header/components/HeaderSubheader/HeaderSubheader.js +6 -6
  133. package/components/Header/components/HeaderTabs/HeaderTabs.js +2 -2
  134. package/components/Header/components/HeaderTabs/HeaderTabsContent.js +2 -2
  135. package/components/Header/components/HeaderTabs/HeaderTabsControls.js +2 -2
  136. package/components/Header/components/HeaderTitle/HeaderTitle.js +2 -2
  137. package/components/Header/components/HeaderTitle/HeaderTitleContent.js +2 -2
  138. package/components/Header/components/HeaderTitle/HeaderTitleControls.js +2 -2
  139. package/components/HelpBox/HelpBox.js +94 -0
  140. package/components/Island/Island.js +25 -66
  141. package/components/Island/components/IslandBody.js +4 -4
  142. package/components/Island/components/IslandFooter.js +4 -4
  143. package/components/Island/components/IslandHeader.js +2 -2
  144. package/components/Island/enums.js +1 -3
  145. package/components/Island/index.js +4 -6
  146. package/components/Island/types.js +2 -0
  147. package/components/Island/utils.js +8 -0
  148. package/components/Link/Link.js +27 -27
  149. package/components/List/List.js +12 -20
  150. package/components/List/ListSortable.js +1 -1
  151. package/components/List/components/ListEmptyState.js +6 -6
  152. package/components/List/components/ListItem.js +1 -10
  153. package/components/List/components/ListItemContent.js +7 -7
  154. package/components/List/components/ListItemControls.js +7 -7
  155. package/components/List/components/ListItemControlsButton.js +2 -2
  156. package/components/List/components/ListItemControlsButtonDropdown.js +4 -2
  157. package/components/List/components/ListItemLoading.js +11 -9
  158. package/components/List/components/ListItemSelectable.js +5 -5
  159. package/components/List/components/ListItemTable.js +9 -9
  160. package/components/List/components/ListItemTailLeft.js +2 -2
  161. package/components/List/components/ListItemTailRight.js +2 -2
  162. package/components/List/components/ListSortableItem.js +2 -2
  163. package/components/List/components/ListSortableItemControls.js +2 -2
  164. package/components/List/components/ListSortableItemTarget.js +8 -8
  165. package/components/List/index.js +1 -1
  166. package/components/ListMaster/ListMaster.js +1 -1
  167. package/components/ListMaster/components/ListMasterBody.js +1 -1
  168. package/components/ListMaster/components/ListMasterChipGroup.js +5 -5
  169. package/components/ListMaster/components/ListMasterFooter.js +2 -2
  170. package/components/ListMaster/components/ListMasterFooterControls.js +2 -2
  171. package/components/ListMaster/components/ListMasterFooterDescription.js +2 -2
  172. package/components/ListMaster/components/ListMasterHeader.js +6 -6
  173. package/components/ListMaster/components/SelectionControls.js +3 -3
  174. package/components/Loader/LoaderMiddle/LoaderMiddle.js +5 -5
  175. package/components/Loader/LoaderSmall/LoaderSmall.js +24 -35
  176. package/components/LoaderWidget/LoaderWidget.js +15 -14
  177. package/components/Marker/Marker.js +20 -0
  178. package/components/Marker/enums.js +5 -0
  179. package/components/Marker/index.js +7 -0
  180. package/components/Marker/utils.js +6 -0
  181. package/components/MarkerStatus/MarkerStatus.js +36 -0
  182. package/components/MarkerStatus/index.js +5 -0
  183. package/components/OrderedList/OrderedList.js +25 -0
  184. package/components/OrderedList/OrderedListItem.js +27 -0
  185. package/components/OrderedList/index.js +7 -0
  186. package/components/OrderedList/types.js +2 -0
  187. package/components/Overlay/Overlay.js +2 -2
  188. package/components/Overlay/OverlayMask.js +2 -2
  189. package/components/Overlay/OverlayPanel.js +2 -2
  190. package/components/Page/Page.js +2 -2
  191. package/components/Page/components/BodyPage.js +2 -2
  192. package/components/Page/components/FooterPage.js +28 -31
  193. package/components/Page/components/HeaderPage.js +26 -29
  194. package/components/Page/components/useStickyCornerRadius.js +34 -0
  195. package/components/Pagination/components/PaginationExtended.js +3 -3
  196. package/components/Pagination/components/PaginationNavigationButton.js +5 -5
  197. package/components/Pagination/components/PaginationNavigationExtended.js +2 -2
  198. package/components/Pagination/components/PaginationPageButton.js +2 -2
  199. package/components/Pagination/components/PaginationPageEllipsis.js +3 -3
  200. package/components/Pagination/components/PaginationSelect.js +7 -7
  201. package/components/Pagination/utils/paginationUtils.js +1 -1
  202. package/components/Radio/Radio.js +29 -21
  203. package/components/Radio/RadioXGroup.js +10 -10
  204. package/components/Radio/RadioYGroup.js +5 -5
  205. package/components/Radio/index.js +4 -6
  206. package/components/Row/Row.js +6 -6
  207. package/components/SegmentedControl/SegmentedControl.js +36 -39
  208. package/components/SegmentedControl/SegmentedControlSegment.js +6 -6
  209. package/components/SelectExtendedField/SelectExtendedField.js +9 -9
  210. package/components/SelectExtendedField/components/SelectExtendedFieldDropdown.js +5 -2
  211. package/components/SelectExtendedField/components/SelectExtendedFieldDropdownDefault.js +22 -18
  212. package/components/SelectExtendedField/components/SelectExtendedFieldTarget.js +38 -37
  213. package/components/SelectField/SelectField.js +62 -0
  214. package/components/SelectField/index.js +5 -0
  215. package/components/Skeleton/Skeleton.js +11 -11
  216. package/components/Stepper/RightBorderArrow.js +7 -0
  217. package/components/Stepper/Stepper.js +103 -0
  218. package/components/Stepper/StepperExtended.js +26 -0
  219. package/components/Stepper/StepperExtendedContext.js +12 -0
  220. package/components/Stepper/StepperStep.js +88 -0
  221. package/components/Stepper/StepperStepIcon.js +23 -0
  222. package/components/Stepper/StepperWrapper.js +12 -0
  223. package/components/Stepper/enums.js +7 -0
  224. package/components/Stepper/index.js +11 -0
  225. package/components/SuggestField/SuggestField.js +64 -0
  226. package/components/SuggestField/SuggestFieldTarget.js +67 -0
  227. package/components/SuggestField/SuggestFieldTargetPostfix.js +28 -0
  228. package/components/SuggestField/desktop/SuggestFieldDesktop.js +196 -0
  229. package/components/SuggestField/desktop/SuggestFieldDesktopDropdown.js +76 -0
  230. package/components/SuggestField/desktop/index.js +7 -0
  231. package/components/SuggestField/desktop/types.js +2 -0
  232. package/components/SuggestField/index.js +17 -0
  233. package/components/SuggestField/mobile/SuggestFieldMobile.js +79 -0
  234. package/components/SuggestField/mobile/SuggestFieldMobileDropdown.js +94 -0
  235. package/components/SuggestField/mobile/SuggestFieldMobileDropdownHint.js +10 -0
  236. package/components/SuggestField/mobile/SuggestFieldMobileTarget.js +30 -0
  237. package/components/SuggestField/mobile/index.js +11 -0
  238. package/components/SuggestField/mobile/types.js +2 -0
  239. package/components/SuggestField/types.js +2 -0
  240. package/components/SwipeableArea/SwipeableArea.js +21 -21
  241. package/components/Table/FilterPanel.js +18 -0
  242. package/components/Table/MasterTable.js +49 -0
  243. package/components/Table/MasterTableContext.js +11 -0
  244. package/components/Table/NoColumns.js +17 -0
  245. package/components/Table/PaginationPanel.js +18 -0
  246. package/components/Table/TableBasic/TableBasic.js +51 -0
  247. package/components/Table/TableBasic/components/TableBasicBody.js +18 -0
  248. package/components/Table/TableBasic/components/TableBasicHeader.js +83 -0
  249. package/components/Table/TableBasic/components/TableBasicRow.js +53 -0
  250. package/components/Table/TableBasic/enums.js +8 -0
  251. package/components/Table/TableBasic/types.js +2 -0
  252. package/components/Table/TableBasicSettings/TableBasicSettings.js +58 -0
  253. package/components/Table/TableBasicSettings/components/ColumnSettings.js +20 -0
  254. package/components/Table/TableBasicSettings/components/ColumnSettingsSortableList.js +24 -0
  255. package/components/Table/TableBasicSettings/components/ColumnSettingsSortableListItem.js +25 -0
  256. package/components/Table/TableBasicSettings/components/ColumnSettingsSortableListItemTarget.js +29 -0
  257. package/components/Table/TableBasicSettings/components/ColumnSettingsStaticList.js +17 -0
  258. package/components/Table/TableBasicSettings/components/ColumnSettingsStaticListItem.js +14 -0
  259. package/components/Table/TableBasicSettings/components/TableBasicSettingsBody.js +13 -0
  260. package/components/Table/TableBasicSettings/components/TableBasicSettingsFooter.js +13 -0
  261. package/components/Table/TableBasicSettings/components/TableBasicSettingsHeader.js +26 -0
  262. package/components/Table/TableFooter/TableFooter.js +14 -0
  263. package/components/Table/TableFooter/components/TableFooterSummary.js +19 -0
  264. package/components/Table/TableFooter/components/TableFooterSummaryAmount.js +18 -0
  265. package/components/Table/TableFooter/components/TableFooterSummarySelectAllButton.js +31 -0
  266. package/components/Table/TableFooter/components/TableFooterSummarySelectedCount.js +8 -0
  267. package/components/Table/TabsLinePanel.js +12 -0
  268. package/components/Table/TabsLinePanelLinks.js +14 -0
  269. package/components/Table/index.js +26 -0
  270. package/components/Table/utils.js +8 -0
  271. package/components/Tabs/Tabs.js +75 -0
  272. package/components/Tabs/index.js +5 -0
  273. package/components/TabsExtended/TabsExtended.js +37 -21
  274. package/components/TabsExtended/TabsExtendedContext.js +6 -4
  275. package/components/TabsExtended/components/TabsExtendedContent.js +19 -15
  276. package/components/TabsExtended/components/TabsExtendedDropdownWrapper.js +2 -2
  277. package/components/TabsExtended/components/TabsExtendedTab.js +2 -2
  278. package/components/TabsExtended/components/TabsExtendedTabButton.js +17 -15
  279. package/components/TabsExtended/components/TabsExtendedTabsWrapper.js +7 -7
  280. package/components/TabsExtended/components/index.js +15 -0
  281. package/components/TabsExtended/enums.js +2 -2
  282. package/components/TabsExtended/index.js +15 -3
  283. package/components/TabsExtended/utils.js +9 -0
  284. package/components/TabsLine/TabsLine.js +48 -0
  285. package/components/TabsLine/components/TabsLineDesktop.js +81 -0
  286. package/components/TabsLine/components/TabsLineDropdown.js +151 -0
  287. package/components/TabsLine/components/TabsLineItem.js +26 -0
  288. package/components/TabsLine/components/TabsLineMobile.js +21 -0
  289. package/components/TabsLine/components/index.js +11 -0
  290. package/components/TabsLine/index.js +13 -0
  291. package/components/TabsLine/types.js +2 -0
  292. package/components/TextField/TextField.js +1 -1
  293. package/components/ThemeProvider/ThemeProvider.js +1 -1
  294. package/components/ThemeProvider/components/ThemeProviderView.js +4 -4
  295. package/components/Tooltip/components/common/TooltipBody.js +2 -2
  296. package/components/Tooltip/components/common/TooltipLink.js +11 -11
  297. package/components/Tooltip/components/common/TooltipXButton.js +1 -1
  298. package/components/Tooltip/components/desktop/components/TooltipDesktopBase.js +2 -2
  299. package/components/Tooltip/components/desktop/components/TooltipDesktopTip.js +2 -2
  300. package/components/Tooltip/components/mobile/TooltipMobile.js +7 -7
  301. package/components/Typography/Caption.js +17 -17
  302. package/components/Typography/Text.js +20 -20
  303. package/components/Typography/Title.js +15 -15
  304. package/components/Typography/utils.js +1 -1
  305. package/components/UnorderedList/UnorderedList.js +25 -0
  306. package/components/UnorderedList/UnorderedListItem.js +27 -0
  307. package/components/UnorderedList/index.js +7 -0
  308. package/components/UnorderedList/types.js +2 -0
  309. package/components/UploadZone/UploadZone.js +3 -3
  310. package/components/UploadZone/components/UploadZoneInput.js +2 -2
  311. package/components/index.js +366 -275
  312. package/consts/AmountConst.js +10 -0
  313. package/consts/DataTestId.js +19 -0
  314. package/enums/EComponentSize.js +5 -0
  315. package/enums/index.js +7 -0
  316. package/index.d.ts +1029 -124
  317. package/index.js +361 -268
  318. package/package.json +69 -2
  319. package/styles/triplex-next.css +436 -354
  320. package/types/CoreTypes.js +2 -0
  321. package/utils/amountUtils.js +34 -0
  322. package/utils/classNameMaps.js +10 -0
  323. package/utils/html/AriaAttributes.js +11 -0
  324. package/utils/html/DataAttributes.js +11 -0
  325. package/utils/inputUtils.js +11 -0
  326. package/utils/isNullOrUndefined.js +5 -0
  327. package/utils/scroll.js +13 -0
  328. package/utils/stringUtils.js +13 -0
  329. package/chunks/Card.module-Ddt7TQ9Z.js +0 -17
  330. package/chunks/DropdownListItem-y6Rvj_dd.js +0 -56
  331. package/chunks/DropdownMobile.module-DrQkghxs.js +0 -19
  332. package/chunks/Footer.module-CKfl241m.js +0 -11
  333. package/chunks/HeaderLayoutSidebar.module-DTXnksBK.js +0 -9
  334. package/chunks/HeaderTabs.module-DVh6MotJ.js +0 -9
  335. package/chunks/HeaderTitle.module-DOeVL9zC.js +0 -9
  336. package/chunks/ListItemTail.module-BnbT61OM.js +0 -12
  337. package/chunks/ListMasterFooter.module-C6QFamKQ.js +0 -10
  338. package/chunks/Overlay.module-BTSQ5G6t.js +0 -18
  339. package/chunks/Page.module-DfMBQJob.js +0 -16
  340. package/chunks/TabsExtended.module-okOlTNQG.js +0 -13
  341. package/chunks/TabsExtendedUtils-NCwWiX7O.js +0 -23
  342. package/chunks/TooltipDesktop.module-DTbnIWo1.js +0 -19
  343. package/chunks/utils-B0khB-Lq.js +0 -36
  344. package/chunks/vendor-D-uL_icH.js +0 -5895
  345. package/components/Checkbox/enum.js +0 -5
  346. package/components/Radio/enum.js +0 -5
  347. package/components/TabsExtended/TabsExtendedUtils.js +0 -8
@@ -0,0 +1,79 @@
1
+ import { jsxs as B, jsx as f } from "react/jsx-runtime";
2
+ import { useState as E, useRef as c, useEffect as I } from "react";
3
+ import { c as L } from "../../../chunks/vendor-CehxOAkM.js";
4
+ import { SuggestFieldMobileTarget as N } from "./SuggestFieldMobileTarget.js";
5
+ import { SuggestFieldMobileDropdown as R } from "./SuggestFieldMobileDropdown.js";
6
+ import { s as q } from "../../../chunks/SuggestFieldMobileDropdownHint-Dz-VDDoR.js";
7
+ function Q({
8
+ className: u,
9
+ value: r,
10
+ options: m,
11
+ size: a,
12
+ status: b,
13
+ label: x,
14
+ placeholder: n,
15
+ dropdownHint: g,
16
+ loading: s,
17
+ dropdownListLoading: w,
18
+ clearInputOnFocus: M,
19
+ onFilter: O,
20
+ onSelect: i,
21
+ onScrollEnd: D,
22
+ onTargetInputFocus: o,
23
+ onTargetInputBlur: S,
24
+ renderTarget: l,
25
+ renderTargetInput: h,
26
+ renderTargetLabel: j,
27
+ renderTargetPrefix: v,
28
+ renderTargetPostfix: C,
29
+ ...F
30
+ }) {
31
+ const [e, d] = E(!1), t = c(null), p = c(!1), P = l === void 0 ? N : l;
32
+ I(() => {
33
+ p.current && !e && t.current && t.current.scrollIntoView({ block: "center" }), p.current = e;
34
+ }, [e]);
35
+ const V = () => i(void 0), k = (y) => {
36
+ d(!0), o == null || o(y);
37
+ };
38
+ return /* @__PURE__ */ B("div", { className: L(q.suggestFieldMobile, u), ...F, ref: t, children: [
39
+ /* @__PURE__ */ f(
40
+ P,
41
+ {
42
+ size: a,
43
+ status: b,
44
+ inputValue: r ? r.label : "",
45
+ label: x,
46
+ placeholder: n,
47
+ loading: s,
48
+ onClear: V,
49
+ onInputFocus: k,
50
+ onInputBlur: S,
51
+ renderInput: h,
52
+ renderLabel: j,
53
+ renderPrefix: v,
54
+ renderPostfix: C
55
+ }
56
+ ),
57
+ /* @__PURE__ */ f(
58
+ R,
59
+ {
60
+ value: r,
61
+ options: m,
62
+ placeholder: n,
63
+ dropdownHint: g,
64
+ opened: e,
65
+ loading: s,
66
+ dropdownListLoading: w,
67
+ clearInputOnFocus: M,
68
+ setOpened: d,
69
+ onFilter: O,
70
+ onSelect: i,
71
+ onScrollEnd: D
72
+ }
73
+ )
74
+ ] });
75
+ }
76
+ export {
77
+ Q as SuggestFieldMobile
78
+ };
79
+ //# sourceMappingURL=SuggestFieldMobile.js.map
@@ -0,0 +1,94 @@
1
+ import { jsx as t, jsxs as m, Fragment as x } from "react/jsx-runtime";
2
+ import y, { useState as H, useRef as p, useEffect as V } from "react";
3
+ import { Dropdown as j } from "../../Dropdown/Dropdown.js";
4
+ import "../../Dropdown/DropdownListContext.js";
5
+ import "../../Dropdown/desktop/DropdownDesktop.js";
6
+ import "../../Dropdown/desktop/DropdownList.js";
7
+ import "../../../chunks/DropdownListItem-B1GkU8rn.js";
8
+ import "../../Dropdown/mobile/DropdownMobile.js";
9
+ import { DropdownMobileBody as k } from "../../Dropdown/mobile/DropdownMobileBody.js";
10
+ import { DropdownMobileClose as _ } from "../../Dropdown/mobile/DropdownMobileClose.js";
11
+ import "../../Dropdown/mobile/DropdownMobileFooter.js";
12
+ import { DropdownMobileHeader as N } from "../../Dropdown/mobile/DropdownMobileHeader.js";
13
+ import "../../Dropdown/mobile/DropdownMobileInner.js";
14
+ import { DropdownMobileInput as O } from "../../Dropdown/mobile/DropdownMobileInput.js";
15
+ import { DropdownMobileList as P } from "../../Dropdown/mobile/DropdownMobileList.js";
16
+ import { DropdownMobileListItem as T } from "../../Dropdown/mobile/DropdownMobileListItem.js";
17
+ import { DropdownMobileLoader as q } from "../../Dropdown/mobile/DropdownMobileLoader.js";
18
+ import { s as z, S as A } from "../../../chunks/SuggestFieldMobileDropdownHint-Dz-VDDoR.js";
19
+ const E = ({
20
+ value: o,
21
+ options: c,
22
+ placeholder: f,
23
+ dropdownHint: l,
24
+ opened: g,
25
+ loading: h,
26
+ dropdownListLoading: a,
27
+ clearInputOnFocus: b,
28
+ setOpened: n,
29
+ onSelect: s,
30
+ onFilter: w,
31
+ onScrollEnd: d
32
+ }, D) => {
33
+ const [M, e] = H((o == null ? void 0 : o.label) || ""), F = p(null), u = p(null);
34
+ V(() => {
35
+ e((o == null ? void 0 : o.label) || "");
36
+ }, [o]);
37
+ const C = () => {
38
+ e(b === !1 && (o == null ? void 0 : o.label) || "");
39
+ }, I = (r) => {
40
+ const { value: i } = r.target;
41
+ e(i), w(i);
42
+ }, R = () => {
43
+ n(!1), s(o);
44
+ }, S = (r) => {
45
+ if (!d)
46
+ return;
47
+ const { clientHeight: i, scrollHeight: B, scrollTop: L } = r.target;
48
+ B - L === i && d();
49
+ };
50
+ return /* @__PURE__ */ t(
51
+ j,
52
+ {
53
+ setOpened: (r) => {
54
+ n(r), r || s(o);
55
+ },
56
+ opened: g,
57
+ targetRef: u,
58
+ ref: D,
59
+ mobileViewProps: {
60
+ children: /* @__PURE__ */ m(x, { children: [
61
+ /* @__PURE__ */ m(N, { closeButton: () => /* @__PURE__ */ t(_, { onClick: R }), children: [
62
+ /* @__PURE__ */ t(
63
+ O,
64
+ {
65
+ value: M,
66
+ placeholder: f,
67
+ autoFocus: !0,
68
+ onFocus: C,
69
+ onChange: I
70
+ }
71
+ ),
72
+ h && /* @__PURE__ */ t(q, {})
73
+ ] }),
74
+ /* @__PURE__ */ t(k, { className: z.suggestFieldMobileBody, onScroll: S, children: l ? /* @__PURE__ */ t(A, { children: l }) : /* @__PURE__ */ t(P, { loading: a, ref: F, children: c.map((r) => /* @__PURE__ */ t(
75
+ T,
76
+ {
77
+ id: r.id,
78
+ selected: r.id === (o == null ? void 0 : o.id),
79
+ onSelect: () => {
80
+ s(r), n(!1);
81
+ },
82
+ children: r.content || r.label
83
+ },
84
+ r.id
85
+ )) }) })
86
+ ] })
87
+ }
88
+ }
89
+ );
90
+ }, mo = y.forwardRef(E);
91
+ export {
92
+ mo as SuggestFieldMobileDropdown
93
+ };
94
+ //# sourceMappingURL=SuggestFieldMobileDropdown.js.map
@@ -0,0 +1,10 @@
1
+ import "react/jsx-runtime";
2
+ import "../../Typography/Title.js";
3
+ import "../../Typography/Text.js";
4
+ import "../../Typography/Caption.js";
5
+ import "../../Typography/enums.js";
6
+ import { S as d } from "../../../chunks/SuggestFieldMobileDropdownHint-Dz-VDDoR.js";
7
+ export {
8
+ d as SuggestFieldMobileDropdownHint
9
+ };
10
+ //# sourceMappingURL=SuggestFieldMobileDropdownHint.js.map
@@ -0,0 +1,30 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useCallback as s } from "react";
3
+ import { SuggestFieldTarget as e } from "../SuggestFieldTarget.js";
4
+ const c = ({
5
+ inputValue: o,
6
+ placeholder: l,
7
+ renderInput: t,
8
+ ...n
9
+ }) => {
10
+ const u = s(
11
+ (a) => {
12
+ const i = t === void 0 ? e.Input : t;
13
+ return /* @__PURE__ */ r(i, { ...a, readOnly: !0 });
14
+ },
15
+ [t]
16
+ );
17
+ return /* @__PURE__ */ r(
18
+ e,
19
+ {
20
+ inputValue: o,
21
+ placeholder: l,
22
+ renderInput: u,
23
+ ...n
24
+ }
25
+ );
26
+ };
27
+ export {
28
+ c as SuggestFieldMobileTarget
29
+ };
30
+ //# sourceMappingURL=SuggestFieldMobileTarget.js.map
@@ -0,0 +1,11 @@
1
+ import { SuggestFieldMobile as r } from "./SuggestFieldMobile.js";
2
+ import { SuggestFieldMobileDropdown as g } from "./SuggestFieldMobileDropdown.js";
3
+ import { S as l } from "../../../chunks/SuggestFieldMobileDropdownHint-Dz-VDDoR.js";
4
+ import { SuggestFieldMobileTarget as p } from "./SuggestFieldMobileTarget.js";
5
+ export {
6
+ r as SuggestFieldMobile,
7
+ g as SuggestFieldMobileDropdown,
8
+ l as SuggestFieldMobileDropdownHint,
9
+ p as SuggestFieldMobileTarget
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=types.js.map
@@ -1,7 +1,7 @@
1
- import { jsxs as j, jsx as w } from "react/jsx-runtime";
2
- import z, { useState as A, useRef as u, useEffect as M, useImperativeHandle as W } from "react";
3
- import { c as g } from "../../chunks/vendor-D-uL_icH.js";
4
- const H = "swipeableArea__7ca9e38a", V = "content__ec0cec24", $ = "disableScroll__34a6790e", k = "disablePointerEvents__f7adb882", q = "swipeAnimationFinish__ccf8e76e", G = "leftContent__a29b04f8", J = "rightContent__076945e1", s = {
1
+ import { jsxs as j, jsx as _ } from "react/jsx-runtime";
2
+ import z, { useState as w, useRef as u, useEffect as M, useImperativeHandle as W } from "react";
3
+ import { c as g } from "../../chunks/vendor-CehxOAkM.js";
4
+ const H = "swipeableArea__a9ad1241", V = "content__77d1ab98", $ = "disableScroll__e934c8b8", k = "disablePointerEvents__4d7f67b0", q = "swipeAnimationFinish__b4f234b8", G = "leftContent__97131e93", J = "rightContent__c6cfb68e", s = {
5
5
  swipeableArea: H,
6
6
  content: V,
7
7
  disableScroll: $,
@@ -9,9 +9,9 @@ const H = "swipeableArea__7ca9e38a", V = "content__ec0cec24", $ = "disableScroll
9
9
  swipeAnimationFinish: q,
10
10
  leftContent: G,
11
11
  rightContent: J
12
- }, p = 24, E = s.swipeAnimationFinish, K = s.disableScroll, Q = s.disablePointerEvents, N = { clientX: 0, clientY: 0 }, U = z.forwardRef(
12
+ }, p = 24, A = s.swipeAnimationFinish, K = s.disableScroll, Q = s.disablePointerEvents, N = { clientX: 0, clientY: 0 }, U = z.forwardRef(
13
13
  ({ children: L, className: I, leftSwipeableArea: m, rightSwipeableArea: C, ...y }, B) => {
14
- const [S, a] = A(!1), [l, d] = A(), [o, e] = A(0), i = u(null), r = u(null), n = u(0), h = u(N), _ = u(null), X = () => {
14
+ const [S, a] = w(!1), [l, d] = w(), [o, e] = w(0), i = u(null), r = u(null), n = u(0), h = u(N), b = u(null), X = () => {
15
15
  a(!0);
16
16
  const t = n.current - o;
17
17
  n.current === 0 ? t > 0 ? e(
@@ -23,14 +23,14 @@ const H = "swipeableArea__7ca9e38a", V = "content__ec0cec24", $ = "disableScroll
23
23
  ) : n.current < 0 && t < 0 && e(
24
24
  Math.abs(t) > p ? 0 : -r.current.getBoundingClientRect().width
25
25
  );
26
- }, R = () => {
27
- h.current = N, d(void 0), document.removeEventListener("touchend", R);
26
+ }, E = () => {
27
+ h.current = N, d(void 0), document.removeEventListener("touchend", E);
28
28
  };
29
29
  M(() => {
30
30
  !l && o !== n.current && X();
31
31
  }, [l]);
32
32
  const x = (t) => {
33
- h.current = { clientX: t.touches[0].clientX, clientY: t.touches[0].clientY }, n.current = o, document.addEventListener("touchend", R);
33
+ h.current = { clientX: t.touches[0].clientX, clientY: t.touches[0].clientY }, n.current = o, document.addEventListener("touchend", E);
34
34
  }, O = (t) => {
35
35
  if (t.touches.length != 1)
36
36
  return;
@@ -56,11 +56,11 @@ const H = "swipeableArea__7ca9e38a", V = "content__ec0cec24", $ = "disableScroll
56
56
  }, D = () => a(!1), P = () => r.current ? Math.abs(o) / r.current.getBoundingClientRect().width : 1, Y = () => i.current ? Math.abs(o) / i.current.getBoundingClientRect().width : 1;
57
57
  M(() => {
58
58
  const t = (c) => {
59
- c.touches.length == 1 && _.current && !_.current.contains(c.target) && (a(!0), e(0), d(void 0));
59
+ c.touches.length == 1 && b.current && !b.current.contains(c.target) && (a(!0), e(0), d(void 0));
60
60
  };
61
61
  return document.addEventListener("touchstart", t), () => document.removeEventListener("touchstart", t);
62
62
  }, []);
63
- const b = () => {
63
+ const R = () => {
64
64
  i.current && (a(!0), e(i.current.getBoundingClientRect().width));
65
65
  }, T = () => {
66
66
  r.current && (a(!0), e(-r.current.getBoundingClientRect().width));
@@ -77,47 +77,47 @@ const H = "swipeableArea__7ca9e38a", V = "content__ec0cec24", $ = "disableScroll
77
77
  T();
78
78
  },
79
79
  swipeRight: () => {
80
- b();
80
+ R();
81
81
  }
82
82
  }),
83
- [v, T, b]
83
+ [v, T, R]
84
84
  ), /* @__PURE__ */ j(
85
85
  "div",
86
86
  {
87
87
  className: g(s.swipeableArea, I),
88
88
  ...y,
89
- "data-tx": "1.1.0",
90
- ref: _,
89
+ "data-tx": "1.2.0",
90
+ ref: b,
91
91
  children: [
92
- typeof m < "u" ? /* @__PURE__ */ w(
92
+ typeof m < "u" ? /* @__PURE__ */ _(
93
93
  "div",
94
94
  {
95
95
  className: g(s.leftContent, {
96
- [E]: S
96
+ [A]: S
97
97
  }),
98
98
  ref: i,
99
99
  style: { opacity: Y() },
100
100
  children: m
101
101
  }
102
102
  ) : null,
103
- typeof C < "u" ? /* @__PURE__ */ w(
103
+ typeof C < "u" ? /* @__PURE__ */ _(
104
104
  "div",
105
105
  {
106
106
  className: g(s.rightContent, {
107
- [E]: S
107
+ [A]: S
108
108
  }),
109
109
  ref: r,
110
110
  style: { opacity: P() },
111
111
  children: C
112
112
  }
113
113
  ) : null,
114
- /* @__PURE__ */ w(
114
+ /* @__PURE__ */ _(
115
115
  "div",
116
116
  {
117
117
  className: g(s.content, {
118
118
  [Q]: o !== 0,
119
119
  [K]: l === "horizontal",
120
- [E]: S
120
+ [A]: S
121
121
  }),
122
122
  onTouchStart: x,
123
123
  onTouchMove: O,
@@ -0,0 +1,18 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { c as r } from "../../chunks/vendor-CehxOAkM.js";
3
+ const s = "filterPanel__5caf2467", i = {
4
+ filterPanel: s
5
+ }, n = ({ children: e, className: l, ...t }) => /* @__PURE__ */ a(
6
+ "div",
7
+ {
8
+ className: r(i.filterPanel, l),
9
+ ...t,
10
+ "data-tx": "1.2.0",
11
+ children: e
12
+ }
13
+ );
14
+ n.displayName = "FilterPanel";
15
+ export {
16
+ n as FilterPanel
17
+ };
18
+ //# sourceMappingURL=FilterPanel.js.map
@@ -0,0 +1,49 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useState as i } from "react";
3
+ import { MasterTableContext as n } from "./MasterTableContext.js";
4
+ import { c as b } from "../../chunks/vendor-CehxOAkM.js";
5
+ import { NoColumns as p } from "./NoColumns.js";
6
+ import { FilterPanel as T } from "./FilterPanel.js";
7
+ import { TabsLinePanel as c } from "./TabsLinePanel.js";
8
+ import { TableBasic as f } from "./TableBasic/TableBasic.js";
9
+ import { TableBasicSettings as P } from "./TableBasicSettings/TableBasicSettings.js";
10
+ import { TableFooter as u } from "./TableFooter/TableFooter.js";
11
+ import { PaginationPanel as d } from "./PaginationPanel.js";
12
+ import "./TableBasicSettings/components/ColumnSettings.js";
13
+ import "./TableBasic/enums.js";
14
+ const x = "masterTable__486daaaa", g = {
15
+ masterTable: x
16
+ }, a = ({ children: t, className: o, loading: r = !1, ...m }) => {
17
+ const [s, l] = i([]);
18
+ return /* @__PURE__ */ e(
19
+ n.Provider,
20
+ {
21
+ value: {
22
+ columns: s,
23
+ loading: r,
24
+ setColumns: l
25
+ },
26
+ children: /* @__PURE__ */ e(
27
+ "div",
28
+ {
29
+ className: b(g.masterTable, o),
30
+ ...m,
31
+ "data-tx": "1.2.0",
32
+ children: t
33
+ }
34
+ )
35
+ }
36
+ );
37
+ };
38
+ a.displayName = "MasterTable";
39
+ a.NoColumns = p;
40
+ a.FilterPanel = T;
41
+ a.TabsLinePanel = c;
42
+ a.TableBasic = f;
43
+ a.TableBasicSettings = P;
44
+ a.TableFooter = u;
45
+ a.PaginationPanel = d;
46
+ export {
47
+ a as MasterTable
48
+ };
49
+ //# sourceMappingURL=MasterTable.js.map
@@ -0,0 +1,11 @@
1
+ import t from "react";
2
+ const o = t.createContext({
3
+ columns: [],
4
+ loading: !1,
5
+ setColumns: () => {
6
+ }
7
+ });
8
+ export {
9
+ o as MasterTableContext
10
+ };
11
+ //# sourceMappingURL=MasterTableContext.js.map
@@ -0,0 +1,17 @@
1
+ import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
+ import { c as e } from "../../chunks/vendor-CehxOAkM.js";
3
+ import { Gap as l } from "../Gap/Gap.js";
4
+ import { ServicesetupSysIcon128 as r } from "@sberbusiness/icons-next";
5
+ const i = "noColumns__d20c00c1", a = "content__765b8db2", s = {
6
+ noColumns: i,
7
+ content: a
8
+ }, p = ({ children: n, className: t, ...c }) => /* @__PURE__ */ m("div", { className: e(s.noColumns, t), ...c, children: [
9
+ /* @__PURE__ */ o(r, {}),
10
+ /* @__PURE__ */ o(l, { size: 24 }),
11
+ /* @__PURE__ */ o("div", { className: s.content, children: n })
12
+ ] });
13
+ p.displayName = "NoColumns";
14
+ export {
15
+ p as NoColumns
16
+ };
17
+ //# sourceMappingURL=NoColumns.js.map
@@ -0,0 +1,18 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { c as o } from "../../chunks/vendor-CehxOAkM.js";
3
+ const s = "paginationPanel__341856ca", e = {
4
+ paginationPanel: s
5
+ }, l = ({ children: a, className: n, ...i }) => /* @__PURE__ */ t(
6
+ "div",
7
+ {
8
+ className: o(e.paginationPanel, n),
9
+ ...i,
10
+ "data-tx": "1.2.0",
11
+ children: a
12
+ }
13
+ );
14
+ l.displayName = "PaginationPanel";
15
+ export {
16
+ l as PaginationPanel
17
+ };
18
+ //# sourceMappingURL=PaginationPanel.js.map
@@ -0,0 +1,51 @@
1
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
+ import { useContext as N, useEffect as g } from "react";
3
+ import { i as C } from "../../../chunks/vendor-CehxOAkM.js";
4
+ import { MasterTableContext as E } from "../MasterTableContext.js";
5
+ import { s as o } from "../../../chunks/utils-DPXynVs1.js";
6
+ import { TableBasicHeader as j } from "./components/TableBasicHeader.js";
7
+ import { TableBasicBody as D } from "./components/TableBasicBody.js";
8
+ import { LoaderMiddle as c } from "../../Loader/LoaderMiddle/LoaderMiddle.js";
9
+ const F = ({
10
+ columns: t,
11
+ data: i,
12
+ highlightRowOnHover: m,
13
+ onOrderBy: p,
14
+ onClickRow: f,
15
+ renderNoColumns: n,
16
+ renderNoData: b,
17
+ headless: v,
18
+ ...u
19
+ }) => {
20
+ const a = N(E), y = i.length === 0;
21
+ g(() => {
22
+ C(t, a.columns) || a.setColumns(t);
23
+ }, [t, a]);
24
+ const h = () => t.every((e) => e.hidden) && n ? n() : /* @__PURE__ */ d("table", { ...u, children: [
25
+ v || /* @__PURE__ */ r(j, { columns: t, onOrderBy: p }),
26
+ /* @__PURE__ */ r(
27
+ D,
28
+ {
29
+ columns: t,
30
+ data: i,
31
+ onClickRow: f,
32
+ highlightRowOnHover: m
33
+ }
34
+ )
35
+ ] }, "table"), x = (e) => {
36
+ const { loading: s } = a;
37
+ return s && e ? l(T()) : !s && e ? l(b()) : s && !e ? B(/* @__PURE__ */ r(c, {})) : null;
38
+ }, B = (e) => /* @__PURE__ */ r("div", { className: o.spinnerWrapper, children: e }), l = (e) => /* @__PURE__ */ r("div", { className: o.footerEmptyData, children: e }), T = () => [
39
+ /* @__PURE__ */ r("div", { className: o.overlayCover }, "overlay"),
40
+ /* @__PURE__ */ r(c, {}, "spinner")
41
+ ];
42
+ return /* @__PURE__ */ d("div", { className: o.tableBasic, children: [
43
+ h(),
44
+ x(y)
45
+ ] });
46
+ };
47
+ F.displayName = "TableBasic";
48
+ export {
49
+ F as TableBasic
50
+ };
51
+ //# sourceMappingURL=TableBasic.js.map
@@ -0,0 +1,18 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { TableBasicRow as b } from "./TableBasicRow.js";
3
+ import { c as p } from "../../../../chunks/vendor-CehxOAkM.js";
4
+ import { s as r } from "../../../../chunks/utils-DPXynVs1.js";
5
+ const B = ({ columns: c, data: o, highlightRowOnHover: t, onClickRow: e }) => {
6
+ if (o.length === 0)
7
+ return null;
8
+ const s = !!e, n = s || !!t, i = p({
9
+ [r.clickable]: s,
10
+ [r.hoverable]: n
11
+ }), m = o.map((l) => /* @__PURE__ */ a(b, { columns: c, data: l, onClickRow: e }, l.rowKey));
12
+ return /* @__PURE__ */ a("tbody", { className: i, children: m });
13
+ };
14
+ B.displayName = "TableBasicBody";
15
+ export {
16
+ B as TableBasicBody
17
+ };
18
+ //# sourceMappingURL=TableBasicBody.js.map
@@ -0,0 +1,83 @@
1
+ import { jsx as r, jsxs as h, Fragment as m } from "react/jsx-runtime";
2
+ import { SortdecreaseStrokeSrvIcon16 as x, SortincreaseStrokeSrvIcon16 as I, SortStrokeSrvIcon16 as D } from "@sberbusiness/icons-next";
3
+ import { isNullOrUndefined as p } from "../../../../utils/isNullOrUndefined.js";
4
+ import { getAriaHTMLAttributes as H } from "../../../../utils/html/AriaAttributes.js";
5
+ import { getDataHTMLAttributes as y } from "../../../../utils/html/DataAttributes.js";
6
+ import { ECellType as b, EHorizontalAlign as s, EOrderDirection as t } from "../enums.js";
7
+ import { c as T } from "../../../../chunks/vendor-CehxOAkM.js";
8
+ import { m as z, s as n } from "../../../../chunks/utils-DPXynVs1.js";
9
+ import { Text as B } from "../../../Typography/Text.js";
10
+ import { ETextSize as v } from "../../../Typography/enums.js";
11
+ const w = ({ columns: u, onOrderBy: l }) => {
12
+ const N = !p(l), f = (e) => {
13
+ let o;
14
+ switch (e.orderDirection) {
15
+ case t.NONE: {
16
+ o = /* @__PURE__ */ r(D, { paletteIndex: 0 });
17
+ break;
18
+ }
19
+ case t.ASC: {
20
+ o = /* @__PURE__ */ r(I, { paletteIndex: 0 });
21
+ break;
22
+ }
23
+ case t.DESC: {
24
+ o = /* @__PURE__ */ r(x, { paletteIndex: 0 });
25
+ break;
26
+ }
27
+ }
28
+ const i = T(n.orderButton, {
29
+ [n.alignLeft]: e.horizontalAlign === s.RIGHT,
30
+ [n.alignRight]: e.horizontalAlign !== s.RIGHT,
31
+ [n.sorted]: e.orderDirection !== t.NONE
32
+ });
33
+ return /* @__PURE__ */ r("span", { className: i, children: o });
34
+ }, A = (e, o) => {
35
+ if (e.hidden)
36
+ return null;
37
+ const i = e.width ? { maxWidth: e.width, minWidth: e.width, width: e.width } : void 0, a = o && !p(e.orderDirection), E = a ? () => {
38
+ S(e.fieldKey, e.orderDirection);
39
+ } : void 0, d = a && f(e), C = z(e.horizontalAlign), O = T(n.thBlock, "hoverable", {
40
+ [n.checkboxType]: e.cellType === b.CHECKBOX,
41
+ [n.order]: a
42
+ }), c = [b.TEXT, void 0].includes(e.cellType) ? /* @__PURE__ */ r(B, { size: v.B3, children: e.label }) : e.label, g = e.horizontalAlign === s.RIGHT ? /* @__PURE__ */ h(m, { children: [
43
+ d,
44
+ c
45
+ ] }) : /* @__PURE__ */ h(m, { children: [
46
+ c,
47
+ d
48
+ ] });
49
+ return /* @__PURE__ */ r("th", { className: C, title: e.title, style: i, children: /* @__PURE__ */ r(
50
+ "span",
51
+ {
52
+ className: O,
53
+ onClick: E,
54
+ ...!!e.ariaAttributes && H(e.ariaAttributes),
55
+ ...!!e.dataAttributes && y(e.dataAttributes),
56
+ children: g
57
+ }
58
+ ) }, e.fieldKey);
59
+ }, S = (e, o) => {
60
+ let i;
61
+ switch (o) {
62
+ case t.NONE: {
63
+ i = t.ASC;
64
+ break;
65
+ }
66
+ case t.ASC: {
67
+ i = t.DESC;
68
+ break;
69
+ }
70
+ case t.DESC: {
71
+ i = t.NONE;
72
+ break;
73
+ }
74
+ }
75
+ l && l({ direction: i, fieldKey: e });
76
+ }, k = u.map((e) => A(e, N));
77
+ return /* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: k }) });
78
+ };
79
+ w.displayName = "TableBasicHeader";
80
+ export {
81
+ w as TableBasicHeader
82
+ };
83
+ //# sourceMappingURL=TableBasicHeader.js.map