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,149 @@
|
|
|
1
|
+
import { jsxs as x, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as d, useEffect as h } from "react";
|
|
3
|
+
import { useDismiss$u as m } from "../../hooks/useDismiss.js";
|
|
4
|
+
const S = ({
|
|
5
|
+
options: i,
|
|
6
|
+
value: t,
|
|
7
|
+
onChange: p,
|
|
8
|
+
width: f = 100,
|
|
9
|
+
fallbackValue: l,
|
|
10
|
+
isOpen: r,
|
|
11
|
+
onOpen: v,
|
|
12
|
+
onClose: c
|
|
13
|
+
}) => {
|
|
14
|
+
const o = d(null), u = d(null);
|
|
15
|
+
m({ refs: [o], onDismiss: c, enabled: r });
|
|
16
|
+
const s = i.find((e) => e.value === t);
|
|
17
|
+
return h(() => {
|
|
18
|
+
if (!r) return;
|
|
19
|
+
const e = u.current;
|
|
20
|
+
if (!e) return;
|
|
21
|
+
const n = e.querySelector("[data-current='true']") ?? e.querySelector("[data-fallback='true']");
|
|
22
|
+
n && (e.scrollTop = n.offsetTop - e.clientHeight / 2 + n.offsetHeight / 2);
|
|
23
|
+
}, [r]), /* @__PURE__ */ x(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
ref: o,
|
|
27
|
+
style: {
|
|
28
|
+
// Ширину задаёт скрытый эталон ниже — по самой длинной подписи. `width`
|
|
29
|
+
// остаётся нижней границей, чтобы короткие списки не схлопывались.
|
|
30
|
+
position: "relative",
|
|
31
|
+
width: "max-content",
|
|
32
|
+
minWidth: `calc(${f} * var(--u-unit, 1px))`,
|
|
33
|
+
userSelect: "none",
|
|
34
|
+
cursor: "pointer"
|
|
35
|
+
},
|
|
36
|
+
className: "calendar-custom-select",
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ a(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
"aria-hidden": !0,
|
|
42
|
+
style: {
|
|
43
|
+
display: "block",
|
|
44
|
+
height: 0,
|
|
45
|
+
overflow: "hidden",
|
|
46
|
+
fontSize: "var(--u-font-size-14, calc(14 * var(--u-unit, 1px)))"
|
|
47
|
+
},
|
|
48
|
+
children: i.map((e) => /* @__PURE__ */ a(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
style: {
|
|
52
|
+
display: "block",
|
|
53
|
+
whiteSpace: "nowrap",
|
|
54
|
+
paddingInline: "calc(6 * var(--u-unit, 1px))",
|
|
55
|
+
// Резерв под то, что съедает ширину у списка, но не у поля:
|
|
56
|
+
// полоса прокрутки (6px) и рамка списка по 1px с двух сторон.
|
|
57
|
+
marginRight: "calc(8 * var(--u-preset-unit, 1px))"
|
|
58
|
+
},
|
|
59
|
+
children: e.label
|
|
60
|
+
},
|
|
61
|
+
String(e.value)
|
|
62
|
+
))
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ a(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: "calendar-custom-select-input",
|
|
69
|
+
style: {
|
|
70
|
+
paddingBlock: 0,
|
|
71
|
+
WebkitAppearance: "none",
|
|
72
|
+
MozAppearance: "none",
|
|
73
|
+
border: 0,
|
|
74
|
+
height: "calc(28 * var(--u-unit, 1px))",
|
|
75
|
+
fontSize: "var(--u-font-size-14, calc(14 * var(--u-unit, 1px)))",
|
|
76
|
+
width: "100%",
|
|
77
|
+
lineHeight: "calc(29 * var(--u-unit, 1px))",
|
|
78
|
+
// Черта идёт по всей ширине поля, а ширину задаёт эталон по самой
|
|
79
|
+
// длинной подписи — значит она совпадает с шириной выпадающего списка.
|
|
80
|
+
borderBottom: "1px solid #748AB9",
|
|
81
|
+
display: "flex",
|
|
82
|
+
alignItems: "center",
|
|
83
|
+
justifyContent: "center"
|
|
84
|
+
},
|
|
85
|
+
onClick: (e) => {
|
|
86
|
+
e.stopPropagation(), r ? c() : v();
|
|
87
|
+
},
|
|
88
|
+
children: /* @__PURE__ */ a("span", { children: s ? s.label : "" })
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
r && /* @__PURE__ */ a(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
ref: u,
|
|
95
|
+
className: "calendar-custom-select-options",
|
|
96
|
+
style: {
|
|
97
|
+
position: "absolute",
|
|
98
|
+
top: "calc(30 * var(--u-unit, 1px))",
|
|
99
|
+
left: 0,
|
|
100
|
+
// Ширину задаёт поле (её считает эталон по самой длинной подписи),
|
|
101
|
+
// поэтому список ровно под чертой и одной с ней ширины. Полосе
|
|
102
|
+
// прокрутки резервируется место, иначе она съедала бы подписи —
|
|
103
|
+
// из-за этого годы обрезались в «202», а месяцы в «Сентябр».
|
|
104
|
+
width: "100%",
|
|
105
|
+
scrollbarGutter: "stable",
|
|
106
|
+
background: "#fff",
|
|
107
|
+
border: "1px solid #748AB9",
|
|
108
|
+
borderRadius: "calc(4 * var(--u-unit, 1px))",
|
|
109
|
+
boxShadow: "0 2px 8px rgba(30,67,145,0.08)",
|
|
110
|
+
zIndex: 10,
|
|
111
|
+
maxHeight: "calc(200 * var(--u-unit, 1px))",
|
|
112
|
+
overflowY: "auto",
|
|
113
|
+
fontSize: "var(--u-font-size-14, calc(14 * var(--u-unit, 1px)))"
|
|
114
|
+
},
|
|
115
|
+
children: i.map((e) => /* @__PURE__ */ a(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
className: "calendar-custom-select-option",
|
|
119
|
+
"data-current": t === e.value ? "true" : void 0,
|
|
120
|
+
"data-fallback": l !== void 0 && l === e.value ? "true" : void 0,
|
|
121
|
+
style: {
|
|
122
|
+
// Без внешних отступов: они оставляли белые поля вокруг подсветки
|
|
123
|
+
// выбранного пункта. Воздух даёт паддинг, подсветка идёт от
|
|
124
|
+
// края до края списка.
|
|
125
|
+
padding: "calc(6 * var(--u-unit, 1px)) calc(6 * var(--u-unit, 1px))",
|
|
126
|
+
cursor: "pointer",
|
|
127
|
+
background: t === e.value ? "#EAF1FF" : "#fff",
|
|
128
|
+
borderRadius: t === e.value ? "4px" : 0,
|
|
129
|
+
color: t === e.value ? "#1E4391" : "#222",
|
|
130
|
+
margin: 0,
|
|
131
|
+
transition: "background 0.15s",
|
|
132
|
+
fontSize: "var(--u-font-size-14, calc(14 * var(--u-unit, 1px)))",
|
|
133
|
+
// Подписи не переносим: список расширяется по содержимому.
|
|
134
|
+
whiteSpace: "nowrap"
|
|
135
|
+
},
|
|
136
|
+
onClick: (n) => {
|
|
137
|
+
n.stopPropagation(), c(), p(e.value);
|
|
138
|
+
},
|
|
139
|
+
children: e.label
|
|
140
|
+
},
|
|
141
|
+
e.value
|
|
142
|
+
))
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
};
|
|
149
|
+
export { S as CalendarSelect$u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaskedDateInput.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/MaskedDateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MaskedDateInput.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/MaskedDateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,mBAAmB,EACzB,MAAM,OAAO,CAAC;AAWf,KAAK,cAAc,GAAG;IACpB,oHAAoH;IACpH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IACnC,yFAAyF;IACzF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,oEAAoE;IACpE,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C;+DAC2D;IAC3D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;yFACqF;IACrF,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAqBF,eAAO,MAAM,eAAe,qJA8T1B,CAAC"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as C, useRef as I, useState as _, useCallback as S, useEffect as $, useLayoutEffect as N } from "react";
|
|
3
|
+
import { useInputOverflow$u as tt } from "../../hooks/useInputOverflow.js";
|
|
4
|
+
import { getSegmentRange$u as U, incrementDateSegment$u as et, parseDateString$u as rt, getSegmentAtCaret$u as M, maskDateValue$u as nt } from "../../vanilla/core/dateMask.js";
|
|
5
|
+
const b = /^\d{2}\.\d{2}\.\d{4}$/, ct = (n, i) => {
|
|
6
|
+
var l, f;
|
|
7
|
+
(f = (l = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")) == null ? void 0 : l.set) == null || f.call(n, i), n.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
8
|
+
}, st = (n, i) => {
|
|
9
|
+
const l = n.selectionStart ?? 0, f = n.selectionEnd ?? l;
|
|
10
|
+
if (l === f) return !1;
|
|
11
|
+
if (l === 0 && f === n.value.length) return !0;
|
|
12
|
+
if (!i) return !1;
|
|
13
|
+
const [T, d] = U(i);
|
|
14
|
+
return l === T && f === d;
|
|
15
|
+
}, ut = C(({ value: n, onChange: i, onFocus: l, onBlur: f, onMouseUp: T, onKeyDown: d, onWheelDate: H, onOpenCalendar: R, onFocusChange: E, isClearable: Y, wheelEdit: o = !1, ...w }, A) => {
|
|
16
|
+
const s = I(null);
|
|
17
|
+
tt(s, n, w.disabled);
|
|
18
|
+
const [g, z] = _(null), q = I(null), p = S((t) => {
|
|
19
|
+
q.current = t, z(t);
|
|
20
|
+
}, []), [B, G] = _(0), [J, Q] = _(0), a = I(typeof n == "string" ? n : ""), L = I(
|
|
21
|
+
typeof n == "string" && b.test(n) ? n : ""
|
|
22
|
+
), V = I(!1);
|
|
23
|
+
$(() => {
|
|
24
|
+
typeof n == "string" && b.test(n) && (L.current = n), V.current || (a.current = typeof n == "string" ? n : "");
|
|
25
|
+
}, [n]);
|
|
26
|
+
const W = S(
|
|
27
|
+
(t) => {
|
|
28
|
+
s.current = t, typeof A == "function" ? A(t) : A && (A.current = t);
|
|
29
|
+
},
|
|
30
|
+
[A]
|
|
31
|
+
), x = S((t) => {
|
|
32
|
+
const e = s.current;
|
|
33
|
+
if (!e) return;
|
|
34
|
+
const [r, c] = U(t);
|
|
35
|
+
e.setSelectionRange(r, c);
|
|
36
|
+
}, []), D = S(
|
|
37
|
+
(t) => {
|
|
38
|
+
const e = () => {
|
|
39
|
+
q.current === t && x(t);
|
|
40
|
+
};
|
|
41
|
+
requestAnimationFrame(() => {
|
|
42
|
+
e(), requestAnimationFrame(e);
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
[x]
|
|
46
|
+
);
|
|
47
|
+
N(() => {
|
|
48
|
+
if (!o) return;
|
|
49
|
+
const t = s.current;
|
|
50
|
+
!t || document.activeElement !== t || !g || x(g);
|
|
51
|
+
}, [n, g, x, o, J]), N(() => {
|
|
52
|
+
if (B === 0) return;
|
|
53
|
+
const t = s.current;
|
|
54
|
+
!t || document.activeElement !== t || t.setSelectionRange(0, t.value.length);
|
|
55
|
+
}, [B]);
|
|
56
|
+
const X = (t) => {
|
|
57
|
+
const e = nt(t.target.value);
|
|
58
|
+
t.target.value = e, a.current = e, i == null || i(t);
|
|
59
|
+
}, Z = (t) => {
|
|
60
|
+
if (T == null || T(t), !o) return;
|
|
61
|
+
if (t.preventDefault(), t.detail >= 2) {
|
|
62
|
+
p(null), G((r) => r + 1);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const e = t.currentTarget.selectionStart ?? 0;
|
|
66
|
+
p(M(e)), Q((r) => r + 1);
|
|
67
|
+
}, h = (t) => {
|
|
68
|
+
var r;
|
|
69
|
+
l == null || l(t), E == null || E(!0);
|
|
70
|
+
const e = ((r = s.current) == null ? void 0 : r.value) ?? "";
|
|
71
|
+
a.current = b.test(e) ? e : typeof n == "string" ? n : "", b.test(a.current) && (L.current = a.current), V.current = !0, o && (p("day"), D("day"));
|
|
72
|
+
}, F = (t) => {
|
|
73
|
+
var y;
|
|
74
|
+
f == null || f(t), E == null || E(!1), V.current = !1, p(null);
|
|
75
|
+
const e = ((y = s.current) == null ? void 0 : y.value) ?? "";
|
|
76
|
+
if (b.test(e)) {
|
|
77
|
+
a.current = e, L.current = e;
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const r = Y && e.trim() === "", c = L.current;
|
|
81
|
+
if (!r && b.test(c)) {
|
|
82
|
+
a.current = c;
|
|
83
|
+
const u = s.current;
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
var m;
|
|
86
|
+
if (!u) return;
|
|
87
|
+
const k = (m = Object.getOwnPropertyDescriptor(
|
|
88
|
+
window.HTMLInputElement.prototype,
|
|
89
|
+
"value"
|
|
90
|
+
)) == null ? void 0 : m.set;
|
|
91
|
+
k == null || k.call(u, c), u.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
92
|
+
}, 0);
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
a.current = e;
|
|
96
|
+
}, j = S(
|
|
97
|
+
(t, e) => {
|
|
98
|
+
var k;
|
|
99
|
+
V.current = !0;
|
|
100
|
+
const r = s.current, c = (r == null ? void 0 : r.value) ?? "", y = b.test(a.current) ? a.current : b.test(c) ? c : "", u = et(y, t, e);
|
|
101
|
+
if (a.current = u, L.current = u, R == null || R(), r) {
|
|
102
|
+
const m = (k = Object.getOwnPropertyDescriptor(
|
|
103
|
+
window.HTMLInputElement.prototype,
|
|
104
|
+
"value"
|
|
105
|
+
)) == null ? void 0 : k.set;
|
|
106
|
+
m == null || m.call(r, u), r.dispatchEvent(new Event("input", { bubbles: !0 }));
|
|
107
|
+
} else if (H) {
|
|
108
|
+
const m = rt(u);
|
|
109
|
+
m && H(m);
|
|
110
|
+
} else i && i({
|
|
111
|
+
target: { value: u },
|
|
112
|
+
currentTarget: { value: u }
|
|
113
|
+
});
|
|
114
|
+
p(t), D(t);
|
|
115
|
+
},
|
|
116
|
+
[i, H, R, D, p]
|
|
117
|
+
), v = S(
|
|
118
|
+
(t) => {
|
|
119
|
+
const e = s.current;
|
|
120
|
+
if (!e || document.activeElement !== e) return;
|
|
121
|
+
t.cancelable && t.preventDefault(), t.stopPropagation();
|
|
122
|
+
const r = e.selectionStart ?? 0, c = g ?? M(r);
|
|
123
|
+
j(c, t.deltaY < 0 ? 1 : -1);
|
|
124
|
+
},
|
|
125
|
+
[g, j]
|
|
126
|
+
), K = S(
|
|
127
|
+
(t) => {
|
|
128
|
+
if (!o) {
|
|
129
|
+
d == null || d(t);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (t.key === "ArrowUp" || t.key === "ArrowDown") {
|
|
133
|
+
t.preventDefault();
|
|
134
|
+
const e = s.current;
|
|
135
|
+
if (!e) return;
|
|
136
|
+
const r = e.selectionStart ?? 0, c = g ?? M(r);
|
|
137
|
+
j(c, t.key === "ArrowUp" ? 1 : -1);
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (t.key === "Enter") {
|
|
141
|
+
const e = s.current, r = (e == null ? void 0 : e.selectionStart) ?? 0, c = g ?? M(r);
|
|
142
|
+
if (c !== "year") {
|
|
143
|
+
t.preventDefault();
|
|
144
|
+
const y = c === "day" ? "month" : "year";
|
|
145
|
+
p(y), D(y);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
d == null || d(t);
|
|
150
|
+
},
|
|
151
|
+
[g, j, D, d, p, o]
|
|
152
|
+
), O = S(
|
|
153
|
+
(t) => {
|
|
154
|
+
const e = s.current;
|
|
155
|
+
if (!e) return;
|
|
156
|
+
const r = t.inputType === "insertText", c = t.inputType.startsWith("delete") && t.inputType !== "deleteByCut" && t.inputType !== "deleteByDrag", y = q.current;
|
|
157
|
+
if (p(null), !(r || c) || !t.cancelable || !st(e, y)) return;
|
|
158
|
+
t.preventDefault();
|
|
159
|
+
const u = r && /^\d$/.test(t.data ?? "");
|
|
160
|
+
(u || c) && ct(e, u ? t.data ?? "" : "");
|
|
161
|
+
},
|
|
162
|
+
[p]
|
|
163
|
+
);
|
|
164
|
+
return $(() => {
|
|
165
|
+
if (!o) return;
|
|
166
|
+
const t = s.current;
|
|
167
|
+
if (t)
|
|
168
|
+
return t.addEventListener("wheel", v, { passive: !1 }), () => t.removeEventListener("wheel", v);
|
|
169
|
+
}, [v, o]), $(() => {
|
|
170
|
+
if (!o) return;
|
|
171
|
+
const t = s.current;
|
|
172
|
+
if (t)
|
|
173
|
+
return t.addEventListener("beforeinput", O), () => t.removeEventListener("beforeinput", O);
|
|
174
|
+
}, [O, o]), /* @__PURE__ */ P(
|
|
175
|
+
"input",
|
|
176
|
+
{
|
|
177
|
+
...w,
|
|
178
|
+
value: n,
|
|
179
|
+
ref: W,
|
|
180
|
+
inputMode: "numeric",
|
|
181
|
+
maxLength: 10,
|
|
182
|
+
onChange: X,
|
|
183
|
+
onKeyDown: K,
|
|
184
|
+
onMouseUp: Z,
|
|
185
|
+
onFocus: h,
|
|
186
|
+
onBlur: F
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
});
|
|
190
|
+
ut.displayName = "MaskedDateInput";
|
|
191
|
+
export { ut as MaskedDateInput$u };
|
|
@@ -3,6 +3,5 @@ export type DateSegment = "day" | "month" | "year";
|
|
|
3
3
|
export declare const getSegmentRange: (segment: DateSegment) => [number, number];
|
|
4
4
|
export declare const getSegmentAtCaret: (caret: number) => DateSegment;
|
|
5
5
|
export declare const incrementDateSegment: (value: string, segment: DateSegment, delta: number) => string;
|
|
6
|
-
export declare const normalizeSegment: (segment: string, max: number) => string;
|
|
7
6
|
export declare const maskDateValue: (raw: string) => string;
|
|
8
7
|
//# sourceMappingURL=dateMask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateMask.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/dateMask.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,IAAI,GAAG,IAMtD,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAGnD,eAAO,MAAM,eAAe,GAAI,SAAS,WAAW,KAAG,CAAC,MAAM,EAAE,MAAM,CAIrE,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,WAIjD,CAAC;AAwBF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,EACb,SAAS,WAAW,EACpB,OAAO,MAAM,KACZ,MAkBF,CAAC;
|
|
1
|
+
{"version":3,"file":"dateMask.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar/dateMask.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,IAAI,GAAG,IAMtD,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAGnD,eAAO,MAAM,eAAe,GAAI,SAAS,WAAW,KAAG,CAAC,MAAM,EAAE,MAAM,CAIrE,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,KAAG,WAIjD,CAAC;AAwBF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,EACb,SAAS,WAAW,EACpB,OAAO,MAAM,KACZ,MAkBF,CAAC;AAoBF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,MAU3C,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import type { CardProperties } from './Card.types';
|
|
4
4
|
export declare const Card: ({ children, className, bordered, collapsible, header, defaultOpen, open, onToggle, }: CardProperties) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,mDAAmD,CAAC;AAI3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAWnD,eAAO,MAAM,IAAI,GAAI,sFASlB,cAAc,4CA2FhB,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { jsx as n, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useRef as C, useLayoutEffect as R } from "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { Icon$u as L } from "../Icon/Icon.js";
|
|
6
|
+
import { useAutoId$u as O } from "../../hooks/useAutoId.js";
|
|
7
|
+
const A = 220, H = 'button, a, input, select, textarea, label, [role="button"], [contenteditable="true"]', k = 5, M = 20, z = ({
|
|
8
|
+
children: c,
|
|
9
|
+
className: E = "",
|
|
10
|
+
bordered: x = !1,
|
|
11
|
+
collapsible: e = !1,
|
|
12
|
+
header: a,
|
|
13
|
+
defaultOpen: b = !0,
|
|
14
|
+
open: d,
|
|
15
|
+
onToggle: o
|
|
16
|
+
}) => {
|
|
17
|
+
const [h, v] = N(b), i = O(null, "u-card-body"), u = typeof d == "boolean", r = e ? u ? d : h : !0, l = C(null), [w, m] = N(!0), f = C(!0);
|
|
18
|
+
R(() => {
|
|
19
|
+
if (f.current) {
|
|
20
|
+
f.current = !1;
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
m(!1);
|
|
24
|
+
const t = window.setTimeout(() => m(!0), A + M);
|
|
25
|
+
return () => window.clearTimeout(t);
|
|
26
|
+
}, [r]);
|
|
27
|
+
const _ = [
|
|
28
|
+
"cardStyle",
|
|
29
|
+
x && "u-react-card--bordered",
|
|
30
|
+
e && "u-react-card--collapsible",
|
|
31
|
+
e && (r ? "u-react-card--open" : "u-react-card--closed"),
|
|
32
|
+
e && r && w && "u-react-card--settled",
|
|
33
|
+
E
|
|
34
|
+
].filter(Boolean).join(" "), I = a != null && a !== !1;
|
|
35
|
+
if (!e && !I)
|
|
36
|
+
return /* @__PURE__ */ n("div", { className: _, children: c });
|
|
37
|
+
const y = () => {
|
|
38
|
+
const t = !r;
|
|
39
|
+
u || v(t), o == null || o(t);
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ p("div", { className: _, children: [
|
|
42
|
+
/* @__PURE__ */ p(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
className: "u-react-card__header",
|
|
46
|
+
onPointerDown: e ? (t) => {
|
|
47
|
+
l.current = { x: t.clientX, y: t.clientY };
|
|
48
|
+
} : void 0,
|
|
49
|
+
onClick: e ? (t) => {
|
|
50
|
+
var S;
|
|
51
|
+
if (t.target.closest(H)) return;
|
|
52
|
+
const s = l.current;
|
|
53
|
+
s && Math.hypot(t.clientX - s.x, t.clientY - s.y) > k || (S = window.getSelection()) != null && S.toString() || y();
|
|
54
|
+
} : void 0,
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ n("div", { className: "u-react-card__header-content", children: a }),
|
|
57
|
+
e ? /* @__PURE__ */ n(
|
|
58
|
+
"button",
|
|
59
|
+
{
|
|
60
|
+
type: "button",
|
|
61
|
+
className: "u-react-card__toggle",
|
|
62
|
+
onClick: y,
|
|
63
|
+
"aria-expanded": r,
|
|
64
|
+
"aria-controls": i,
|
|
65
|
+
"aria-label": r ? "Свернуть" : "Развернуть",
|
|
66
|
+
children: /* @__PURE__ */ n(L, { name: "up", size: 20, rotate: r ? 0 : 180 })
|
|
67
|
+
}
|
|
68
|
+
) : null
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
e ? /* @__PURE__ */ n("div", { className: "u-react-card__body", id: i, children: /* @__PURE__ */ n("div", { className: "u-react-card__body-inner", children: c }) }) : /* @__PURE__ */ n("div", { className: "u-react-card__body-static", children: c })
|
|
73
|
+
] });
|
|
74
|
+
};
|
|
75
|
+
export { z as Card$u };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as a, jsxs as y, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useAutoId$u as f } from "../../hooks/useAutoId.js";
|
|
5
|
+
const k = ({
|
|
6
|
+
children: l,
|
|
7
|
+
disabled: c,
|
|
8
|
+
checked: s,
|
|
9
|
+
defaultChecked: i,
|
|
10
|
+
rightCheckbox: o = !1,
|
|
11
|
+
onClick: e,
|
|
12
|
+
onChange: r,
|
|
13
|
+
className: m = "",
|
|
14
|
+
id: p,
|
|
15
|
+
"aria-label": d,
|
|
16
|
+
"aria-labelledby": u,
|
|
17
|
+
propsInput: x,
|
|
18
|
+
style: t
|
|
19
|
+
}) => {
|
|
20
|
+
const n = f(p, "u-checkbox"), h = r || (e ? (v) => {
|
|
21
|
+
e(v);
|
|
22
|
+
} : void 0);
|
|
23
|
+
return /* @__PURE__ */ a("div", { className: "u-checkbox-wrapper", children: /* @__PURE__ */ y("label", { style: Object.assign({ columnGap: l ? "" : 0 }, t || {}), className: `u-checkbox ${m}`, children: [
|
|
24
|
+
o && /* @__PURE__ */ a(b, { children: l }),
|
|
25
|
+
/* @__PURE__ */ a("input", { defaultChecked: i, checked: s, disabled: c, id: n, type: "checkbox", onChange: h, onClick: e, readOnly: s !== void 0 && !r && !e, "aria-label": d, "aria-labelledby": u, ...x }),
|
|
26
|
+
/* @__PURE__ */ a("div", { className: "u-checkbox-input" }),
|
|
27
|
+
!o && /* @__PURE__ */ a(b, { children: l })
|
|
28
|
+
] }) });
|
|
29
|
+
};
|
|
30
|
+
export { k as Checkbox$u };
|