urfu-ui-kit-react 2.1.3 → 2.1.5

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 (412) hide show
  1. package/README.md +4 -25
  2. package/dist/components/Accordion/Accordion.js +18 -0
  3. package/dist/components/BreadCrumbs/BreadCrumbs.d.ts +1 -1
  4. package/dist/components/BreadCrumbs/BreadCrumbs.d.ts.map +1 -1
  5. package/dist/components/BreadCrumbs/BreadCrumbs.js +32 -0
  6. package/dist/components/Button/Button.d.ts +1 -0
  7. package/dist/components/Button/Button.d.ts.map +1 -1
  8. package/dist/components/Button/Button.js +88 -0
  9. package/dist/components/Button/Button.types.d.ts +9 -3
  10. package/dist/components/Button/Button.types.d.ts.map +1 -1
  11. package/dist/components/Button/ButtonRefreshIcon.js +35 -0
  12. package/dist/components/Calendar/Calendar.d.ts +1 -5
  13. package/dist/components/Calendar/Calendar.d.ts.map +1 -1
  14. package/dist/components/Calendar/Calendar.js +355 -0
  15. package/dist/components/Calendar/CalendarSelect.js +149 -0
  16. package/dist/components/Calendar/MaskedDateInput.d.ts.map +1 -1
  17. package/dist/components/Calendar/MaskedDateInput.js +191 -0
  18. package/dist/components/Calendar/dateMask.d.ts +0 -1
  19. package/dist/components/Calendar/dateMask.d.ts.map +1 -1
  20. package/dist/components/Card/Card.d.ts +1 -1
  21. package/dist/components/Card/Card.d.ts.map +1 -1
  22. package/dist/components/Card/Card.js +75 -0
  23. package/dist/components/Checkbox/Checkbox.js +30 -0
  24. package/dist/components/ColumnSettings/ColumnSettings.js +216 -0
  25. package/dist/components/ConfirmModal/ConfirmModal.d.ts +1 -0
  26. package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
  27. package/dist/components/ConfirmModal/ConfirmModal.js +40 -0
  28. package/dist/components/ErrorScreen/ErrorScreen.d.ts +1 -1
  29. package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
  30. package/dist/components/ErrorScreen/ErrorScreen.js +221 -0
  31. package/dist/components/ErrorScreen/ErrorScreenIllustration.js +57 -0
  32. package/dist/components/FormField/FormField.d.ts +1 -1
  33. package/dist/components/FormField/FormField.d.ts.map +1 -1
  34. package/dist/components/FormField/FormField.js +40 -0
  35. package/dist/components/Icon/Icon.d.ts +1 -1
  36. package/dist/components/Icon/Icon.d.ts.map +1 -1
  37. package/dist/components/Icon/Icon.js +32 -0
  38. package/dist/components/Icon/Icon.types.d.ts +3 -1
  39. package/dist/components/Icon/Icon.types.d.ts.map +1 -1
  40. package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts +1 -1
  41. package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts.map +1 -1
  42. package/dist/components/InputExpandTextarea/InputExpandTextarea.js +144 -0
  43. package/dist/components/InputFile/InputFile.d.ts +1 -1
  44. package/dist/components/InputFile/InputFile.d.ts.map +1 -1
  45. package/dist/components/InputFile/InputFile.js +203 -0
  46. package/dist/components/InputFile/InputFile.types.d.ts +0 -6
  47. package/dist/components/InputFile/InputFile.types.d.ts.map +1 -1
  48. package/dist/components/InputNumber/InputNumber.d.ts +1 -1
  49. package/dist/components/InputNumber/InputNumber.d.ts.map +1 -1
  50. package/dist/components/InputNumber/InputNumber.js +220 -0
  51. package/dist/components/InputText/InputAffix.d.ts +1 -1
  52. package/dist/components/InputText/InputAffix.js +109 -0
  53. package/dist/components/InputText/InputText.d.ts +2 -1
  54. package/dist/components/InputText/InputText.d.ts.map +1 -1
  55. package/dist/components/InputText/InputText.js +137 -0
  56. package/dist/components/InputTime/InputTime.d.ts +1 -1
  57. package/dist/components/InputTime/InputTime.d.ts.map +1 -1
  58. package/dist/components/InputTime/InputTime.js +335 -0
  59. package/dist/components/InputTime/InputTimeDropdown.js +31 -0
  60. package/dist/components/InputTime/inputTimeKeyDown.js +63 -0
  61. package/dist/components/InputTime/useInputTimeWheel.js +45 -0
  62. package/dist/components/Menu/Menu.d.ts +1 -1
  63. package/dist/components/Menu/Menu.d.ts.map +1 -1
  64. package/dist/components/Menu/Menu.js +113 -0
  65. package/dist/components/Message/Message.js +29 -0
  66. package/dist/components/Modal/Modal.d.ts +1 -0
  67. package/dist/components/Modal/Modal.d.ts.map +1 -1
  68. package/dist/components/Modal/Modal.js +102 -0
  69. package/dist/components/Modal/editorFocus.js +15 -0
  70. package/dist/components/Modal/useModalFocus.js +112 -0
  71. package/dist/components/Modal/useModalTitleClearance.js +48 -0
  72. package/dist/components/Multiselect/Multiselect.d.ts +1 -0
  73. package/dist/components/Multiselect/Multiselect.d.ts.map +1 -1
  74. package/dist/components/Multiselect/Multiselect.js +408 -0
  75. package/dist/components/Notification/Notification.d.ts +1 -1
  76. package/dist/components/Notification/Notification.d.ts.map +1 -1
  77. package/dist/components/Notification/Notification.js +156 -0
  78. package/dist/components/OfflineBanner/OfflineBanner.d.ts +1 -1
  79. package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
  80. package/dist/components/OfflineBanner/OfflineBanner.js +40 -0
  81. package/dist/components/Pagination/Pagination.d.ts +1 -1
  82. package/dist/components/Pagination/Pagination.d.ts.map +1 -1
  83. package/dist/components/Pagination/Pagination.js +126 -0
  84. package/dist/components/Preloader/Preloader.d.ts.map +1 -1
  85. package/dist/components/Preloader/Preloader.js +60 -0
  86. package/dist/components/Radio/Radio.js +34 -0
  87. package/dist/components/Search/Search.d.ts +1 -1
  88. package/dist/components/Search/Search.d.ts.map +1 -1
  89. package/dist/components/Search/Search.js +47 -0
  90. package/dist/components/SearchSelect/SearchSelect.js +295 -0
  91. package/dist/components/SearchSelect/SearchSelectOption.js +41 -0
  92. package/dist/components/SearchSelect/useFlippedPlacement.js +25 -0
  93. package/dist/components/Select/MobileOptionSheet.d.ts +1 -1
  94. package/dist/components/Select/MobileOptionSheet.d.ts.map +1 -1
  95. package/dist/components/Select/MobileOptionSheet.js +116 -0
  96. package/dist/components/Select/Select.js +319 -0
  97. package/dist/components/Skeleton/Skeleton.js +38 -0
  98. package/dist/components/Skeleton/Skeleton.types.d.ts +4 -2
  99. package/dist/components/Skeleton/Skeleton.types.d.ts.map +1 -1
  100. package/dist/components/Status/Status.js +43 -0
  101. package/dist/components/StickyActionBar/StickyActionBar.d.ts +1 -1
  102. package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
  103. package/dist/components/StickyActionBar/StickyActionBar.js +73 -0
  104. package/dist/components/Switch/Switch.d.ts +1 -1
  105. package/dist/components/Switch/Switch.d.ts.map +1 -1
  106. package/dist/components/Switch/Switch.js +29 -0
  107. package/dist/components/Table/Filter/DefaultInput.d.ts.map +1 -1
  108. package/dist/components/Table/Filter/DefaultInput.js +22 -0
  109. package/dist/components/Table/Filter/Filter.js +233 -0
  110. package/dist/components/Table/Filter/Filter.types.d.ts +17 -13
  111. package/dist/components/Table/Filter/Filter.types.d.ts.map +1 -1
  112. package/dist/components/Table/Filter/FilterBooleanBox.d.ts +1 -0
  113. package/dist/components/Table/Filter/FilterBooleanBox.d.ts.map +1 -1
  114. package/dist/components/Table/Filter/FilterBooleanBox.js +40 -0
  115. package/dist/components/Table/Filter/FilterBoxShell.js +89 -0
  116. package/dist/components/Table/Filter/FilterConditionSelect.js +14 -0
  117. package/dist/components/Table/Filter/FilterDateBox.d.ts +1 -0
  118. package/dist/components/Table/Filter/FilterDateBox.d.ts.map +1 -1
  119. package/dist/components/Table/Filter/FilterDateBox.js +173 -0
  120. package/dist/components/Table/Filter/FilterPanel.js +25 -0
  121. package/dist/components/Table/Filter/FilterSortIndicator.js +24 -0
  122. package/dist/components/Table/Filter/FilterStringBox.js +115 -0
  123. package/dist/components/Table/Filter/Functions.d.ts +0 -6
  124. package/dist/components/Table/Filter/Functions.d.ts.map +1 -1
  125. package/dist/components/Table/Filter/Functions.js +76 -0
  126. package/dist/components/Table/Filter/SelectFilter.js +114 -0
  127. package/dist/components/Table/Filter/SelectOptions.js +21 -0
  128. package/dist/components/Table/Filter/TableFilterOptions.d.ts +1 -0
  129. package/dist/components/Table/Filter/TableFilterOptions.d.ts.map +1 -1
  130. package/dist/components/Table/Filter/TableFilterOptions.js +268 -0
  131. package/dist/components/Table/Filter/TableFilterSortButton.js +17 -0
  132. package/dist/components/Table/Filter/filterBoxHelpers.js +2 -0
  133. package/dist/components/Table/Filter/filterExpression.js +48 -0
  134. package/dist/components/Table/Filter/filterLoading.js +2 -0
  135. package/dist/components/Table/Filter/useFilterDates.js +33 -0
  136. package/dist/components/Table/Filter/useFilterOptionsPreload.js +22 -0
  137. package/dist/components/Table/Filter/useLocalFilterSearch.js +32 -0
  138. package/dist/components/Table/Filter/usePagedFilterOptions.js +71 -0
  139. package/dist/components/Table/Filter/useServerFilterOptions.js +35 -0
  140. package/dist/components/Table/Filter/useVirtualOptionWindow.js +80 -0
  141. package/dist/components/Table/Functions.js +54 -0
  142. package/dist/components/Table/Skeleton/TableSkeleton.js +28 -0
  143. package/dist/components/Table/Skeleton/createSkeletonColumns.js +9 -0
  144. package/dist/components/Table/Table.d.ts +1 -0
  145. package/dist/components/Table/Table.d.ts.map +1 -1
  146. package/dist/components/Table/Table.dataPipeline.d.ts.map +1 -1
  147. package/dist/components/Table/Table.dataPipeline.js +75 -0
  148. package/dist/components/Table/Table.helpers.d.ts +2 -2
  149. package/dist/components/Table/Table.helpers.d.ts.map +1 -1
  150. package/dist/components/Table/Table.helpers.js +72 -0
  151. package/dist/components/Table/Table.js +419 -0
  152. package/dist/components/Table/Table.types.d.ts +6 -2
  153. package/dist/components/Table/Table.types.d.ts.map +1 -1
  154. package/dist/components/Table/TableHead.d.ts.map +1 -1
  155. package/dist/components/Table/TableHead.js +189 -0
  156. package/dist/components/Table/TableMobileCard.js +215 -0
  157. package/dist/components/Table/TableMobileFilters.js +56 -0
  158. package/dist/components/Table/TableMobileView.js +316 -0
  159. package/dist/components/Table/TableRow.js +136 -0
  160. package/dist/components/Table/useColumnResize.d.ts +3 -2
  161. package/dist/components/Table/useColumnResize.d.ts.map +1 -1
  162. package/dist/components/Table/useColumnResize.js +44 -0
  163. package/dist/components/Table/useDelayedSkeleton.d.ts +0 -2
  164. package/dist/components/Table/useDelayedSkeleton.d.ts.map +1 -1
  165. package/dist/components/Table/useDelayedSkeleton.js +32 -0
  166. package/dist/components/Table/useMobileFilterColumns.d.ts +1 -1
  167. package/dist/components/Table/useMobileFilterColumns.d.ts.map +1 -1
  168. package/dist/components/Table/useMobileFilterColumns.js +52 -0
  169. package/dist/components/Table/useStableColumnWidths.js +22 -0
  170. package/dist/components/Table/useTableColumnPinning.d.ts +2 -57
  171. package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
  172. package/dist/components/Table/useTableColumnPinning.js +52 -0
  173. package/dist/components/Table/useTableFilters.js +39 -0
  174. package/dist/components/Table/useTableSortState.js +38 -0
  175. package/dist/components/Table/useTableVirtualization.js +145 -0
  176. package/dist/components/Tabs/Tabs.d.ts +1 -0
  177. package/dist/components/Tabs/Tabs.d.ts.map +1 -1
  178. package/dist/components/Tabs/Tabs.js +141 -0
  179. package/dist/components/Tabs/tabsIndicator.d.ts +14 -0
  180. package/dist/components/Tabs/tabsIndicator.d.ts.map +1 -0
  181. package/dist/components/Tabs/useTabsIndicator.d.ts +6 -0
  182. package/dist/components/Tabs/useTabsIndicator.d.ts.map +1 -0
  183. package/dist/components/Tabs/useTabsIndicator.js +14 -0
  184. package/dist/components/Tabs/useTabsOverflow.js +49 -0
  185. package/dist/components/Textarea/Textarea.js +102 -0
  186. package/dist/components/Tooltip/Tooltip.d.ts +1 -0
  187. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  188. package/dist/components/Tooltip/Tooltip.js +218 -0
  189. package/dist/components/TreeView/TreeView.d.ts +1 -0
  190. package/dist/components/TreeView/TreeView.d.ts.map +1 -1
  191. package/dist/components/TreeView/TreeView.js +323 -0
  192. package/dist/components/TreeView/TreeView.types.d.ts +0 -4
  193. package/dist/components/TreeView/TreeView.types.d.ts.map +1 -1
  194. package/dist/dev/index.js +2 -2
  195. package/dist/dev/types/vanilla/src/dev/shown.d.ts +0 -2
  196. package/dist/dev/types/vanilla/src/dev/store.d.ts +0 -4
  197. package/dist/fonts/icons/urfu-ui-icon-font.eot +0 -0
  198. package/dist/fonts/icons/urfu-ui-icon-font.svg +4 -1
  199. package/dist/fonts/icons/urfu-ui-icon-font.ttf +0 -0
  200. package/dist/fonts/icons/urfu-ui-icon-font.woff +0 -0
  201. package/dist/fonts/icons/urfu-ui-icon-font.woff2 +0 -0
  202. package/dist/hooks/useActiveOptionScroll.js +20 -0
  203. package/dist/hooks/useAnchoredPosition.js +37 -0
  204. package/dist/hooks/useAutoId.d.ts +0 -1
  205. package/dist/hooks/useAutoId.d.ts.map +1 -1
  206. package/dist/hooks/useAutoId.js +7 -0
  207. package/dist/hooks/useAutoPortal.js +11 -0
  208. package/dist/hooks/useDebounce.js +11 -0
  209. package/dist/hooks/useDismiss.d.ts +1 -1
  210. package/dist/hooks/useDismiss.d.ts.map +1 -1
  211. package/dist/hooks/useDismiss.js +20 -0
  212. package/dist/hooks/useInputOverflow.d.ts +9 -0
  213. package/dist/hooks/useInputOverflow.d.ts.map +1 -0
  214. package/dist/hooks/useInputOverflow.js +16 -0
  215. package/dist/hooks/useMediaQuery.js +21 -0
  216. package/dist/hooks/useMobilePicker.js +7 -0
  217. package/dist/hooks/useMountTransition.d.ts +1 -1
  218. package/dist/hooks/useMountTransition.d.ts.map +1 -1
  219. package/dist/hooks/useMountTransition.js +21 -0
  220. package/dist/hooks/useOnlineStatus.js +11 -0
  221. package/dist/hooks/useOptionKeyboardNavigation.js +63 -0
  222. package/dist/hooks/usePagination.js +31 -0
  223. package/dist/hooks/useSelectEngine.d.ts +3 -3
  224. package/dist/hooks/useSelectEngine.d.ts.map +1 -1
  225. package/dist/hooks/useSelectEngine.js +96 -0
  226. package/dist/hooks/useTableSort.js +13 -0
  227. package/dist/index.d.ts +16 -0
  228. package/dist/index.d.ts.map +1 -1
  229. package/dist/responsive/uiKitResponsive.js +44 -0
  230. package/dist/shared/fieldAccessibility.js +8 -0
  231. package/dist/shared/iconNames.d.ts +5 -0
  232. package/dist/shared/iconNames.d.ts.map +1 -0
  233. package/dist/shared/inputOverflow.d.ts +10 -0
  234. package/dist/shared/inputOverflow.d.ts.map +1 -0
  235. package/dist/shared/kitCopy.js +9 -0
  236. package/dist/shared/optionStateColors.js +5 -0
  237. package/dist/shared/optionValue.d.ts +1 -1
  238. package/dist/shared/optionValue.d.ts.map +1 -1
  239. package/dist/shared/optionValue.js +11 -0
  240. package/dist/shared/popupTransition.js +11 -0
  241. package/dist/shared/size.d.ts +0 -1
  242. package/dist/shared/size.d.ts.map +1 -1
  243. package/dist/shared/size.js +4 -0
  244. package/dist/shared/sortRows.js +24 -0
  245. package/dist/shared/uiKitDefaults.js +25 -0
  246. package/dist/style-no-fonts.css +1 -1
  247. package/dist/style.css +1 -1
  248. package/dist/style.layer.css +8 -8
  249. package/dist/style.shell.css +15 -11
  250. package/dist/urfu-ui-kit-react.js +57 -17543
  251. package/dist/vanilla/core/BoundedOptionPageCache.js +41 -0
  252. package/dist/vanilla/core/dateMask.js +28 -0
  253. package/dist/vanilla/core/describeError.js +243 -0
  254. package/dist/vanilla/core/devLauncherOffset.js +20 -0
  255. package/dist/vanilla/core/distributeTabs.js +25 -0
  256. package/dist/vanilla/core/hasPreviousPage.js +6 -0
  257. package/dist/vanilla/core/inputMode.js +17 -0
  258. package/dist/vanilla/core/inputOverflow.js +34 -0
  259. package/dist/vanilla/core/kitRegistry.js +160 -0
  260. package/dist/vanilla/core/reconcileColumnOrder.js +5 -0
  261. package/dist/vanilla/core/sheetTitle.js +11 -0
  262. package/dist/vanilla/core/tabsIndicator.js +38 -0
  263. package/dist/vanilla/core/validation.js +21 -0
  264. package/dist/vendor/@floating-ui/core/dist/floating-ui.core.js +323 -0
  265. package/dist/vendor/@floating-ui/dom/dist/floating-ui.dom.js +383 -0
  266. package/dist/vendor/@floating-ui/react/dist/floating-ui.react.js +255 -0
  267. package/dist/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js +183 -0
  268. package/dist/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +110 -0
  269. package/dist/vendor/@floating-ui/utils/dist/floating-ui.utils.js +106 -0
  270. package/dist/vendor/clsx/dist/clsx.js +14 -0
  271. package/dist/vendor/date-fns/_lib/addLeadingZeros.js +5 -0
  272. package/dist/vendor/date-fns/_lib/defaultOptions.js +5 -0
  273. package/dist/vendor/date-fns/_lib/format/formatters.js +547 -0
  274. package/dist/vendor/date-fns/_lib/format/lightFormatters.js +56 -0
  275. package/dist/vendor/date-fns/_lib/format/longFormatters.js +47 -0
  276. package/dist/vendor/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +16 -0
  277. package/dist/vendor/date-fns/_lib/protectedTokens.js +16 -0
  278. package/dist/vendor/date-fns/addDays.js +7 -0
  279. package/dist/vendor/date-fns/addHours.js +6 -0
  280. package/dist/vendor/date-fns/addMilliseconds.js +7 -0
  281. package/dist/vendor/date-fns/addMinutes.js +6 -0
  282. package/dist/vendor/date-fns/addMonths.js +17 -0
  283. package/dist/vendor/date-fns/addQuarters.js +6 -0
  284. package/dist/vendor/date-fns/addSeconds.js +5 -0
  285. package/dist/vendor/date-fns/addWeeks.js +6 -0
  286. package/dist/vendor/date-fns/addYears.js +5 -0
  287. package/dist/vendor/date-fns/constants.js +2 -0
  288. package/dist/vendor/date-fns/constructFrom.js +4 -0
  289. package/dist/vendor/date-fns/differenceInCalendarDays.js +8 -0
  290. package/dist/vendor/date-fns/differenceInCalendarMonths.js +6 -0
  291. package/dist/vendor/date-fns/differenceInCalendarQuarters.js +7 -0
  292. package/dist/vendor/date-fns/differenceInCalendarYears.js +6 -0
  293. package/dist/vendor/date-fns/differenceInDays.js +13 -0
  294. package/dist/vendor/date-fns/endOfDay.js +6 -0
  295. package/dist/vendor/date-fns/endOfMonth.js +6 -0
  296. package/dist/vendor/date-fns/endOfWeek.js +8 -0
  297. package/dist/vendor/date-fns/endOfYear.js +6 -0
  298. package/dist/vendor/date-fns/format.js +53 -0
  299. package/dist/vendor/date-fns/getDate.js +5 -0
  300. package/dist/vendor/date-fns/getDay.js +5 -0
  301. package/dist/vendor/date-fns/getDayOfYear.js +8 -0
  302. package/dist/vendor/date-fns/getDaysInMonth.js +7 -0
  303. package/dist/vendor/date-fns/getDefaultOptions.js +5 -0
  304. package/dist/vendor/date-fns/getHours.js +5 -0
  305. package/dist/vendor/date-fns/getISODay.js +6 -0
  306. package/dist/vendor/date-fns/getISOWeek.js +9 -0
  307. package/dist/vendor/date-fns/getISOWeekYear.js +12 -0
  308. package/dist/vendor/date-fns/getMinutes.js +5 -0
  309. package/dist/vendor/date-fns/getMonth.js +5 -0
  310. package/dist/vendor/date-fns/getQuarter.js +6 -0
  311. package/dist/vendor/date-fns/getSeconds.js +5 -0
  312. package/dist/vendor/date-fns/getTime.js +5 -0
  313. package/dist/vendor/date-fns/getWeek.js +9 -0
  314. package/dist/vendor/date-fns/getWeekYear.js +14 -0
  315. package/dist/vendor/date-fns/getYear.js +5 -0
  316. package/dist/vendor/date-fns/isAfter.js +6 -0
  317. package/dist/vendor/date-fns/isBefore.js +6 -0
  318. package/dist/vendor/date-fns/isDate.js +4 -0
  319. package/dist/vendor/date-fns/isEqual.js +6 -0
  320. package/dist/vendor/date-fns/isSameDay.js +6 -0
  321. package/dist/vendor/date-fns/isSameMonth.js +6 -0
  322. package/dist/vendor/date-fns/isSameQuarter.js +6 -0
  323. package/dist/vendor/date-fns/isSameWeek.js +6 -0
  324. package/dist/vendor/date-fns/isSameYear.js +6 -0
  325. package/dist/vendor/date-fns/isValid.js +9 -0
  326. package/dist/vendor/date-fns/isWithinInterval.js +9 -0
  327. package/dist/vendor/date-fns/locale/_lib/buildFormatLongFn.js +7 -0
  328. package/dist/vendor/date-fns/locale/_lib/buildLocalizeFn.js +16 -0
  329. package/dist/vendor/date-fns/locale/_lib/buildMatchFn.js +29 -0
  330. package/dist/vendor/date-fns/locale/_lib/buildMatchPatternFn.js +13 -0
  331. package/dist/vendor/date-fns/locale/en-US/_lib/formatDistance.js +68 -0
  332. package/dist/vendor/date-fns/locale/en-US/_lib/formatLong.js +31 -0
  333. package/dist/vendor/date-fns/locale/en-US/_lib/formatRelative.js +9 -0
  334. package/dist/vendor/date-fns/locale/en-US/_lib/localize.js +153 -0
  335. package/dist/vendor/date-fns/locale/en-US/_lib/match.js +108 -0
  336. package/dist/vendor/date-fns/locale/en-US.js +18 -0
  337. package/dist/vendor/date-fns/locale/ru/_lib/formatDistance.js +182 -0
  338. package/dist/vendor/date-fns/locale/ru/_lib/formatLong.js +28 -0
  339. package/dist/vendor/date-fns/locale/ru/_lib/formatRelative.js +62 -0
  340. package/dist/vendor/date-fns/locale/ru/_lib/localize.js +177 -0
  341. package/dist/vendor/date-fns/locale/ru/_lib/match.js +109 -0
  342. package/dist/vendor/date-fns/locale/ru.js +18 -0
  343. package/dist/vendor/date-fns/max.js +9 -0
  344. package/dist/vendor/date-fns/min.js +9 -0
  345. package/dist/vendor/date-fns/parse/_lib/Parser.js +20 -0
  346. package/dist/vendor/date-fns/parse/_lib/Setter.js +36 -0
  347. package/dist/vendor/date-fns/parse/_lib/constants.js +46 -0
  348. package/dist/vendor/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +46 -0
  349. package/dist/vendor/date-fns/parse/_lib/parsers/AMPMParser.js +46 -0
  350. package/dist/vendor/date-fns/parse/_lib/parsers/DateParser.js +59 -0
  351. package/dist/vendor/date-fns/parse/_lib/parsers/DayOfYearParser.js +49 -0
  352. package/dist/vendor/date-fns/parse/_lib/parsers/DayParser.js +45 -0
  353. package/dist/vendor/date-fns/parse/_lib/parsers/DayPeriodParser.js +46 -0
  354. package/dist/vendor/date-fns/parse/_lib/parsers/EraParser.js +29 -0
  355. package/dist/vendor/date-fns/parse/_lib/parsers/ExtendedYearParser.js +19 -0
  356. package/dist/vendor/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +20 -0
  357. package/dist/vendor/date-fns/parse/_lib/parsers/Hour0To11Parser.js +30 -0
  358. package/dist/vendor/date-fns/parse/_lib/parsers/Hour0to23Parser.js +30 -0
  359. package/dist/vendor/date-fns/parse/_lib/parsers/Hour1To24Parser.js +31 -0
  360. package/dist/vendor/date-fns/parse/_lib/parsers/Hour1to12Parser.js +31 -0
  361. package/dist/vendor/date-fns/parse/_lib/parsers/ISODayParser.js +101 -0
  362. package/dist/vendor/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +45 -0
  363. package/dist/vendor/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +45 -0
  364. package/dist/vendor/date-fns/parse/_lib/parsers/ISOWeekParser.js +47 -0
  365. package/dist/vendor/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +38 -0
  366. package/dist/vendor/date-fns/parse/_lib/parsers/LocalDayParser.js +76 -0
  367. package/dist/vendor/date-fns/parse/_lib/parsers/LocalWeekParser.js +46 -0
  368. package/dist/vendor/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +67 -0
  369. package/dist/vendor/date-fns/parse/_lib/parsers/MinuteParser.js +30 -0
  370. package/dist/vendor/date-fns/parse/_lib/parsers/MonthParser.js +73 -0
  371. package/dist/vendor/date-fns/parse/_lib/parsers/QuarterParser.js +71 -0
  372. package/dist/vendor/date-fns/parse/_lib/parsers/SecondParser.js +30 -0
  373. package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +76 -0
  374. package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +73 -0
  375. package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +71 -0
  376. package/dist/vendor/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +20 -0
  377. package/dist/vendor/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +20 -0
  378. package/dist/vendor/date-fns/parse/_lib/parsers/YearParser.js +47 -0
  379. package/dist/vendor/date-fns/parse/_lib/parsers.js +65 -0
  380. package/dist/vendor/date-fns/parse/_lib/utils.js +90 -0
  381. package/dist/vendor/date-fns/parse.js +85 -0
  382. package/dist/vendor/date-fns/parseISO.js +119 -0
  383. package/dist/vendor/date-fns/set.js +8 -0
  384. package/dist/vendor/date-fns/setDay.js +9 -0
  385. package/dist/vendor/date-fns/setHours.js +6 -0
  386. package/dist/vendor/date-fns/setISODay.js +8 -0
  387. package/dist/vendor/date-fns/setISOWeek.js +7 -0
  388. package/dist/vendor/date-fns/setMinutes.js +6 -0
  389. package/dist/vendor/date-fns/setMonth.js +10 -0
  390. package/dist/vendor/date-fns/setQuarter.js +7 -0
  391. package/dist/vendor/date-fns/setSeconds.js +6 -0
  392. package/dist/vendor/date-fns/setWeek.js +7 -0
  393. package/dist/vendor/date-fns/setYear.js +7 -0
  394. package/dist/vendor/date-fns/startOfDay.js +6 -0
  395. package/dist/vendor/date-fns/startOfISOWeek.js +5 -0
  396. package/dist/vendor/date-fns/startOfISOWeekYear.js +8 -0
  397. package/dist/vendor/date-fns/startOfMonth.js +6 -0
  398. package/dist/vendor/date-fns/startOfQuarter.js +6 -0
  399. package/dist/vendor/date-fns/startOfWeek.js +8 -0
  400. package/dist/vendor/date-fns/startOfWeekYear.js +10 -0
  401. package/dist/vendor/date-fns/startOfYear.js +7 -0
  402. package/dist/vendor/date-fns/subDays.js +5 -0
  403. package/dist/vendor/date-fns/subMonths.js +5 -0
  404. package/dist/vendor/date-fns/subQuarters.js +5 -0
  405. package/dist/vendor/date-fns/subWeeks.js +5 -0
  406. package/dist/vendor/date-fns/subYears.js +5 -0
  407. package/dist/vendor/date-fns/toDate.js +5 -0
  408. package/dist/vendor/date-fns/transpose.js +15 -0
  409. package/dist/vendor/react-datepicker/dist/es/index.js +2696 -0
  410. package/package.json +37 -35
  411. package/dist/hooks/useOutsideAlerter.d.ts +0 -3
  412. package/dist/hooks/useOutsideAlerter.d.ts.map +0 -1
