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,220 @@
|
|
|
1
|
+
import { jsxs as V, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { getFieldAccessibility$u as at } from "../../shared/fieldAccessibility.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { useRef as F, useState as I, useEffect as M, useCallback as z } from "react";
|
|
6
|
+
import { Tooltip$u as pt } from "../Tooltip/Tooltip.js";
|
|
7
|
+
import { useAutoId$u as ft } from "../../hooks/useAutoId.js";
|
|
8
|
+
import { useInputOverflow$u as mt } from "../../hooks/useInputOverflow.js";
|
|
9
|
+
import { sizeClassName$u as bt } from "../../shared/size.js";
|
|
10
|
+
import { resolveValidation$u as dt } from "../../vanilla/core/validation.js";
|
|
11
|
+
const Mt = ({
|
|
12
|
+
"aria-label": G,
|
|
13
|
+
"aria-labelledby": Z,
|
|
14
|
+
"aria-describedby": q,
|
|
15
|
+
title: b = "",
|
|
16
|
+
placeholder: P = "",
|
|
17
|
+
defaultValue: y,
|
|
18
|
+
value: c,
|
|
19
|
+
id: Y,
|
|
20
|
+
name: N = "",
|
|
21
|
+
onChange: p,
|
|
22
|
+
required: E = !1,
|
|
23
|
+
disabled: i = !1,
|
|
24
|
+
lineUp: $ = !1,
|
|
25
|
+
rowGap: H = 4,
|
|
26
|
+
columnGap: J = 20,
|
|
27
|
+
styleInputContainer: K,
|
|
28
|
+
styleTitle: Q,
|
|
29
|
+
tooltipMaxWidth: U = 300,
|
|
30
|
+
className: X = "",
|
|
31
|
+
size: _,
|
|
32
|
+
min: n,
|
|
33
|
+
max: o,
|
|
34
|
+
restoreLastOnBlur: s = !1,
|
|
35
|
+
hintText: B = "Используйте колесо мыши или стрелки ↑↓ для изменения значения",
|
|
36
|
+
validationText: L = "Заполните поле",
|
|
37
|
+
validationOn: O,
|
|
38
|
+
error: tt,
|
|
39
|
+
validationOnWithoutText: et,
|
|
40
|
+
absoluteValidationText: rt
|
|
41
|
+
}) => {
|
|
42
|
+
const S = dt({ error: tt, validationOn: O, validationOnWithoutText: et, validationText: L }), u = ft(Y, "u-input-number"), k = bt(_), it = at(u, b, E, S, {
|
|
43
|
+
"aria-label": G,
|
|
44
|
+
"aria-labelledby": Z,
|
|
45
|
+
"aria-describedby": q
|
|
46
|
+
}), d = F(null);
|
|
47
|
+
mt(d, c, i);
|
|
48
|
+
const x = F(null), [g, D] = I(!1), [nt, ot] = I(!1), [T, v] = I(String(c ?? y ?? "")), h = F(String(c ?? y ?? "")), A = (t) => typeof t == "number" ? `calc(${t} * var(--u-preset-unit, 1px))` : String(t), ut = (t) => typeof t == "number" ? `calc(${t} * var(--u-unit, 1px))` : String(t);
|
|
49
|
+
M(() => {
|
|
50
|
+
const t = () => {
|
|
51
|
+
ot(window.innerWidth <= 900);
|
|
52
|
+
};
|
|
53
|
+
return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
54
|
+
}, []), M(() => {
|
|
55
|
+
if (!s || g) return;
|
|
56
|
+
const t = String(c ?? "");
|
|
57
|
+
v(t), t.trim() !== "" && (h.current = t);
|
|
58
|
+
}, [s, g, c]);
|
|
59
|
+
const j = z((t) => {
|
|
60
|
+
const e = Number(String(t).replace(",", "."));
|
|
61
|
+
if (!Number.isFinite(e)) return "";
|
|
62
|
+
const r = n != null && n !== "" ? Number(n) : void 0, l = o != null && o !== "" ? Number(o) : void 0;
|
|
63
|
+
let a = e;
|
|
64
|
+
return Number.isFinite(r) && (a = Math.max(a, r)), Number.isFinite(l) && (a = Math.min(a, l)), String(a);
|
|
65
|
+
}, [n, o]), w = z((t) => {
|
|
66
|
+
if (s && (v(t), String(t).trim() !== "" && (h.current = String(t))), !p) return;
|
|
67
|
+
p({
|
|
68
|
+
target: {
|
|
69
|
+
value: t,
|
|
70
|
+
id: u,
|
|
71
|
+
name: N
|
|
72
|
+
},
|
|
73
|
+
currentTarget: {
|
|
74
|
+
value: t,
|
|
75
|
+
id: u,
|
|
76
|
+
name: N
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}, [u, N, p, s]), C = (t) => {
|
|
80
|
+
if (i) return;
|
|
81
|
+
const e = d.current;
|
|
82
|
+
e && (t === -1 ? e.stepDown() : e.stepUp(), w(e.value));
|
|
83
|
+
}, R = z((t) => {
|
|
84
|
+
const e = d.current;
|
|
85
|
+
if (i || !e || document.activeElement !== e) return;
|
|
86
|
+
t.cancelable && t.preventDefault(), t.stopPropagation(), t.deltaY < 0 ? e.stepUp() : e.stepDown();
|
|
87
|
+
const r = Number(e.value), l = n != null && n !== "" ? Number(n) : void 0, a = o != null && o !== "" ? Number(o) : void 0;
|
|
88
|
+
let f = r;
|
|
89
|
+
Number.isFinite(l) && (f = Math.max(f, l)), Number.isFinite(a) && (f = Math.min(f, a)), Number.isFinite(f) && (e.value = String(f)), w(e.value);
|
|
90
|
+
}, [i, w, o, n]);
|
|
91
|
+
M(() => {
|
|
92
|
+
if (i) return;
|
|
93
|
+
const t = x.current;
|
|
94
|
+
if (!t) return;
|
|
95
|
+
const e = (r) => R(r);
|
|
96
|
+
return t.addEventListener("wheel", e, { passive: !1 }), () => {
|
|
97
|
+
t.removeEventListener("wheel", e);
|
|
98
|
+
};
|
|
99
|
+
}, [i, R]);
|
|
100
|
+
const ct = (t) => {
|
|
101
|
+
if (!s) {
|
|
102
|
+
p == null || p(t);
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const e = t.target.value;
|
|
106
|
+
if (String(e).trim() === "") {
|
|
107
|
+
v("");
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
w(j(e));
|
|
111
|
+
}, st = () => {
|
|
112
|
+
if (D(!0), !s) return;
|
|
113
|
+
const t = String(c ?? "");
|
|
114
|
+
v(t), t.trim() !== "" && (h.current = t);
|
|
115
|
+
}, lt = () => {
|
|
116
|
+
var l;
|
|
117
|
+
if (D(!1), !s) return;
|
|
118
|
+
const t = String(((l = d.current) == null ? void 0 : l.value) ?? T ?? "").trim(), e = t !== "" ? t : h.current || String(c ?? ""), r = j(e);
|
|
119
|
+
v(r), r.trim() !== "" && (h.current = r), r !== String(c ?? "") && w(r);
|
|
120
|
+
}, W = /* @__PURE__ */ V("div", { ref: x, className: `u-number ${i ? "u-number-disabled" : ""}`, children: [
|
|
121
|
+
/* @__PURE__ */ m(
|
|
122
|
+
"button",
|
|
123
|
+
{
|
|
124
|
+
className: "u-number-down",
|
|
125
|
+
type: "button",
|
|
126
|
+
"aria-label": `Уменьшить ${b || "значение"}`,
|
|
127
|
+
onClick: () => {
|
|
128
|
+
C(-1);
|
|
129
|
+
},
|
|
130
|
+
id: `num-minus-${u}`,
|
|
131
|
+
disabled: i
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ m(
|
|
135
|
+
"input",
|
|
136
|
+
{
|
|
137
|
+
...it,
|
|
138
|
+
ref: d,
|
|
139
|
+
type: "number",
|
|
140
|
+
className: `u-react-input u-input ${S.hasError ? "u-input-required" : ""}`,
|
|
141
|
+
min: n,
|
|
142
|
+
max: o,
|
|
143
|
+
id: u,
|
|
144
|
+
name: N,
|
|
145
|
+
placeholder: P,
|
|
146
|
+
defaultValue: y,
|
|
147
|
+
value: s && g ? T : c,
|
|
148
|
+
disabled: i,
|
|
149
|
+
onChange: ct,
|
|
150
|
+
onFocus: st,
|
|
151
|
+
onBlur: lt
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
/* @__PURE__ */ m(
|
|
155
|
+
"button",
|
|
156
|
+
{
|
|
157
|
+
className: "u-number-up",
|
|
158
|
+
type: "button",
|
|
159
|
+
"aria-label": `Увеличить ${b || "значение"}`,
|
|
160
|
+
onClick: () => {
|
|
161
|
+
C(1);
|
|
162
|
+
},
|
|
163
|
+
id: `num-plus-${u}`,
|
|
164
|
+
disabled: i
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
] });
|
|
168
|
+
return /* @__PURE__ */ V(
|
|
169
|
+
"div",
|
|
170
|
+
{
|
|
171
|
+
className: `u-react-input-number-container${k ? ` ${k}` : ""} ${X}`,
|
|
172
|
+
style: Object.assign(
|
|
173
|
+
{
|
|
174
|
+
display: "flex",
|
|
175
|
+
flexDirection: $ ? "row" : "column",
|
|
176
|
+
rowGap: $ ? null : A(H),
|
|
177
|
+
columnGap: $ ? A(J) : null
|
|
178
|
+
},
|
|
179
|
+
K
|
|
180
|
+
),
|
|
181
|
+
children: [
|
|
182
|
+
b && /* @__PURE__ */ m(
|
|
183
|
+
"div",
|
|
184
|
+
{
|
|
185
|
+
id: `${u}-label`,
|
|
186
|
+
className: `${E ? "u-required" : ""} u-react-input-title`,
|
|
187
|
+
style: Object.assign(
|
|
188
|
+
{
|
|
189
|
+
color: "var(--u-field-title-color, #545454)",
|
|
190
|
+
fontSize: "var(--u-field-label-size-main, calc(14 * var(--u-unit, 1px)))"
|
|
191
|
+
},
|
|
192
|
+
Q
|
|
193
|
+
),
|
|
194
|
+
children: b
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
i ? W : /* @__PURE__ */ m(
|
|
198
|
+
pt,
|
|
199
|
+
{
|
|
200
|
+
portalOn: !0,
|
|
201
|
+
id: `input-number-wheel-${u || "default"}`,
|
|
202
|
+
tooltipText: B,
|
|
203
|
+
position: "top",
|
|
204
|
+
isActive: g && !nt,
|
|
205
|
+
showWhenActive: !0,
|
|
206
|
+
tooltipStyle: {
|
|
207
|
+
maxWidth: ut(U),
|
|
208
|
+
width: "auto",
|
|
209
|
+
whiteSpace: "normal",
|
|
210
|
+
overflowWrap: "break-word"
|
|
211
|
+
},
|
|
212
|
+
children: W
|
|
213
|
+
}
|
|
214
|
+
),
|
|
215
|
+
S.showText && /* @__PURE__ */ m("h5", { id: `${u}-error`, className: "h5 clr-red-main", style: rt ? { position: "absolute", bottom: "calc(-20 * var(--u-unit, 1px))" } : { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: S.text })
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
);
|
|
219
|
+
};
|
|
220
|
+
export { Mt as InputNumber$u };
|
|
@@ -38,7 +38,7 @@ type InputAffixProperties = {
|
|
|
38
38
|
* `picker` задаёт вид вручную; `auto` выбирает по числу вариантов.
|
|
39
39
|
*/
|
|
40
40
|
export declare function useInputAffixElement({ side, inputId, variants, current, next, onSelect, onPicked, picker, disabled, compact }: InputAffixProperties): {
|
|
41
|
-
element:
|
|
41
|
+
element: JSX.Element;
|
|
42
42
|
width: number;
|
|
43
43
|
mode: string;
|
|
44
44
|
id: string;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsx as r, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useRef as E, useLayoutEffect as O } from "react";
|
|
3
|
+
import { Icon$u as z } from "../Icon/Icon.js";
|
|
4
|
+
import { useDismiss$u as K } from "../../hooks/useDismiss.js";
|
|
5
|
+
const I = { prefix: "Префикс", suffix: "Суффикс" }, q = 3, B = (l) => typeof l == "string" ? { value: l, label: l } : { value: l.value, label: l.label ?? l.value };
|
|
6
|
+
function W(l, n, s, e) {
|
|
7
|
+
const i = l == null ? [] : (Array.isArray(l) ? l : [l]).map(B), [d, p] = N(s), o = n ?? d, x = i.findIndex((b) => b.value === o), m = o !== void 0 && x < 0 && n !== void 0 ? { value: o, label: o } : i[Math.max(x, 0)], f = i.length > 1 ? i[(Math.max(x, 0) + 1) % i.length] : void 0;
|
|
8
|
+
return { variants: i, current: m, next: f, select: (b) => {
|
|
9
|
+
b.value !== (m == null ? void 0 : m.value) && (n === void 0 && p(b.value), e == null || e(b.value));
|
|
10
|
+
} };
|
|
11
|
+
}
|
|
12
|
+
function C(l) {
|
|
13
|
+
const n = E(null), [s, e] = N(0);
|
|
14
|
+
return O(() => {
|
|
15
|
+
const i = n.current;
|
|
16
|
+
if (!i) {
|
|
17
|
+
e(0);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const d = () => e(i.getBoundingClientRect().width);
|
|
21
|
+
if (d(), typeof ResizeObserver > "u") return;
|
|
22
|
+
const p = new ResizeObserver(d);
|
|
23
|
+
return p.observe(i), () => p.disconnect();
|
|
24
|
+
}, [l]), [n, s];
|
|
25
|
+
}
|
|
26
|
+
const M = (l, n) => /* @__PURE__ */ g("span", { className: "u-react-input-affix__variants", "aria-hidden": "true", children: [
|
|
27
|
+
l.map((s) => /* @__PURE__ */ r("span", { className: s.value === n.value ? "u-react-input-affix__current" : void 0, children: s.label }, s.value)),
|
|
28
|
+
!l.some((s) => s.value === n.value) && /* @__PURE__ */ r("span", { className: "u-react-input-affix__current", children: n.label })
|
|
29
|
+
] });
|
|
30
|
+
function Y({ side: l, inputId: n, variants: s, current: e, next: i, onSelect: d, onPicked: p, picker: o, disabled: x, compact: m }) {
|
|
31
|
+
const f = !e || s.length < 2 ? "static" : o === "cycle" || o === "menu" ? o : s.length <= q ? "cycle" : "menu", [_, b] = C(`${f}|${f === "static" ? e == null ? void 0 : e.label : s.map((t) => t.label).join("|")}`), [u, y] = N(!1), A = E(null), k = E(null), $ = `${n}-${l}`;
|
|
32
|
+
K({ refs: [_], onDismiss: () => y(!1), enabled: u }), O(() => {
|
|
33
|
+
var w, c;
|
|
34
|
+
if (!u) return;
|
|
35
|
+
const t = (w = k.current) == null ? void 0 : w.querySelectorAll('[role="option"]'), a = s.findIndex((D) => D.value === (e == null ? void 0 : e.value));
|
|
36
|
+
(c = t == null ? void 0 : t[Math.max(a, 0)]) == null || c.focus();
|
|
37
|
+
}, [u]);
|
|
38
|
+
const v = `u-react-input-affix u-react-input-affix--${l} u-react-input-affix--${f}${m ? " u-react-input-affix--small" : ""}`, S = (t) => {
|
|
39
|
+
var c, D, L, R;
|
|
40
|
+
const a = [...((c = k.current) == null ? void 0 : c.querySelectorAll('[role="option"]')) ?? []], w = a.indexOf(document.activeElement);
|
|
41
|
+
if (t.key === "ArrowDown" || t.key === "ArrowUp") {
|
|
42
|
+
t.preventDefault();
|
|
43
|
+
const j = t.key === "ArrowDown" ? 1 : -1;
|
|
44
|
+
(D = a[(w + j + a.length) % a.length]) == null || D.focus();
|
|
45
|
+
} else t.key === "Home" || t.key === "End" ? (t.preventDefault(), (L = a[t.key === "Home" ? 0 : a.length - 1]) == null || L.focus()) : t.key === "Escape" ? (t.preventDefault(), y(!1), (R = A.current) == null || R.focus()) : t.key === "Tab" && y(!1);
|
|
46
|
+
};
|
|
47
|
+
let h = null;
|
|
48
|
+
if (e && f === "static")
|
|
49
|
+
h = /* @__PURE__ */ r("span", { ref: _, id: $, className: v, children: e.label });
|
|
50
|
+
else if (e && i && f === "cycle")
|
|
51
|
+
h = /* @__PURE__ */ r(
|
|
52
|
+
"button",
|
|
53
|
+
{
|
|
54
|
+
ref: _,
|
|
55
|
+
id: $,
|
|
56
|
+
type: "button",
|
|
57
|
+
className: v,
|
|
58
|
+
disabled: x,
|
|
59
|
+
"aria-label": `${I[l]}: ${e.label}. Сменить на ${i.label}`,
|
|
60
|
+
onClick: (t) => {
|
|
61
|
+
d(i), t.detail > 0 && p();
|
|
62
|
+
},
|
|
63
|
+
children: M(s, e)
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
else if (e) {
|
|
67
|
+
const t = `${$}-list`;
|
|
68
|
+
h = /* @__PURE__ */ g("div", { ref: _, className: `${v}${u ? " u-react-input-affix--open" : ""}`, children: [
|
|
69
|
+
/* @__PURE__ */ g(
|
|
70
|
+
"button",
|
|
71
|
+
{
|
|
72
|
+
ref: A,
|
|
73
|
+
id: $,
|
|
74
|
+
type: "button",
|
|
75
|
+
className: "u-react-input-affix__trigger",
|
|
76
|
+
disabled: x,
|
|
77
|
+
"aria-haspopup": "listbox",
|
|
78
|
+
"aria-expanded": u,
|
|
79
|
+
"aria-controls": u ? t : void 0,
|
|
80
|
+
"aria-label": `${I[l]}: ${e.label}`,
|
|
81
|
+
onClick: () => y((a) => !a),
|
|
82
|
+
onKeyDown: (a) => {
|
|
83
|
+
(a.key === "ArrowDown" || a.key === "ArrowUp") && (a.preventDefault(), y(!0));
|
|
84
|
+
},
|
|
85
|
+
children: [
|
|
86
|
+
M(s, e),
|
|
87
|
+
/* @__PURE__ */ r(z, { name: "down", size: m ? 10 : 12, rotate: u ? 180 : 0, className: "u-react-input-affix__icon" })
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
u && /* @__PURE__ */ r("ul", { ref: k, id: t, role: "listbox", "aria-label": I[l], className: "u-react-input-affix__menu", onKeyDown: S, children: s.map((a) => /* @__PURE__ */ r("li", { role: "presentation", children: /* @__PURE__ */ r(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
type: "button",
|
|
95
|
+
role: "option",
|
|
96
|
+
"aria-selected": a.value === e.value,
|
|
97
|
+
className: "u-react-input-affix__option",
|
|
98
|
+
onClick: (w) => {
|
|
99
|
+
var c;
|
|
100
|
+
d(a), y(!1), w.detail > 0 ? p() : (c = A.current) == null || c.focus();
|
|
101
|
+
},
|
|
102
|
+
children: a.label
|
|
103
|
+
}
|
|
104
|
+
) }, a.value)) })
|
|
105
|
+
] });
|
|
106
|
+
}
|
|
107
|
+
return { element: h, width: h ? b : 0, mode: f, id: h ? $ : void 0 };
|
|
108
|
+
}
|
|
109
|
+
export { W as useInputAffix$u, Y as useInputAffixElement$u };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { InputTextProperties } from './InputText.types';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
|
|
4
5
|
export declare const InputText: ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, title, placeholder, defaultValue, value, id: providedId, name, onChange, required, disabled, lineUp, rowGap, columnGap, styleInputContainer, styleTitle, styleInput, className, tableView, size, validationText, validationOn, error, validationOnWithoutText, absoluteValidationText, prefix, prefixValue, defaultPrefixValue, onPrefixChange, prefixPicker, suffix, suffixValue, defaultSuffixValue, onSuffixChange, suffixPicker, }: InputTextProperties) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
//# sourceMappingURL=InputText.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputText.d.ts","sourceRoot":"","sources":["../../../src/components/InputText/InputText.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"InputText.d.ts","sourceRoot":"","sources":["../../../src/components/InputText/InputText.tsx"],"names":[],"mappings":"AACA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAOvD,OAAO,yDAAyD,CAAC;AACjE,OAAO,0DAA0D,CAAC;AAElE,eAAO,MAAM,SAAS,GAAI,2gBAqCvB,mBAAmB,4CA8HrB,CAAA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsx as f, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { getFieldAccessibility$u as le } from "../../shared/fieldAccessibility.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useRef as ue, useState as pe, useEffect as fe } from "react";
|
|
5
|
+
import { useAutoId$u as me } from "../../hooks/useAutoId.js";
|
|
6
|
+
import { useInputOverflow$u as de } from "../../hooks/useInputOverflow.js";
|
|
7
|
+
import { isCompact$u as xe, sizeClassName$u as ve } from "../../shared/size.js";
|
|
8
|
+
import { useInputAffix$u as N, useInputAffixElement$u as z } from "./InputAffix.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
import { resolveValidation$u as he } from "../../vanilla/core/validation.js";
|
|
12
|
+
const ke = ({
|
|
13
|
+
"aria-label": C,
|
|
14
|
+
"aria-labelledby": k,
|
|
15
|
+
"aria-describedby": w,
|
|
16
|
+
title: c = "",
|
|
17
|
+
placeholder: E = "",
|
|
18
|
+
defaultValue: O,
|
|
19
|
+
value: l,
|
|
20
|
+
id: R,
|
|
21
|
+
name: P = "",
|
|
22
|
+
onChange: d,
|
|
23
|
+
required: x = !1,
|
|
24
|
+
disabled: s = !1,
|
|
25
|
+
lineUp: u = !1,
|
|
26
|
+
rowGap: T = 4,
|
|
27
|
+
columnGap: B = 20,
|
|
28
|
+
styleInputContainer: G,
|
|
29
|
+
styleTitle: q,
|
|
30
|
+
styleInput: D,
|
|
31
|
+
className: F = "",
|
|
32
|
+
tableView: v = !1,
|
|
33
|
+
size: h,
|
|
34
|
+
validationText: L = "Заполните поле",
|
|
35
|
+
validationOn: H,
|
|
36
|
+
error: J,
|
|
37
|
+
validationOnWithoutText: K,
|
|
38
|
+
absoluteValidationText: M,
|
|
39
|
+
prefix: Q,
|
|
40
|
+
prefixValue: V,
|
|
41
|
+
defaultPrefixValue: W,
|
|
42
|
+
onPrefixChange: X,
|
|
43
|
+
prefixPicker: Y = "auto",
|
|
44
|
+
suffix: Z,
|
|
45
|
+
suffixValue: _,
|
|
46
|
+
defaultSuffixValue: U,
|
|
47
|
+
onSuffixChange: ee,
|
|
48
|
+
suffixPicker: te = "auto"
|
|
49
|
+
}) => {
|
|
50
|
+
const a = he({ error: J, validationOn: H, validationOnWithoutText: K, validationText: L }), t = xe(h, v), b = ve(h, v), i = me(R, "u-input-text"), g = N(Q, V, W, X), y = N(Z, _, U, ee), n = ue(null);
|
|
51
|
+
de(n, l, s);
|
|
52
|
+
const $ = () => {
|
|
53
|
+
var e;
|
|
54
|
+
return (e = n.current) == null ? void 0 : e.focus();
|
|
55
|
+
}, o = z({ side: "prefix", inputId: i, ...g, onSelect: g.select, onPicked: $, picker: Y, disabled: s, compact: t }), r = z({ side: "suffix", inputId: i, ...y, onSelect: y.select, onPicked: $, picker: te, disabled: s, compact: t }), ie = !!(o.element || r.element), ne = le(i, c, x, a, {
|
|
56
|
+
"aria-label": C,
|
|
57
|
+
"aria-labelledby": k,
|
|
58
|
+
"aria-describedby": [w, o.id, r.id].filter(Boolean).join(" ") || void 0
|
|
59
|
+
}), S = ({ mode: e, width: se }) => {
|
|
60
|
+
const j = t ? "var(--u-unit, 1px)" : "var(--u-preset-unit, 1px)", [ae, ce] = e === "menu" ? [0, t ? 8 : 16] : [t ? 4 : 8, t ? 6 : 10];
|
|
61
|
+
return `calc(${ae} * ${j} + ${se}px + ${ce} * ${j})`;
|
|
62
|
+
}, [p, oe] = pe(null), re = (e) => {
|
|
63
|
+
oe(e.target.selectionStart), d && d(e);
|
|
64
|
+
};
|
|
65
|
+
fe(() => {
|
|
66
|
+
const e = n.current;
|
|
67
|
+
e != null && e.matches(":focus") && e.setSelectionRange(p, p);
|
|
68
|
+
}, [n, p, l]);
|
|
69
|
+
const A = (e) => typeof e == "number" ? `calc(${e} * var(--u-preset-unit, 1px))` : String(e), I = /* @__PURE__ */ f(
|
|
70
|
+
"input",
|
|
71
|
+
{
|
|
72
|
+
...ne,
|
|
73
|
+
className: `u-react-input u-input ${a.hasError ? "u-input-required" : ""}`,
|
|
74
|
+
id: i,
|
|
75
|
+
ref: n,
|
|
76
|
+
name: P,
|
|
77
|
+
style: Object.assign(
|
|
78
|
+
{},
|
|
79
|
+
t && {
|
|
80
|
+
height: "var(--u-compact-height)",
|
|
81
|
+
fontSize: "var(--u-compact-font-size)",
|
|
82
|
+
padding: "var(--u-compact-padding)",
|
|
83
|
+
borderRadius: "8px"
|
|
84
|
+
},
|
|
85
|
+
o.element && { paddingLeft: S(o) },
|
|
86
|
+
r.element && { paddingRight: S(r) },
|
|
87
|
+
D
|
|
88
|
+
),
|
|
89
|
+
type: "text",
|
|
90
|
+
placeholder: E,
|
|
91
|
+
value: l || "",
|
|
92
|
+
defaultValue: O,
|
|
93
|
+
disabled: s,
|
|
94
|
+
onChange: re
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
return /* @__PURE__ */ m("div", { className: `u-react-input-container${b ? ` ${b}` : ""} ${F}`, style: { position: "relative" }, children: [
|
|
98
|
+
/* @__PURE__ */ m(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
style: Object.assign(
|
|
102
|
+
{
|
|
103
|
+
display: "flex",
|
|
104
|
+
flexDirection: u ? "row" : "column",
|
|
105
|
+
rowGap: u ? null : A(T),
|
|
106
|
+
columnGap: u ? A(B) : null
|
|
107
|
+
},
|
|
108
|
+
G
|
|
109
|
+
),
|
|
110
|
+
children: [
|
|
111
|
+
c && /* @__PURE__ */ f(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
id: `${i}-label`,
|
|
115
|
+
className: `${x ? "u-required" : ""} u-react-input-title`,
|
|
116
|
+
style: Object.assign(
|
|
117
|
+
{
|
|
118
|
+
color: "var(--u-field-title-color, #545454)",
|
|
119
|
+
fontSize: "var(--u-field-label-size-main, calc(14 * var(--u-unit, 1px)))"
|
|
120
|
+
},
|
|
121
|
+
q
|
|
122
|
+
),
|
|
123
|
+
children: c
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
ie ? /* @__PURE__ */ m("div", { className: "u-react-input-affixed", children: [
|
|
127
|
+
o.element,
|
|
128
|
+
I,
|
|
129
|
+
r.element
|
|
130
|
+
] }) : I
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
a.showText && /* @__PURE__ */ f("h5", { id: `${i}-error`, className: "h5 clr-red-main", style: M ? { position: "absolute", bottom: "calc(-20 * var(--u-unit, 1px))" } : { position: "relative", marginTop: "calc(4 * var(--u-unit, 1px))" }, children: a.text })
|
|
135
|
+
] });
|
|
136
|
+
};
|
|
137
|
+
export { ke as InputText$u };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTime.d.ts","sourceRoot":"","sources":["../../../src/components/InputTime/InputTime.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"InputTime.d.ts","sourceRoot":"","sources":["../../../src/components/InputTime/InputTime.tsx"],"names":[],"mappings":"AAAA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yDAAyD,CAAC;AACjE,OAAO,0BAA0B,CAAA;AACjC,OAAO,yBAAyB,CAAC;AAQjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAS7D,eAAO,MAAM,SAAS,GAAI,+aA+BvB,mBAAmB,4CA2erB,CAAC"}
|