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.
- 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 +141 -0
- package/dist/components/Tabs/tabsIndicator.d.ts +14 -0
- package/dist/components/Tabs/tabsIndicator.d.ts.map +1 -0
- package/dist/components/Tabs/useTabsIndicator.d.ts +6 -0
- package/dist/components/Tabs/useTabsIndicator.d.ts.map +1 -0
- package/dist/components/Tabs/useTabsIndicator.js +14 -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 +2 -2
- 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 +4 -1
- 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.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 +8 -8
- package/dist/style.shell.css +15 -11
- package/dist/urfu-ui-kit-react.js +57 -17543
- 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/tabsIndicator.js +38 -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,102 @@
|
|
|
1
|
+
import { jsx as a, jsxs as j } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as I, useState as L, useInsertionEffect as R, useLayoutEffect as F, useEffect as l } from "react";
|
|
3
|
+
import { createPortal as H } from "react-dom";
|
|
4
|
+
import { useMountTransition$u as z } from "../../hooks/useMountTransition.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { useModalFocus$u as B, ModalFocusContext$u as U, isTopModal$u as q } from "./useModalFocus.js";
|
|
7
|
+
import { isEditorPopupTarget$u as G } from "./editorFocus.js";
|
|
8
|
+
import { useModalTitleClearance$u as J } from "./useModalTitleClearance.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
import { getPortalScopeProps$u as Q, getUiKitDefaults$u as V } from "../../shared/uiKitDefaults.js";
|
|
14
|
+
import { lockKitScroll$u as W, ownKitNode$u as X, isKitEventHandled$u as Y, markKitEventHandled$u as Z } from "../../vanilla/core/kitRegistry.js";
|
|
15
|
+
const fe = ({
|
|
16
|
+
onCancel: s,
|
|
17
|
+
active: o,
|
|
18
|
+
ariaLabel: k,
|
|
19
|
+
ariaLabelledBy: m,
|
|
20
|
+
children: c,
|
|
21
|
+
maxWidth: N = "900px",
|
|
22
|
+
maxHeight: _,
|
|
23
|
+
className: x = "",
|
|
24
|
+
height: v = "",
|
|
25
|
+
notCloseClickOnBack: w,
|
|
26
|
+
closeOnEscape: f = !1,
|
|
27
|
+
closeButtonInside: p = !1,
|
|
28
|
+
lockScroll: y = !1,
|
|
29
|
+
unmountOnClose: P = !1,
|
|
30
|
+
portalOn: n = !0,
|
|
31
|
+
trapFocus: S = !0,
|
|
32
|
+
initialFocus: T = "first",
|
|
33
|
+
mobileSheet: A
|
|
34
|
+
}) => {
|
|
35
|
+
const K = A ?? V().mobileSheets, i = I(null), [e] = L(
|
|
36
|
+
() => typeof document > "u" ? null : document.createElement("div")
|
|
37
|
+
);
|
|
38
|
+
R(() => {
|
|
39
|
+
if (!(!n || !e))
|
|
40
|
+
return e.className = "u-react-modal-portal", document.body.appendChild(e), () => e.remove();
|
|
41
|
+
}, [n, e]), F(() => {
|
|
42
|
+
if (!n || !e) return;
|
|
43
|
+
const t = Q()["data-u-kit"];
|
|
44
|
+
if (t ? e.setAttribute("data-u-kit", t) : e.removeAttribute("data-u-kit"), o) {
|
|
45
|
+
const r = document.activeElement;
|
|
46
|
+
document.body.appendChild(e), r instanceof HTMLElement && e.contains(r) && r.focus({ preventScroll: !0 });
|
|
47
|
+
}
|
|
48
|
+
}, [o, n, e]);
|
|
49
|
+
const b = 180, { shouldRender: g, status: $, isAnimated: C } = z({
|
|
50
|
+
isOpen: !!o,
|
|
51
|
+
duration: b
|
|
52
|
+
}), d = C && $ === "exiting", h = !!o || d, E = d ? { opacity: 0, transition: `opacity ${b}ms ease` } : null, { scope: u, onFocusCapture: D } = B(i, !!o, S, T);
|
|
53
|
+
if (J(i, h, m, c, p), l(() => {
|
|
54
|
+
if (!o || !f || typeof s != "function") return;
|
|
55
|
+
const t = (r) => {
|
|
56
|
+
r.key !== "Escape" || r.defaultPrevented || Y(r) || !q(u) || G(i.current, r.target) || (Z(r), s(r));
|
|
57
|
+
};
|
|
58
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
59
|
+
}, [o, f, s, u]), l(() => {
|
|
60
|
+
if (!(!o || !y))
|
|
61
|
+
return W();
|
|
62
|
+
}, [o, y]), l(() => {
|
|
63
|
+
const t = i.current;
|
|
64
|
+
return t ? X(t) : void 0;
|
|
65
|
+
}, [g, n]), P && !g) return null;
|
|
66
|
+
const M = /* @__PURE__ */ a(U.Provider, { value: u, children: /* @__PURE__ */ a(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
className: `${h ? "u-modal u-modal-active" : "u-modal"}${K ? " u-react-modal-sheet" : ""}${d ? " u-react-modal-closing" : ""} ${x}`,
|
|
70
|
+
style: { backgroundColor: "unset" },
|
|
71
|
+
onMouseDown: w ? () => {
|
|
72
|
+
} : s,
|
|
73
|
+
children: /* @__PURE__ */ a("div", { className: "u-modal__container", style: Object.assign({ backgroundColor: "#0006" }, E), children: /* @__PURE__ */ j(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: `u-modal__body${p ? " u-modal__body--close-inside" : ""}`,
|
|
77
|
+
ref: i,
|
|
78
|
+
tabIndex: -1,
|
|
79
|
+
onFocusCapture: D,
|
|
80
|
+
role: "dialog",
|
|
81
|
+
"aria-label": k,
|
|
82
|
+
"aria-labelledby": m,
|
|
83
|
+
"aria-modal": o || void 0,
|
|
84
|
+
"aria-hidden": !o || void 0,
|
|
85
|
+
onMouseDown: (t) => {
|
|
86
|
+
t.stopPropagation();
|
|
87
|
+
},
|
|
88
|
+
style: Object.assign(
|
|
89
|
+
{ width: "100%", maxWidth: N, height: v, maxHeight: _, zIndex: 1001 },
|
|
90
|
+
E
|
|
91
|
+
),
|
|
92
|
+
children: [
|
|
93
|
+
c,
|
|
94
|
+
/* @__PURE__ */ a("div", { className: "u-modal__exit", children: /* @__PURE__ */ a("button", { className: "u-button-cross", onClick: s, "aria-label": "Закрыть" }) })
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
) })
|
|
98
|
+
}
|
|
99
|
+
) });
|
|
100
|
+
return !n || !e ? M : H(M, e);
|
|
101
|
+
};
|
|
102
|
+
export { fe as Modal$u };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const r = (n) => {
|
|
2
|
+
var o;
|
|
3
|
+
const t = n.ownerDocument.defaultView, e = (o = t == null ? void 0 : t.tinymce) == null ? void 0 : o.get();
|
|
4
|
+
return (Array.isArray(e) ? e : []).filter((s) => {
|
|
5
|
+
const i = s.getContainer();
|
|
6
|
+
return (i == null ? void 0 : i.isConnected) && n.contains(i);
|
|
7
|
+
});
|
|
8
|
+
}, c = (n) => {
|
|
9
|
+
var t;
|
|
10
|
+
return (t = n.theme) != null && t.getSinkElement ? [...new Set(["dialog", "popup"].map((e) => {
|
|
11
|
+
var o, s;
|
|
12
|
+
return (s = (o = n.theme) == null ? void 0 : o.getSinkElement) == null ? void 0 : s.call(o, e);
|
|
13
|
+
}))].filter((e) => !!(e != null && e.isConnected)) : [];
|
|
14
|
+
}, a = (n) => r(n).flatMap(c), l = (n, t) => !!(t && r(n).some((e) => e.getContainer().contains(t) || c(e).some((o) => o.contains(t)))), m = (n, t) => !!(n && t instanceof Node && a(n).some((e) => e.contains(t)));
|
|
15
|
+
export { a as getEditorFocusRoots$u, l as isEditorFocusTarget$u, m as isEditorPopupTarget$u };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { useContext as B, useRef as g, useLayoutEffect as R, createContext as O } from "react";
|
|
2
|
+
import { isEditorFocusTarget$u as q, getEditorFocusRoots$u as V } from "./editorFocus.js";
|
|
3
|
+
import { topKitModal$u as x, kitModalStack$u as U } from "../../vanilla/core/kitRegistry.js";
|
|
4
|
+
const W = O(null), p = U(), v = 'a[href], area[href], button, input, select, textarea, iframe, [contenteditable="true"], [tabindex]', h = (t) => {
|
|
5
|
+
var e;
|
|
6
|
+
const r = (e = t.bodyRef.current) == null ? void 0 : e.ownerDocument;
|
|
7
|
+
return !!r && x(r) === t;
|
|
8
|
+
}, D = /* @__PURE__ */ new WeakSet(), C = (t) => !!(t && D.has(t)), E = (t) => {
|
|
9
|
+
var r;
|
|
10
|
+
if (!t.isConnected || t.closest('[hidden], [inert], [aria-hidden="true"]')) return !1;
|
|
11
|
+
for (let e = t; e; e = e.parentElement) {
|
|
12
|
+
const s = (r = e.ownerDocument.defaultView) == null ? void 0 : r.getComputedStyle(e);
|
|
13
|
+
if ((s == null ? void 0 : s.display) === "none" || (s == null ? void 0 : s.visibility) === "hidden" || (s == null ? void 0 : s.visibility) === "collapse") return !1;
|
|
14
|
+
}
|
|
15
|
+
return !0;
|
|
16
|
+
}, A = (t) => {
|
|
17
|
+
const r = t.bodyRef.current;
|
|
18
|
+
if (!r) return [];
|
|
19
|
+
const e = [r, ...t.portals, ...V(r)].filter(E);
|
|
20
|
+
for (let s = 0; s < e.length; s += 1)
|
|
21
|
+
for (const f of e[s].querySelectorAll("[aria-controls]"))
|
|
22
|
+
if (f.getAttribute("aria-expanded") !== "false")
|
|
23
|
+
for (const b of (f.getAttribute("aria-controls") ?? "").split(/\s+/)) {
|
|
24
|
+
const n = r.ownerDocument.getElementById(b);
|
|
25
|
+
n && E(n) && !e.some((d) => d.contains(n)) && e.push(n);
|
|
26
|
+
}
|
|
27
|
+
return e;
|
|
28
|
+
}, y = (t, r) => A(t).some((e) => e.contains(r)), H = (t) => {
|
|
29
|
+
const r = [...new Set(A(t).flatMap((e) => [
|
|
30
|
+
...e.matches(v) ? [e] : [],
|
|
31
|
+
...e.querySelectorAll(v)
|
|
32
|
+
]))].filter((e) => e.tabIndex >= 0 && !e.matches(':disabled, input[type="hidden"]') && E(e));
|
|
33
|
+
return r.filter((e) => {
|
|
34
|
+
if (!(e instanceof HTMLInputElement) || e.type !== "radio" || !e.name) return !0;
|
|
35
|
+
const s = r.filter((f) => f instanceof HTMLInputElement && f.type === "radio" && f.name === e.name && f.form === e.form);
|
|
36
|
+
return e === (s.find((f) => f.checked) ?? s[0]);
|
|
37
|
+
}).sort((e, s) => (e.tabIndex > 0 ? e.tabIndex : 1 / 0) - (s.tabIndex > 0 ? s.tabIndex : 1 / 0));
|
|
38
|
+
}, k = (t) => {
|
|
39
|
+
var e;
|
|
40
|
+
const r = t.lastFocused;
|
|
41
|
+
r && E(r) && y(t, r) && !r.matches(":disabled") ? r.focus({ preventScroll: !0 }) : (e = H(t)[0] ?? t.bodyRef.current) == null || e.focus({ preventScroll: !0 });
|
|
42
|
+
}, N = (t, r, e, s = "first") => {
|
|
43
|
+
const f = B(W), b = g(s);
|
|
44
|
+
b.current = s;
|
|
45
|
+
const n = g({
|
|
46
|
+
bodyRef: t,
|
|
47
|
+
parent: f,
|
|
48
|
+
portals: /* @__PURE__ */ new Set(),
|
|
49
|
+
lastFocused: null,
|
|
50
|
+
element: () => t.current,
|
|
51
|
+
open: () => {
|
|
52
|
+
var i;
|
|
53
|
+
return ((i = t.current) == null ? void 0 : i.getAttribute("aria-modal")) === "true";
|
|
54
|
+
}
|
|
55
|
+
}).current;
|
|
56
|
+
D.add(n);
|
|
57
|
+
const d = g(null), w = g(r);
|
|
58
|
+
w.current = r;
|
|
59
|
+
const S = () => {
|
|
60
|
+
var l;
|
|
61
|
+
const i = d.current;
|
|
62
|
+
if (d.current = null, !i || !E(i)) return;
|
|
63
|
+
const o = x(i.ownerDocument), u = C(o) ? y(o, i) : !!((l = o == null ? void 0 : o.element()) != null && l.contains(i));
|
|
64
|
+
(!o || u) && i.focus({ preventScroll: !0 });
|
|
65
|
+
};
|
|
66
|
+
return R(() => {
|
|
67
|
+
var M, L;
|
|
68
|
+
const i = t.current;
|
|
69
|
+
if (!r || !i) {
|
|
70
|
+
S();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const o = i.ownerDocument, u = d.current ?? (o.activeElement instanceof HTMLElement ? o.activeElement : null);
|
|
74
|
+
d.current = null, n.portals.clear(), n.lastFocused = null;
|
|
75
|
+
const l = p.findIndex((c) => {
|
|
76
|
+
if (!C(c)) return !1;
|
|
77
|
+
for (let a = c.parent; a; a = a.parent) if (a === n) return !0;
|
|
78
|
+
return !1;
|
|
79
|
+
});
|
|
80
|
+
p.splice(l < 0 ? p.length : l, 0, n);
|
|
81
|
+
const m = (L = (M = x(o)) == null ? void 0 : M.element()) == null ? void 0 : L.closest(".u-react-modal-portal");
|
|
82
|
+
if ((m == null ? void 0 : m.parentElement) === o.body && o.body.lastElementChild !== m) {
|
|
83
|
+
const c = o.activeElement;
|
|
84
|
+
o.body.appendChild(m), c instanceof HTMLElement && m.contains(c) && c.focus({ preventScroll: !0 });
|
|
85
|
+
}
|
|
86
|
+
const F = (c) => {
|
|
87
|
+
!e || !h(n) || !(c.target instanceof HTMLElement) || (y(n, c.target) ? n.lastFocused = c.target : k(n));
|
|
88
|
+
}, I = (c) => {
|
|
89
|
+
if (!e || !h(n) || c.defaultPrevented || c.key !== "Tab" || c.altKey || c.ctrlKey || c.metaKey || q(i, o.activeElement)) return;
|
|
90
|
+
const a = H(n), T = a.indexOf(o.activeElement), K = T < 0 ? c.shiftKey ? a.length - 1 : 0 : (T + (c.shiftKey ? -1 : 1) + a.length) % a.length;
|
|
91
|
+
c.preventDefault(), (a[K] ?? i).focus({ preventScroll: !0 });
|
|
92
|
+
};
|
|
93
|
+
return o.addEventListener("focusin", F), o.addEventListener("keydown", I), e && h(n) && (u && y(n, u) ? n.lastFocused = u : b.current === "dialog" ? i.focus({ preventScroll: !0 }) : k(n)), () => {
|
|
94
|
+
o.removeEventListener("focusin", F), o.removeEventListener("keydown", I);
|
|
95
|
+
const c = p.indexOf(n);
|
|
96
|
+
c >= 0 && p.splice(c, 1), e && (d.current = u, queueMicrotask(() => {
|
|
97
|
+
var a;
|
|
98
|
+
(!w.current || !((a = n.bodyRef.current) != null && a.isConnected)) && S();
|
|
99
|
+
})), n.portals.clear();
|
|
100
|
+
};
|
|
101
|
+
}, [r, e, t, n]), { scope: n, onFocusCapture: (i) => {
|
|
102
|
+
if (!h(n) || !(i.target instanceof HTMLElement)) return;
|
|
103
|
+
const o = i.target, u = t.current;
|
|
104
|
+
if (u && !u.contains(o)) {
|
|
105
|
+
let l = o;
|
|
106
|
+
for (; l.parentElement && l.parentElement !== u.ownerDocument.body; ) l = l.parentElement;
|
|
107
|
+
l !== u.ownerDocument.body && !l.contains(u) && n.portals.add(l);
|
|
108
|
+
}
|
|
109
|
+
n.lastFocused = o;
|
|
110
|
+
} };
|
|
111
|
+
};
|
|
112
|
+
export { W as ModalFocusContext$u, h as isTopModal$u, N as useModalFocus$u };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useLayoutEffect as v } from "react";
|
|
2
|
+
const F = (r, g, p, b, w) => {
|
|
3
|
+
var o, f, m;
|
|
4
|
+
const t = r.ownerDocument.defaultView, a = t == null ? void 0 : t.getComputedStyle(r), e = g.top + (parseFloat((a == null ? void 0 : a.borderTopWidth) ?? "") || 0) + (parseFloat((a == null ? void 0 : a.paddingTop) ?? "") || 0), i = Math.max(0, p - e + b), l = (f = (o = r.ownerDocument).createRange) == null ? void 0 : f.call(o);
|
|
5
|
+
l == null || l.selectNodeContents(r);
|
|
6
|
+
const s = [...((m = l == null ? void 0 : l.getClientRects) == null ? void 0 : m.call(l)) ?? []].filter((c) => c.width > 0 || c.height > 0).map((c) => (c.top + c.bottom) / 2 + w / 2);
|
|
7
|
+
if (s.length === 0) return i;
|
|
8
|
+
const h = Math.max(...s) - e;
|
|
9
|
+
if (i <= h) return i;
|
|
10
|
+
const d = r.nextElementSibling, n = Math.max(
|
|
11
|
+
0,
|
|
12
|
+
parseFloat((a == null ? void 0 : a.marginBottom) ?? "") || 0,
|
|
13
|
+
d && t && parseFloat(t.getComputedStyle(d).marginTop) || 0
|
|
14
|
+
);
|
|
15
|
+
return Math.min(i, Math.max(h, p - e - n));
|
|
16
|
+
}, A = (r, g, p, b, w) => {
|
|
17
|
+
v(() => {
|
|
18
|
+
const t = r.current;
|
|
19
|
+
if (!g || !t) return;
|
|
20
|
+
const e = (p ?? "").split(/\s+/).map((o) => t.ownerDocument.getElementById(o)).find((o) => (o == null ? void 0 : o.closest(".u-modal__body")) === t) ?? [...t.querySelectorAll("h1, h2, h3, h4, h5, h6")].find((o) => o.closest(".u-modal__body") === t), i = t.querySelector(":scope > .u-modal__exit > button"), l = t.ownerDocument.defaultView;
|
|
21
|
+
if (!e || !i || !l || ["flex", "inline-flex", "grid", "inline-grid"].includes(l.getComputedStyle(e).display)) return;
|
|
22
|
+
t.setAttribute("data-u-modal-has-title", "");
|
|
23
|
+
let s = 0;
|
|
24
|
+
const h = () => {
|
|
25
|
+
const o = e.getBoundingClientRect(), f = i.getBoundingClientRect(), m = t.getBoundingClientRect(), c = l.getComputedStyle(e), x = parseFloat(c.lineHeight) || (parseFloat(c.fontSize) || 16) * 1.2, C = t.offsetWidth > 0 && m.width > 0 ? m.width / t.offsetWidth : 1;
|
|
26
|
+
t.style.setProperty(
|
|
27
|
+
"--u-modal-title-close-top",
|
|
28
|
+
`${(o.top - m.top - f.height / 2) / C + x / 2}px`
|
|
29
|
+
);
|
|
30
|
+
const u = i.getBoundingClientRect(), y = parseFloat(l.getComputedStyle(t).getPropertyValue("--u-modal-title-gap")) || 8;
|
|
31
|
+
u.left < o.right + y && u.right > o.left && u.bottom + y > o.top && u.top < o.bottom ? (e.setAttribute("data-u-modal-title-clearance", ""), e.style.setProperty(
|
|
32
|
+
"--u-modal-title-clearance-width",
|
|
33
|
+
`${Math.min(o.width, Math.max(0, o.right - u.left + y))}px`
|
|
34
|
+
), e.style.setProperty(
|
|
35
|
+
"--u-modal-title-clearance-height",
|
|
36
|
+
`${F(e, o, u.bottom, y, x)}px`
|
|
37
|
+
)) : (e.removeAttribute("data-u-modal-title-clearance"), e.style.removeProperty("--u-modal-title-clearance-width"), e.style.removeProperty("--u-modal-title-clearance-height"));
|
|
38
|
+
}, d = () => {
|
|
39
|
+
l.cancelAnimationFrame(s), s = l.requestAnimationFrame(h);
|
|
40
|
+
};
|
|
41
|
+
h();
|
|
42
|
+
const n = typeof ResizeObserver > "u" ? null : new ResizeObserver(d);
|
|
43
|
+
return n == null || n.observe(t), n == null || n.observe(e), n == null || n.observe(i), l.addEventListener("resize", d), () => {
|
|
44
|
+
n == null || n.disconnect(), l.removeEventListener("resize", d), l.cancelAnimationFrame(s), t.removeAttribute("data-u-modal-has-title"), t.style.removeProperty("--u-modal-title-close-top"), e.removeAttribute("data-u-modal-title-clearance"), e.style.removeProperty("--u-modal-title-clearance-width"), e.style.removeProperty("--u-modal-title-clearance-height");
|
|
45
|
+
};
|
|
46
|
+
}, [r, g, p, b, w]);
|
|
47
|
+
};
|
|
48
|
+
export { A as useModalTitleClearance$u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Multiselect.d.ts","sourceRoot":"","sources":["../../../src/components/Multiselect/Multiselect.tsx"],"names":[],"mappings":"AAEA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oBAAoB,CAAA;AAC3B,OAAO,0BAA0B,CAAA;AACjC,OAAO,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAoB,MAAM,qBAAqB,CAAC;AAcnF,eAAO,MAAM,WAAW,GAAI,mbAgCzB,qBAAqB,4CAgbvB,CAAA"}
|
|
1
|
+
{"version":3,"file":"Multiselect.d.ts","sourceRoot":"","sources":["../../../src/components/Multiselect/Multiselect.tsx"],"names":[],"mappings":"AAEA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oBAAoB,CAAA;AAC3B,OAAO,0DAA0D,CAAC;AAClE,OAAO,0BAA0B,CAAA;AACjC,OAAO,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,qBAAqB,EAAoB,MAAM,qBAAqB,CAAC;AAcnF,eAAO,MAAM,WAAW,GAAI,mbAgCzB,qBAAqB,4CAgbvB,CAAA"}
|