urfu-ui-kit-react 2.1.2 → 2.1.4
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.
- package/README.md +4 -25
- package/dist/components/Accordion/Accordion.js +18 -0
- package/dist/components/BreadCrumbs/BreadCrumbs.d.ts +1 -1
- package/dist/components/BreadCrumbs/BreadCrumbs.d.ts.map +1 -1
- package/dist/components/BreadCrumbs/BreadCrumbs.js +32 -0
- package/dist/components/Button/Button.d.ts +1 -0
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +88 -0
- package/dist/components/Button/Button.types.d.ts +9 -3
- package/dist/components/Button/Button.types.d.ts.map +1 -1
- package/dist/components/Button/ButtonRefreshIcon.js +35 -0
- package/dist/components/Calendar/Calendar.d.ts +1 -5
- package/dist/components/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/Calendar/Calendar.js +355 -0
- package/dist/components/Calendar/CalendarSelect.js +149 -0
- package/dist/components/Calendar/MaskedDateInput.d.ts.map +1 -1
- package/dist/components/Calendar/MaskedDateInput.js +191 -0
- package/dist/components/Calendar/dateMask.d.ts +0 -1
- package/dist/components/Calendar/dateMask.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/Card/Card.js +75 -0
- package/dist/components/Checkbox/Checkbox.js +30 -0
- package/dist/components/ColumnSettings/ColumnSettings.js +216 -0
- package/dist/components/ConfirmModal/ConfirmModal.d.ts +1 -0
- package/dist/components/ConfirmModal/ConfirmModal.d.ts.map +1 -1
- package/dist/components/ConfirmModal/ConfirmModal.js +40 -0
- package/dist/components/ErrorScreen/ErrorScreen.d.ts +1 -1
- package/dist/components/ErrorScreen/ErrorScreen.d.ts.map +1 -1
- package/dist/components/ErrorScreen/ErrorScreen.js +221 -0
- package/dist/components/ErrorScreen/ErrorScreenIllustration.js +57 -0
- package/dist/components/FormField/FormField.d.ts +1 -1
- package/dist/components/FormField/FormField.d.ts.map +1 -1
- package/dist/components/FormField/FormField.js +40 -0
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/Icon.js +32 -0
- package/dist/components/Icon/Icon.types.d.ts +3 -1
- package/dist/components/Icon/Icon.types.d.ts.map +1 -1
- package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts +1 -1
- package/dist/components/InputExpandTextarea/InputExpandTextarea.d.ts.map +1 -1
- package/dist/components/InputExpandTextarea/InputExpandTextarea.js +144 -0
- package/dist/components/InputFile/InputFile.d.ts +1 -1
- package/dist/components/InputFile/InputFile.d.ts.map +1 -1
- package/dist/components/InputFile/InputFile.js +203 -0
- package/dist/components/InputFile/InputFile.types.d.ts +0 -6
- package/dist/components/InputFile/InputFile.types.d.ts.map +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts.map +1 -1
- package/dist/components/InputNumber/InputNumber.js +220 -0
- package/dist/components/InputText/InputAffix.d.ts +1 -1
- package/dist/components/InputText/InputAffix.js +109 -0
- package/dist/components/InputText/InputText.d.ts +2 -1
- package/dist/components/InputText/InputText.d.ts.map +1 -1
- package/dist/components/InputText/InputText.js +137 -0
- package/dist/components/InputTime/InputTime.d.ts +1 -1
- package/dist/components/InputTime/InputTime.d.ts.map +1 -1
- package/dist/components/InputTime/InputTime.js +335 -0
- package/dist/components/InputTime/InputTimeDropdown.js +31 -0
- package/dist/components/InputTime/inputTimeKeyDown.js +63 -0
- package/dist/components/InputTime/useInputTimeWheel.js +45 -0
- package/dist/components/Menu/Menu.d.ts +1 -1
- package/dist/components/Menu/Menu.d.ts.map +1 -1
- package/dist/components/Menu/Menu.js +113 -0
- package/dist/components/Message/Message.js +29 -0
- package/dist/components/Modal/Modal.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +102 -0
- package/dist/components/Modal/editorFocus.js +15 -0
- package/dist/components/Modal/useModalFocus.js +112 -0
- package/dist/components/Modal/useModalTitleClearance.js +48 -0
- package/dist/components/Multiselect/Multiselect.d.ts +1 -0
- package/dist/components/Multiselect/Multiselect.d.ts.map +1 -1
- package/dist/components/Multiselect/Multiselect.js +408 -0
- package/dist/components/Notification/Notification.d.ts +1 -1
- package/dist/components/Notification/Notification.d.ts.map +1 -1
- package/dist/components/Notification/Notification.js +156 -0
- package/dist/components/OfflineBanner/OfflineBanner.d.ts +1 -1
- package/dist/components/OfflineBanner/OfflineBanner.d.ts.map +1 -1
- package/dist/components/OfflineBanner/OfflineBanner.js +40 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.js +126 -0
- package/dist/components/Preloader/Preloader.d.ts.map +1 -1
- package/dist/components/Preloader/Preloader.js +60 -0
- package/dist/components/Radio/Radio.js +34 -0
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Search/Search.d.ts.map +1 -1
- package/dist/components/Search/Search.js +47 -0
- package/dist/components/SearchSelect/SearchSelect.js +295 -0
- package/dist/components/SearchSelect/SearchSelectOption.js +41 -0
- package/dist/components/SearchSelect/useFlippedPlacement.js +25 -0
- package/dist/components/Select/MobileOptionSheet.d.ts +1 -1
- package/dist/components/Select/MobileOptionSheet.d.ts.map +1 -1
- package/dist/components/Select/MobileOptionSheet.js +116 -0
- package/dist/components/Select/Select.js +319 -0
- package/dist/components/Skeleton/Skeleton.js +38 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +4 -2
- package/dist/components/Skeleton/Skeleton.types.d.ts.map +1 -1
- package/dist/components/Status/Status.js +43 -0
- package/dist/components/StickyActionBar/StickyActionBar.d.ts +1 -1
- package/dist/components/StickyActionBar/StickyActionBar.d.ts.map +1 -1
- package/dist/components/StickyActionBar/StickyActionBar.js +73 -0
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts.map +1 -1
- package/dist/components/Switch/Switch.js +29 -0
- package/dist/components/Table/Filter/DefaultInput.d.ts.map +1 -1
- package/dist/components/Table/Filter/DefaultInput.js +22 -0
- package/dist/components/Table/Filter/Filter.js +233 -0
- package/dist/components/Table/Filter/Filter.types.d.ts +17 -13
- package/dist/components/Table/Filter/Filter.types.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterBooleanBox.d.ts +1 -0
- package/dist/components/Table/Filter/FilterBooleanBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterBooleanBox.js +40 -0
- package/dist/components/Table/Filter/FilterBoxShell.js +89 -0
- package/dist/components/Table/Filter/FilterConditionSelect.js +14 -0
- package/dist/components/Table/Filter/FilterDateBox.d.ts +1 -0
- package/dist/components/Table/Filter/FilterDateBox.d.ts.map +1 -1
- package/dist/components/Table/Filter/FilterDateBox.js +173 -0
- package/dist/components/Table/Filter/FilterPanel.js +25 -0
- package/dist/components/Table/Filter/FilterSortIndicator.js +24 -0
- package/dist/components/Table/Filter/FilterStringBox.js +115 -0
- package/dist/components/Table/Filter/Functions.d.ts +0 -6
- package/dist/components/Table/Filter/Functions.d.ts.map +1 -1
- package/dist/components/Table/Filter/Functions.js +76 -0
- package/dist/components/Table/Filter/SelectFilter.js +114 -0
- package/dist/components/Table/Filter/SelectOptions.js +21 -0
- package/dist/components/Table/Filter/TableFilterOptions.d.ts +1 -0
- package/dist/components/Table/Filter/TableFilterOptions.d.ts.map +1 -1
- package/dist/components/Table/Filter/TableFilterOptions.js +268 -0
- package/dist/components/Table/Filter/TableFilterSortButton.js +17 -0
- package/dist/components/Table/Filter/filterBoxHelpers.js +2 -0
- package/dist/components/Table/Filter/filterExpression.js +48 -0
- package/dist/components/Table/Filter/filterLoading.js +2 -0
- package/dist/components/Table/Filter/useFilterDates.js +33 -0
- package/dist/components/Table/Filter/useFilterOptionsPreload.js +22 -0
- package/dist/components/Table/Filter/useLocalFilterSearch.js +32 -0
- package/dist/components/Table/Filter/usePagedFilterOptions.js +71 -0
- package/dist/components/Table/Filter/useServerFilterOptions.js +35 -0
- package/dist/components/Table/Filter/useVirtualOptionWindow.js +80 -0
- package/dist/components/Table/Functions.js +54 -0
- package/dist/components/Table/Skeleton/TableSkeleton.js +28 -0
- package/dist/components/Table/Skeleton/createSkeletonColumns.js +9 -0
- package/dist/components/Table/Table.d.ts +1 -0
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Table/Table.dataPipeline.d.ts.map +1 -1
- package/dist/components/Table/Table.dataPipeline.js +75 -0
- package/dist/components/Table/Table.helpers.d.ts +2 -2
- package/dist/components/Table/Table.helpers.d.ts.map +1 -1
- package/dist/components/Table/Table.helpers.js +72 -0
- package/dist/components/Table/Table.js +419 -0
- package/dist/components/Table/Table.types.d.ts +6 -2
- package/dist/components/Table/Table.types.d.ts.map +1 -1
- package/dist/components/Table/TableHead.d.ts.map +1 -1
- package/dist/components/Table/TableHead.js +189 -0
- package/dist/components/Table/TableMobileCard.js +215 -0
- package/dist/components/Table/TableMobileFilters.js +56 -0
- package/dist/components/Table/TableMobileView.js +316 -0
- package/dist/components/Table/TableRow.js +136 -0
- package/dist/components/Table/useColumnResize.d.ts +3 -2
- package/dist/components/Table/useColumnResize.d.ts.map +1 -1
- package/dist/components/Table/useColumnResize.js +44 -0
- package/dist/components/Table/useDelayedSkeleton.d.ts +0 -2
- package/dist/components/Table/useDelayedSkeleton.d.ts.map +1 -1
- package/dist/components/Table/useDelayedSkeleton.js +32 -0
- package/dist/components/Table/useMobileFilterColumns.d.ts +1 -1
- package/dist/components/Table/useMobileFilterColumns.d.ts.map +1 -1
- package/dist/components/Table/useMobileFilterColumns.js +52 -0
- package/dist/components/Table/useStableColumnWidths.js +22 -0
- package/dist/components/Table/useTableColumnPinning.d.ts +2 -57
- package/dist/components/Table/useTableColumnPinning.d.ts.map +1 -1
- package/dist/components/Table/useTableColumnPinning.js +52 -0
- package/dist/components/Table/useTableFilters.js +39 -0
- package/dist/components/Table/useTableSortState.js +38 -0
- package/dist/components/Table/useTableVirtualization.js +145 -0
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.js +135 -0
- package/dist/components/Tabs/useTabsOverflow.js +49 -0
- package/dist/components/Textarea/Textarea.js +102 -0
- package/dist/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +218 -0
- package/dist/components/TreeView/TreeView.d.ts +1 -0
- package/dist/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/components/TreeView/TreeView.js +323 -0
- package/dist/components/TreeView/TreeView.types.d.ts +0 -4
- package/dist/components/TreeView/TreeView.types.d.ts.map +1 -1
- package/dist/dev/index.js +336 -336
- package/dist/dev/types/vanilla/src/dev/shown.d.ts +0 -2
- package/dist/dev/types/vanilla/src/dev/store.d.ts +0 -4
- package/dist/fonts/icons/urfu-ui-icon-font.eot +0 -0
- package/dist/fonts/icons/urfu-ui-icon-font.svg +3 -0
- package/dist/fonts/icons/urfu-ui-icon-font.ttf +0 -0
- package/dist/fonts/icons/urfu-ui-icon-font.woff +0 -0
- package/dist/fonts/icons/urfu-ui-icon-font.woff2 +0 -0
- package/dist/hooks/useActiveOptionScroll.js +20 -0
- package/dist/hooks/useAnchoredPosition.d.ts +12 -0
- package/dist/hooks/useAnchoredPosition.d.ts.map +1 -1
- package/dist/hooks/useAnchoredPosition.js +37 -0
- package/dist/hooks/useAutoId.d.ts +0 -1
- package/dist/hooks/useAutoId.d.ts.map +1 -1
- package/dist/hooks/useAutoId.js +7 -0
- package/dist/hooks/useAutoPortal.js +11 -0
- package/dist/hooks/useDebounce.js +11 -0
- package/dist/hooks/useDismiss.d.ts +1 -1
- package/dist/hooks/useDismiss.d.ts.map +1 -1
- package/dist/hooks/useDismiss.js +20 -0
- package/dist/hooks/useInputOverflow.d.ts +9 -0
- package/dist/hooks/useInputOverflow.d.ts.map +1 -0
- package/dist/hooks/useInputOverflow.js +16 -0
- package/dist/hooks/useMediaQuery.js +21 -0
- package/dist/hooks/useMobilePicker.js +7 -0
- package/dist/hooks/useMountTransition.d.ts +1 -1
- package/dist/hooks/useMountTransition.d.ts.map +1 -1
- package/dist/hooks/useMountTransition.js +21 -0
- package/dist/hooks/useOnlineStatus.js +11 -0
- package/dist/hooks/useOptionKeyboardNavigation.js +63 -0
- package/dist/hooks/usePagination.js +31 -0
- package/dist/hooks/useSelectEngine.d.ts +3 -3
- package/dist/hooks/useSelectEngine.d.ts.map +1 -1
- package/dist/hooks/useSelectEngine.js +96 -0
- package/dist/hooks/useTableSort.js +13 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/responsive/uiKitResponsive.js +44 -0
- package/dist/shared/fieldAccessibility.js +8 -0
- package/dist/shared/iconNames.d.ts +5 -0
- package/dist/shared/iconNames.d.ts.map +1 -0
- package/dist/shared/inputOverflow.d.ts +10 -0
- package/dist/shared/inputOverflow.d.ts.map +1 -0
- package/dist/shared/kitCopy.js +9 -0
- package/dist/shared/optionStateColors.js +5 -0
- package/dist/shared/optionValue.d.ts +1 -1
- package/dist/shared/optionValue.d.ts.map +1 -1
- package/dist/shared/optionValue.js +11 -0
- package/dist/shared/popupTransition.js +11 -0
- package/dist/shared/size.d.ts +0 -1
- package/dist/shared/size.d.ts.map +1 -1
- package/dist/shared/size.js +4 -0
- package/dist/shared/sortRows.js +24 -0
- package/dist/shared/uiKitDefaults.js +25 -0
- package/dist/style-no-fonts.css +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layer.css +9 -9
- package/dist/style.shell.css +15 -11
- package/dist/urfu-ui-kit-react.js +57 -17502
- package/dist/vanilla/core/BoundedOptionPageCache.js +41 -0
- package/dist/vanilla/core/dateMask.js +28 -0
- package/dist/vanilla/core/describeError.js +243 -0
- package/dist/vanilla/core/devLauncherOffset.js +20 -0
- package/dist/vanilla/core/distributeTabs.js +25 -0
- package/dist/vanilla/core/hasPreviousPage.js +6 -0
- package/dist/vanilla/core/inputMode.js +17 -0
- package/dist/vanilla/core/inputOverflow.js +34 -0
- package/dist/vanilla/core/kitRegistry.js +160 -0
- package/dist/vanilla/core/reconcileColumnOrder.js +5 -0
- package/dist/vanilla/core/sheetTitle.js +11 -0
- package/dist/vanilla/core/validation.js +21 -0
- package/dist/vendor/@floating-ui/core/dist/floating-ui.core.js +323 -0
- package/dist/vendor/@floating-ui/dom/dist/floating-ui.dom.js +383 -0
- package/dist/vendor/@floating-ui/react/dist/floating-ui.react.js +255 -0
- package/dist/vendor/@floating-ui/react-dom/dist/floating-ui.react-dom.js +183 -0
- package/dist/vendor/@floating-ui/utils/dist/floating-ui.utils.dom.js +110 -0
- package/dist/vendor/@floating-ui/utils/dist/floating-ui.utils.js +106 -0
- package/dist/vendor/clsx/dist/clsx.js +14 -0
- package/dist/vendor/date-fns/_lib/addLeadingZeros.js +5 -0
- package/dist/vendor/date-fns/_lib/defaultOptions.js +5 -0
- package/dist/vendor/date-fns/_lib/format/formatters.js +547 -0
- package/dist/vendor/date-fns/_lib/format/lightFormatters.js +56 -0
- package/dist/vendor/date-fns/_lib/format/longFormatters.js +47 -0
- package/dist/vendor/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +16 -0
- package/dist/vendor/date-fns/_lib/protectedTokens.js +16 -0
- package/dist/vendor/date-fns/addDays.js +7 -0
- package/dist/vendor/date-fns/addHours.js +6 -0
- package/dist/vendor/date-fns/addMilliseconds.js +7 -0
- package/dist/vendor/date-fns/addMinutes.js +6 -0
- package/dist/vendor/date-fns/addMonths.js +17 -0
- package/dist/vendor/date-fns/addQuarters.js +6 -0
- package/dist/vendor/date-fns/addSeconds.js +5 -0
- package/dist/vendor/date-fns/addWeeks.js +6 -0
- package/dist/vendor/date-fns/addYears.js +5 -0
- package/dist/vendor/date-fns/constants.js +2 -0
- package/dist/vendor/date-fns/constructFrom.js +4 -0
- package/dist/vendor/date-fns/differenceInCalendarDays.js +8 -0
- package/dist/vendor/date-fns/differenceInCalendarMonths.js +6 -0
- package/dist/vendor/date-fns/differenceInCalendarQuarters.js +7 -0
- package/dist/vendor/date-fns/differenceInCalendarYears.js +6 -0
- package/dist/vendor/date-fns/differenceInDays.js +13 -0
- package/dist/vendor/date-fns/endOfDay.js +6 -0
- package/dist/vendor/date-fns/endOfMonth.js +6 -0
- package/dist/vendor/date-fns/endOfWeek.js +8 -0
- package/dist/vendor/date-fns/endOfYear.js +6 -0
- package/dist/vendor/date-fns/format.js +53 -0
- package/dist/vendor/date-fns/getDate.js +5 -0
- package/dist/vendor/date-fns/getDay.js +5 -0
- package/dist/vendor/date-fns/getDayOfYear.js +8 -0
- package/dist/vendor/date-fns/getDaysInMonth.js +7 -0
- package/dist/vendor/date-fns/getDefaultOptions.js +5 -0
- package/dist/vendor/date-fns/getHours.js +5 -0
- package/dist/vendor/date-fns/getISODay.js +6 -0
- package/dist/vendor/date-fns/getISOWeek.js +9 -0
- package/dist/vendor/date-fns/getISOWeekYear.js +12 -0
- package/dist/vendor/date-fns/getMinutes.js +5 -0
- package/dist/vendor/date-fns/getMonth.js +5 -0
- package/dist/vendor/date-fns/getQuarter.js +6 -0
- package/dist/vendor/date-fns/getSeconds.js +5 -0
- package/dist/vendor/date-fns/getTime.js +5 -0
- package/dist/vendor/date-fns/getWeek.js +9 -0
- package/dist/vendor/date-fns/getWeekYear.js +14 -0
- package/dist/vendor/date-fns/getYear.js +5 -0
- package/dist/vendor/date-fns/isAfter.js +6 -0
- package/dist/vendor/date-fns/isBefore.js +6 -0
- package/dist/vendor/date-fns/isDate.js +4 -0
- package/dist/vendor/date-fns/isEqual.js +6 -0
- package/dist/vendor/date-fns/isSameDay.js +6 -0
- package/dist/vendor/date-fns/isSameMonth.js +6 -0
- package/dist/vendor/date-fns/isSameQuarter.js +6 -0
- package/dist/vendor/date-fns/isSameWeek.js +6 -0
- package/dist/vendor/date-fns/isSameYear.js +6 -0
- package/dist/vendor/date-fns/isValid.js +9 -0
- package/dist/vendor/date-fns/isWithinInterval.js +9 -0
- package/dist/vendor/date-fns/locale/_lib/buildFormatLongFn.js +7 -0
- package/dist/vendor/date-fns/locale/_lib/buildLocalizeFn.js +16 -0
- package/dist/vendor/date-fns/locale/_lib/buildMatchFn.js +29 -0
- package/dist/vendor/date-fns/locale/_lib/buildMatchPatternFn.js +13 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/formatDistance.js +68 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/formatLong.js +31 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/formatRelative.js +9 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/localize.js +153 -0
- package/dist/vendor/date-fns/locale/en-US/_lib/match.js +108 -0
- package/dist/vendor/date-fns/locale/en-US.js +18 -0
- package/dist/vendor/date-fns/locale/ru/_lib/formatDistance.js +182 -0
- package/dist/vendor/date-fns/locale/ru/_lib/formatLong.js +28 -0
- package/dist/vendor/date-fns/locale/ru/_lib/formatRelative.js +62 -0
- package/dist/vendor/date-fns/locale/ru/_lib/localize.js +177 -0
- package/dist/vendor/date-fns/locale/ru/_lib/match.js +109 -0
- package/dist/vendor/date-fns/locale/ru.js +18 -0
- package/dist/vendor/date-fns/max.js +9 -0
- package/dist/vendor/date-fns/min.js +9 -0
- package/dist/vendor/date-fns/parse/_lib/Parser.js +20 -0
- package/dist/vendor/date-fns/parse/_lib/Setter.js +36 -0
- package/dist/vendor/date-fns/parse/_lib/constants.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/AMPMParser.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/DateParser.js +59 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/DayOfYearParser.js +49 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/DayParser.js +45 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/DayPeriodParser.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/EraParser.js +29 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ExtendedYearParser.js +19 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +20 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/Hour0To11Parser.js +30 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/Hour0to23Parser.js +30 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/Hour1To24Parser.js +31 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/Hour1to12Parser.js +31 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISODayParser.js +101 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +45 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +45 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISOWeekParser.js +47 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +38 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/LocalDayParser.js +76 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/LocalWeekParser.js +46 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +67 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/MinuteParser.js +30 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/MonthParser.js +73 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/QuarterParser.js +71 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/SecondParser.js +30 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +76 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +73 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +71 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +20 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +20 -0
- package/dist/vendor/date-fns/parse/_lib/parsers/YearParser.js +47 -0
- package/dist/vendor/date-fns/parse/_lib/parsers.js +65 -0
- package/dist/vendor/date-fns/parse/_lib/utils.js +90 -0
- package/dist/vendor/date-fns/parse.js +85 -0
- package/dist/vendor/date-fns/parseISO.js +119 -0
- package/dist/vendor/date-fns/set.js +8 -0
- package/dist/vendor/date-fns/setDay.js +9 -0
- package/dist/vendor/date-fns/setHours.js +6 -0
- package/dist/vendor/date-fns/setISODay.js +8 -0
- package/dist/vendor/date-fns/setISOWeek.js +7 -0
- package/dist/vendor/date-fns/setMinutes.js +6 -0
- package/dist/vendor/date-fns/setMonth.js +10 -0
- package/dist/vendor/date-fns/setQuarter.js +7 -0
- package/dist/vendor/date-fns/setSeconds.js +6 -0
- package/dist/vendor/date-fns/setWeek.js +7 -0
- package/dist/vendor/date-fns/setYear.js +7 -0
- package/dist/vendor/date-fns/startOfDay.js +6 -0
- package/dist/vendor/date-fns/startOfISOWeek.js +5 -0
- package/dist/vendor/date-fns/startOfISOWeekYear.js +8 -0
- package/dist/vendor/date-fns/startOfMonth.js +6 -0
- package/dist/vendor/date-fns/startOfQuarter.js +6 -0
- package/dist/vendor/date-fns/startOfWeek.js +8 -0
- package/dist/vendor/date-fns/startOfWeekYear.js +10 -0
- package/dist/vendor/date-fns/startOfYear.js +7 -0
- package/dist/vendor/date-fns/subDays.js +5 -0
- package/dist/vendor/date-fns/subMonths.js +5 -0
- package/dist/vendor/date-fns/subQuarters.js +5 -0
- package/dist/vendor/date-fns/subWeeks.js +5 -0
- package/dist/vendor/date-fns/subYears.js +5 -0
- package/dist/vendor/date-fns/toDate.js +5 -0
- package/dist/vendor/date-fns/transpose.js +15 -0
- package/dist/vendor/react-datepicker/dist/es/index.js +2696 -0
- package/package.json +37 -35
- package/dist/hooks/useOutsideAlerter.d.ts +0 -3
- 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 +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;AAQvE,eAAO,MAAM,IAAI,GAAI,8FASlB,cAAc,4CA+JhB,CAAC"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { useState as _, useRef as y, useId as F, useEffect as H } from "react";
|
|
7
|
+
import { Icon$u as d } from "../Icon/Icon.js";
|
|
8
|
+
import { Tooltip$u as L } from "../Tooltip/Tooltip.js";
|
|
9
|
+
import { useDismiss$u as Y } from "../../hooks/useDismiss.js";
|
|
10
|
+
import { useTabsOverflow$u as G } from "./useTabsOverflow.js";
|
|
11
|
+
const J = [], ne = ({
|
|
12
|
+
onClick: f,
|
|
13
|
+
tabsData: s = J,
|
|
14
|
+
activeTab: p,
|
|
15
|
+
className: v = "",
|
|
16
|
+
variant: R = "line",
|
|
17
|
+
fullWidth: w = !1,
|
|
18
|
+
tooltipOn: T = !1,
|
|
19
|
+
tooltipDisabled: E = !1
|
|
20
|
+
}) => {
|
|
21
|
+
const { containerRef: M, measureRef: P, moreMeasureRef: S, visible: B, overflow: l, paddingOf: K, promote: U } = G(s, p, w), [u, a] = _(!1), N = y(null), b = y(null), $ = y(null), A = F(), h = R === "segment", g = h ? "u-tab-segment" : "u-tab-line", j = h ? "u-tab-segment-active" : "u-tab-active";
|
|
22
|
+
Y({ refs: [N], enabled: u, onDismiss: () => a(!1) }), H(() => {
|
|
23
|
+
l.length || a(!1);
|
|
24
|
+
}, [l.length]);
|
|
25
|
+
const k = (e) => {
|
|
26
|
+
var o, r;
|
|
27
|
+
if ((o = s[e]) != null && o.disabled) return;
|
|
28
|
+
const t = l.includes(e);
|
|
29
|
+
U(e), a(!1), f == null || f(s[e]), t && ((r = b.current) == null || r.focus({ preventScroll: !0 }));
|
|
30
|
+
}, I = () => {
|
|
31
|
+
var e;
|
|
32
|
+
return Array.from(((e = $.current) == null ? void 0 : e.querySelectorAll('button:not([aria-disabled="true"])')) || []);
|
|
33
|
+
}, q = (e) => {
|
|
34
|
+
var o;
|
|
35
|
+
const t = I();
|
|
36
|
+
(o = t[e < 0 ? t.length - 1 : e]) == null || o.focus();
|
|
37
|
+
}, z = (e) => {
|
|
38
|
+
var m, c;
|
|
39
|
+
const t = I(), o = t.indexOf(document.activeElement), r = e.key === "ArrowDown" ? (o + 1) % t.length : e.key === "ArrowUp" ? (o - 1 + t.length) % t.length : e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : -1;
|
|
40
|
+
r >= 0 ? (e.preventDefault(), (m = t[r]) == null || m.focus()) : e.key === "Escape" && (e.preventDefault(), a(!1), (c = b.current) == null || c.focus());
|
|
41
|
+
}, C = (e) => {
|
|
42
|
+
if (!e.icon) return /* @__PURE__ */ n("span", { className: "u-tabs-title", children: e.title });
|
|
43
|
+
const t = e.iconPosition === "right";
|
|
44
|
+
return /* @__PURE__ */ i("span", { className: `u-tabs-content${t ? " u-tabs-content-reverse" : ""}`, children: [
|
|
45
|
+
/* @__PURE__ */ n(d, { name: e.icon, className: "u-tabs-icon" }),
|
|
46
|
+
!e.iconOnly && /* @__PURE__ */ n("span", { className: "u-tabs-title", children: e.title })
|
|
47
|
+
] });
|
|
48
|
+
}, O = (e, t = !1) => {
|
|
49
|
+
const o = s[e], r = !!(o.icon && o.iconOnly), m = o.icon ? r ? " u-tab-icon-only" : ` u-tab-with-icon${o.iconPosition === "right" ? " u-tab-icon-right" : ""}` : "", c = /* @__PURE__ */ n(
|
|
50
|
+
"button",
|
|
51
|
+
{
|
|
52
|
+
className: `${g}${m}${o.id === p ? ` ${j}` : ""}${o.disabled ? " u-tab--disabled" : ""}`,
|
|
53
|
+
type: "button",
|
|
54
|
+
"data-label": r ? void 0 : o.title,
|
|
55
|
+
"aria-label": r ? o.title : void 0,
|
|
56
|
+
"data-measure-tab": t ? "" : void 0,
|
|
57
|
+
style: t ? void 0 : K(e),
|
|
58
|
+
tabIndex: t || o.disabled ? -1 : void 0,
|
|
59
|
+
"aria-current": !t && o.id === p ? "page" : void 0,
|
|
60
|
+
"aria-disabled": !t && o.disabled ? "true" : void 0,
|
|
61
|
+
onClick: t ? void 0 : () => k(e),
|
|
62
|
+
children: C(o)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
return /* @__PURE__ */ n("div", { className: "u-tabs-item", children: T && !E && !t ? /* @__PURE__ */ n(L, { tooltipText: o.title, portalOn: !0, className: "u-tabs-tooltip", children: c }) : c }, e);
|
|
66
|
+
};
|
|
67
|
+
return /* @__PURE__ */ i(
|
|
68
|
+
"div",
|
|
69
|
+
{
|
|
70
|
+
ref: M,
|
|
71
|
+
className: `u-tabs ${h ? "u-tabs-segment" : "u-tabs-line"}${w ? " u-tabs-full-width" : ""}${v ? ` ${v}` : ""}`,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ i("div", { className: "u-tabs-track", children: [
|
|
74
|
+
B.map((e) => O(e)),
|
|
75
|
+
l.length > 0 && /* @__PURE__ */ i(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
className: "u-tabs-more",
|
|
79
|
+
ref: N,
|
|
80
|
+
onKeyDown: z,
|
|
81
|
+
onBlur: (e) => {
|
|
82
|
+
const t = e.relatedTarget;
|
|
83
|
+
t && !e.currentTarget.contains(t) && a(!1);
|
|
84
|
+
},
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ i(
|
|
87
|
+
"button",
|
|
88
|
+
{
|
|
89
|
+
type: "button",
|
|
90
|
+
ref: b,
|
|
91
|
+
className: `${g} u-tabs-more-trigger`,
|
|
92
|
+
"aria-expanded": u,
|
|
93
|
+
"aria-haspopup": "menu",
|
|
94
|
+
"aria-controls": A,
|
|
95
|
+
onClick: () => a((e) => !e),
|
|
96
|
+
onKeyDown: (e) => {
|
|
97
|
+
(e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), e.stopPropagation(), a(!0), requestAnimationFrame(() => q(e.key === "ArrowUp" ? -1 : 0)));
|
|
98
|
+
},
|
|
99
|
+
children: [
|
|
100
|
+
/* @__PURE__ */ n("span", { children: "Ещё" }),
|
|
101
|
+
/* @__PURE__ */ n(d, { name: "down", size: 14, rotate: u ? 180 : 0 })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
u && /* @__PURE__ */ n("div", { className: "u-tabs-more-menu", role: "menu", id: A, ref: $, children: l.map((e) => /* @__PURE__ */ n(
|
|
106
|
+
"button",
|
|
107
|
+
{
|
|
108
|
+
type: "button",
|
|
109
|
+
role: "menuitem",
|
|
110
|
+
"aria-disabled": s[e].disabled ? "true" : void 0,
|
|
111
|
+
tabIndex: s[e].disabled ? -1 : void 0,
|
|
112
|
+
onClick: () => k(e),
|
|
113
|
+
children: s[e].icon ? /* @__PURE__ */ i("span", { className: "u-tabs-content", children: [
|
|
114
|
+
/* @__PURE__ */ n(d, { name: s[e].icon, className: "u-tabs-icon" }),
|
|
115
|
+
/* @__PURE__ */ n("span", { children: s[e].title })
|
|
116
|
+
] }) : s[e].title
|
|
117
|
+
},
|
|
118
|
+
e
|
|
119
|
+
)) })
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
)
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ i("div", { ref: P, className: "u-tabs-measure", "aria-hidden": "true", children: [
|
|
125
|
+
s.map((e, t) => O(t, !0)),
|
|
126
|
+
/* @__PURE__ */ i("button", { ref: S, type: "button", tabIndex: -1, className: `${g} u-tabs-more-trigger u-tabs-more-measure`, children: [
|
|
127
|
+
/* @__PURE__ */ n("span", { children: "Ещё" }),
|
|
128
|
+
/* @__PURE__ */ n(d, { name: "down", size: 14 })
|
|
129
|
+
] })
|
|
130
|
+
] })
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
};
|
|
135
|
+
export { ne as Tabs$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,
|
|
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"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { jsxs as $, jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as D, useState as C, useCallback as z, useLayoutEffect as U, useEffect as Y, useId as V } from "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { createPortal as J } from "react-dom";
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { getPortalScopeProps$u as Q } from "../../shared/uiKitDefaults.js";
|
|
8
|
+
const Z = 100, W = (r, t, n, f) => {
|
|
9
|
+
const s = G(O), p = t.x + t.width / 2, a = t.y + t.height / 2 - f / 2 + t.scrollY;
|
|
10
|
+
return r === "bottom" ? { x: p, y: t.y + t.height + t.scrollY + s } : r === "right" ? { x: t.x + t.width + s + n / 2, y: a } : r === "left" ? { x: t.x - s - n / 2, y: a } : { x: p, y: t.y + t.scrollY - s - f };
|
|
11
|
+
}, _ = 8, O = 10, q = 14, G = (r) => {
|
|
12
|
+
if (typeof window > "u" || typeof document > "u") return r;
|
|
13
|
+
const t = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
14
|
+
return !Number.isFinite(t) || t <= 0 ? r : r * (t / 16);
|
|
15
|
+
}, tt = {
|
|
16
|
+
top: "bottom",
|
|
17
|
+
bottom: "top",
|
|
18
|
+
left: "right",
|
|
19
|
+
right: "left"
|
|
20
|
+
}, et = (r, t, n, f) => {
|
|
21
|
+
const s = G(O), p = t.x + t.width / 2, a = t.y + t.height / 2 - f / 2 + t.scrollY;
|
|
22
|
+
return r === "top" ? { x: p, y: t.y + t.scrollY - s - f } : r === "bottom" ? { x: p, y: t.y + t.height + t.scrollY + s } : r === "right" ? { x: t.x + t.width + s + n / 2, y: a } : { x: t.x - s - n / 2, y: a };
|
|
23
|
+
}, nt = (r, t, n, f) => {
|
|
24
|
+
var M, u;
|
|
25
|
+
const s = W(r, t, n, f);
|
|
26
|
+
if (typeof window > "u")
|
|
27
|
+
return { placement: r, ...s, arrowShift: 0 };
|
|
28
|
+
const p = ((M = document.documentElement) == null ? void 0 : M.clientHeight) || window.innerHeight, a = ((u = document.documentElement) == null ? void 0 : u.clientWidth) || window.innerWidth, w = [r, tt[r]];
|
|
29
|
+
for (const d of ["top", "bottom", "left", "right"])
|
|
30
|
+
w.includes(d) || w.push(d);
|
|
31
|
+
const g = (d) => {
|
|
32
|
+
const h = d.y - t.scrollY, E = d.x - n / 2;
|
|
33
|
+
return Math.max(0, _ - h) + Math.max(0, h + f - (p - _)) + Math.max(0, _ - E) + Math.max(0, E + n - (a - _));
|
|
34
|
+
};
|
|
35
|
+
let l = null;
|
|
36
|
+
for (const d of w) {
|
|
37
|
+
const h = d === r ? s : et(d, t, n, f), E = g(h);
|
|
38
|
+
if (E === 0)
|
|
39
|
+
return { placement: d, x: h.x, y: h.y, arrowShift: 0 };
|
|
40
|
+
(!l || E < l.overflow) && (l = { placement: d, x: h.x, y: h.y, overflow: E });
|
|
41
|
+
}
|
|
42
|
+
const m = l;
|
|
43
|
+
let x = m.x;
|
|
44
|
+
const b = n / 2;
|
|
45
|
+
x - b < _ ? x = b + _ : x + b > a - _ && (x = a - _ - b);
|
|
46
|
+
const y = t.x + t.width / 2, T = Math.max(0, b - q), I = Math.max(-T, Math.min(T, y - x));
|
|
47
|
+
return { placement: m.placement, x, y: m.y, arrowShift: I };
|
|
48
|
+
}, k = (r) => {
|
|
49
|
+
const t = document.activeElement;
|
|
50
|
+
if (!r || !t || !r.contains(t)) return !1;
|
|
51
|
+
const n = document.documentElement.getAttribute("data-input-mode");
|
|
52
|
+
if (n) return n === "keyboard";
|
|
53
|
+
try {
|
|
54
|
+
return t.matches(":focus-visible");
|
|
55
|
+
} catch {
|
|
56
|
+
return !0;
|
|
57
|
+
}
|
|
58
|
+
}, rt = 1e3;
|
|
59
|
+
let j = -1 / 0, H = !1;
|
|
60
|
+
const ot = () => {
|
|
61
|
+
H || typeof document > "u" || (H = !0, document.addEventListener("pointerdown", () => {
|
|
62
|
+
j = Date.now();
|
|
63
|
+
}, { capture: !0, passive: !0 }));
|
|
64
|
+
}, it = () => document.documentElement.getAttribute("data-input-mode") !== "keyboard" && Date.now() - j < rt, mt = ({
|
|
65
|
+
children: r = /* @__PURE__ */ P("div", {}),
|
|
66
|
+
className: t = "",
|
|
67
|
+
portalOn: n = !1,
|
|
68
|
+
id: f = "",
|
|
69
|
+
tooltipText: s = /* @__PURE__ */ P("div", {}),
|
|
70
|
+
style: p,
|
|
71
|
+
tooltipStyle: a,
|
|
72
|
+
position: w = "top",
|
|
73
|
+
isActive: g = !0,
|
|
74
|
+
showWhenActive: l = !1
|
|
75
|
+
}) => {
|
|
76
|
+
const m = D(null), x = D(null), b = D(null), [y, T] = C(!1), [I, M] = C(null), [u, d] = C(null), [h, E] = C(w), [X, B] = C(!1), F = () => {
|
|
77
|
+
b.current && (clearTimeout(b.current), b.current = null);
|
|
78
|
+
}, S = z(() => {
|
|
79
|
+
F(), T(!1), M(null), d(null), B(!1), E(w);
|
|
80
|
+
}, [w]), L = z((e) => {
|
|
81
|
+
F();
|
|
82
|
+
const { x: i, y: o, width: c, height: v } = e.getBoundingClientRect();
|
|
83
|
+
M({ x: i, y: o, width: c, height: v, scrollY: window.scrollY }), T(!0);
|
|
84
|
+
}, []), N = z((e) => {
|
|
85
|
+
const { x: i, y: o, width: c, height: v } = e.getBoundingClientRect();
|
|
86
|
+
M((R) => R && { x: i, y: o, width: c, height: v, scrollY: window.scrollY });
|
|
87
|
+
}, []);
|
|
88
|
+
U(() => {
|
|
89
|
+
if (!n || !y || !I) return;
|
|
90
|
+
const e = x.current;
|
|
91
|
+
if (!e) return;
|
|
92
|
+
const { width: i, height: o } = e.getBoundingClientRect(), c = nt(w, I, i, o);
|
|
93
|
+
E(c.placement), d({ x: c.x, y: c.y, arrowShift: c.arrowShift });
|
|
94
|
+
}, [n, y, I, w, s]), Y(() => {
|
|
95
|
+
if (u)
|
|
96
|
+
return b.current = setTimeout(() => B(!0), Z), F;
|
|
97
|
+
}, [u]), Y(() => {
|
|
98
|
+
g || S();
|
|
99
|
+
}, [g, S]), Y(() => {
|
|
100
|
+
if (!y) return;
|
|
101
|
+
const e = () => {
|
|
102
|
+
if (l && g) return;
|
|
103
|
+
const i = m.current;
|
|
104
|
+
if (i && k(i)) {
|
|
105
|
+
N(i);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
S();
|
|
109
|
+
};
|
|
110
|
+
return window.addEventListener("scroll", e, !0), () => window.removeEventListener("scroll", e, !0);
|
|
111
|
+
}, [y, l, g, S, N]), Y(() => {
|
|
112
|
+
if (!n || !y) return;
|
|
113
|
+
let e;
|
|
114
|
+
const i = () => {
|
|
115
|
+
e !== void 0 && window.cancelAnimationFrame(e), e = window.requestAnimationFrame(() => {
|
|
116
|
+
const R = m.current;
|
|
117
|
+
R && N(R);
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
window.addEventListener("resize", i);
|
|
121
|
+
const o = typeof ResizeObserver > "u" ? null : new ResizeObserver(i);
|
|
122
|
+
let c = m.current;
|
|
123
|
+
for (; c; )
|
|
124
|
+
o == null || o.observe(c), c = c.parentElement;
|
|
125
|
+
const v = x.current;
|
|
126
|
+
return v && (o == null || o.observe(v)), () => {
|
|
127
|
+
window.removeEventListener("resize", i), o == null || o.disconnect(), e !== void 0 && window.cancelAnimationFrame(e);
|
|
128
|
+
};
|
|
129
|
+
}, [n, y, N]), Y(() => {
|
|
130
|
+
if (!l || !n) return;
|
|
131
|
+
if (!g) {
|
|
132
|
+
S();
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const e = m.current;
|
|
136
|
+
e && L(e);
|
|
137
|
+
}, [l, n, g, S, L]), Y(() => F, []), Y(ot, []);
|
|
138
|
+
const K = V(), A = f ? `u-tooltip${f}` : `u-tooltip${K.replace(/:/g, "")}`;
|
|
139
|
+
return Y(() => {
|
|
140
|
+
const e = m.current;
|
|
141
|
+
if (!n || !y || !e) return;
|
|
142
|
+
const i = document.activeElement, o = i instanceof HTMLElement && e.contains(i) ? i : e, c = new Set((o.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean));
|
|
143
|
+
return c.add(A), o.setAttribute("aria-describedby", [...c].join(" ")), () => {
|
|
144
|
+
const v = (o.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((R) => R && R !== A);
|
|
145
|
+
v.length ? o.setAttribute("aria-describedby", v.join(" ")) : o.removeAttribute("aria-describedby");
|
|
146
|
+
};
|
|
147
|
+
}, [n, y, A]), n ? /* @__PURE__ */ $(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
ref: m,
|
|
151
|
+
style: p,
|
|
152
|
+
onMouseEnter: l ? void 0 : (e) => {
|
|
153
|
+
g && L(e.currentTarget);
|
|
154
|
+
},
|
|
155
|
+
onMouseLeave: l ? void 0 : () => {
|
|
156
|
+
k(m.current) || S();
|
|
157
|
+
},
|
|
158
|
+
onFocus: l ? void 0 : (e) => {
|
|
159
|
+
g && !it() && L(e.currentTarget);
|
|
160
|
+
},
|
|
161
|
+
onBlur: l ? void 0 : (e) => {
|
|
162
|
+
e.currentTarget.contains(e.relatedTarget) || S();
|
|
163
|
+
},
|
|
164
|
+
onKeyDown: (e) => {
|
|
165
|
+
e.key === "Escape" && S();
|
|
166
|
+
},
|
|
167
|
+
className: `u-help ${t}`,
|
|
168
|
+
children: [
|
|
169
|
+
y && J(
|
|
170
|
+
/* @__PURE__ */ P(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
ref: x,
|
|
174
|
+
...Q(),
|
|
175
|
+
style: {
|
|
176
|
+
left: (u == null ? void 0 : u.x) ?? 0,
|
|
177
|
+
top: (u == null ? void 0 : u.y) ?? 0,
|
|
178
|
+
opacity: X ? 1 : 0,
|
|
179
|
+
/**
|
|
180
|
+
* До первого замера подсказка скрыта, но занимает место —
|
|
181
|
+
* `visibility` сохраняет размеры, поэтому её есть чем измерить.
|
|
182
|
+
*/
|
|
183
|
+
visibility: u ? "visible" : "hidden",
|
|
184
|
+
/**
|
|
185
|
+
* Переход только по прозрачности. В vanilla у `.u-help-tooltip`
|
|
186
|
+
* стоит `transition: 0.3s` — на все свойства сразу, включая
|
|
187
|
+
* координаты, и подсказка съезжала к месту через пол-экрана:
|
|
188
|
+
* сначала при уточнении позиции по замеру, а с выносом замера
|
|
189
|
+
* вперёд — ещё и от начальной точки.
|
|
190
|
+
*/
|
|
191
|
+
transition: "opacity 0.3s",
|
|
192
|
+
height: "fit-content",
|
|
193
|
+
/**
|
|
194
|
+
* Как во Vue-ките: над окнами (1000), фильтрами таблицы (9999) и выпадающими
|
|
195
|
+
* списками (10010). Одно значение у обоих китов — на странице с оболочкой и
|
|
196
|
+
* сервисом слой подсказки не зависит от того, чей кит объявил токен на :root.
|
|
197
|
+
*/
|
|
198
|
+
zIndex: "var(--u-tooltip-z, 10020)",
|
|
199
|
+
"--u-tooltip-arrow-shift": `${(u == null ? void 0 : u.arrowShift) ?? 0}px`,
|
|
200
|
+
...a
|
|
201
|
+
},
|
|
202
|
+
className: `u-help-tooltip u-help-tooltip-portal--${h}`,
|
|
203
|
+
id: A,
|
|
204
|
+
role: "tooltip",
|
|
205
|
+
children: s
|
|
206
|
+
}
|
|
207
|
+
),
|
|
208
|
+
document.body
|
|
209
|
+
),
|
|
210
|
+
/* @__PURE__ */ P("div", { className: "u-help__content", children: r })
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
) : /* @__PURE__ */ $("div", { style: p, className: `u-help ${t}`, children: [
|
|
214
|
+
/* @__PURE__ */ P("div", { className: `u-help-tooltip u-help-tooltip--${w}`, children: s }),
|
|
215
|
+
/* @__PURE__ */ P("div", { className: "u-help__content", children: r })
|
|
216
|
+
] });
|
|
217
|
+
};
|
|
218
|
+
export { mt as Tooltip$u };
|