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,215 @@
|
|
|
1
|
+
import { jsx as a, Fragment as j, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as L, useId as O, useRef as R, useEffect as H, useLayoutEffect as D } from "react";
|
|
3
|
+
import { Icon$u as E } from "../Icon/Icon.js";
|
|
4
|
+
const W = ({
|
|
5
|
+
label: f,
|
|
6
|
+
children: s,
|
|
7
|
+
lines: n = 1,
|
|
8
|
+
valueColor: m,
|
|
9
|
+
labelColor: _,
|
|
10
|
+
gridSpan: d,
|
|
11
|
+
gridRowSpan: g
|
|
12
|
+
}) => {
|
|
13
|
+
const [o, y] = L(!1), [N, C] = L(!1), u = R(null), w = O(), p = R(null);
|
|
14
|
+
return D(() => {
|
|
15
|
+
var h;
|
|
16
|
+
const l = u.current, i = p.current;
|
|
17
|
+
if (p.current = null, !l || i == null) return;
|
|
18
|
+
if (typeof l.animate != "function" || (h = window.matchMedia) != null && h.call(window, "(prefers-reduced-motion: reduce)").matches) {
|
|
19
|
+
l.classList.toggle("u-table-mobile-card__value--clamped", !o), l.style.webkitLineClamp = o ? "" : String(n);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
l.classList.remove("u-table-mobile-card__value--clamped"), l.style.webkitLineClamp = "";
|
|
23
|
+
let t = l.getBoundingClientRect().height;
|
|
24
|
+
o || (l.classList.add("u-table-mobile-card__value--clamped"), l.style.webkitLineClamp = String(n), t = l.getBoundingClientRect().height, l.classList.remove("u-table-mobile-card__value--clamped"), l.style.webkitLineClamp = ""), l.style.height = t + "px", l.style.overflow = "hidden";
|
|
25
|
+
const r = l.animate([{ height: i + "px" }, { height: t + "px" }], { duration: 220, easing: "ease" }), b = () => {
|
|
26
|
+
l.style.height = "", l.style.overflow = "", l.classList.toggle("u-table-mobile-card__value--clamped", !o), l.style.webkitLineClamp = o ? "" : String(n);
|
|
27
|
+
};
|
|
28
|
+
return r.onfinish = b, () => {
|
|
29
|
+
r.onfinish = null, r.cancel(), b();
|
|
30
|
+
};
|
|
31
|
+
}, [o, s, n]), H(() => {
|
|
32
|
+
const l = u.current;
|
|
33
|
+
if (!l) return;
|
|
34
|
+
const i = () => {
|
|
35
|
+
const r = Number.parseFloat(getComputedStyle(l).lineHeight), b = Number.isFinite(r) ? r * n : l.clientHeight;
|
|
36
|
+
C(l.scrollHeight > b + 1);
|
|
37
|
+
};
|
|
38
|
+
if (i(), typeof ResizeObserver > "u") return;
|
|
39
|
+
const t = new ResizeObserver(i);
|
|
40
|
+
return t.observe(l), () => t.disconnect();
|
|
41
|
+
}, [s, n, o]), /* @__PURE__ */ c("div", { className: `u-table-mobile-card__row u-table-mobile-card__row--collapsible${d === "full" ? " u-table-mobile-card__row--span-full" : d === 2 ? " u-table-mobile-card__row--span2" : d === "narrow" ? " u-table-mobile-card__row--span-narrow" : ""}${g === 2 ? " u-table-mobile-card__row--rowspan2" : ""}`, children: [
|
|
42
|
+
f != null && /* @__PURE__ */ a("span", { className: "u-table-mobile-card__label", style: _ ? { color: _ } : void 0, children: f }),
|
|
43
|
+
/* @__PURE__ */ a(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
ref: u,
|
|
47
|
+
id: w,
|
|
48
|
+
className: "u-table-mobile-card__value" + (o ? "" : " u-table-mobile-card__value--clamped"),
|
|
49
|
+
style: { ...o ? {} : { WebkitLineClamp: n }, ...m ? { color: m } : {} },
|
|
50
|
+
children: s
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
(N || o) && /* @__PURE__ */ a(
|
|
54
|
+
"button",
|
|
55
|
+
{
|
|
56
|
+
type: "button",
|
|
57
|
+
className: "u-table-mobile-card__value-toggle",
|
|
58
|
+
onClick: () => {
|
|
59
|
+
var l;
|
|
60
|
+
p.current = ((l = u.current) == null ? void 0 : l.getBoundingClientRect().height) ?? null, y((i) => !i);
|
|
61
|
+
},
|
|
62
|
+
"aria-expanded": o,
|
|
63
|
+
"aria-controls": w,
|
|
64
|
+
children: o ? "Скрыть" : "Показать больше"
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] });
|
|
68
|
+
}, J = ({
|
|
69
|
+
title: f,
|
|
70
|
+
titleLabel: s,
|
|
71
|
+
titleHideLabel: n,
|
|
72
|
+
titleColor: m,
|
|
73
|
+
titleLabelColor: _,
|
|
74
|
+
subtitle: d,
|
|
75
|
+
subtitleColor: g,
|
|
76
|
+
actions: o,
|
|
77
|
+
inline: y,
|
|
78
|
+
body: N,
|
|
79
|
+
details: C,
|
|
80
|
+
flat: u,
|
|
81
|
+
inset: w,
|
|
82
|
+
density: p = "default",
|
|
83
|
+
divider: l,
|
|
84
|
+
showLabels: i = !0,
|
|
85
|
+
columns: t = 1
|
|
86
|
+
}) => {
|
|
87
|
+
const [r, b] = L(!1), h = O(), $ = R(null);
|
|
88
|
+
H(() => {
|
|
89
|
+
$.current && ($.current.inert = !r);
|
|
90
|
+
}, [r]);
|
|
91
|
+
const S = y.filter((e) => e.value != null && e.value !== ""), x = N.filter((e) => e.value != null && e.value !== ""), k = C.filter((e) => e.value != null && e.value !== ""), F = k.length > 0, z = x.length > 0, B = t === 3 ? " u-table-mobile-card__fields--cols3" : t === 2 ? " u-table-mobile-card__fields--cols2" : "", M = /* @__PURE__ */ a(j, { children: /* @__PURE__ */ c("div", { className: "u-table-mobile-card__head-main", children: [
|
|
92
|
+
/* @__PURE__ */ c("span", { className: "u-table-mobile-card__primary", children: [
|
|
93
|
+
i && !n && s != null && s !== "" && /* @__PURE__ */ a(
|
|
94
|
+
"span",
|
|
95
|
+
{
|
|
96
|
+
className: "u-table-mobile-card__title-label",
|
|
97
|
+
style: _ ? { color: _ } : void 0,
|
|
98
|
+
children: s
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ a(
|
|
102
|
+
"span",
|
|
103
|
+
{
|
|
104
|
+
className: "u-table-mobile-card__title",
|
|
105
|
+
style: m ? { color: m } : void 0,
|
|
106
|
+
children: f
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
d != null && d !== "" && /* @__PURE__ */ a(
|
|
110
|
+
"span",
|
|
111
|
+
{
|
|
112
|
+
className: "u-table-mobile-card__subtitle",
|
|
113
|
+
style: g ? { color: g } : void 0,
|
|
114
|
+
children: d
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
] }),
|
|
118
|
+
S.length > 0 && /* @__PURE__ */ a("span", { className: "u-table-mobile-card__inline-group", children: S.map(
|
|
119
|
+
(e, v) => i && !e.hideLabel ? /* @__PURE__ */ c("span", { className: "u-table-mobile-card__inline-field", children: [
|
|
120
|
+
/* @__PURE__ */ a(
|
|
121
|
+
"span",
|
|
122
|
+
{
|
|
123
|
+
className: "u-table-mobile-card__inline-label",
|
|
124
|
+
style: e.labelColor ? { color: e.labelColor } : void 0,
|
|
125
|
+
children: e.label
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ a(
|
|
129
|
+
"span",
|
|
130
|
+
{
|
|
131
|
+
className: "u-table-mobile-card__inline",
|
|
132
|
+
style: e.valueColor ? { color: e.valueColor } : void 0,
|
|
133
|
+
children: e.value
|
|
134
|
+
}
|
|
135
|
+
)
|
|
136
|
+
] }, v) : /* @__PURE__ */ a(
|
|
137
|
+
"span",
|
|
138
|
+
{
|
|
139
|
+
className: "u-table-mobile-card__inline",
|
|
140
|
+
style: e.valueColor ? { color: e.valueColor } : void 0,
|
|
141
|
+
children: e.value
|
|
142
|
+
},
|
|
143
|
+
v
|
|
144
|
+
)
|
|
145
|
+
) })
|
|
146
|
+
] }) }), I = (e, v) => e.expandLines ? /* @__PURE__ */ a(
|
|
147
|
+
W,
|
|
148
|
+
{
|
|
149
|
+
label: i && !e.hideLabel ? e.label : null,
|
|
150
|
+
lines: e.expandLines,
|
|
151
|
+
valueColor: e.valueColor,
|
|
152
|
+
labelColor: e.labelColor,
|
|
153
|
+
gridSpan: e.gridSpan,
|
|
154
|
+
gridRowSpan: e.gridRowSpan,
|
|
155
|
+
children: e.value
|
|
156
|
+
},
|
|
157
|
+
v
|
|
158
|
+
) : /* @__PURE__ */ c("div", { className: `u-table-mobile-card__row${e.gridSpan === "full" ? " u-table-mobile-card__row--span-full" : e.gridSpan === 2 ? " u-table-mobile-card__row--span2" : e.gridSpan === "narrow" ? " u-table-mobile-card__row--span-narrow" : ""}${e.gridRowSpan === 2 ? " u-table-mobile-card__row--rowspan2" : ""}`, children: [
|
|
159
|
+
i && !e.hideLabel && /* @__PURE__ */ a(
|
|
160
|
+
"span",
|
|
161
|
+
{
|
|
162
|
+
className: "u-table-mobile-card__label",
|
|
163
|
+
style: e.labelColor ? { color: e.labelColor } : void 0,
|
|
164
|
+
children: e.label
|
|
165
|
+
}
|
|
166
|
+
),
|
|
167
|
+
/* @__PURE__ */ a(
|
|
168
|
+
"span",
|
|
169
|
+
{
|
|
170
|
+
className: "u-table-mobile-card__value",
|
|
171
|
+
style: e.valueColor ? { color: e.valueColor } : void 0,
|
|
172
|
+
children: e.value
|
|
173
|
+
}
|
|
174
|
+
)
|
|
175
|
+
] }, v);
|
|
176
|
+
return /* @__PURE__ */ c(
|
|
177
|
+
"div",
|
|
178
|
+
{
|
|
179
|
+
className: `u-table-mobile-card u-table-mobile-card--list${u ? " u-table-mobile-card--flat" : ""}${l ? " u-table-mobile-card--divider" : ""}${t === 3 ? " u-table-mobile-card--cols3" : ""}${w ? " u-table-mobile-card--inset" : ""}${p === "compact" ? " u-table-mobile-card--compact" : ""}`,
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ c("div", { className: "u-table-mobile-card__head", children: [
|
|
182
|
+
M,
|
|
183
|
+
o && /* @__PURE__ */ a("div", { className: "u-table-mobile-card__actions", children: o })
|
|
184
|
+
] }),
|
|
185
|
+
z && /* @__PURE__ */ a("div", { className: `u-table-mobile-card__fields u-table-mobile-card__fields--body${B}`, children: x.map(I) }),
|
|
186
|
+
F && /* @__PURE__ */ c(
|
|
187
|
+
"button",
|
|
188
|
+
{
|
|
189
|
+
type: "button",
|
|
190
|
+
className: "u-table-mobile-card__details-toggle",
|
|
191
|
+
"aria-label": r ? "Свернуть" : "Подробнее",
|
|
192
|
+
onClick: () => b((e) => !e),
|
|
193
|
+
"aria-expanded": r,
|
|
194
|
+
"aria-controls": h,
|
|
195
|
+
children: [
|
|
196
|
+
r ? "Свернуть" : "Подробнее",
|
|
197
|
+
/* @__PURE__ */ a(E, { name: "up", size: "14px", className: `u-table-mobile-card__chevron${r ? " u-table-mobile-card__chevron--open" : ""}` })
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
F && /* @__PURE__ */ a(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
id: h,
|
|
205
|
+
ref: $,
|
|
206
|
+
"aria-hidden": !r,
|
|
207
|
+
className: `u-table-mobile-card__details-wrap${r ? " u-table-mobile-card__details-wrap--open" : ""}`,
|
|
208
|
+
children: /* @__PURE__ */ a("div", { className: `u-table-mobile-card__details${B}`, children: k.map(I) })
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
};
|
|
215
|
+
export { J as MobileCard$u, W as MobileCollapsibleField$u };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs as c, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as d } from "react";
|
|
3
|
+
import { Button$u as m } from "../Button/Button.js";
|
|
4
|
+
import { Select$u as y } from "../Select/Select.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
const h = {
|
|
7
|
+
asc: { icon: "up-arrow", iconLabel: "По возрастанию" },
|
|
8
|
+
desc: { icon: "down-arrow", iconLabel: "По убыванию" }
|
|
9
|
+
};
|
|
10
|
+
function N({ options: a, renderFilter: b, onReset: s, sortLabel: t }) {
|
|
11
|
+
const [n, f] = d(!1), [v, o] = d(() => {
|
|
12
|
+
var e;
|
|
13
|
+
return (e = a[0]) == null ? void 0 : e.key;
|
|
14
|
+
}), l = a.find((e) => e.key === v) ?? a[0], r = a.filter((e) => e.active).length, u = a.map((e) => ({
|
|
15
|
+
value: e.key,
|
|
16
|
+
label: e.label + (e.active ? e.selectedCount === void 0 ? " · выбор по условию" : ` · выбрано: ${e.selectedCount}` : ""),
|
|
17
|
+
...e.sort ? h[e.sort] : {}
|
|
18
|
+
}));
|
|
19
|
+
return a.length ? /* @__PURE__ */ c("div", { className: "u-table-mobile-filters", children: [
|
|
20
|
+
/* @__PURE__ */ c(
|
|
21
|
+
m,
|
|
22
|
+
{
|
|
23
|
+
type: "button",
|
|
24
|
+
variant: "outline",
|
|
25
|
+
size: "small",
|
|
26
|
+
className: "u-table-mobile-filters__toggle",
|
|
27
|
+
disabled: a.every((e) => e.disabled) && !r && !t,
|
|
28
|
+
icon: n ? "up" : "down",
|
|
29
|
+
"aria-expanded": n,
|
|
30
|
+
onClick: () => f((e) => !e),
|
|
31
|
+
children: [
|
|
32
|
+
"Фильтры",
|
|
33
|
+
r ? ": " + r : ""
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
n ? /* @__PURE__ */ c("div", { className: "u-table-mobile-filters__panel", role: "region", "aria-label": "Фильтры таблицы", children: [
|
|
38
|
+
/* @__PURE__ */ i(
|
|
39
|
+
y,
|
|
40
|
+
{
|
|
41
|
+
title: "Столбец",
|
|
42
|
+
"aria-label": "Столбец для фильтрации",
|
|
43
|
+
options: u,
|
|
44
|
+
value: u.find((e) => e.value === (l == null ? void 0 : l.key)) ?? null,
|
|
45
|
+
onChange: (e) => {
|
|
46
|
+
typeof (e == null ? void 0 : e.value) == "string" && o(e.value);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
),
|
|
50
|
+
/* @__PURE__ */ i("div", { children: l ? b(l.key) : null }, l == null ? void 0 : l.key),
|
|
51
|
+
t ? /* @__PURE__ */ i("p", { className: "u-table-mobile-filters__sort-label", children: t }) : null,
|
|
52
|
+
s && (r || t) ? /* @__PURE__ */ i(m, { className: "u-table-mobile-filters__reset", variant: "text", onClick: s, children: "Сбросить все фильтры и сортировку" }) : null
|
|
53
|
+
] }) : null
|
|
54
|
+
] }) : null;
|
|
55
|
+
}
|
|
56
|
+
export { N as TableMobileFilters$u };
|
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
import { jsxs as n, Fragment as ce, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as X, useState as Y, useEffect as Z } from "react";
|
|
3
|
+
import { TableMobileFilters$u as pe } from "./TableMobileFilters.js";
|
|
4
|
+
import { Icon$u as w } from "../Icon/Icon.js";
|
|
5
|
+
import { Select$u as fe } from "../Select/Select.js";
|
|
6
|
+
import { Preloader$u as he } from "../Preloader/Preloader.js";
|
|
7
|
+
import { Tooltip$u as ve } from "../Tooltip/Tooltip.js";
|
|
8
|
+
import { MobileCard$u as _e, MobileCollapsibleField$u as ge } from "./TableMobileCard.js";
|
|
9
|
+
const ye = ({
|
|
10
|
+
filteredColumns: m,
|
|
11
|
+
pagedData: P,
|
|
12
|
+
filteredDataLength: D,
|
|
13
|
+
dataLength: I,
|
|
14
|
+
initialSkeletonRows: F = 10,
|
|
15
|
+
isCardMode: H,
|
|
16
|
+
isLoading: z,
|
|
17
|
+
isLoadingPreloader: A,
|
|
18
|
+
messageForEmptyTable: M,
|
|
19
|
+
effectiveSortField: u,
|
|
20
|
+
effectiveSortDir: L,
|
|
21
|
+
applySort: ee,
|
|
22
|
+
setSortField: N,
|
|
23
|
+
toggleSortDir: C,
|
|
24
|
+
mobileSortBar: le,
|
|
25
|
+
mobileSortLabel: c = "Сортировка",
|
|
26
|
+
mobileSortStyle: p = "select",
|
|
27
|
+
renderMobileToolbar: B,
|
|
28
|
+
mobileFilterOptions: f,
|
|
29
|
+
renderMobileFilter: T,
|
|
30
|
+
onMobileFiltersReset: ae,
|
|
31
|
+
mobileFilterSortLabel: ie,
|
|
32
|
+
renderMobileCard: W,
|
|
33
|
+
mobileCardCollapsible: oe,
|
|
34
|
+
mobileCardLabels: j = !0,
|
|
35
|
+
mobileMaxVisible: h,
|
|
36
|
+
mobileCardColumns: v = 1,
|
|
37
|
+
mobileCardGap: O,
|
|
38
|
+
mobileCardDivider: S,
|
|
39
|
+
mobileCardFlat: x,
|
|
40
|
+
mobileCardInset: q,
|
|
41
|
+
mobileCardDensity: J = "default"
|
|
42
|
+
}) => {
|
|
43
|
+
const K = `${q ? " u-table-mobile-card--inset" : ""}${J === "compact" ? " u-table-mobile-card--compact" : ""}`, E = X(null), [Q, re] = Y({ atStart: !0, atEnd: !0 }), R = () => {
|
|
44
|
+
const l = E.current;
|
|
45
|
+
if (!l) return;
|
|
46
|
+
const i = l.scrollWidth > l.clientWidth + 1;
|
|
47
|
+
re({
|
|
48
|
+
atStart: !i || l.scrollLeft <= 1,
|
|
49
|
+
atEnd: !i || l.scrollLeft + l.clientWidth >= l.scrollWidth - 1
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
Z(() => {
|
|
53
|
+
if (!H || p !== "segments") return;
|
|
54
|
+
const l = E.current;
|
|
55
|
+
if (!l || typeof ResizeObserver > "u") return;
|
|
56
|
+
R();
|
|
57
|
+
const i = new ResizeObserver(R);
|
|
58
|
+
return i.observe(l), () => i.disconnect();
|
|
59
|
+
}, [H, p, I]);
|
|
60
|
+
const y = X(null), [_, $] = Y(!1);
|
|
61
|
+
Z(() => {
|
|
62
|
+
if (!_) return;
|
|
63
|
+
const l = (i) => {
|
|
64
|
+
y.current && !y.current.contains(i.target) && $(!1);
|
|
65
|
+
};
|
|
66
|
+
return document.addEventListener("mousedown", l), () => document.removeEventListener("mousedown", l);
|
|
67
|
+
}, [_]);
|
|
68
|
+
const b = (l, i, r) => l.renderMobile ? l.renderMobile(i, r) : l.render ? l.render(i, r) : i[l.field], o = m.find((l) => l.mobilePrimary) ?? m[0], g = m.filter(
|
|
69
|
+
(l) => l !== o && l.mobileHidden !== !0
|
|
70
|
+
), d = g.find((l) => l.mobileSubtitle), U = g.filter((l) => l.mobileActions), k = g.filter((l) => l !== d && !l.mobileActions), te = k.filter((l) => l.mobileInline), ne = k.filter(
|
|
71
|
+
(l) => l.mobileSecondary && !l.mobileInline
|
|
72
|
+
), G = k.filter(
|
|
73
|
+
(l) => !l.mobileInline && !l.mobileSecondary
|
|
74
|
+
), se = h != null ? G.slice(0, Math.max(0, h)) : G, be = [
|
|
75
|
+
...ne,
|
|
76
|
+
...h != null ? G.slice(Math.max(0, h)) : []
|
|
77
|
+
], de = () => {
|
|
78
|
+
if (B)
|
|
79
|
+
return /* @__PURE__ */ a("div", { className: "u-table-mobile-toolbar", children: B() });
|
|
80
|
+
if (f != null && f.length && T)
|
|
81
|
+
return /* @__PURE__ */ a("div", { className: "u-table-mobile-toolbar", children: /* @__PURE__ */ a(
|
|
82
|
+
pe,
|
|
83
|
+
{
|
|
84
|
+
options: f,
|
|
85
|
+
renderFilter: T,
|
|
86
|
+
onReset: ae,
|
|
87
|
+
sortLabel: ie
|
|
88
|
+
}
|
|
89
|
+
) });
|
|
90
|
+
const l = m.filter((e) => e.sortOn);
|
|
91
|
+
if (!(le ?? l.length > 0) || l.length === 0) return null;
|
|
92
|
+
const r = l.find((e) => e.field === u);
|
|
93
|
+
return p === "menu" ? /* @__PURE__ */ n("div", { className: "u-table-mobile-sortmenu", ref: y, children: [
|
|
94
|
+
/* @__PURE__ */ n(
|
|
95
|
+
"button",
|
|
96
|
+
{
|
|
97
|
+
type: "button",
|
|
98
|
+
className: "u-table-mobile-sortmenu__trigger",
|
|
99
|
+
onClick: () => $((e) => !e),
|
|
100
|
+
"aria-expanded": _,
|
|
101
|
+
"aria-haspopup": "listbox",
|
|
102
|
+
children: [
|
|
103
|
+
/* @__PURE__ */ a(w, { name: "sorting", size: "16px", color: "#1E4391" }),
|
|
104
|
+
/* @__PURE__ */ a("span", { className: "u-table-mobile-sortmenu__label", children: r ? r.mobileLabel ?? r.title ?? r.field : c })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
),
|
|
108
|
+
_ && /* @__PURE__ */ a("div", { className: "u-table-mobile-sortmenu__list", role: "listbox", children: l.map((e) => {
|
|
109
|
+
const t = e.field === u;
|
|
110
|
+
return /* @__PURE__ */ n(
|
|
111
|
+
"button",
|
|
112
|
+
{
|
|
113
|
+
type: "button",
|
|
114
|
+
className: `u-table-mobile-sortmenu__option${t ? " u-table-mobile-sortmenu__option--active" : ""}`,
|
|
115
|
+
"aria-selected": t,
|
|
116
|
+
onClick: () => {
|
|
117
|
+
t ? C() : (N(String(e.field)), $(!1));
|
|
118
|
+
},
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ a("span", { children: e.mobileLabel ?? e.title ?? e.field }),
|
|
121
|
+
t && /* @__PURE__ */ a(
|
|
122
|
+
w,
|
|
123
|
+
{
|
|
124
|
+
name: L === "desc" ? "down-arrow" : "up-arrow",
|
|
125
|
+
size: "12px",
|
|
126
|
+
color: "#1E4391"
|
|
127
|
+
}
|
|
128
|
+
)
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
e.field
|
|
132
|
+
);
|
|
133
|
+
}) })
|
|
134
|
+
] }) : p === "segments" ? /* @__PURE__ */ a(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
ref: E,
|
|
138
|
+
onScroll: R,
|
|
139
|
+
className: `u-table-mobile-sortseg${Q.atStart ? "" : " u-table-mobile-sortseg--clip-start"}${Q.atEnd ? "" : " u-table-mobile-sortseg--clip-end"}`,
|
|
140
|
+
role: "group",
|
|
141
|
+
"aria-label": c,
|
|
142
|
+
children: l.map((e) => {
|
|
143
|
+
const t = e.field === u, s = e.mobileLabel ?? e.title ?? e.field;
|
|
144
|
+
return /* @__PURE__ */ n(
|
|
145
|
+
"button",
|
|
146
|
+
{
|
|
147
|
+
type: "button",
|
|
148
|
+
className: `u-table-mobile-sortseg__item${t ? " u-table-mobile-sortseg__item--active" : ""}`,
|
|
149
|
+
"aria-pressed": t,
|
|
150
|
+
onClick: () => t ? C() : N(String(e.field)),
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ a(
|
|
153
|
+
"span",
|
|
154
|
+
{
|
|
155
|
+
className: "u-table-mobile-sortseg__label",
|
|
156
|
+
"data-label": s,
|
|
157
|
+
children: s
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
t && /* @__PURE__ */ a(
|
|
161
|
+
w,
|
|
162
|
+
{
|
|
163
|
+
name: L === "desc" ? "down-arrow" : "up-arrow",
|
|
164
|
+
size: "10px",
|
|
165
|
+
color: "#1E4391",
|
|
166
|
+
className: "u-table-mobile-sortseg__arrow"
|
|
167
|
+
}
|
|
168
|
+
)
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
e.field
|
|
172
|
+
);
|
|
173
|
+
})
|
|
174
|
+
}
|
|
175
|
+
) : /* @__PURE__ */ n("div", { className: "u-table-mobile-toolbar u-table-mobile-toolbar--sort", children: [
|
|
176
|
+
c && /* @__PURE__ */ a("span", { className: "u-table-mobile-toolbar__label", children: c }),
|
|
177
|
+
/* @__PURE__ */ n("div", { className: "u-table-mobile-toolbar__row", children: [
|
|
178
|
+
/* @__PURE__ */ a(
|
|
179
|
+
fe,
|
|
180
|
+
{
|
|
181
|
+
isClearable: !0,
|
|
182
|
+
placeholder: "Без сортировки",
|
|
183
|
+
options: l.map((e) => ({
|
|
184
|
+
value: e.field,
|
|
185
|
+
label: e.mobileLabel ?? e.title ?? e.field
|
|
186
|
+
})),
|
|
187
|
+
value: r ? { value: r.field, label: r.mobileLabel ?? r.title ?? r.field } : void 0,
|
|
188
|
+
onChange: (e) => e != null && e.value ? N(String(e.value)) : ee(void 0, void 0),
|
|
189
|
+
styleSelectContainer: { alignItems: "center" }
|
|
190
|
+
}
|
|
191
|
+
),
|
|
192
|
+
u && /* @__PURE__ */ a(
|
|
193
|
+
"button",
|
|
194
|
+
{
|
|
195
|
+
type: "button",
|
|
196
|
+
className: "u-table-mobile-sortdir",
|
|
197
|
+
onClick: C,
|
|
198
|
+
"aria-label": "Направление сортировки",
|
|
199
|
+
children: /* @__PURE__ */ a(
|
|
200
|
+
w,
|
|
201
|
+
{
|
|
202
|
+
name: L === "desc" ? "down-arrow" : "up-arrow",
|
|
203
|
+
size: "20px",
|
|
204
|
+
color: "#1E4391"
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
] })
|
|
210
|
+
] });
|
|
211
|
+
}, me = (l, i) => {
|
|
212
|
+
if (W) return W(l, i);
|
|
213
|
+
const r = v === 3 ? " u-table-mobile-card__fields--cols3" : v === 2 ? " u-table-mobile-card__fields--cols2" : "";
|
|
214
|
+
return oe ? /* @__PURE__ */ a(
|
|
215
|
+
_e,
|
|
216
|
+
{
|
|
217
|
+
flat: x,
|
|
218
|
+
inset: q,
|
|
219
|
+
density: J,
|
|
220
|
+
divider: S,
|
|
221
|
+
showLabels: j,
|
|
222
|
+
columns: v,
|
|
223
|
+
title: o ? b(o, l, i) : null,
|
|
224
|
+
titleLabel: o ? o.mobileLabel ?? o.title : null,
|
|
225
|
+
titleHideLabel: !!(o != null && o.mobileHideLabel),
|
|
226
|
+
titleColor: o == null ? void 0 : o.mobileValueColor,
|
|
227
|
+
titleLabelColor: o == null ? void 0 : o.mobileLabelColor,
|
|
228
|
+
subtitle: d ? b(d, l, i) : null,
|
|
229
|
+
subtitleColor: d == null ? void 0 : d.mobileValueColor,
|
|
230
|
+
actions: U.length ? U.map((e) => /* @__PURE__ */ a("span", { children: b(e, l, i) }, e.field)) : void 0,
|
|
231
|
+
inline: te.map((e) => ({
|
|
232
|
+
label: e.mobileLabel ?? e.title,
|
|
233
|
+
value: b(e, l, i),
|
|
234
|
+
hideLabel: !!e.mobileHideLabel,
|
|
235
|
+
valueColor: e.mobileValueColor,
|
|
236
|
+
labelColor: e.mobileLabelColor,
|
|
237
|
+
expandLines: e.mobileExpandLines ?? (e.mobileCollapsible ? 1 : void 0),
|
|
238
|
+
gridSpan: e.mobileGridSpan,
|
|
239
|
+
gridRowSpan: e.mobileGridRowSpan
|
|
240
|
+
})),
|
|
241
|
+
body: se.map((e) => ({
|
|
242
|
+
label: e.mobileLabel ?? e.title,
|
|
243
|
+
value: b(e, l, i),
|
|
244
|
+
hideLabel: !!e.mobileHideLabel,
|
|
245
|
+
valueColor: e.mobileValueColor,
|
|
246
|
+
labelColor: e.mobileLabelColor,
|
|
247
|
+
expandLines: e.mobileExpandLines ?? (e.mobileCollapsible ? 1 : void 0),
|
|
248
|
+
gridSpan: e.mobileGridSpan,
|
|
249
|
+
gridRowSpan: e.mobileGridRowSpan
|
|
250
|
+
})),
|
|
251
|
+
details: be.map((e) => ({
|
|
252
|
+
label: e.mobileLabel ?? e.title,
|
|
253
|
+
value: b(e, l, i),
|
|
254
|
+
hideLabel: !!e.mobileHideLabel,
|
|
255
|
+
valueColor: e.mobileValueColor,
|
|
256
|
+
labelColor: e.mobileLabelColor,
|
|
257
|
+
expandLines: e.mobileExpandLines ?? (e.mobileCollapsible ? 1 : void 0),
|
|
258
|
+
gridSpan: e.mobileGridSpan,
|
|
259
|
+
gridRowSpan: e.mobileGridRowSpan
|
|
260
|
+
}))
|
|
261
|
+
},
|
|
262
|
+
l.id ?? i
|
|
263
|
+
) : /* @__PURE__ */ n(
|
|
264
|
+
"div",
|
|
265
|
+
{
|
|
266
|
+
className: `u-table-mobile-card${x ? " u-table-mobile-card--flat" : ""}${S ? " u-table-mobile-card--divider" : ""}${v === 3 ? " u-table-mobile-card--cols3" : ""}${K}`,
|
|
267
|
+
children: [
|
|
268
|
+
o && /* @__PURE__ */ a("div", { className: "u-table-mobile-card__title", style: o.mobileValueColor ? { color: o.mobileValueColor } : void 0, children: b(o, l, i) }),
|
|
269
|
+
/* @__PURE__ */ a("div", { className: "u-table-mobile-card__fields" + r, children: g.map((e, t) => {
|
|
270
|
+
const s = b(e, l, i);
|
|
271
|
+
if (s == null || s === "" || s === !1 || Array.isArray(s) && s.length === 0) return null;
|
|
272
|
+
const V = j && !e.mobileHideLabel ? e.mobileLabel ?? e.title : null, ue = e.mobileGridSpan === "full" ? " u-table-mobile-card__row--span-full" : e.mobileGridSpan === 2 ? " u-table-mobile-card__row--span2" : e.mobileGridSpan === "narrow" ? " u-table-mobile-card__row--span-narrow" : "";
|
|
273
|
+
return e.mobileCollapsible || e.mobileExpandLines ? /* @__PURE__ */ a(
|
|
274
|
+
ge,
|
|
275
|
+
{
|
|
276
|
+
label: V,
|
|
277
|
+
lines: e.mobileExpandLines ?? 1,
|
|
278
|
+
valueColor: e.mobileValueColor,
|
|
279
|
+
labelColor: e.mobileLabelColor,
|
|
280
|
+
gridSpan: e.mobileGridSpan,
|
|
281
|
+
gridRowSpan: e.mobileGridRowSpan,
|
|
282
|
+
children: s
|
|
283
|
+
},
|
|
284
|
+
e.key ?? e.field ?? t
|
|
285
|
+
) : /* @__PURE__ */ n("div", { className: "u-table-mobile-card__row" + ue + (e.mobileGridRowSpan === 2 ? " u-table-mobile-card__row--rowspan2" : ""), children: [
|
|
286
|
+
V != null && /* @__PURE__ */ n("span", { className: "u-table-mobile-card__label", style: e.mobileLabelColor ? { color: e.mobileLabelColor } : void 0, children: [
|
|
287
|
+
V,
|
|
288
|
+
e.headerIcon && (e.headerTooltip ? /* @__PURE__ */ a(ve, { portalOn: !0, tooltipText: e.headerTooltip, className: "u-table-mobile-card__label-icon", children: e.headerIcon }) : /* @__PURE__ */ a("span", { className: "u-table-mobile-card__label-icon", children: e.headerIcon }))
|
|
289
|
+
] }),
|
|
290
|
+
/* @__PURE__ */ a("span", { className: "u-table-mobile-card__value", style: e.mobileValueColor ? { color: e.mobileValueColor } : void 0, children: s })
|
|
291
|
+
] }, e.key ?? e.field ?? t);
|
|
292
|
+
}) })
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
l.id ?? i
|
|
296
|
+
);
|
|
297
|
+
};
|
|
298
|
+
return /* @__PURE__ */ n(ce, { children: [
|
|
299
|
+
de(),
|
|
300
|
+
z && !A ? /* @__PURE__ */ a("div", { className: "u-table-mobile-list", "aria-hidden": "true", children: Array.from({ length: I || F }, (l, i) => /* @__PURE__ */ n("div", { className: `u-table-mobile-card u-table-mobile-card--skeleton${x ? " u-table-mobile-card--flat" : ""}${S ? " u-table-mobile-card--divider" : ""}${K}`, children: [
|
|
301
|
+
/* @__PURE__ */ a("div", { className: "skeleton-cell u-table-mobile-card__skeleton-title" }),
|
|
302
|
+
/* @__PURE__ */ n("div", { className: "u-table-mobile-card__skeleton-fields", children: [
|
|
303
|
+
/* @__PURE__ */ a("div", { className: "skeleton-cell" }),
|
|
304
|
+
/* @__PURE__ */ a("div", { className: "skeleton-cell" })
|
|
305
|
+
] })
|
|
306
|
+
] }, i)) }) : z || A ? /* @__PURE__ */ a("div", { className: "u-table-mobile-loading", children: /* @__PURE__ */ a(he, { variant: "large-primary", className: "" }) }) : D === 0 ? M ? /* @__PURE__ */ a("div", { className: "u-table-mobile-empty", children: M }) : null : /* @__PURE__ */ a(
|
|
307
|
+
"div",
|
|
308
|
+
{
|
|
309
|
+
className: "u-table-mobile-list",
|
|
310
|
+
style: O != null ? { gap: O } : void 0,
|
|
311
|
+
children: P.map((l, i) => me(l, i))
|
|
312
|
+
}
|
|
313
|
+
)
|
|
314
|
+
] });
|
|
315
|
+
};
|
|
316
|
+
export { ye as TableMobileView$u };
|