@@ -0,0 +1,145 @@
1
+ import { useRef as i, useState as A, useLayoutEffect as k, useCallback as N, useMemo as Z, useEffect as B } from "react";
2
+ const ot = ({
3
+ filteredData: e,
4
+ virtualizationOn: c,
5
+ visibleRows: q,
6
+ rowHeight: I,
7
+ isLoading: C,
8
+ isLoadingPreloader: S,
9
+ id: E,
10
+ page: H,
11
+ pageSize: p
12
+ }) => {
13
+ const s = i(null), [h, P] = A(0), [_, $] = A(0), d = i([]), j = i([]), F = i([]), G = i([]), J = i([]), K = i({}), T = i(0);
14
+ k(() => {
15
+ if (!C && !S && s.current) {
16
+ if (e.length === 0) {
17
+ T.current = 0;
18
+ return;
19
+ }
20
+ const t = s.current.getBoundingClientRect().height;
21
+ t > 0 && (T.current = t);
22
+ }
23
+ });
24
+ const [L, O] = A(void 0), Q = N(
25
+ (t) => d.current[t] ?? I,
26
+ [I]
27
+ ), l = Z(() => {
28
+ const t = new Array(e.length + 1).fill(0);
29
+ for (let n = 0; n < e.length; n++)
30
+ t[n + 1] = t[n] + Q(n);
31
+ return t;
32
+ }, [e.length, Q, _]), a = Z(
33
+ () => l.length > 0 ? l[l.length - 1] : 0,
34
+ [l]
35
+ ), w = q + 1, U = N(
36
+ (t) => {
37
+ let n = 0, o = l.length - 1;
38
+ for (; n < o; ) {
39
+ const r = Math.floor((n + o) / 2);
40
+ l[r] <= t ? n = r + 1 : o = r;
41
+ }
42
+ return Math.max(0, Math.min(e.length - 1, n - 1));
43
+ },
44
+ [l, e.length]
45
+ ), X = typeof H == "number" && typeof p == "number" && p > 0, z = X ? e.slice((H - 1) * p, H * p) : e, f = c && !X && e.length > q, D = f ? l[h] : 0, tt = f ? Math.max(
46
+ 0,
47
+ a - l[Math.min(e.length, h + w)]
48
+ ) : 0, V = N(
49
+ (t) => {
50
+ if (!f)
51
+ return;
52
+ const n = t.target, o = Math.max(0, e.length - w), r = Math.min(o, U(n.scrollTop));
53
+ P(r);
54
+ },
55
+ [e.length, U, f, w]
56
+ );
57
+ B(() => {
58
+ if (c && s.current) {
59
+ const t = s.current;
60
+ return t.addEventListener("scroll", V), () => {
61
+ t == null || t.removeEventListener("scroll", V);
62
+ };
63
+ }
64
+ }, [c, V]), B(() => {
65
+ c && s.current && e.length < h && (s.current.scrollTo({ top: 0 }), P(0));
66
+ }, [e.length, h, c]);
67
+ const [M, et] = A(0);
68
+ B(() => {
69
+ const t = s.current;
70
+ if (!c || !t || typeof ResizeObserver > "u") return;
71
+ let n = t.clientWidth;
72
+ const o = new ResizeObserver((r) => {
73
+ var m;
74
+ const u = ((m = r[0]) == null ? void 0 : m.contentRect.width) ?? 0;
75
+ u <= 0 || Math.abs(u - n) <= 0.5 || (n = u, et((v) => v + 1));
76
+ });
77
+ return o.observe(t), () => o.disconnect();
78
+ }, [c]);
79
+ const Y = i(null);
80
+ return k(() => {
81
+ if (!c || C) return;
82
+ const t = Y.current;
83
+ Y.current = { data: e, width: M }, !(!t || t.data === e && t.width === M) && (d.current = [], $((n) => n + 1));
84
+ }, [c, C, e, M]), B(() => {
85
+ if (!c)
86
+ return;
87
+ const t = f ? h : 0, n = f ? Math.min(e.length, h + w) : e.length;
88
+ let o = !1;
89
+ for (let r = t; r < n; r++) {
90
+ const u = K.current[r];
91
+ if (!u) continue;
92
+ const m = u.getBoundingClientRect().height;
93
+ (!d.current[r] || Math.abs(d.current[r] - m) > 0.5) && (d.current[r] = m, o = !0);
94
+ }
95
+ o && $((r) => r + 1);
96
+ }, [c, f, h, w, e.length, M]), k(() => {
97
+ var t;
98
+ if (!C && e.length > 0) {
99
+ const n = Array.from(((t = s.current) == null ? void 0 : t.querySelectorAll(".table tbody tr")) ?? []).filter((b) => b.cells.length > 0), o = new Array(e.length).fill(void 0), r = new Array(e.length).fill(void 0), u = new Array(e.length).fill(void 0), m = new Array(e.length).fill(void 0), v = new Array(e.length).fill(void 0);
100
+ n.forEach((b, W) => {
101
+ const y = Number(b.dataset.virtualIndex ?? W);
102
+ if (isNaN(y)) return;
103
+ const nt = b.getBoundingClientRect().height;
104
+ o[y] = nt;
105
+ const x = Array.from(b.children);
106
+ r[y] = x.map((R) => R.getBoundingClientRect().height), u[y] = x.map((R) => {
107
+ const g = R.firstElementChild;
108
+ return g ? g.getBoundingClientRect().height : 0;
109
+ }), m[y] = x.map((R) => {
110
+ const g = R.firstElementChild;
111
+ return g ? g.getBoundingClientRect().width : 0;
112
+ }), v[y] = x.map((R) => {
113
+ const g = window.getComputedStyle(R);
114
+ return {
115
+ padding: g.padding,
116
+ border: g.border,
117
+ background: g.background
118
+ };
119
+ });
120
+ }), d.current = o.map((b, W) => b ?? d.current[W]), j.current = r.filter(Boolean), F.current = u.filter(Boolean), G.current = m.filter(Boolean), J.current = v.filter(Boolean);
121
+ }
122
+ }, [C, e, E, H, p, h, w]), B(() => {
123
+ !S && e.length > 0 && setTimeout(() => {
124
+ const t = document.querySelector(`#${E} .table tbody`);
125
+ t && O(t.getBoundingClientRect().height);
126
+ }, 0);
127
+ }, [S, e, E]), {
128
+ rootRef: s,
129
+ start: h,
130
+ visibleCount: w,
131
+ pagedData: z,
132
+ hasOverflow: f,
133
+ topPadding: D,
134
+ bottomPadding: tt,
135
+ rowRefs: K,
136
+ rowHeightsRef: d,
137
+ tdHeightsRef: j,
138
+ tdContentHeightsRef: F,
139
+ tdContentWidthsRef: G,
140
+ tdStylesRef: J,
141
+ preloaderRealHeight: L,
142
+ lastLoadedHeightRef: T
143
+ };
144
+ };
145
+ export { ot as useTableVirtualization$u };
@@ -1,4 +1,5 @@
1
1
 
2
+
2
3
  import './Tabs.less';
3
4
  import '../../styles/tokens.less';
4
5
  import type { TabsProperties } from './Tabs.types';
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,aAAa,CAAC;AACrB,OAAO,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,cAAc,CAAC;AAQvE,eAAO,MAAM,IAAI,GAAI,8FASlB,cAAc,4CA+JhB,CAAC"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,mDAAmD,CAAC;AAC3D,OAAO,aAAa,CAAC;AACrB,OAAO,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAsB,cAAc,EAAE,MAAM,cAAc,CAAC;AAWvE,eAAO,MAAM,IAAI,GAAI,8FASlB,cAAc,4CAyKhB,CAAC"}
@@ -0,0 +1,141 @@
1
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ /* empty css */
6
+ import { useState as Q, useRef as f, useId as V, useEffect as X } from "react";
7
+ import { Icon$u as p } from "../Icon/Icon.js";
8
+ import { Tooltip$u as Z } from "../Tooltip/Tooltip.js";
9
+ import { useDismiss$u as W } from "../../hooks/useDismiss.js";
10
+ import { useMountTransition$u as x } from "../../hooks/useMountTransition.js";
11
+ import { getPopupTransitionStyle$u as D, POPUP_TRANSITION_MS$u as ee } from "../../shared/popupTransition.js";
12
+ import { useTabsOverflow$u as te } from "./useTabsOverflow.js";
13
+ import { useTabsIndicator$u as ne } from "./useTabsIndicator.js";
14
+ const oe = [], ye = ({
15
+ onClick: b,
16
+ tabsData: r = oe,
17
+ activeTab: m,
18
+ className: w = "",
19
+ variant: $ = "line",
20
+ fullWidth: h = !1,
21
+ tooltipOn: P = !1,
22
+ tooltipDisabled: M = !1
23
+ }) => {
24
+ const { containerRef: E, measureRef: U, moreMeasureRef: _, visible: B, overflow: l, paddingOf: K, promote: j } = te(r, m, h), [c, a] = Q(!1), v = f(null), y = f(null), O = f(null), R = V(), { shouldRender: q, status: z, isAnimated: C } = x({ isOpen: c, duration: ee }), A = f(l);
25
+ c && (A.current = l);
26
+ const g = $ === "segment", N = g ? "u-tab-segment" : "u-tab-line", F = g ? "u-tab-segment-active" : "u-tab-active", { trackRef: H, indicatorRef: J } = ne(m, `${$}|${h}|${JSON.stringify(r.map((e) => e.id))}`);
27
+ W({ refs: [v], enabled: c, onDismiss: () => a(!1) }), X(() => {
28
+ l.length || a(!1);
29
+ }, [l.length]);
30
+ const T = (e) => {
31
+ var n, s;
32
+ if ((n = r[e]) != null && n.disabled) return;
33
+ const t = l.includes(e);
34
+ j(e), a(!1), b == null || b(r[e]), t && ((s = y.current) == null || s.focus({ preventScroll: !0 }));
35
+ }, I = () => {
36
+ var e;
37
+ return Array.from(((e = O.current) == null ? void 0 : e.querySelectorAll('button:not([aria-disabled="true"])')) || []);
38
+ }, L = (e) => {
39
+ var n;
40
+ const t = I();
41
+ (n = t[e < 0 ? t.length - 1 : e]) == null || n.focus();
42
+ }, Y = (e) => {
43
+ var d, u;
44
+ const t = I(), n = t.indexOf(document.activeElement), s = e.key === "ArrowDown" ? (n + 1) % t.length : e.key === "ArrowUp" ? (n - 1 + t.length) % t.length : e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : -1;
45
+ s >= 0 ? (e.preventDefault(), (d = t[s]) == null || d.focus()) : e.key === "Escape" && (e.preventDefault(), a(!1), (u = y.current) == null || u.focus());
46
+ }, k = (e) => /* @__PURE__ */ o("span", { className: "u-tabs-title", "data-label": e.title, children: e.title }), G = (e) => {
47
+ if (!e.icon) return k(e);
48
+ const t = e.iconPosition === "right";
49
+ return /* @__PURE__ */ i("span", { className: `u-tabs-content${t ? " u-tabs-content-reverse" : ""}`, children: [
50
+ /* @__PURE__ */ o(p, { name: e.icon, className: "u-tabs-icon" }),
51
+ !e.iconOnly && k(e)
52
+ ] });
53
+ }, S = (e, t = !1) => {
54
+ const n = r[e], s = !!(n.icon && n.iconOnly), d = n.icon ? s ? " u-tab-icon-only" : ` u-tab-with-icon${n.iconPosition === "right" ? " u-tab-icon-right" : ""}` : "", u = /* @__PURE__ */ o(
55
+ "button",
56
+ {
57
+ className: `${N}${d}${n.id === m ? ` ${F}` : ""}${n.disabled ? " u-tab--disabled" : ""}`,
58
+ type: "button",
59
+ "data-label": s ? void 0 : n.title,
60
+ "aria-label": s ? n.title : void 0,
61
+ "data-measure-tab": t ? "" : void 0,
62
+ style: t ? void 0 : K(e),
63
+ tabIndex: t || n.disabled ? -1 : void 0,
64
+ "aria-current": !t && n.id === m ? "page" : void 0,
65
+ "aria-disabled": !t && n.disabled ? "true" : void 0,
66
+ onClick: t ? void 0 : () => T(e),
67
+ children: G(n)
68
+ }
69
+ );
70
+ return /* @__PURE__ */ o("div", { className: "u-tabs-item", children: P && !M && !t ? /* @__PURE__ */ o(Z, { tooltipText: n.title, portalOn: !0, className: "u-tabs-tooltip", children: u }) : u }, e);
71
+ };
72
+ return /* @__PURE__ */ i(
73
+ "div",
74
+ {
75
+ ref: E,
76
+ className: `u-tabs ${g ? "u-tabs-segment" : "u-tabs-line"}${h ? " u-tabs-full-width" : ""}${w ? ` ${w}` : ""}`,
77
+ children: [
78
+ /* @__PURE__ */ i("div", { className: "u-tabs-track", ref: H, children: [
79
+ /* @__PURE__ */ o("span", { className: "u-tabs-indicator", ref: J, "aria-hidden": "true" }),
80
+ B.map((e) => S(e)),
81
+ l.length > 0 && /* @__PURE__ */ i(
82
+ "div",
83
+ {
84
+ className: "u-tabs-more",
85
+ ref: v,
86
+ onKeyDown: Y,
87
+ onBlur: (e) => {
88
+ const t = e.relatedTarget;
89
+ t && !e.currentTarget.contains(t) && a(!1);
90
+ },
91
+ children: [
92
+ /* @__PURE__ */ i(
93
+ "button",
94
+ {
95
+ type: "button",
96
+ ref: y,
97
+ className: `${N} u-tabs-more-trigger`,
98
+ "aria-expanded": c,
99
+ "aria-haspopup": "menu",
100
+ "aria-controls": R,
101
+ onClick: () => a((e) => !e),
102
+ onKeyDown: (e) => {
103
+ (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), e.stopPropagation(), a(!0), requestAnimationFrame(() => L(e.key === "ArrowUp" ? -1 : 0)));
104
+ },
105
+ children: [
106
+ /* @__PURE__ */ o("span", { children: "Ещё" }),
107
+ /* @__PURE__ */ o(p, { name: "down", size: 14, rotate: c ? 180 : 0 })
108
+ ]
109
+ }
110
+ ),
111
+ q && /* @__PURE__ */ o("div", { className: "u-tabs-more-menu", role: "menu", id: R, ref: O, style: D(z, C), children: A.current.filter((e) => r[e]).map((e) => /* @__PURE__ */ o(
112
+ "button",
113
+ {
114
+ type: "button",
115
+ role: "menuitem",
116
+ "aria-disabled": r[e].disabled ? "true" : void 0,
117
+ tabIndex: r[e].disabled ? -1 : void 0,
118
+ onClick: () => T(e),
119
+ children: r[e].icon ? /* @__PURE__ */ i("span", { className: "u-tabs-content", children: [
120
+ /* @__PURE__ */ o(p, { name: r[e].icon, className: "u-tabs-icon" }),
121
+ /* @__PURE__ */ o("span", { children: r[e].title })
122
+ ] }) : r[e].title
123
+ },
124
+ e
125
+ )) })
126
+ ]
127
+ }
128
+ )
129
+ ] }),
130
+ /* @__PURE__ */ i("div", { ref: U, className: "u-tabs-measure", "aria-hidden": "true", children: [
131
+ r.map((e, t) => S(t, !0)),
132
+ /* @__PURE__ */ i("button", { ref: _, type: "button", tabIndex: -1, className: `${N} u-tabs-more-trigger u-tabs-more-measure`, children: [
133
+ /* @__PURE__ */ o("span", { children: "Ещё" }),
134
+ /* @__PURE__ */ o(p, { name: "down", size: 14 })
135
+ ] })
136
+ ] })
137
+ ]
138
+ }
139
+ );
140
+ };
141
+ export { ye as Tabs$u };
@@ -0,0 +1,14 @@
1
+ /** Длительность переезда подсветки активной вкладки, мс. */
2
+ export declare const TABS_INDICATOR_MS = 200;
3
+ /**
4
+ * Подсветка активной вкладки — один элемент `.u-tabs-indicator` на ряд `.u-tabs-track`.
5
+ * Встаёт на кнопку с `aria-current="page"`; переезжает к ней, только когда сменилась активная
6
+ * вкладка при том же составе. Первый показ, смена размеров и состава, prefers-reduced-motion — без переезда.
7
+ */
8
+ export declare const createTabsIndicator: () => {
9
+ /** После каждой отрисовки. layout — состав и вид вкладок: при его смене подсветка не едет. */
10
+ update(track: HTMLElement | null, indicator: HTMLElement | null, active: unknown, layout: string): void;
11
+ /** Ряд сменил размер (окно, загрузка шрифтов) — встать на место без переезда. */
12
+ refresh(track: HTMLElement | null, indicator: HTMLElement | null): void;
13
+ };
14
+ //# sourceMappingURL=tabsIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabsIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/tabsIndicator.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAQrC;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAmC5B,8FAA8F;kBAChF,WAAW,GAAG,IAAI,aAAa,WAAW,GAAG,IAAI,UAAU,OAAO,UAAU,MAAM;IAMhG,iFAAiF;mBAClE,WAAW,GAAG,IAAI,aAAa,WAAW,GAAG,IAAI;CAInE,CAAC"}
@@ -0,0 +1,6 @@
1
+ /** Подсветка активной вкладки: переезжает к выбранной, при смене размеров ряда встаёт на место. */
2
+ export declare const useTabsIndicator: (activeTab: string | number | undefined, layout: string) => {
3
+ trackRef: import("react").MutableRefObject<HTMLDivElement>;
4
+ indicatorRef: import("react").MutableRefObject<HTMLSpanElement>;
5
+ };
6
+ //# sourceMappingURL=useTabsIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTabsIndicator.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/useTabsIndicator.ts"],"names":[],"mappings":"AAGA,mGAAmG;AACnG,eAAO,MAAM,gBAAgB,GAAI,WAAW,MAAM,GAAG,MAAM,GAAG,SAAS,EAAE,QAAQ,MAAM;;;CAkBtF,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { useRef as o, useState as a, useLayoutEffect as s } from "react";
2
+ import { createTabsIndicator$u as f } from "../../vanilla/core/tabsIndicator.js";
3
+ const p = (u, i) => {
4
+ const e = o(null), r = o(null), [t] = a(f);
5
+ return s(() => {
6
+ t.update(e.current, r.current, u, i);
7
+ }), s(() => {
8
+ const n = e.current;
9
+ if (!n || typeof ResizeObserver > "u") return;
10
+ const c = new ResizeObserver(() => t.refresh(e.current, r.current));
11
+ return c.observe(n), () => c.disconnect();
12
+ }, [t]), { trackRef: e, indicatorRef: r };
13
+ };
14
+ export { p as useTabsIndicator$u };
@@ -0,0 +1,49 @@
1
+ import { useRef as R, useState as B, useCallback as P, useLayoutEffect as T } from "react";
2
+ import { TAB_PADDING_MIN_RATIO$u as _, distributeTabs$u as D, tabsSqueeze$u as G } from "../../vanilla/core/distributeTabs.js";
3
+ const K = (l, y, g) => {
4
+ const u = R(null), p = R(null), O = R(null), m = JSON.stringify(l.map((t) => t.id)), L = l.map((t, e) => e), [F, q] = B({ signature: m, order: L }), h = F.signature === m ? F.order : L, [r, M] = B({ widths: [], paddings: [], available: 0, gap: 0, more: 0 }), i = P(() => {
5
+ var x;
6
+ const t = u.current, e = p.current;
7
+ if (!t || !e) return;
8
+ const n = getComputedStyle(t), d = t.getBoundingClientRect().width - (parseFloat(n.borderLeftWidth) || 0) - (parseFloat(n.borderRightWidth) || 0) - (parseFloat(n.paddingLeft) || 0) - (parseFloat(n.paddingRight) || 0), s = Array.from(e.querySelectorAll("[data-measure-tab]")), w = s.map((o) => o.getBoundingClientRect().width), v = s.map((o) => {
9
+ const c = getComputedStyle(o);
10
+ return [parseFloat(c.paddingLeft) || 0, parseFloat(c.paddingRight) || 0];
11
+ }), f = {
12
+ widths: w,
13
+ paddings: v,
14
+ available: d,
15
+ gap: parseFloat(n.columnGap || "0") || 0,
16
+ more: ((x = O.current) == null ? void 0 : x.getBoundingClientRect().width) || 0
17
+ };
18
+ M((o) => o.available === f.available && o.gap === f.gap && o.more === f.more && o.widths.length === w.length && o.widths.every((c, b) => c === w[b]) && o.paddings.every(([c, b], A) => {
19
+ var E, I;
20
+ return c === ((E = v[A]) == null ? void 0 : E[0]) && b === ((I = v[A]) == null ? void 0 : I[1]);
21
+ }) ? o : f);
22
+ }, []);
23
+ T(() => {
24
+ var n, d;
25
+ i();
26
+ let t = !1;
27
+ const e = typeof ResizeObserver > "u" ? null : new ResizeObserver(i);
28
+ return u.current && (e == null || e.observe(u.current)), p.current && (e == null || e.observe(p.current)), window.addEventListener("resize", i), (n = document.fonts) == null || n.addEventListener("loadingdone", i), (d = document.fonts) == null || d.ready.then(() => {
29
+ t || i();
30
+ }), () => {
31
+ var s;
32
+ t = !0, e == null || e.disconnect(), window.removeEventListener("resize", i), (s = document.fonts) == null || s.removeEventListener("loadingdone", i);
33
+ };
34
+ }, [i, l, g]);
35
+ const N = y === void 0 ? -1 : l.findIndex((t) => t.id === y), S = r.widths.length === l.length && r.widths.every((t) => t > 0), z = g ? [] : r.paddings.map(([t, e]) => (t + e) * (1 - _)), a = S ? D(h, r.widths, r.available, r.gap, r.more, N, g, z) : { visible: h, overflow: [] }, C = S && !g ? G(a.visible, r.widths, z, r.available, r.gap, r.more, a.overflow.length > 0) : 0;
36
+ return { containerRef: u, measureRef: p, moreMeasureRef: O, ...a, paddingOf: (t) => {
37
+ const e = r.paddings[t];
38
+ if (!C || !e) return;
39
+ const n = 1 - C * (1 - _);
40
+ return { paddingLeft: e[0] * n, paddingRight: e[1] * n };
41
+ }, promote: (t) => {
42
+ if (!a.overflow.includes(t)) return;
43
+ const e = a.visible[a.visible.length - 1];
44
+ if (e === void 0) return;
45
+ const n = [...h], d = n.indexOf(t), s = n.indexOf(e);
46
+ [n[d], n[s]] = [n[s], n[d]], q({ signature: m, order: n });
47
+ } };
48
+ };
49
+ export { K as useTabsOverflow$u };
@@ -0,0 +1,102 @@
1
+ import { jsxs as u, jsx as l } from "react/jsx-runtime";
2
+ /* empty css */
3
+ import { useAutoId$u as S } from "../../hooks/useAutoId.js";
4
+ import { getFieldAccessibility$u as C } from "../../shared/fieldAccessibility.js";
5
+ import { sizeClassName$u as F } from "../../shared/size.js";
6
+ import { resolveValidation$u as G } from "../../vanilla/core/validation.js";
7
+ const J = ({
8
+ "aria-label": d,
9
+ "aria-labelledby": x,
10
+ "aria-describedby": p,
11
+ title: r = "",
12
+ placeholder: m = "",
13
+ defaultValue: b,
14
+ value: h,
15
+ id: v,
16
+ name: f = "",
17
+ onChange: y,
18
+ required: s = !1,
19
+ disabled: g = !1,
20
+ lineUp: i = !1,
21
+ rowGap: $ = 4,
22
+ columnGap: w = 20,
23
+ styleInputContainer: j,
24
+ styleTitle: N,
25
+ styleInput: T,
26
+ className: z = "",
27
+ size: E,
28
+ validationText: A = "Заполните поле",
29
+ validationOn: B
30
+ }) => {
31
+ const a = S(v, "u-textarea"), o = F(E), e = G({ validationOn: B, validationText: A }), c = e.showText && !!e.text, O = C(a, r, s, { ...e, showText: c }, {
32
+ "aria-label": d,
33
+ "aria-labelledby": x,
34
+ "aria-describedby": p
35
+ }), n = (t) => typeof t == "number" ? `calc(${t} * var(--u-preset-unit, 1px))` : String(t);
36
+ return /* @__PURE__ */ u(
37
+ "div",
38
+ {
39
+ className: `u-react-input-container${o ? ` ${o}` : ""} ${z}`,
40
+ children: [
41
+ /* @__PURE__ */ u(
42
+ "div",
43
+ {
44
+ style: Object.assign(
45
+ {
46
+ display: "flex",
47
+ flexDirection: i ? "row" : "column",
48
+ rowGap: i ? null : n($),
49
+ columnGap: i ? n(w) : null
50
+ },
51
+ j
52
+ ),
53
+ children: [
54
+ r && /* @__PURE__ */ l(
55
+ "div",
56
+ {
57
+ id: `${a}-label`,
58
+ className: `${s ? "u-required" : ""} u-react-input-title`,
59
+ style: Object.assign(
60
+ {
61
+ color: "var(--u-field-title-color, #545454)",
62
+ fontSize: "var(--u-field-label-size-main, calc(14 * var(--u-unit, 1px)))"
63
+ },
64
+ N
65
+ ),
66
+ children: r
67
+ }
68
+ ),
69
+ /* @__PURE__ */ l(
70
+ "textarea",
71
+ {
72
+ ...O,
73
+ className: `u-textarea${e.hasError ? " u-textarea-required" : ""}`,
74
+ id: a,
75
+ name: f,
76
+ placeholder: m,
77
+ value: h,
78
+ defaultValue: b,
79
+ disabled: g,
80
+ onChange: y,
81
+ style: Object.assign(
82
+ {
83
+ minHeight: "max(var(--u-textarea-min-height, 48px), calc(20 * var(--u-unit, 1px) + 2px))",
84
+ // Строка, рамка и отступы должны помещаться при минимальной высоте.
85
+ paddingBlock: "clamp(0px, calc((var(--u-textarea-min-height, 48px) - 20 * var(--u-unit, 1px) - 2px) / 2), var(--u-input-padding-y, 14px))"
86
+ },
87
+ e.hasError && { border: "1px solid var(--u-color-error, #EF302B)" },
88
+ // `styleInput` идёт последним: как и в остальных полях,
89
+ // потребитель может перекрыть стили компонента.
90
+ T
91
+ )
92
+ }
93
+ )
94
+ ]
95
+ }
96
+ ),
97
+ c && /* @__PURE__ */ l("h5", { id: `${a}-error`, className: "h5 clr-red-main", style: { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: e.text })
98
+ ]
99
+ }
100
+ );
101
+ };
102
+ export { J as Textarea$u };
@@ -1,4 +1,5 @@
1
1
 
2
+
2
3
  import "./Tooltip.less";
3
4
  import { TooltipProperties } from './Tooltip.types';
4
5
  export declare const Tooltip: ({ children, className, portalOn, id, tooltipText, style, tooltipStyle, position, isActive, showWhenActive }: TooltipProperties) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAE1C,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAiOpD,eAAO,MAAM,OAAO,GAAI,6GAWrB,iBAAiB,4CAkPnB,CAAC"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAE1C,OAAO,sDAAsD,CAAC;AAC9D,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAiOpD,eAAO,MAAM,OAAO,GAAI,6GAWrB,iBAAiB,4CAkPnB,CAAC"}