@itcase/ui 1.1.25 → 1.2.1
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/dist/{cjs/Badge-C_bYrtVY.js → Badge-2JkquAEb.js} +6 -10
- package/dist/{Badge-CLV5v6N7.js → Badge-CrhdvxY6.js} +4 -4
- package/dist/Button-BA3ZeUjj.js +90 -0
- package/dist/Button-VkatyBmt.js +93 -0
- package/dist/{cjs/Divider-D92wY8Fn.js → Divider-BjB5MD6u.js} +4 -8
- package/dist/{Divider-Dhj6sMWd.js → Divider-U5UdY-ef.js} +2 -2
- package/dist/{DropdownItem-CkojAA8a.js → DropdownItem-bB-KYqcL.js} +7 -7
- package/dist/{cjs/DropdownItem-2Nqtx3Vi.js → DropdownItem-m4hdxHp6.js} +8 -13
- package/dist/{Group-DLmtajo8.js → Group-BXfLh7AZ.js} +3 -3
- package/dist/{cjs/Group-EFTg84wP.js → Group-Buo_BxGT.js} +5 -9
- package/dist/{cjs/Icon-C7ZJyN5o.js → Icon-Co5Mtpt_.js} +11 -17
- package/dist/{Icon-BLqnXYOO.js → Icon-CsE2-ieX.js} +10 -10
- package/dist/{Image-Bz4Fo3eB.js → Image-8t6PvsaZ.js} +2 -2
- package/dist/{cjs/Image-CCx6QWZj.js → Image-DrUlRMHa.js} +4 -8
- package/dist/{Input-CYDtAlO-.js → Input-BQ6Plt1n.js} +4 -4
- package/dist/{cjs/Input-vwyG3XF0.js → Input-C7gBdx1m.js} +5 -10
- package/dist/{Label-c3hONOHC.js → Label-BA_CnRBq.js} +5 -5
- package/dist/{cjs/Label-C2uLpNrU.js → Label-CpSzGRtr.js} +7 -11
- package/dist/{Link-DtzAAQn8.js → Link-Bqu5amIb.js} +8 -8
- package/dist/{cjs/Link-DRV1vzHd.js → Link-DQxoFKhI.js} +10 -15
- package/dist/{Loader-VCP1ZNcb.js → Loader-CJ8ZCdwy.js} +3 -3
- package/dist/{cjs/Loader-C2D6fJk1.js → Loader-fA11tUEJ.js} +5 -9
- package/dist/{MenuItem-BbU9r8_D.js → MenuItem-CNJfj0nV.js} +6 -6
- package/dist/{cjs/MenuItem-D6T9WRQk.js → MenuItem-DvIFaWkB.js} +7 -12
- package/dist/{cjs/Overlay-CkN2X1BM.js → Overlay-CFXouKnl.js} +4 -8
- package/dist/{Overlay-DNPslUfY.js → Overlay-DO5dnSRE.js} +2 -2
- package/dist/{cjs/Radio-Bvv59nEV.js → Radio-BQo97TZL.js} +7 -11
- package/dist/{Radio-BHqgR8WO.js → Radio-oMf0vN7T.js} +6 -6
- package/dist/{Scrollbar-DrRNpn12.js → Scrollbar-CrGXCZ_F.js} +2 -2
- package/dist/{cjs/Scrollbar-DOujlQOb.js → Scrollbar-DVlIZzvz.js} +2 -6
- package/dist/Switch-B5yVEqxz.js +14 -0
- package/dist/Switch-DEXsrPCo.js +12 -0
- package/dist/{Text-Dz-KPI5I.js → Text-CG3xPG27.js} +2 -2
- package/dist/{cjs/Text-B0SULA92.js → Text-_YhyTsQ1.js} +4 -8
- package/dist/{Title-zpOK2AxL.js → Title-BfSFPJtJ.js} +3 -3
- package/dist/{cjs/Title-Ckp30YSI.js → Title-zwP6c2U2.js} +6 -10
- package/dist/{Tooltip-IVq3_vb4.js → Tooltip-DJufHBiQ.js} +7 -7
- package/dist/{cjs/Tooltip-DREz-tP6.js → Tooltip-DkTKx9n-.js} +8 -13
- package/dist/cjs/components/Accordion.js +178 -15
- package/dist/cjs/components/Avatar.js +33 -14
- package/dist/cjs/components/Badge.js +4 -4
- package/dist/cjs/components/Breadcrumbs.js +88 -15
- package/dist/cjs/components/Button.js +9 -9
- package/dist/cjs/components/Caption.js +23 -7
- package/dist/cjs/components/Card.js +26 -8
- package/dist/cjs/components/Cell.js +70 -14
- package/dist/cjs/components/Checkbox.js +86 -8
- package/dist/cjs/components/Chips.js +75 -9
- package/dist/cjs/components/Choice.js +100 -15
- package/dist/cjs/components/Code.js +101 -8
- package/dist/cjs/components/ContextMenu.js +48 -13
- package/dist/cjs/components/CookiesWarning.js +56 -17
- package/dist/cjs/components/DadataHintField.js +31 -9
- package/dist/cjs/components/DatePicker.js +1158 -18
- package/dist/cjs/components/Divider.js +3 -3
- package/dist/cjs/components/Dot.js +32 -7
- package/dist/cjs/components/Drawer.js +12 -8
- package/dist/cjs/components/Dropdown.js +6 -6
- package/dist/cjs/components/Flex.js +116 -7
- package/dist/cjs/components/FormField.js +108 -27
- package/dist/cjs/components/Grid.js +148 -8
- package/dist/cjs/components/Group.js +3 -3
- package/dist/cjs/components/HTMLContent.js +83 -7
- package/dist/cjs/components/Icon.js +7 -7
- package/dist/cjs/components/Image.js +3 -3
- package/dist/cjs/components/Input.js +2 -2
- package/dist/cjs/components/InputMask.js +3 -8
- package/dist/cjs/components/InputPassword.js +112 -14
- package/dist/cjs/components/Label.js +5 -5
- package/dist/cjs/components/LanguageSelector.js +17 -11
- package/dist/cjs/components/Link.js +3 -3
- package/dist/cjs/components/List.js +43 -9
- package/dist/cjs/components/Loader.js +4 -4
- package/dist/cjs/components/Logo.js +37 -10
- package/dist/cjs/components/Menu.js +35 -11
- package/dist/cjs/components/MenuItem.js +5 -5
- package/dist/cjs/components/Modal.js +160 -12
- package/dist/cjs/components/Notification.js +41 -12
- package/dist/cjs/components/Overlay.js +3 -3
- package/dist/cjs/components/Page.js +39 -45
- package/dist/cjs/components/Pagination.js +97 -17
- package/dist/cjs/components/Panel.js +5 -9
- package/dist/cjs/components/Radio.js +4 -4
- package/dist/cjs/components/RangeSlider.js +48 -8
- package/dist/cjs/components/Response.js +78 -19
- package/dist/cjs/components/SVGContent.js +2 -6
- package/dist/cjs/components/ScrollOnDrag.js +4 -10
- package/dist/cjs/components/ScrollToView.js +56 -10
- package/dist/cjs/components/Scrollbar.js +2 -3
- package/dist/cjs/components/Search.js +123 -16
- package/dist/cjs/components/Segmented.js +91 -9
- package/dist/cjs/components/Select.js +115 -6775
- package/dist/cjs/components/SiteMenu.js +60 -14
- package/dist/cjs/components/Swiper.js +81 -9
- package/dist/cjs/components/Switch.js +2 -2
- package/dist/cjs/components/Tab.js +144 -14
- package/dist/cjs/components/Text.js +3 -3
- package/dist/cjs/components/Textarea.js +95 -8
- package/dist/cjs/components/Tile.js +50 -10
- package/dist/cjs/components/Title.js +2 -2
- package/dist/cjs/components/Tooltip.js +4 -4
- package/dist/cjs/components/Video.js +16 -6
- package/dist/cjs/components/Wrapper.js +43 -7
- package/dist/cjs/components.js +1 -213
- package/dist/cjs/context/Notifications.js +4 -9
- package/dist/cjs/context/UIContext.js +7 -12
- package/dist/cjs/hooks/useDeviceTargetClass.js +2 -7
- package/dist/cjs/hooks/useStyles.js +6 -12
- package/dist/components/Accordion.js +180 -13
- package/dist/components/Avatar.js +35 -12
- package/dist/components/Badge.js +4 -4
- package/dist/components/Breadcrumbs.js +90 -13
- package/dist/components/Button.js +9 -9
- package/dist/components/Caption.js +25 -5
- package/dist/components/Card.js +28 -6
- package/dist/components/Cell.js +72 -12
- package/dist/components/Checkbox.js +87 -5
- package/dist/components/Chips.js +76 -6
- package/dist/components/Choice.js +101 -12
- package/dist/components/Code.js +103 -6
- package/dist/components/ContextMenu.js +50 -11
- package/dist/components/CookiesWarning.js +58 -15
- package/dist/components/DadataHintField.js +33 -7
- package/dist/components/DatePicker.js +1161 -17
- package/dist/components/Divider.js +3 -3
- package/dist/components/Dot.js +34 -5
- package/dist/components/Drawer.js +12 -4
- package/dist/components/Dropdown.js +6 -6
- package/dist/components/Flex.js +118 -5
- package/dist/components/FormField.js +107 -22
- package/dist/components/Grid.js +149 -5
- package/dist/components/Group.js +3 -3
- package/dist/components/HTMLContent.js +85 -5
- package/dist/components/Icon.js +7 -7
- package/dist/components/Image.js +3 -3
- package/dist/components/Input.js +2 -2
- package/dist/components/InputMask.js +4 -4
- package/dist/components/InputPassword.js +113 -11
- package/dist/components/Label.js +5 -5
- package/dist/components/LanguageSelector.js +19 -9
- package/dist/components/Link.js +3 -3
- package/dist/components/List.js +45 -7
- package/dist/components/Loader.js +4 -4
- package/dist/components/Logo.js +38 -7
- package/dist/components/Menu.js +37 -9
- package/dist/components/MenuItem.js +5 -5
- package/dist/components/Modal.js +162 -10
- package/dist/components/Notification.js +42 -9
- package/dist/components/Overlay.js +3 -3
- package/dist/components/Page.js +3 -3
- package/dist/components/Pagination.js +99 -15
- package/dist/components/Panel.js +5 -5
- package/dist/components/Radio.js +4 -4
- package/dist/components/RangeSlider.js +50 -6
- package/dist/components/Response.js +79 -16
- package/dist/components/SVGContent.js +2 -2
- package/dist/components/ScrollOnDrag.js +5 -6
- package/dist/components/ScrollToView.js +58 -8
- package/dist/components/Scrollbar.js +2 -3
- package/dist/components/Search.js +124 -13
- package/dist/components/Segmented.js +92 -6
- package/dist/components/Select.js +38 -6674
- package/dist/components/SiteMenu.js +62 -12
- package/dist/components/Swiper.js +83 -7
- package/dist/components/Switch.js +2 -2
- package/dist/components/Tab.js +145 -11
- package/dist/components/Text.js +3 -3
- package/dist/components/Textarea.js +96 -5
- package/dist/components/Tile.js +52 -8
- package/dist/components/Title.js +2 -2
- package/dist/components/Tooltip.js +4 -4
- package/dist/components/Video.js +18 -4
- package/dist/components/Wrapper.js +45 -5
- package/dist/components.js +1 -95
- package/dist/context/Notifications.js +3 -3
- package/dist/context/UIContext.js +3 -3
- package/dist/css/components/Chips/Chips.css +1 -1
- package/dist/css/components/DatePicker/DatePicker.css +1 -1
- package/dist/css/components/Notification/Notification.css +11 -0
- package/dist/css/components/Notification/css/__item/notification__item_status.css +11 -0
- package/dist/css/components/Swiper/Swiper.css +0 -3
- package/dist/{components → types/components}/Button/Button.interface.d.ts +2 -2
- package/dist/{components → types/components}/Cell/Cell.interface.d.ts +4 -4
- package/dist/{components → types/components}/Chips/Chips.interface.d.ts +3 -3
- package/dist/{components → types/components}/Dropdown/Dropdown.interface.d.ts +8 -8
- package/dist/{components → types/components}/Flex/Flex.interface.d.ts +5 -5
- package/dist/{cjs → types}/components/Group/Group.interface.d.ts +4 -4
- package/dist/{components → types/components}/HTMLContent/HTMLContent.interface.d.ts +4 -4
- package/dist/{cjs → types}/components/Label/Label.interface.d.ts +5 -5
- package/dist/{cjs → types}/components/Logo/Logo.interface.d.ts +3 -3
- package/dist/{cjs → types}/components/MenuItem/MenuItem.interface.d.ts +7 -7
- package/dist/{cjs → types}/components/Pagination/Pagination.d.ts +2 -2
- package/dist/{cjs → types}/components/Pagination/Pagination.interface.d.ts +14 -5
- package/dist/{components → types/components}/Panel/Panel.interface.d.ts +3 -3
- package/dist/{cjs → types}/components/Segmented/Segmented.interface.d.ts +3 -3
- package/dist/types/components/Select/SelectClearIndicator.d.ts +11 -0
- package/dist/types/components/Select/SelectContainer.d.ts +2 -0
- package/dist/types/components/Select/SelectControl.d.ts +11 -0
- package/dist/types/components/Select/SelectDropdownIndicator.d.ts +13 -0
- package/dist/types/components/Select/SelectGroupHeading.d.ts +7 -0
- package/dist/types/components/Select/SelectIndicatorsContainer.d.ts +4 -0
- package/dist/types/components/Select/SelectInput.d.ts +12 -0
- package/dist/types/components/Select/SelectLoadingIndicator.d.ts +7 -0
- package/dist/types/components/Select/SelectMenu.d.ts +11 -0
- package/dist/types/components/Select/SelectMultiValueContainer.d.ts +1 -0
- package/dist/types/components/Select/SelectMultiValueLabel.d.ts +4 -0
- package/dist/types/components/Select/SelectMultiValueRemove.d.ts +4 -0
- package/dist/types/components/Select/SelectNoOptions.d.ts +12 -0
- package/dist/types/components/Select/SelectOption.d.ts +16 -0
- package/dist/types/components/Select/SelectPlaceholder.d.ts +11 -0
- package/dist/types/components/Select/SelectSingleValue.d.ts +12 -0
- package/dist/types/components/Select/SelectValueContainer.d.ts +11 -0
- package/dist/types/components/Select/index.d.ts +20 -0
- package/dist/{cjs → types}/components/Swiper/Swiper.interface.d.ts +3 -3
- package/dist/{components → types/components}/Tab/Tab.interface.d.ts +8 -7
- package/dist/{components → types/components}/Text/Text.interface.d.ts +4 -4
- package/dist/{components → types/components}/Tile/Tile.interface.d.ts +6 -6
- package/dist/{components → types/components}/Title/Title.interface.d.ts +4 -4
- package/dist/{cjs → types}/components/Tooltip/Tooltip.interface.d.ts +3 -3
- package/dist/{components → types/components}/Wrapper/Wrapper.interface.d.ts +3 -3
- package/dist/types/context/Notifications.d.ts +19 -0
- package/dist/types/context/UIContext.d.ts +11 -0
- package/dist/types/hooks/styleAttributes.d.ts +2 -0
- package/dist/{cjs → types}/hooks/styleAttributes.interface.d.ts +2 -2
- package/dist/types/hooks/useDeviceTargetClass.d.ts +1 -0
- package/dist/types/hooks/useMediaQueries.d.ts +7 -0
- package/dist/types/hooks/useStyles.d.ts +1 -0
- package/dist/types/icons/index.d.ts +10 -0
- package/dist/types/types/componentProps/align.d.ts +1 -0
- package/dist/types/types/componentProps/alignDirection.d.ts +1 -0
- package/dist/types/types/componentProps/justifyContent.d.ts +1 -0
- package/dist/types/types/componentProps/textAlign.d.ts +1 -0
- package/dist/types/types/componentProps/textColorActive.d.ts +2 -0
- package/dist/types/types/componentProps/textWrap.d.ts +1 -0
- package/dist/{cjs → types}/types/index.d.ts +6 -6
- package/package.json +33 -35
- package/dist/Accordion-FIIzpSgl.js +0 -177
- package/dist/Avatar-DR2A8Na8.js +0 -31
- package/dist/Breadcrumbs-CDKi6gOC.js +0 -88
- package/dist/Button-CSzPxWyC.js +0 -90
- package/dist/Caption-DDh0VFPJ.js +0 -25
- package/dist/Card-CvW4Qozl.js +0 -28
- package/dist/Cell-3We_qMvM.js +0 -68
- package/dist/Checkbox-0h4YosTW.js +0 -87
- package/dist/Chips-Bd3ZFosY.js +0 -76
- package/dist/Choice-CeQ9Il98.js +0 -97
- package/dist/Code-1WUXVzfb.js +0 -272
- package/dist/ContextMenuItem-KPAQQHlQ.js +0 -46
- package/dist/CookiesWarning-B30eAOND.js +0 -52
- package/dist/DadataHintField-CHJLsVjJ.js +0 -1103
- package/dist/DatePicker-Bf7t1yiM.js +0 -14136
- package/dist/Dot-Bc0Ly45H.js +0 -34
- package/dist/Drawer-DkLkFSmD.js +0 -139
- package/dist/FlexItem-DHmKl6e7.js +0 -118
- package/dist/GridRow-DRjyNWBh.js +0 -149
- package/dist/HTMLContent-CgbJTAy4.js +0 -85
- package/dist/InputPassword-DYBnRCtc.js +0 -108
- package/dist/LanguageSelector-D0A-uqch.js +0 -14
- package/dist/ListItem-BoCF7VH9.js +0 -44
- package/dist/Logo-DCx_YOA2.js +0 -37
- package/dist/Menu-C-TIWZeb.js +0 -34
- package/dist/ModalLoader-4OS81u94.js +0 -161
- package/dist/NotificationList-CmXca2zs.js +0 -40
- package/dist/Pagination-BAbFsztK.js +0 -86
- package/dist/RangeSlider-BPFVikab.js +0 -50
- package/dist/Response-BMRzGa5t.js +0 -74
- package/dist/ScrollToView-W6XhacKJ.js +0 -1821
- package/dist/SearchResult-6Vg0m_NA.js +0 -120
- package/dist/Segmented-BM1p7Ubz.js +0 -92
- package/dist/SiteMenuButton-DsYMvX6W.js +0 -58
- package/dist/Swiper-CXjE6qZR.js +0 -5138
- package/dist/Switch-0BHqovLA.js +0 -12
- package/dist/SwitchField-DCwEVCVg.js +0 -98
- package/dist/TabGroup-BLB4Ymcx.js +0 -144
- package/dist/Textarea-D3XSuMEm.js +0 -96
- package/dist/Tile-CNnauNx6.js +0 -52
- package/dist/Video-0z4mNz4P.js +0 -18
- package/dist/Wrapper-CJTkVfsd.js +0 -45
- package/dist/cjs/Accordion-Ba4Use_H.js +0 -186
- package/dist/cjs/Avatar-BKK80aBG.js +0 -37
- package/dist/cjs/Breadcrumbs-B7F96CYT.js +0 -96
- package/dist/cjs/Button-DH5f_2bV.js +0 -98
- package/dist/cjs/Caption-f-OM1D-G.js +0 -31
- package/dist/cjs/Card-BhnTRJN5.js +0 -34
- package/dist/cjs/Cell-Bc4BC1e3.js +0 -74
- package/dist/cjs/Checkbox-C5EikmBn.js +0 -94
- package/dist/cjs/Chips-wl8WgeWZ.js +0 -83
- package/dist/cjs/Choice-DJOKyu8I.js +0 -105
- package/dist/cjs/Code-BJFoJBYh.js +0 -279
- package/dist/cjs/ContextMenuItem-CLU1xPrC.js +0 -53
- package/dist/cjs/CookiesWarning-C-6cEf16.js +0 -59
- package/dist/cjs/DadataHintField-z7Mw-xDn.js +0 -1111
- package/dist/cjs/DatePicker-4tMTL9Nx.js +0 -14160
- package/dist/cjs/Dot-CKWexdtn.js +0 -40
- package/dist/cjs/Drawer-AQqI18ra.js +0 -146
- package/dist/cjs/FlexItem-2KlvlTJY.js +0 -125
- package/dist/cjs/GridRow-CAqZZGge.js +0 -157
- package/dist/cjs/HTMLContent-4vI2pdQC.js +0 -91
- package/dist/cjs/InputPassword-CbrEhEJB.js +0 -115
- package/dist/cjs/LanguageSelector-DZC_wwP6.js +0 -20
- package/dist/cjs/ListItem-B5rYml7Y.js +0 -51
- package/dist/cjs/Logo-CsOCRB7d.js +0 -44
- package/dist/cjs/Menu-KYRzB912.js +0 -40
- package/dist/cjs/ModalLoader-DRt-18Tr.js +0 -170
- package/dist/cjs/NotificationList-DETpx50O.js +0 -48
- package/dist/cjs/Pagination-DuykmIqr.js +0 -94
- package/dist/cjs/RangeSlider-Dy53bTyY.js +0 -57
- package/dist/cjs/Response-CTawELy2.js +0 -82
- package/dist/cjs/ScrollToView-DPhR0AQC.js +0 -1831
- package/dist/cjs/SearchResult-CfZvZ2Rg.js +0 -129
- package/dist/cjs/Segmented-D9L6q-Sa.js +0 -100
- package/dist/cjs/SiteMenuButton-CC0QccWu.js +0 -65
- package/dist/cjs/Swiper-Zh5xaPu3.js +0 -5145
- package/dist/cjs/Switch-K1p9h3aF.js +0 -19
- package/dist/cjs/SwitchField-C31Nbyyn.js +0 -108
- package/dist/cjs/TabGroup-BKWkofWW.js +0 -153
- package/dist/cjs/Textarea-tng0D_n7.js +0 -103
- package/dist/cjs/Tile-bPw3x_en.js +0 -58
- package/dist/cjs/Video-B_xqvgag.js +0 -24
- package/dist/cjs/Wrapper-DravIzND.js +0 -51
- package/dist/cjs/components/Button/Button.interface.d.ts +0 -77
- package/dist/cjs/components/Cell/Cell.interface.d.ts +0 -62
- package/dist/cjs/components/Chips/Chips.interface.d.ts +0 -44
- package/dist/cjs/components/Dropdown/Dropdown.interface.d.ts +0 -73
- package/dist/cjs/components/Flex/Flex.interface.d.ts +0 -120
- package/dist/cjs/components/HTMLContent/HTMLContent.interface.d.ts +0 -30
- package/dist/cjs/components/Panel/Panel.interface.d.ts +0 -56
- package/dist/cjs/components/Tab/Tab.interface.d.ts +0 -79
- package/dist/cjs/components/Text/Text.interface.d.ts +0 -54
- package/dist/cjs/components/Tile/Tile.interface.d.ts +0 -37
- package/dist/cjs/components/Title/Title.interface.d.ts +0 -50
- package/dist/cjs/components/Wrapper/Wrapper.interface.d.ts +0 -20
- package/dist/cjs/components/index.d.ts +0 -60
- package/dist/cjs/context/index.d.ts +0 -2
- package/dist/cjs/floating-ui.dom-ma2MDAMT.js +0 -1431
- package/dist/cjs/hooks/index.d.ts +0 -3
- package/dist/cjs/index.d.ts +0 -4
- package/dist/cjs/jsx-runtime-BBxmckJR.js +0 -1377
- package/dist/cjs/types/componentProps/align.d.ts +0 -1
- package/dist/cjs/types/componentProps/alignDirection.d.ts +0 -1
- package/dist/cjs/types/componentProps/justifyContent.d.ts +0 -1
- package/dist/cjs/types/componentProps/textAlign.d.ts +0 -1
- package/dist/cjs/types/componentProps/textColorActive.d.ts +0 -2
- package/dist/cjs/types/componentProps/textWrap.d.ts +0 -1
- package/dist/components/Accordion/Accordion.d.ts +0 -8
- package/dist/components/Accordion/Accordion.interface.d.ts +0 -70
- package/dist/components/Accordion/AccordionItem.d.ts +0 -8
- package/dist/components/Accordion/index.d.ts +0 -3
- package/dist/components/Avatar/Avatar.d.ts +0 -3
- package/dist/components/Avatar/Avatar.interface.d.ts +0 -29
- package/dist/components/Avatar/index.d.ts +0 -1
- package/dist/components/Badge/Badge.d.ts +0 -10
- package/dist/components/Badge/Badge.interface.d.ts +0 -33
- package/dist/components/Badge/index.d.ts +0 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +0 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.interface.d.ts +0 -71
- package/dist/components/Breadcrumbs/BreadcrumbsItem.d.ts +0 -8
- package/dist/components/Breadcrumbs/index.d.ts +0 -3
- package/dist/components/Button/Button.d.ts +0 -5
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/Caption/Caption.d.ts +0 -3
- package/dist/components/Caption/Caption.interface.d.ts +0 -21
- package/dist/components/Caption/index.d.ts +0 -1
- package/dist/components/Card/Card.d.ts +0 -13
- package/dist/components/Card/Card.interface.d.ts +0 -29
- package/dist/components/Card/index.d.ts +0 -1
- package/dist/components/Cell/Cell.d.ts +0 -9
- package/dist/components/Cell/index.d.ts +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +0 -9
- package/dist/components/Checkbox/Checkbox.interface.d.ts +0 -56
- package/dist/components/Checkbox/index.d.ts +0 -1
- package/dist/components/Chips/Chips.d.ts +0 -4
- package/dist/components/Chips/index.d.ts +0 -1
- package/dist/components/Choice/Choice.d.ts +0 -5
- package/dist/components/Choice/Choice.interface.d.ts +0 -59
- package/dist/components/Choice/index.d.ts +0 -1
- package/dist/components/Code/Code.d.ts +0 -21
- package/dist/components/Code/Code.interface.d.ts +0 -33
- package/dist/components/Code/index.d.ts +0 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +0 -8
- package/dist/components/ContextMenu/ContextMenu.interface.d.ts +0 -36
- package/dist/components/ContextMenu/ContextMenuItem.d.ts +0 -3
- package/dist/components/ContextMenu/index.d.ts +0 -3
- package/dist/components/CookiesWarning/CookiesWarning.d.ts +0 -10
- package/dist/components/CookiesWarning/CookiesWarning.interface.d.ts +0 -16
- package/dist/components/CookiesWarning/index.d.ts +0 -2
- package/dist/components/DadataHintField/DadataHintField.d.ts +0 -3
- package/dist/components/DadataHintField/DadataHintField.interface.d.ts +0 -14
- package/dist/components/DadataHintField/index.d.ts +0 -1
- package/dist/components/DatePicker/DatePicker.d.ts +0 -3
- package/dist/components/DatePicker/DatePicker.interface.d.ts +0 -100
- package/dist/components/DatePicker/index.d.ts +0 -1
- package/dist/components/Divider/Divider.d.ts +0 -8
- package/dist/components/Divider/Divider.interface.d.ts +0 -31
- package/dist/components/Divider/index.d.ts +0 -1
- package/dist/components/Dot/Dot.d.ts +0 -6
- package/dist/components/Dot/Dot.interface.d.ts +0 -27
- package/dist/components/Dot/index.d.ts +0 -1
- package/dist/components/Drawer/Drawer.d.ts +0 -3
- package/dist/components/Drawer/Drawer.interface.d.ts +0 -16
- package/dist/components/Drawer/index.d.ts +0 -1
- package/dist/components/Dropdown/Dropdown.d.ts +0 -10
- package/dist/components/Dropdown/DropdownItem.d.ts +0 -10
- package/dist/components/Dropdown/index.d.ts +0 -3
- package/dist/components/Flex/Flex.d.ts +0 -8
- package/dist/components/Flex/FlexItem.d.ts +0 -8
- package/dist/components/Flex/index.d.ts +0 -3
- package/dist/components/FormField/ChoiceField.d.ts +0 -8
- package/dist/components/FormField/FormField.d.ts +0 -9
- package/dist/components/FormField/FormFiled.interface.d.ts +0 -77
- package/dist/components/FormField/PasswordField.d.ts +0 -9
- package/dist/components/FormField/SelectField.d.ts +0 -9
- package/dist/components/FormField/SwitchField.d.ts +0 -8
- package/dist/components/FormField/index.d.ts +0 -6
- package/dist/components/Grid/Grid.d.ts +0 -8
- package/dist/components/Grid/Grid.interface.d.ts +0 -142
- package/dist/components/Grid/GridItem.d.ts +0 -3
- package/dist/components/Grid/GridRow.d.ts +0 -8
- package/dist/components/Grid/index.d.ts +0 -4
- package/dist/components/Group/Group.d.ts +0 -9
- package/dist/components/Group/Group.interface.d.ts +0 -53
- package/dist/components/Group/index.d.ts +0 -1
- package/dist/components/HTMLContent/HTMLContent.d.ts +0 -3
- package/dist/components/HTMLContent/index.d.ts +0 -1
- package/dist/components/Icon/Icon.d.ts +0 -5
- package/dist/components/Icon/Icon.interface.d.ts +0 -93
- package/dist/components/Icon/index.d.ts +0 -1
- package/dist/components/Image/Image.d.ts +0 -3
- package/dist/components/Image/Image.interface.d.ts +0 -34
- package/dist/components/Image/index.d.ts +0 -1
- package/dist/components/Input/Input.d.ts +0 -5
- package/dist/components/Input/Input.interface.d.ts +0 -51
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/InputMask/Input.d.ts +0 -5
- package/dist/components/InputMask/Input.interface.d.ts +0 -53
- package/dist/components/InputMask/index.d.ts +0 -1
- package/dist/components/InputPassword/InputPassword.d.ts +0 -10
- package/dist/components/InputPassword/InputPassword.interface.d.ts +0 -52
- package/dist/components/InputPassword/index.d.ts +0 -1
- package/dist/components/Label/Label.d.ts +0 -9
- package/dist/components/Label/Label.interface.d.ts +0 -58
- package/dist/components/Label/index.d.ts +0 -1
- package/dist/components/LanguageSelector/Label.interface.d.ts +0 -20
- package/dist/components/LanguageSelector/LanguageSelector.d.ts +0 -3
- package/dist/components/LanguageSelector/index.d.ts +0 -1
- package/dist/components/Link/Link.d.ts +0 -11
- package/dist/components/Link/Link.interface.d.ts +0 -61
- package/dist/components/Link/index.d.ts +0 -1
- package/dist/components/List/List.d.ts +0 -3
- package/dist/components/List/List.interface.d.ts +0 -28
- package/dist/components/List/ListItem.d.ts +0 -3
- package/dist/components/List/index.d.ts +0 -3
- package/dist/components/Loader/Loader.d.ts +0 -4
- package/dist/components/Loader/Loader.interface.d.ts +0 -30
- package/dist/components/Loader/index.d.ts +0 -1
- package/dist/components/Logo/Logo.d.ts +0 -4
- package/dist/components/Logo/Logo.interface.d.ts +0 -37
- package/dist/components/Logo/index.d.ts +0 -1
- package/dist/components/Menu/Menu.d.ts +0 -8
- package/dist/components/Menu/Menu.interface.d.ts +0 -20
- package/dist/components/Menu/index.d.ts +0 -1
- package/dist/components/MenuItem/MenuItem.d.ts +0 -11
- package/dist/components/MenuItem/MenuItem.interface.d.ts +0 -65
- package/dist/components/MenuItem/index.d.ts +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -4
- package/dist/components/Modal/Modal.interface.d.ts +0 -33
- package/dist/components/Modal/ModalLoader.d.ts +0 -3
- package/dist/components/Modal/index.d.ts +0 -3
- package/dist/components/Notification/Notification.interface.d.ts +0 -49
- package/dist/components/Notification/NotificationItem.d.ts +0 -10
- package/dist/components/Notification/NotificationList.d.ts +0 -3
- package/dist/components/Notification/index.d.ts +0 -3
- package/dist/components/Overlay/Overlay.d.ts +0 -3
- package/dist/components/Overlay/Overlay.interface.d.ts +0 -12
- package/dist/components/Overlay/index.d.ts +0 -1
- package/dist/components/Pagination/Pagination.d.ts +0 -13
- package/dist/components/Pagination/Pagination.interface.d.ts +0 -46
- package/dist/components/Pagination/index.d.ts +0 -1
- package/dist/components/Panel/Panel.d.ts +0 -7
- package/dist/components/Panel/index.d.ts +0 -1
- package/dist/components/Radio/Radio.d.ts +0 -10
- package/dist/components/Radio/Radio.interface.d.ts +0 -53
- package/dist/components/Radio/index.d.ts +0 -1
- package/dist/components/RangeSlider/RangeSlider.d.ts +0 -3
- package/dist/components/RangeSlider/RangeSlider.interface.d.ts +0 -28
- package/dist/components/RangeSlider/index.d.ts +0 -1
- package/dist/components/Response/Response.d.ts +0 -4
- package/dist/components/Response/Response.interface.d.ts +0 -66
- package/dist/components/Response/index.d.ts +0 -1
- package/dist/components/SVGContent/SVGContent.d.ts +0 -3
- package/dist/components/SVGContent/SVGContent.interface.d.ts +0 -11
- package/dist/components/SVGContent/index.d.ts +0 -1
- package/dist/components/ScrollOnDrag/ScrollOnDrag.d.ts +0 -8
- package/dist/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +0 -18
- package/dist/components/ScrollOnDrag/index.d.ts +0 -1
- package/dist/components/ScrollToView/ScrollToView.d.ts +0 -2
- package/dist/components/ScrollToView/index.d.ts +0 -1
- package/dist/components/Scrollbar/Scrollbar.d.ts +0 -8
- package/dist/components/Scrollbar/Scrollbar.interface.d.ts +0 -10
- package/dist/components/Scrollbar/index.d.ts +0 -1
- package/dist/components/Search/Search.interface.d.ts +0 -69
- package/dist/components/Search/SearchInput.d.ts +0 -5
- package/dist/components/Search/SearchResult.d.ts +0 -4
- package/dist/components/Search/index.d.ts +0 -3
- package/dist/components/Segmented/Segmented.d.ts +0 -5
- package/dist/components/Segmented/Segmented.interface.d.ts +0 -42
- package/dist/components/Segmented/index.d.ts +0 -1
- package/dist/components/SiteMenu/SiteMenu.d.ts +0 -3
- package/dist/components/SiteMenu/SiteMenu.interface.d.ts +0 -23
- package/dist/components/SiteMenu/SiteMenuButton.d.ts +0 -3
- package/dist/components/SiteMenu/index.d.ts +0 -3
- package/dist/components/Swiper/Swiper.d.ts +0 -9
- package/dist/components/Swiper/Swiper.interface.d.ts +0 -58
- package/dist/components/Swiper/index.d.ts +0 -1
- package/dist/components/Switch/Switch.d.ts +0 -4
- package/dist/components/Switch/Switch.interface.d.ts +0 -10
- package/dist/components/Switch/index.d.ts +0 -1
- package/dist/components/Tab/Tab.d.ts +0 -11
- package/dist/components/Tab/TabGroup.d.ts +0 -3
- package/dist/components/Tab/index.d.ts +0 -3
- package/dist/components/Text/Text.d.ts +0 -9
- package/dist/components/Text/index.d.ts +0 -1
- package/dist/components/Textarea/Textarea.d.ts +0 -9
- package/dist/components/Textarea/Textarea.interface.d.ts +0 -44
- package/dist/components/Textarea/index.d.ts +0 -1
- package/dist/components/Tile/Tile.d.ts +0 -9
- package/dist/components/Tile/index.d.ts +0 -1
- package/dist/components/Title/Title.d.ts +0 -9
- package/dist/components/Title/index.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -5
- package/dist/components/Tooltip/Tooltip.interface.d.ts +0 -44
- package/dist/components/Tooltip/index.d.ts +0 -1
- package/dist/components/Video/Video.d.ts +0 -3
- package/dist/components/Video/Video.interface.d.ts +0 -15
- package/dist/components/Video/index.d.ts +0 -1
- package/dist/components/Wrapper/Wrapper.d.ts +0 -9
- package/dist/components/Wrapper/index.d.ts +0 -1
- package/dist/components/index.d.ts +0 -60
- package/dist/context/index.d.ts +0 -2
- package/dist/floating-ui.dom-BV5qw-HP.js +0 -1423
- package/dist/hooks/index.d.ts +0 -3
- package/dist/hooks/styleAttributes.interface.d.ts +0 -161
- package/dist/index.d.ts +0 -4
- package/dist/jsx-runtime-C2uP7l8s.js +0 -1371
- package/dist/types/componentProps/align.d.ts +0 -1
- package/dist/types/componentProps/alignDirection.d.ts +0 -1
- package/dist/types/componentProps/alignment.d.ts +0 -1
- package/dist/types/componentProps/appearanceKeys.d.ts +0 -1
- package/dist/types/componentProps/borderColor.d.ts +0 -1
- package/dist/types/componentProps/borderColorHover.d.ts +0 -1
- package/dist/types/componentProps/borderType.d.ts +0 -1
- package/dist/types/componentProps/borderWidth.d.ts +0 -1
- package/dist/types/componentProps/captionPosition.d.ts +0 -1
- package/dist/types/componentProps/direction.d.ts +0 -1
- package/dist/types/componentProps/elevation.d.ts +0 -1
- package/dist/types/componentProps/emojiSize.d.ts +0 -1
- package/dist/types/componentProps/fill.d.ts +0 -1
- package/dist/types/componentProps/fillGradient.d.ts +0 -1
- package/dist/types/componentProps/fillHover.d.ts +0 -1
- package/dist/types/componentProps/fillType.d.ts +0 -1
- package/dist/types/componentProps/flexAlign.d.ts +0 -1
- package/dist/types/componentProps/flexGrow.d.ts +0 -1
- package/dist/types/componentProps/flexJustifyContent.d.ts +0 -1
- package/dist/types/componentProps/flexWrap.d.ts +0 -1
- package/dist/types/componentProps/gridAlign.d.ts +0 -1
- package/dist/types/componentProps/gridAlignSelf.d.ts +0 -1
- package/dist/types/componentProps/gridJustifyItems.d.ts +0 -1
- package/dist/types/componentProps/gridJustifySelf.d.ts +0 -1
- package/dist/types/componentProps/height.d.ts +0 -1
- package/dist/types/componentProps/horizontalContentAlign.d.ts +0 -1
- package/dist/types/componentProps/horizontalResizeMode.d.ts +0 -1
- package/dist/types/componentProps/iconFillSize.d.ts +0 -1
- package/dist/types/componentProps/iconSize.d.ts +0 -1
- package/dist/types/componentProps/itemColor.d.ts +0 -1
- package/dist/types/componentProps/justifyContent.d.ts +0 -1
- package/dist/types/componentProps/overflow.d.ts +0 -1
- package/dist/types/componentProps/position.d.ts +0 -1
- package/dist/types/componentProps/resizeMode.d.ts +0 -1
- package/dist/types/componentProps/shape.d.ts +0 -1
- package/dist/types/componentProps/size.d.ts +0 -1
- package/dist/types/componentProps/sizeInterface.d.ts +0 -1
- package/dist/types/componentProps/sizePX.d.ts +0 -1
- package/dist/types/componentProps/stacking.d.ts +0 -1
- package/dist/types/componentProps/state.d.ts +0 -1
- package/dist/types/componentProps/stateKeys.d.ts +0 -1
- package/dist/types/componentProps/svgFill.d.ts +0 -1
- package/dist/types/componentProps/textAlign.d.ts +0 -1
- package/dist/types/componentProps/textColor.d.ts +0 -1
- package/dist/types/componentProps/textColorActive.d.ts +0 -2
- package/dist/types/componentProps/textColorHover.d.ts +0 -1
- package/dist/types/componentProps/textGradient.d.ts +0 -1
- package/dist/types/componentProps/textSize.d.ts +0 -1
- package/dist/types/componentProps/textStyle.d.ts +0 -1
- package/dist/types/componentProps/textTag.d.ts +0 -1
- package/dist/types/componentProps/textWeight.d.ts +0 -1
- package/dist/types/componentProps/textWrap.d.ts +0 -1
- package/dist/types/componentProps/titleSize.d.ts +0 -1
- package/dist/types/componentProps/type.d.ts +0 -1
- package/dist/types/componentProps/underline.d.ts +0 -1
- package/dist/types/componentProps/verticalContentAlign.d.ts +0 -1
- package/dist/types/componentProps/verticalResizeMode.d.ts +0 -1
- package/dist/types/componentProps/width.d.ts +0 -1
- package/dist/types/componentProps/wrap.d.ts +0 -1
- package/dist/types/index.d.ts +0 -57
- /package/dist/{cjs/_tslib-CKiUdo7p.js → tslib.es6-CKiUdo7p.js} +0 -0
- /package/dist/{_tslib-S-VPg1Cw.js → tslib.es6-S-VPg1Cw.js} +0 -0
- /package/dist/{cjs → types}/components/Accordion/Accordion.d.ts +0 -0
- /package/dist/{cjs → types}/components/Accordion/Accordion.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Accordion/AccordionItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Accordion/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Avatar/Avatar.d.ts +0 -0
- /package/dist/{cjs → types}/components/Avatar/Avatar.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Avatar/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Badge/Badge.d.ts +0 -0
- /package/dist/{cjs → types}/components/Badge/Badge.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Badge/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Breadcrumbs/Breadcrumbs.d.ts +0 -0
- /package/dist/{cjs → types}/components/Breadcrumbs/Breadcrumbs.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Breadcrumbs/BreadcrumbsItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Breadcrumbs/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Button/Button.d.ts +0 -0
- /package/dist/{cjs → types}/components/Button/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Caption/Caption.d.ts +0 -0
- /package/dist/{cjs → types}/components/Caption/Caption.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Caption/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Card/Card.d.ts +0 -0
- /package/dist/{cjs → types}/components/Card/Card.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Card/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Cell/Cell.d.ts +0 -0
- /package/dist/{cjs → types}/components/Cell/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{cjs → types}/components/Checkbox/Checkbox.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Checkbox/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Chips/Chips.d.ts +0 -0
- /package/dist/{cjs → types}/components/Chips/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Choice/Choice.d.ts +0 -0
- /package/dist/{cjs → types}/components/Choice/Choice.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Choice/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Code/Code.d.ts +0 -0
- /package/dist/{cjs → types}/components/Code/Code.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Code/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/ContextMenu/ContextMenu.d.ts +0 -0
- /package/dist/{cjs → types}/components/ContextMenu/ContextMenu.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/ContextMenu/ContextMenuItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/ContextMenu/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/CookiesWarning/CookiesWarning.d.ts +0 -0
- /package/dist/{cjs → types}/components/CookiesWarning/CookiesWarning.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/CookiesWarning/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/DadataHintField/DadataHintField.d.ts +0 -0
- /package/dist/{cjs → types}/components/DadataHintField/DadataHintField.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/DadataHintField/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/DatePicker/DatePicker.d.ts +0 -0
- /package/dist/{cjs → types}/components/DatePicker/DatePicker.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/DatePicker/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Divider/Divider.d.ts +0 -0
- /package/dist/{cjs → types}/components/Divider/Divider.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Divider/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dot/Dot.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dot/Dot.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dot/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Drawer/Drawer.d.ts +0 -0
- /package/dist/{cjs → types}/components/Drawer/Drawer.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Drawer/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dropdown/Dropdown.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dropdown/DropdownItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Dropdown/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Flex/Flex.d.ts +0 -0
- /package/dist/{cjs → types}/components/Flex/FlexItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Flex/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/ChoiceField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/FormField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/FormFiled.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/PasswordField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/SelectField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/SwitchField.d.ts +0 -0
- /package/dist/{cjs → types}/components/FormField/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/Grid.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/Grid.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/GridItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/GridRow.d.ts +0 -0
- /package/dist/{cjs → types}/components/Grid/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Group/Group.d.ts +0 -0
- /package/dist/{cjs → types}/components/Group/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/HTMLContent/HTMLContent.d.ts +0 -0
- /package/dist/{cjs → types}/components/HTMLContent/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Icon/Icon.d.ts +0 -0
- /package/dist/{cjs → types}/components/Icon/Icon.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Icon/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Image/Image.d.ts +0 -0
- /package/dist/{cjs → types}/components/Image/Image.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Image/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Input/Input.d.ts +0 -0
- /package/dist/{cjs → types}/components/Input/Input.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Input/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputMask/Input.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputMask/Input.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputMask/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputPassword/InputPassword.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputPassword/InputPassword.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/InputPassword/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Label/Label.d.ts +0 -0
- /package/dist/{cjs → types}/components/Label/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/LanguageSelector/Label.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/LanguageSelector/LanguageSelector.d.ts +0 -0
- /package/dist/{cjs → types}/components/LanguageSelector/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Link/Link.d.ts +0 -0
- /package/dist/{cjs → types}/components/Link/Link.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Link/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/List/List.d.ts +0 -0
- /package/dist/{cjs → types}/components/List/List.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/List/ListItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/List/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Loader/Loader.d.ts +0 -0
- /package/dist/{cjs → types}/components/Loader/Loader.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Loader/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Logo/Logo.d.ts +0 -0
- /package/dist/{cjs → types}/components/Logo/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Menu/Menu.d.ts +0 -0
- /package/dist/{cjs → types}/components/Menu/Menu.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Menu/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/MenuItem/MenuItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/MenuItem/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Modal/Modal.d.ts +0 -0
- /package/dist/{cjs → types}/components/Modal/Modal.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Modal/ModalLoader.d.ts +0 -0
- /package/dist/{cjs → types}/components/Modal/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Notification/Notification.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Notification/NotificationItem.d.ts +0 -0
- /package/dist/{cjs → types}/components/Notification/NotificationList.d.ts +0 -0
- /package/dist/{cjs → types}/components/Notification/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Overlay/Overlay.d.ts +0 -0
- /package/dist/{cjs → types}/components/Overlay/Overlay.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Overlay/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Pagination/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Panel/Panel.d.ts +0 -0
- /package/dist/{cjs → types}/components/Panel/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Radio/Radio.d.ts +0 -0
- /package/dist/{cjs → types}/components/Radio/Radio.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Radio/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/RangeSlider/RangeSlider.d.ts +0 -0
- /package/dist/{cjs → types}/components/RangeSlider/RangeSlider.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/RangeSlider/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Response/Response.d.ts +0 -0
- /package/dist/{cjs → types}/components/Response/Response.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Response/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/SVGContent/SVGContent.d.ts +0 -0
- /package/dist/{cjs → types}/components/SVGContent/SVGContent.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/SVGContent/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollOnDrag/ScrollOnDrag.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollOnDrag/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollToView/ScrollToView.d.ts +0 -0
- /package/dist/{cjs → types}/components/ScrollToView/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Scrollbar/Scrollbar.d.ts +0 -0
- /package/dist/{cjs → types}/components/Scrollbar/Scrollbar.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Scrollbar/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Search/Search.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Search/SearchInput.d.ts +0 -0
- /package/dist/{cjs → types}/components/Search/SearchResult.d.ts +0 -0
- /package/dist/{cjs → types}/components/Search/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Segmented/Segmented.d.ts +0 -0
- /package/dist/{cjs → types}/components/Segmented/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/SiteMenu/SiteMenu.d.ts +0 -0
- /package/dist/{cjs → types}/components/SiteMenu/SiteMenu.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/SiteMenu/SiteMenuButton.d.ts +0 -0
- /package/dist/{cjs → types}/components/SiteMenu/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Swiper/Swiper.d.ts +0 -0
- /package/dist/{cjs → types}/components/Swiper/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Switch/Switch.d.ts +0 -0
- /package/dist/{cjs → types}/components/Switch/Switch.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Switch/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tab/Tab.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tab/TabGroup.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tab/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Text/Text.d.ts +0 -0
- /package/dist/{cjs → types}/components/Text/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Textarea/Textarea.d.ts +0 -0
- /package/dist/{cjs → types}/components/Textarea/Textarea.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Textarea/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tile/Tile.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tile/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Title/Title.d.ts +0 -0
- /package/dist/{cjs → types}/components/Title/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tooltip/Tooltip.d.ts +0 -0
- /package/dist/{cjs → types}/components/Tooltip/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Video/Video.d.ts +0 -0
- /package/dist/{cjs → types}/components/Video/Video.interface.d.ts +0 -0
- /package/dist/{cjs → types}/components/Video/index.d.ts +0 -0
- /package/dist/{cjs → types}/components/Wrapper/Wrapper.d.ts +0 -0
- /package/dist/{cjs → types}/components/Wrapper/index.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/alignment.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/appearanceKeys.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/borderColor.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/borderColorHover.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/borderType.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/borderWidth.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/captionPosition.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/direction.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/elevation.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/emojiSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/fill.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/fillGradient.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/fillHover.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/fillType.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/flexAlign.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/flexGrow.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/flexJustifyContent.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/flexWrap.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/gridAlign.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/gridAlignSelf.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/gridJustifyItems.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/gridJustifySelf.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/height.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/horizontalContentAlign.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/horizontalResizeMode.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/iconFillSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/iconSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/itemColor.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/overflow.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/position.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/resizeMode.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/shape.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/size.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/sizeInterface.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/sizePX.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/stacking.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/state.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/stateKeys.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/svgFill.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textColor.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textColorHover.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textGradient.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textStyle.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textTag.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/textWeight.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/titleSize.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/type.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/underline.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/verticalContentAlign.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/verticalResizeMode.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/width.d.ts +0 -0
- /package/dist/{cjs → types}/types/componentProps/wrap.d.ts +0 -0
|
@@ -1,28 +1,1172 @@
|
|
|
1
|
-
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
6
|
-
import '
|
|
7
|
-
import '../
|
|
8
|
-
import '../
|
|
1
|
+
import { _ as __assign } from '../tslib.es6-S-VPg1Cw.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import React, { useMemo, useCallback, useRef, useState, useEffect } from 'react';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import DatePicker from 'react-datepicker';
|
|
6
|
+
import { useDeviceTargetClass } from '../hooks/useDeviceTargetClass.js';
|
|
7
|
+
import { B as Button } from '../Button-BA3ZeUjj.js';
|
|
8
|
+
import { I as Icon } from '../Icon-CsE2-ieX.js';
|
|
9
|
+
import { I as Input } from '../Input-BQ6Plt1n.js';
|
|
10
|
+
import { L as Label } from '../Label-BA_CnRBq.js';
|
|
11
|
+
import { T as Text } from '../Text-CG3xPG27.js';
|
|
9
12
|
import 'lodash/castArray';
|
|
10
13
|
import 'lodash/camelCase';
|
|
11
14
|
import '../context/UIContext.js';
|
|
12
15
|
import 'prop-types';
|
|
13
16
|
import '../hooks/useMediaQueries.js';
|
|
14
17
|
import 'react-responsive';
|
|
15
|
-
import '../Button-CSzPxWyC.js';
|
|
16
18
|
import '../hooks/useStyles.js';
|
|
17
19
|
import 'lodash/maxBy';
|
|
18
20
|
import 'lodash/upperFirst';
|
|
19
21
|
import '../hooks/styleAttributes.js';
|
|
20
|
-
import '../
|
|
22
|
+
import '../Link-Bqu5amIb.js';
|
|
23
|
+
import '../Loader-CJ8ZCdwy.js';
|
|
21
24
|
import 'react-inlinesvg';
|
|
22
|
-
import '../
|
|
23
|
-
import '../
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
import '../Tooltip-DJufHBiQ.js';
|
|
26
|
+
import '../Title-BfSFPJtJ.js';
|
|
27
|
+
|
|
28
|
+
function buildFormatLongFn(args) {
|
|
29
|
+
return (options = {}) => {
|
|
30
|
+
// TODO: Remove String()
|
|
31
|
+
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
32
|
+
const format = args.formats[width] || args.formats[args.defaultWidth];
|
|
33
|
+
return format;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* eslint-disable no-unused-vars */
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The localize function argument callback which allows to convert raw value to
|
|
41
|
+
* the actual type.
|
|
42
|
+
*
|
|
43
|
+
* @param value - The value to convert
|
|
44
|
+
*
|
|
45
|
+
* @returns The converted value
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The map of localized values for each width.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* The index type of the locale unit value. It types conversion of units of
|
|
54
|
+
* values that don't start at 0 (i.e. quarters).
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Converts the unit value to the tuple of values.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The tuple of localized era values. The first element represents BC,
|
|
63
|
+
* the second element represents AD.
|
|
64
|
+
*/
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* The tuple of localized quarter values. The first element represents Q1.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The tuple of localized day values. The first element represents Sunday.
|
|
72
|
+
*/
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The tuple of localized month values. The first element represents January.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
function buildLocalizeFn(args) {
|
|
79
|
+
return (value, options) => {
|
|
80
|
+
const context = options?.context ? String(options.context) : "standalone";
|
|
81
|
+
|
|
82
|
+
let valuesArray;
|
|
83
|
+
if (context === "formatting" && args.formattingValues) {
|
|
84
|
+
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
85
|
+
const width = options?.width ? String(options.width) : defaultWidth;
|
|
86
|
+
|
|
87
|
+
valuesArray =
|
|
88
|
+
args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
89
|
+
} else {
|
|
90
|
+
const defaultWidth = args.defaultWidth;
|
|
91
|
+
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
92
|
+
|
|
93
|
+
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
94
|
+
}
|
|
95
|
+
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
96
|
+
|
|
97
|
+
// @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!
|
|
98
|
+
return valuesArray[index];
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function buildMatchFn(args) {
|
|
103
|
+
return (string, options = {}) => {
|
|
104
|
+
const width = options.width;
|
|
105
|
+
|
|
106
|
+
const matchPattern =
|
|
107
|
+
(width && args.matchPatterns[width]) ||
|
|
108
|
+
args.matchPatterns[args.defaultMatchWidth];
|
|
109
|
+
const matchResult = string.match(matchPattern);
|
|
110
|
+
|
|
111
|
+
if (!matchResult) {
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
const matchedString = matchResult[0];
|
|
115
|
+
|
|
116
|
+
const parsePatterns =
|
|
117
|
+
(width && args.parsePatterns[width]) ||
|
|
118
|
+
args.parsePatterns[args.defaultParseWidth];
|
|
119
|
+
|
|
120
|
+
const key = Array.isArray(parsePatterns)
|
|
121
|
+
? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
122
|
+
: // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
123
|
+
findKey(parsePatterns, (pattern) => pattern.test(matchedString));
|
|
124
|
+
|
|
125
|
+
let value;
|
|
126
|
+
|
|
127
|
+
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
128
|
+
value = options.valueCallback
|
|
129
|
+
? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
130
|
+
options.valueCallback(value)
|
|
131
|
+
: value;
|
|
132
|
+
|
|
133
|
+
const rest = string.slice(matchedString.length);
|
|
134
|
+
|
|
135
|
+
return { value, rest };
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function findKey(object, predicate) {
|
|
140
|
+
for (const key in object) {
|
|
141
|
+
if (
|
|
142
|
+
Object.prototype.hasOwnProperty.call(object, key) &&
|
|
143
|
+
predicate(object[key])
|
|
144
|
+
) {
|
|
145
|
+
return key;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function findIndex(array, predicate) {
|
|
152
|
+
for (let key = 0; key < array.length; key++) {
|
|
153
|
+
if (predicate(array[key])) {
|
|
154
|
+
return key;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return undefined;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function buildMatchPatternFn(args) {
|
|
161
|
+
return (string, options = {}) => {
|
|
162
|
+
const matchResult = string.match(args.matchPattern);
|
|
163
|
+
if (!matchResult) return null;
|
|
164
|
+
const matchedString = matchResult[0];
|
|
165
|
+
|
|
166
|
+
const parseResult = string.match(args.parsePattern);
|
|
167
|
+
if (!parseResult) return null;
|
|
168
|
+
let value = args.valueCallback
|
|
169
|
+
? args.valueCallback(parseResult[0])
|
|
170
|
+
: parseResult[0];
|
|
171
|
+
|
|
172
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
|
|
173
|
+
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
174
|
+
|
|
175
|
+
const rest = string.slice(matchedString.length);
|
|
176
|
+
|
|
177
|
+
return { value, rest };
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* @name toDate
|
|
183
|
+
* @category Common Helpers
|
|
184
|
+
* @summary Convert the given argument to an instance of Date.
|
|
185
|
+
*
|
|
186
|
+
* @description
|
|
187
|
+
* Convert the given argument to an instance of Date.
|
|
188
|
+
*
|
|
189
|
+
* If the argument is an instance of Date, the function returns its clone.
|
|
190
|
+
*
|
|
191
|
+
* If the argument is a number, it is treated as a timestamp.
|
|
192
|
+
*
|
|
193
|
+
* If the argument is none of the above, the function returns Invalid Date.
|
|
194
|
+
*
|
|
195
|
+
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
196
|
+
*
|
|
197
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
198
|
+
*
|
|
199
|
+
* @param argument - The value to convert
|
|
200
|
+
*
|
|
201
|
+
* @returns The parsed date in the local time zone
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* // Clone the date:
|
|
205
|
+
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
206
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* // Convert the timestamp to date:
|
|
210
|
+
* const result = toDate(1392098430000)
|
|
211
|
+
* //=> Tue Feb 11 2014 11:30:30
|
|
212
|
+
*/
|
|
213
|
+
function toDate(argument) {
|
|
214
|
+
const argStr = Object.prototype.toString.call(argument);
|
|
215
|
+
|
|
216
|
+
// Clone the date
|
|
217
|
+
if (
|
|
218
|
+
argument instanceof Date ||
|
|
219
|
+
(typeof argument === "object" && argStr === "[object Date]")
|
|
220
|
+
) {
|
|
221
|
+
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
222
|
+
return new argument.constructor(+argument);
|
|
223
|
+
} else if (
|
|
224
|
+
typeof argument === "number" ||
|
|
225
|
+
argStr === "[object Number]" ||
|
|
226
|
+
typeof argument === "string" ||
|
|
227
|
+
argStr === "[object String]"
|
|
228
|
+
) {
|
|
229
|
+
// TODO: Can we get rid of as?
|
|
230
|
+
return new Date(argument);
|
|
231
|
+
} else {
|
|
232
|
+
// TODO: Can we get rid of as?
|
|
233
|
+
return new Date(NaN);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
let defaultOptions = {};
|
|
238
|
+
|
|
239
|
+
function getDefaultOptions() {
|
|
240
|
+
return defaultOptions;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The {@link startOfWeek} function options.
|
|
245
|
+
*/
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* @name startOfWeek
|
|
249
|
+
* @category Week Helpers
|
|
250
|
+
* @summary Return the start of a week for the given date.
|
|
251
|
+
*
|
|
252
|
+
* @description
|
|
253
|
+
* Return the start of a week for the given date.
|
|
254
|
+
* The result will be in the local timezone.
|
|
255
|
+
*
|
|
256
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
257
|
+
*
|
|
258
|
+
* @param date - The original date
|
|
259
|
+
* @param options - An object with options
|
|
260
|
+
*
|
|
261
|
+
* @returns The start of a week
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* // The start of a week for 2 September 2014 11:55:00:
|
|
265
|
+
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
266
|
+
* //=> Sun Aug 31 2014 00:00:00
|
|
267
|
+
*
|
|
268
|
+
* @example
|
|
269
|
+
* // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
|
|
270
|
+
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
|
|
271
|
+
* //=> Mon Sep 01 2014 00:00:00
|
|
272
|
+
*/
|
|
273
|
+
function startOfWeek(date, options) {
|
|
274
|
+
const defaultOptions = getDefaultOptions();
|
|
275
|
+
const weekStartsOn =
|
|
276
|
+
options?.weekStartsOn ??
|
|
277
|
+
options?.locale?.options?.weekStartsOn ??
|
|
278
|
+
defaultOptions.weekStartsOn ??
|
|
279
|
+
defaultOptions.locale?.options?.weekStartsOn ??
|
|
280
|
+
0;
|
|
281
|
+
|
|
282
|
+
const _date = toDate(date);
|
|
283
|
+
const day = _date.getDay();
|
|
284
|
+
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
285
|
+
|
|
286
|
+
_date.setDate(_date.getDate() - diff);
|
|
287
|
+
_date.setHours(0, 0, 0, 0);
|
|
288
|
+
return _date;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* The {@link isSameWeek} function options.
|
|
293
|
+
*/
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* @name isSameWeek
|
|
297
|
+
* @category Week Helpers
|
|
298
|
+
* @summary Are the given dates in the same week (and month and year)?
|
|
299
|
+
*
|
|
300
|
+
* @description
|
|
301
|
+
* Are the given dates in the same week (and month and year)?
|
|
302
|
+
*
|
|
303
|
+
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
304
|
+
*
|
|
305
|
+
* @param dateLeft - The first date to check
|
|
306
|
+
* @param dateRight - The second date to check
|
|
307
|
+
* @param options - An object with options
|
|
308
|
+
*
|
|
309
|
+
* @returns The dates are in the same week (and month and year)
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* // Are 31 August 2014 and 4 September 2014 in the same week?
|
|
313
|
+
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))
|
|
314
|
+
* //=> true
|
|
315
|
+
*
|
|
316
|
+
* @example
|
|
317
|
+
* // If week starts with Monday,
|
|
318
|
+
* // are 31 August 2014 and 4 September 2014 in the same week?
|
|
319
|
+
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {
|
|
320
|
+
* weekStartsOn: 1
|
|
321
|
+
* })
|
|
322
|
+
* //=> false
|
|
323
|
+
*
|
|
324
|
+
* @example
|
|
325
|
+
* // Are 1 January 2014 and 1 January 2015 in the same week?
|
|
326
|
+
* const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))
|
|
327
|
+
* //=> false
|
|
328
|
+
*/
|
|
329
|
+
function isSameWeek(dateLeft, dateRight, options) {
|
|
330
|
+
const dateLeftStartOfWeek = startOfWeek(dateLeft, options);
|
|
331
|
+
const dateRightStartOfWeek = startOfWeek(dateRight, options);
|
|
332
|
+
|
|
333
|
+
return +dateLeftStartOfWeek === +dateRightStartOfWeek;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function declension(scheme, count) {
|
|
337
|
+
// scheme for count=1 exists
|
|
338
|
+
if (scheme.one !== undefined && count === 1) {
|
|
339
|
+
return scheme.one;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
const rem10 = count % 10;
|
|
343
|
+
const rem100 = count % 100;
|
|
344
|
+
|
|
345
|
+
// 1, 21, 31, ...
|
|
346
|
+
if (rem10 === 1 && rem100 !== 11) {
|
|
347
|
+
return scheme.singularNominative.replace("{{count}}", String(count));
|
|
348
|
+
|
|
349
|
+
// 2, 3, 4, 22, 23, 24, 32 ...
|
|
350
|
+
} else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) {
|
|
351
|
+
return scheme.singularGenitive.replace("{{count}}", String(count));
|
|
352
|
+
|
|
353
|
+
// 5, 6, 7, 8, 9, 10, 11, ...
|
|
354
|
+
} else {
|
|
355
|
+
return scheme.pluralGenitive.replace("{{count}}", String(count));
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
function buildLocalizeTokenFn(scheme) {
|
|
360
|
+
return (count, options) => {
|
|
361
|
+
if (options?.addSuffix) {
|
|
362
|
+
if (options.comparison && options.comparison > 0) {
|
|
363
|
+
if (scheme.future) {
|
|
364
|
+
return declension(scheme.future, count);
|
|
365
|
+
} else {
|
|
366
|
+
return "через " + declension(scheme.regular, count);
|
|
367
|
+
}
|
|
368
|
+
} else {
|
|
369
|
+
if (scheme.past) {
|
|
370
|
+
return declension(scheme.past, count);
|
|
371
|
+
} else {
|
|
372
|
+
return declension(scheme.regular, count) + " назад";
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
} else {
|
|
376
|
+
return declension(scheme.regular, count);
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
const formatDistanceLocale = {
|
|
382
|
+
lessThanXSeconds: buildLocalizeTokenFn({
|
|
383
|
+
regular: {
|
|
384
|
+
one: "меньше секунды",
|
|
385
|
+
singularNominative: "меньше {{count}} секунды",
|
|
386
|
+
singularGenitive: "меньше {{count}} секунд",
|
|
387
|
+
pluralGenitive: "меньше {{count}} секунд",
|
|
388
|
+
},
|
|
389
|
+
future: {
|
|
390
|
+
one: "меньше, чем через секунду",
|
|
391
|
+
singularNominative: "меньше, чем через {{count}} секунду",
|
|
392
|
+
singularGenitive: "меньше, чем через {{count}} секунды",
|
|
393
|
+
pluralGenitive: "меньше, чем через {{count}} секунд",
|
|
394
|
+
},
|
|
395
|
+
}),
|
|
396
|
+
|
|
397
|
+
xSeconds: buildLocalizeTokenFn({
|
|
398
|
+
regular: {
|
|
399
|
+
singularNominative: "{{count}} секунда",
|
|
400
|
+
singularGenitive: "{{count}} секунды",
|
|
401
|
+
pluralGenitive: "{{count}} секунд",
|
|
402
|
+
},
|
|
403
|
+
past: {
|
|
404
|
+
singularNominative: "{{count}} секунду назад",
|
|
405
|
+
singularGenitive: "{{count}} секунды назад",
|
|
406
|
+
pluralGenitive: "{{count}} секунд назад",
|
|
407
|
+
},
|
|
408
|
+
future: {
|
|
409
|
+
singularNominative: "через {{count}} секунду",
|
|
410
|
+
singularGenitive: "через {{count}} секунды",
|
|
411
|
+
pluralGenitive: "через {{count}} секунд",
|
|
412
|
+
},
|
|
413
|
+
}),
|
|
414
|
+
|
|
415
|
+
halfAMinute: (_count, options) => {
|
|
416
|
+
if (options?.addSuffix) {
|
|
417
|
+
if (options.comparison && options.comparison > 0) {
|
|
418
|
+
return "через полминуты";
|
|
419
|
+
} else {
|
|
420
|
+
return "полминуты назад";
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
return "полминуты";
|
|
425
|
+
},
|
|
426
|
+
|
|
427
|
+
lessThanXMinutes: buildLocalizeTokenFn({
|
|
428
|
+
regular: {
|
|
429
|
+
one: "меньше минуты",
|
|
430
|
+
singularNominative: "меньше {{count}} минуты",
|
|
431
|
+
singularGenitive: "меньше {{count}} минут",
|
|
432
|
+
pluralGenitive: "меньше {{count}} минут",
|
|
433
|
+
},
|
|
434
|
+
future: {
|
|
435
|
+
one: "меньше, чем через минуту",
|
|
436
|
+
singularNominative: "меньше, чем через {{count}} минуту",
|
|
437
|
+
singularGenitive: "меньше, чем через {{count}} минуты",
|
|
438
|
+
pluralGenitive: "меньше, чем через {{count}} минут",
|
|
439
|
+
},
|
|
440
|
+
}),
|
|
441
|
+
|
|
442
|
+
xMinutes: buildLocalizeTokenFn({
|
|
443
|
+
regular: {
|
|
444
|
+
singularNominative: "{{count}} минута",
|
|
445
|
+
singularGenitive: "{{count}} минуты",
|
|
446
|
+
pluralGenitive: "{{count}} минут",
|
|
447
|
+
},
|
|
448
|
+
past: {
|
|
449
|
+
singularNominative: "{{count}} минуту назад",
|
|
450
|
+
singularGenitive: "{{count}} минуты назад",
|
|
451
|
+
pluralGenitive: "{{count}} минут назад",
|
|
452
|
+
},
|
|
453
|
+
future: {
|
|
454
|
+
singularNominative: "через {{count}} минуту",
|
|
455
|
+
singularGenitive: "через {{count}} минуты",
|
|
456
|
+
pluralGenitive: "через {{count}} минут",
|
|
457
|
+
},
|
|
458
|
+
}),
|
|
459
|
+
|
|
460
|
+
aboutXHours: buildLocalizeTokenFn({
|
|
461
|
+
regular: {
|
|
462
|
+
singularNominative: "около {{count}} часа",
|
|
463
|
+
singularGenitive: "около {{count}} часов",
|
|
464
|
+
pluralGenitive: "около {{count}} часов",
|
|
465
|
+
},
|
|
466
|
+
future: {
|
|
467
|
+
singularNominative: "приблизительно через {{count}} час",
|
|
468
|
+
singularGenitive: "приблизительно через {{count}} часа",
|
|
469
|
+
pluralGenitive: "приблизительно через {{count}} часов",
|
|
470
|
+
},
|
|
471
|
+
}),
|
|
472
|
+
|
|
473
|
+
xHours: buildLocalizeTokenFn({
|
|
474
|
+
regular: {
|
|
475
|
+
singularNominative: "{{count}} час",
|
|
476
|
+
singularGenitive: "{{count}} часа",
|
|
477
|
+
pluralGenitive: "{{count}} часов",
|
|
478
|
+
},
|
|
479
|
+
}),
|
|
480
|
+
|
|
481
|
+
xDays: buildLocalizeTokenFn({
|
|
482
|
+
regular: {
|
|
483
|
+
singularNominative: "{{count}} день",
|
|
484
|
+
singularGenitive: "{{count}} дня",
|
|
485
|
+
pluralGenitive: "{{count}} дней",
|
|
486
|
+
},
|
|
487
|
+
}),
|
|
488
|
+
|
|
489
|
+
aboutXWeeks: buildLocalizeTokenFn({
|
|
490
|
+
regular: {
|
|
491
|
+
singularNominative: "около {{count}} недели",
|
|
492
|
+
singularGenitive: "около {{count}} недель",
|
|
493
|
+
pluralGenitive: "около {{count}} недель",
|
|
494
|
+
},
|
|
495
|
+
future: {
|
|
496
|
+
singularNominative: "приблизительно через {{count}} неделю",
|
|
497
|
+
singularGenitive: "приблизительно через {{count}} недели",
|
|
498
|
+
pluralGenitive: "приблизительно через {{count}} недель",
|
|
499
|
+
},
|
|
500
|
+
}),
|
|
501
|
+
|
|
502
|
+
xWeeks: buildLocalizeTokenFn({
|
|
503
|
+
regular: {
|
|
504
|
+
singularNominative: "{{count}} неделя",
|
|
505
|
+
singularGenitive: "{{count}} недели",
|
|
506
|
+
pluralGenitive: "{{count}} недель",
|
|
507
|
+
},
|
|
508
|
+
}),
|
|
509
|
+
|
|
510
|
+
aboutXMonths: buildLocalizeTokenFn({
|
|
511
|
+
regular: {
|
|
512
|
+
singularNominative: "около {{count}} месяца",
|
|
513
|
+
singularGenitive: "около {{count}} месяцев",
|
|
514
|
+
pluralGenitive: "около {{count}} месяцев",
|
|
515
|
+
},
|
|
516
|
+
future: {
|
|
517
|
+
singularNominative: "приблизительно через {{count}} месяц",
|
|
518
|
+
singularGenitive: "приблизительно через {{count}} месяца",
|
|
519
|
+
pluralGenitive: "приблизительно через {{count}} месяцев",
|
|
520
|
+
},
|
|
521
|
+
}),
|
|
522
|
+
|
|
523
|
+
xMonths: buildLocalizeTokenFn({
|
|
524
|
+
regular: {
|
|
525
|
+
singularNominative: "{{count}} месяц",
|
|
526
|
+
singularGenitive: "{{count}} месяца",
|
|
527
|
+
pluralGenitive: "{{count}} месяцев",
|
|
528
|
+
},
|
|
529
|
+
}),
|
|
530
|
+
|
|
531
|
+
aboutXYears: buildLocalizeTokenFn({
|
|
532
|
+
regular: {
|
|
533
|
+
singularNominative: "около {{count}} года",
|
|
534
|
+
singularGenitive: "около {{count}} лет",
|
|
535
|
+
pluralGenitive: "около {{count}} лет",
|
|
536
|
+
},
|
|
537
|
+
future: {
|
|
538
|
+
singularNominative: "приблизительно через {{count}} год",
|
|
539
|
+
singularGenitive: "приблизительно через {{count}} года",
|
|
540
|
+
pluralGenitive: "приблизительно через {{count}} лет",
|
|
541
|
+
},
|
|
542
|
+
}),
|
|
543
|
+
|
|
544
|
+
xYears: buildLocalizeTokenFn({
|
|
545
|
+
regular: {
|
|
546
|
+
singularNominative: "{{count}} год",
|
|
547
|
+
singularGenitive: "{{count}} года",
|
|
548
|
+
pluralGenitive: "{{count}} лет",
|
|
549
|
+
},
|
|
550
|
+
}),
|
|
551
|
+
|
|
552
|
+
overXYears: buildLocalizeTokenFn({
|
|
553
|
+
regular: {
|
|
554
|
+
singularNominative: "больше {{count}} года",
|
|
555
|
+
singularGenitive: "больше {{count}} лет",
|
|
556
|
+
pluralGenitive: "больше {{count}} лет",
|
|
557
|
+
},
|
|
558
|
+
future: {
|
|
559
|
+
singularNominative: "больше, чем через {{count}} год",
|
|
560
|
+
singularGenitive: "больше, чем через {{count}} года",
|
|
561
|
+
pluralGenitive: "больше, чем через {{count}} лет",
|
|
562
|
+
},
|
|
563
|
+
}),
|
|
564
|
+
|
|
565
|
+
almostXYears: buildLocalizeTokenFn({
|
|
566
|
+
regular: {
|
|
567
|
+
singularNominative: "почти {{count}} год",
|
|
568
|
+
singularGenitive: "почти {{count}} года",
|
|
569
|
+
pluralGenitive: "почти {{count}} лет",
|
|
570
|
+
},
|
|
571
|
+
future: {
|
|
572
|
+
singularNominative: "почти через {{count}} год",
|
|
573
|
+
singularGenitive: "почти через {{count}} года",
|
|
574
|
+
pluralGenitive: "почти через {{count}} лет",
|
|
575
|
+
},
|
|
576
|
+
}),
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
const formatDistance = (token, count, options) => {
|
|
580
|
+
return formatDistanceLocale[token](count, options);
|
|
581
|
+
};
|
|
582
|
+
|
|
583
|
+
const dateFormats = {
|
|
584
|
+
full: "EEEE, d MMMM y 'г.'",
|
|
585
|
+
long: "d MMMM y 'г.'",
|
|
586
|
+
medium: "d MMM y 'г.'",
|
|
587
|
+
short: "dd.MM.y",
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
const timeFormats = {
|
|
591
|
+
full: "H:mm:ss zzzz",
|
|
592
|
+
long: "H:mm:ss z",
|
|
593
|
+
medium: "H:mm:ss",
|
|
594
|
+
short: "H:mm",
|
|
595
|
+
};
|
|
596
|
+
|
|
597
|
+
const dateTimeFormats = {
|
|
598
|
+
any: "{{date}}, {{time}}",
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
const formatLong = {
|
|
602
|
+
date: buildFormatLongFn({
|
|
603
|
+
formats: dateFormats,
|
|
604
|
+
defaultWidth: "full",
|
|
605
|
+
}),
|
|
606
|
+
|
|
607
|
+
time: buildFormatLongFn({
|
|
608
|
+
formats: timeFormats,
|
|
609
|
+
defaultWidth: "full",
|
|
610
|
+
}),
|
|
611
|
+
|
|
612
|
+
dateTime: buildFormatLongFn({
|
|
613
|
+
formats: dateTimeFormats,
|
|
614
|
+
defaultWidth: "any",
|
|
615
|
+
}),
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
const accusativeWeekdays = [
|
|
619
|
+
"воскресенье",
|
|
620
|
+
"понедельник",
|
|
621
|
+
"вторник",
|
|
622
|
+
"среду",
|
|
623
|
+
"четверг",
|
|
624
|
+
"пятницу",
|
|
625
|
+
"субботу",
|
|
626
|
+
];
|
|
627
|
+
|
|
628
|
+
function lastWeek(day) {
|
|
629
|
+
const weekday = accusativeWeekdays[day];
|
|
630
|
+
|
|
631
|
+
switch (day) {
|
|
632
|
+
case 0:
|
|
633
|
+
return "'в прошлое " + weekday + " в' p";
|
|
634
|
+
case 1:
|
|
635
|
+
case 2:
|
|
636
|
+
case 4:
|
|
637
|
+
return "'в прошлый " + weekday + " в' p";
|
|
638
|
+
case 3:
|
|
639
|
+
case 5:
|
|
640
|
+
case 6:
|
|
641
|
+
return "'в прошлую " + weekday + " в' p";
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
function thisWeek(day) {
|
|
646
|
+
const weekday = accusativeWeekdays[day];
|
|
647
|
+
|
|
648
|
+
if (day === 2 /* Tue */) {
|
|
649
|
+
return "'во " + weekday + " в' p";
|
|
650
|
+
} else {
|
|
651
|
+
return "'в " + weekday + " в' p";
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
function nextWeek(day) {
|
|
656
|
+
const weekday = accusativeWeekdays[day];
|
|
657
|
+
|
|
658
|
+
switch (day) {
|
|
659
|
+
case 0:
|
|
660
|
+
return "'в следующее " + weekday + " в' p";
|
|
661
|
+
case 1:
|
|
662
|
+
case 2:
|
|
663
|
+
case 4:
|
|
664
|
+
return "'в следующий " + weekday + " в' p";
|
|
665
|
+
case 3:
|
|
666
|
+
case 5:
|
|
667
|
+
case 6:
|
|
668
|
+
return "'в следующую " + weekday + " в' p";
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
const formatRelativeLocale = {
|
|
673
|
+
lastWeek: (date, baseDate, options) => {
|
|
674
|
+
const day = date.getDay();
|
|
675
|
+
if (isSameWeek(date, baseDate, options)) {
|
|
676
|
+
return thisWeek(day);
|
|
677
|
+
} else {
|
|
678
|
+
return lastWeek(day);
|
|
679
|
+
}
|
|
680
|
+
},
|
|
681
|
+
yesterday: "'вчера в' p",
|
|
682
|
+
today: "'сегодня в' p",
|
|
683
|
+
tomorrow: "'завтра в' p",
|
|
684
|
+
nextWeek: (date, baseDate, options) => {
|
|
685
|
+
const day = date.getDay();
|
|
686
|
+
if (isSameWeek(date, baseDate, options)) {
|
|
687
|
+
return thisWeek(day);
|
|
688
|
+
} else {
|
|
689
|
+
return nextWeek(day);
|
|
690
|
+
}
|
|
691
|
+
},
|
|
692
|
+
other: "P",
|
|
693
|
+
};
|
|
694
|
+
|
|
695
|
+
const formatRelative = (token, date, baseDate, options) => {
|
|
696
|
+
const format = formatRelativeLocale[token];
|
|
697
|
+
|
|
698
|
+
if (typeof format === "function") {
|
|
699
|
+
return format(date, baseDate, options);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
return format;
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
const eraValues = {
|
|
706
|
+
narrow: ["до н.э.", "н.э."],
|
|
707
|
+
abbreviated: ["до н. э.", "н. э."],
|
|
708
|
+
wide: ["до нашей эры", "нашей эры"],
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
const quarterValues = {
|
|
712
|
+
narrow: ["1", "2", "3", "4"],
|
|
713
|
+
abbreviated: ["1-й кв.", "2-й кв.", "3-й кв.", "4-й кв."],
|
|
714
|
+
wide: ["1-й квартал", "2-й квартал", "3-й квартал", "4-й квартал"],
|
|
715
|
+
};
|
|
716
|
+
|
|
717
|
+
const monthValues = {
|
|
718
|
+
narrow: ["Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"],
|
|
719
|
+
abbreviated: [
|
|
720
|
+
"янв.",
|
|
721
|
+
"фев.",
|
|
722
|
+
"март",
|
|
723
|
+
"апр.",
|
|
724
|
+
"май",
|
|
725
|
+
"июнь",
|
|
726
|
+
"июль",
|
|
727
|
+
"авг.",
|
|
728
|
+
"сент.",
|
|
729
|
+
"окт.",
|
|
730
|
+
"нояб.",
|
|
731
|
+
"дек.",
|
|
732
|
+
],
|
|
733
|
+
|
|
734
|
+
wide: [
|
|
735
|
+
"январь",
|
|
736
|
+
"февраль",
|
|
737
|
+
"март",
|
|
738
|
+
"апрель",
|
|
739
|
+
"май",
|
|
740
|
+
"июнь",
|
|
741
|
+
"июль",
|
|
742
|
+
"август",
|
|
743
|
+
"сентябрь",
|
|
744
|
+
"октябрь",
|
|
745
|
+
"ноябрь",
|
|
746
|
+
"декабрь",
|
|
747
|
+
],
|
|
748
|
+
};
|
|
749
|
+
|
|
750
|
+
const formattingMonthValues = {
|
|
751
|
+
narrow: ["Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"],
|
|
752
|
+
abbreviated: [
|
|
753
|
+
"янв.",
|
|
754
|
+
"фев.",
|
|
755
|
+
"мар.",
|
|
756
|
+
"апр.",
|
|
757
|
+
"мая",
|
|
758
|
+
"июн.",
|
|
759
|
+
"июл.",
|
|
760
|
+
"авг.",
|
|
761
|
+
"сент.",
|
|
762
|
+
"окт.",
|
|
763
|
+
"нояб.",
|
|
764
|
+
"дек.",
|
|
765
|
+
],
|
|
766
|
+
|
|
767
|
+
wide: [
|
|
768
|
+
"января",
|
|
769
|
+
"февраля",
|
|
770
|
+
"марта",
|
|
771
|
+
"апреля",
|
|
772
|
+
"мая",
|
|
773
|
+
"июня",
|
|
774
|
+
"июля",
|
|
775
|
+
"августа",
|
|
776
|
+
"сентября",
|
|
777
|
+
"октября",
|
|
778
|
+
"ноября",
|
|
779
|
+
"декабря",
|
|
780
|
+
],
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
const dayValues = {
|
|
784
|
+
narrow: ["В", "П", "В", "С", "Ч", "П", "С"],
|
|
785
|
+
short: ["вс", "пн", "вт", "ср", "чт", "пт", "сб"],
|
|
786
|
+
abbreviated: ["вск", "пнд", "втр", "срд", "чтв", "птн", "суб"],
|
|
787
|
+
wide: [
|
|
788
|
+
"воскресенье",
|
|
789
|
+
"понедельник",
|
|
790
|
+
"вторник",
|
|
791
|
+
"среда",
|
|
792
|
+
"четверг",
|
|
793
|
+
"пятница",
|
|
794
|
+
"суббота",
|
|
795
|
+
],
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
const dayPeriodValues = {
|
|
799
|
+
narrow: {
|
|
800
|
+
am: "ДП",
|
|
801
|
+
pm: "ПП",
|
|
802
|
+
midnight: "полн.",
|
|
803
|
+
noon: "полд.",
|
|
804
|
+
morning: "утро",
|
|
805
|
+
afternoon: "день",
|
|
806
|
+
evening: "веч.",
|
|
807
|
+
night: "ночь",
|
|
808
|
+
},
|
|
809
|
+
abbreviated: {
|
|
810
|
+
am: "ДП",
|
|
811
|
+
pm: "ПП",
|
|
812
|
+
midnight: "полн.",
|
|
813
|
+
noon: "полд.",
|
|
814
|
+
morning: "утро",
|
|
815
|
+
afternoon: "день",
|
|
816
|
+
evening: "веч.",
|
|
817
|
+
night: "ночь",
|
|
818
|
+
},
|
|
819
|
+
wide: {
|
|
820
|
+
am: "ДП",
|
|
821
|
+
pm: "ПП",
|
|
822
|
+
midnight: "полночь",
|
|
823
|
+
noon: "полдень",
|
|
824
|
+
morning: "утро",
|
|
825
|
+
afternoon: "день",
|
|
826
|
+
evening: "вечер",
|
|
827
|
+
night: "ночь",
|
|
828
|
+
},
|
|
829
|
+
};
|
|
830
|
+
|
|
831
|
+
const formattingDayPeriodValues = {
|
|
832
|
+
narrow: {
|
|
833
|
+
am: "ДП",
|
|
834
|
+
pm: "ПП",
|
|
835
|
+
midnight: "полн.",
|
|
836
|
+
noon: "полд.",
|
|
837
|
+
morning: "утра",
|
|
838
|
+
afternoon: "дня",
|
|
839
|
+
evening: "веч.",
|
|
840
|
+
night: "ночи",
|
|
841
|
+
},
|
|
842
|
+
abbreviated: {
|
|
843
|
+
am: "ДП",
|
|
844
|
+
pm: "ПП",
|
|
845
|
+
midnight: "полн.",
|
|
846
|
+
noon: "полд.",
|
|
847
|
+
morning: "утра",
|
|
848
|
+
afternoon: "дня",
|
|
849
|
+
evening: "веч.",
|
|
850
|
+
night: "ночи",
|
|
851
|
+
},
|
|
852
|
+
wide: {
|
|
853
|
+
am: "ДП",
|
|
854
|
+
pm: "ПП",
|
|
855
|
+
midnight: "полночь",
|
|
856
|
+
noon: "полдень",
|
|
857
|
+
morning: "утра",
|
|
858
|
+
afternoon: "дня",
|
|
859
|
+
evening: "вечера",
|
|
860
|
+
night: "ночи",
|
|
861
|
+
},
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
const ordinalNumber = (dirtyNumber, options) => {
|
|
865
|
+
const number = Number(dirtyNumber);
|
|
866
|
+
const unit = options?.unit;
|
|
867
|
+
|
|
868
|
+
let suffix;
|
|
869
|
+
if (unit === "date") {
|
|
870
|
+
suffix = "-е";
|
|
871
|
+
} else if (unit === "week" || unit === "minute" || unit === "second") {
|
|
872
|
+
suffix = "-я";
|
|
873
|
+
} else {
|
|
874
|
+
suffix = "-й";
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
return number + suffix;
|
|
878
|
+
};
|
|
879
|
+
|
|
880
|
+
const localize = {
|
|
881
|
+
ordinalNumber,
|
|
882
|
+
|
|
883
|
+
era: buildLocalizeFn({
|
|
884
|
+
values: eraValues,
|
|
885
|
+
defaultWidth: "wide",
|
|
886
|
+
}),
|
|
887
|
+
|
|
888
|
+
quarter: buildLocalizeFn({
|
|
889
|
+
values: quarterValues,
|
|
890
|
+
defaultWidth: "wide",
|
|
891
|
+
argumentCallback: (quarter) => quarter - 1,
|
|
892
|
+
}),
|
|
893
|
+
|
|
894
|
+
month: buildLocalizeFn({
|
|
895
|
+
values: monthValues,
|
|
896
|
+
defaultWidth: "wide",
|
|
897
|
+
formattingValues: formattingMonthValues,
|
|
898
|
+
defaultFormattingWidth: "wide",
|
|
899
|
+
}),
|
|
900
|
+
|
|
901
|
+
day: buildLocalizeFn({
|
|
902
|
+
values: dayValues,
|
|
903
|
+
defaultWidth: "wide",
|
|
904
|
+
}),
|
|
905
|
+
|
|
906
|
+
dayPeriod: buildLocalizeFn({
|
|
907
|
+
values: dayPeriodValues,
|
|
908
|
+
defaultWidth: "any",
|
|
909
|
+
formattingValues: formattingDayPeriodValues,
|
|
910
|
+
defaultFormattingWidth: "wide",
|
|
911
|
+
}),
|
|
912
|
+
};
|
|
913
|
+
|
|
914
|
+
const matchOrdinalNumberPattern = /^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i;
|
|
915
|
+
const parseOrdinalNumberPattern = /\d+/i;
|
|
916
|
+
|
|
917
|
+
const matchEraPatterns = {
|
|
918
|
+
narrow: /^((до )?н\.?\s?э\.?)/i,
|
|
919
|
+
abbreviated: /^((до )?н\.?\s?э\.?)/i,
|
|
920
|
+
wide: /^(до нашей эры|нашей эры|наша эра)/i,
|
|
921
|
+
};
|
|
922
|
+
const parseEraPatterns = {
|
|
923
|
+
any: [/^д/i, /^н/i],
|
|
924
|
+
};
|
|
925
|
+
|
|
926
|
+
const matchQuarterPatterns = {
|
|
927
|
+
narrow: /^[1234]/i,
|
|
928
|
+
abbreviated: /^[1234](-?[ыои]?й?)? кв.?/i,
|
|
929
|
+
wide: /^[1234](-?[ыои]?й?)? квартал/i,
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
const parseQuarterPatterns = {
|
|
933
|
+
any: [/1/i, /2/i, /3/i, /4/i],
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
const matchMonthPatterns = {
|
|
937
|
+
narrow: /^[яфмаисонд]/i,
|
|
938
|
+
abbreviated:
|
|
939
|
+
/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,
|
|
940
|
+
wide: /^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i,
|
|
941
|
+
};
|
|
942
|
+
|
|
943
|
+
const parseMonthPatterns = {
|
|
944
|
+
narrow: [
|
|
945
|
+
/^я/i,
|
|
946
|
+
/^ф/i,
|
|
947
|
+
/^м/i,
|
|
948
|
+
/^а/i,
|
|
949
|
+
/^м/i,
|
|
950
|
+
/^и/i,
|
|
951
|
+
/^и/i,
|
|
952
|
+
/^а/i,
|
|
953
|
+
/^с/i,
|
|
954
|
+
/^о/i,
|
|
955
|
+
/^н/i,
|
|
956
|
+
/^я/i,
|
|
957
|
+
],
|
|
958
|
+
|
|
959
|
+
any: [
|
|
960
|
+
/^я/i,
|
|
961
|
+
/^ф/i,
|
|
962
|
+
/^мар/i,
|
|
963
|
+
/^ап/i,
|
|
964
|
+
/^ма[йя]/i,
|
|
965
|
+
/^июн/i,
|
|
966
|
+
/^июл/i,
|
|
967
|
+
/^ав/i,
|
|
968
|
+
/^с/i,
|
|
969
|
+
/^о/i,
|
|
970
|
+
/^н/i,
|
|
971
|
+
/^д/i,
|
|
972
|
+
],
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
const matchDayPatterns = {
|
|
976
|
+
narrow: /^[впсч]/i,
|
|
977
|
+
short: /^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,
|
|
978
|
+
abbreviated: /^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,
|
|
979
|
+
wide: /^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i,
|
|
980
|
+
};
|
|
981
|
+
|
|
982
|
+
const parseDayPatterns = {
|
|
983
|
+
narrow: [/^в/i, /^п/i, /^в/i, /^с/i, /^ч/i, /^п/i, /^с/i],
|
|
984
|
+
any: [/^в[ос]/i, /^п[он]/i, /^в/i, /^ср/i, /^ч/i, /^п[ят]/i, /^с[уб]/i],
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
const matchDayPeriodPatterns = {
|
|
988
|
+
narrow: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
|
|
989
|
+
abbreviated: /^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,
|
|
990
|
+
wide: /^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i,
|
|
991
|
+
};
|
|
992
|
+
|
|
993
|
+
const parseDayPeriodPatterns = {
|
|
994
|
+
any: {
|
|
995
|
+
am: /^дп/i,
|
|
996
|
+
pm: /^пп/i,
|
|
997
|
+
midnight: /^полн/i,
|
|
998
|
+
noon: /^полд/i,
|
|
999
|
+
morning: /^у/i,
|
|
1000
|
+
afternoon: /^д[ен]/i,
|
|
1001
|
+
evening: /^в/i,
|
|
1002
|
+
night: /^н/i,
|
|
1003
|
+
},
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
const match = {
|
|
1007
|
+
ordinalNumber: buildMatchPatternFn({
|
|
1008
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
1009
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
1010
|
+
valueCallback: (value) => parseInt(value, 10),
|
|
1011
|
+
}),
|
|
1012
|
+
|
|
1013
|
+
era: buildMatchFn({
|
|
1014
|
+
matchPatterns: matchEraPatterns,
|
|
1015
|
+
defaultMatchWidth: "wide",
|
|
1016
|
+
parsePatterns: parseEraPatterns,
|
|
1017
|
+
defaultParseWidth: "any",
|
|
1018
|
+
}),
|
|
1019
|
+
|
|
1020
|
+
quarter: buildMatchFn({
|
|
1021
|
+
matchPatterns: matchQuarterPatterns,
|
|
1022
|
+
defaultMatchWidth: "wide",
|
|
1023
|
+
parsePatterns: parseQuarterPatterns,
|
|
1024
|
+
defaultParseWidth: "any",
|
|
1025
|
+
valueCallback: (index) => index + 1,
|
|
1026
|
+
}),
|
|
1027
|
+
|
|
1028
|
+
month: buildMatchFn({
|
|
1029
|
+
matchPatterns: matchMonthPatterns,
|
|
1030
|
+
defaultMatchWidth: "wide",
|
|
1031
|
+
parsePatterns: parseMonthPatterns,
|
|
1032
|
+
defaultParseWidth: "any",
|
|
1033
|
+
}),
|
|
1034
|
+
|
|
1035
|
+
day: buildMatchFn({
|
|
1036
|
+
matchPatterns: matchDayPatterns,
|
|
1037
|
+
defaultMatchWidth: "wide",
|
|
1038
|
+
parsePatterns: parseDayPatterns,
|
|
1039
|
+
defaultParseWidth: "any",
|
|
1040
|
+
}),
|
|
1041
|
+
|
|
1042
|
+
dayPeriod: buildMatchFn({
|
|
1043
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
1044
|
+
defaultMatchWidth: "wide",
|
|
1045
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
1046
|
+
defaultParseWidth: "any",
|
|
1047
|
+
}),
|
|
1048
|
+
};
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* @category Locales
|
|
1052
|
+
* @summary Russian locale.
|
|
1053
|
+
* @language Russian
|
|
1054
|
+
* @iso-639-2 rus
|
|
1055
|
+
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
|
|
1056
|
+
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
|
|
1057
|
+
*/
|
|
1058
|
+
const ru = {
|
|
1059
|
+
code: "ru",
|
|
1060
|
+
formatDistance: formatDistance,
|
|
1061
|
+
formatLong: formatLong,
|
|
1062
|
+
formatRelative: formatRelative,
|
|
1063
|
+
localize: localize,
|
|
1064
|
+
match: match,
|
|
1065
|
+
options: {
|
|
1066
|
+
weekStartsOn: 1 /* Monday */,
|
|
1067
|
+
firstWeekContainsDate: 1,
|
|
1068
|
+
},
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
function DatePickerInput(props) {
|
|
1072
|
+
var className = props.className, value = props.value, inputProps = props.inputProps, datePickerProps = props.datePickerProps, onChange = props.onChange, endValue = props.endValue, labelTextSize = props.labelTextSize, clearLabelTextColorHover = props.clearLabelTextColorHover, clearIcon = props.clearIcon, clearIconFill = props.clearIconFill, clearIconFillHover = props.clearIconFillHover, clearIconItemFillHover = props.clearIconItemFillHover, clearIconFillSize = props.clearIconFillSize, clearIconItemFill = props.clearIconItemFill, clearIconShape = props.clearIconShape, clearIconSize = props.clearIconSize, clearIconSrc = props.clearIconSrc, clearLabel = props.clearLabel, clearLabelTextColor = props.clearLabelTextColor, clearLabelTextSize = props.clearLabelTextSize;
|
|
1073
|
+
var widthClass = useDeviceTargetClass(props, {
|
|
1074
|
+
prefix: 'width_',
|
|
1075
|
+
propsKey: 'width',
|
|
1076
|
+
});
|
|
1077
|
+
var datepickerRef = useRef(null);
|
|
1078
|
+
var start = useMemo(function () {
|
|
1079
|
+
if (value) {
|
|
1080
|
+
if (typeof value === 'string') {
|
|
1081
|
+
return new Date(value);
|
|
1082
|
+
}
|
|
1083
|
+
return value;
|
|
1084
|
+
}
|
|
1085
|
+
if (datePickerProps.isStartDefaultNull) {
|
|
1086
|
+
return undefined;
|
|
1087
|
+
}
|
|
1088
|
+
return new Date();
|
|
1089
|
+
}, [value, datePickerProps.isStartDefaultNull]);
|
|
1090
|
+
var end = useMemo(function () {
|
|
1091
|
+
if (!endValue) {
|
|
1092
|
+
return undefined;
|
|
1093
|
+
}
|
|
1094
|
+
if (typeof endValue === 'string') {
|
|
1095
|
+
return new Date(endValue);
|
|
1096
|
+
}
|
|
1097
|
+
return endValue;
|
|
1098
|
+
}, [endValue]);
|
|
1099
|
+
var _a = useState(start), startDate = _a[0], setStartDate = _a[1];
|
|
1100
|
+
var _b = useState(end), endDate = _b[0], setEndDate = _b[1];
|
|
1101
|
+
var handleChange = useCallback(function (_a) {
|
|
1102
|
+
var newStartDate = _a[0], newEndDate = _a[1];
|
|
1103
|
+
onChange && onChange(newStartDate, newEndDate);
|
|
1104
|
+
setStartDate(newStartDate);
|
|
1105
|
+
setEndDate(newEndDate);
|
|
1106
|
+
}, [onChange]);
|
|
1107
|
+
var renderDayContents = useCallback(function (day, date) {
|
|
1108
|
+
return (jsx(Button, { className: "react-datepicker__day-button", label: date.getDate().toString(), labelTextColor: datePickerProps.dayTextColor, labelTextSize: datePickerProps.dayTextSize, shape: datePickerProps.dayTextShape, size: datePickerProps.daySize }));
|
|
1109
|
+
}, [
|
|
1110
|
+
datePickerProps.daySize,
|
|
1111
|
+
datePickerProps.dayTextColor,
|
|
1112
|
+
datePickerProps.dayTextShape,
|
|
1113
|
+
datePickerProps.dayTextSize,
|
|
1114
|
+
]);
|
|
1115
|
+
var renderCustomHeader = useCallback(function (_a) {
|
|
1116
|
+
var monthDate = _a.monthDate, decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth;
|
|
1117
|
+
return (jsxs("div", { className: "react-datepicker__header--div", children: [datePickerProps.iconLeft && (jsx(Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, size: datePickerProps.iconSize, SvgImage: datePickerProps.iconLeft, onClick: decreaseMonth })), jsxs("div", { className: "react-datepicker__data", children: [jsx(Text, { className: "react-datepicker__month", size: datePickerProps.monthTextSize, textColor: datePickerProps.monthTextColor, textWeight: datePickerProps.monthTextWeight, children: monthDate.toLocaleString('ru-RU', { month: 'long' }) }), jsx(Text, { className: "react-datepicker__year", size: datePickerProps.yearTextSize, textColor: datePickerProps.yearTextColor, textWeight: datePickerProps.yearTextWeight, children: monthDate.toLocaleString('ru-RU', { year: 'numeric' }) })] }), datePickerProps.iconRight && (jsx(Icon, { className: "react-datepicker__icon", fill: datePickerProps.iconFill, fillHover: datePickerProps.iconFillHover, fillSize: datePickerProps.iconFillSize, iconFill: datePickerProps.iconItemFill, shape: datePickerProps.iconShape, size: datePickerProps.iconSize, SvgImage: datePickerProps.iconRight, onClick: increaseMonth }))] }));
|
|
1118
|
+
}, [
|
|
1119
|
+
datePickerProps.iconFill,
|
|
1120
|
+
datePickerProps.iconFillHover,
|
|
1121
|
+
datePickerProps.iconFillSize,
|
|
1122
|
+
datePickerProps.iconItemFill,
|
|
1123
|
+
datePickerProps.iconLeft,
|
|
1124
|
+
datePickerProps.iconRight,
|
|
1125
|
+
datePickerProps.iconShape,
|
|
1126
|
+
datePickerProps.iconSize,
|
|
1127
|
+
datePickerProps.monthTextColor,
|
|
1128
|
+
datePickerProps.monthTextSize,
|
|
1129
|
+
datePickerProps.monthTextWeight,
|
|
1130
|
+
datePickerProps.yearTextColor,
|
|
1131
|
+
datePickerProps.yearTextSize,
|
|
1132
|
+
datePickerProps.yearTextWeight,
|
|
1133
|
+
]);
|
|
1134
|
+
useEffect(function () {
|
|
1135
|
+
setStartDate(start);
|
|
1136
|
+
}, [start]);
|
|
1137
|
+
useEffect(function () {
|
|
1138
|
+
setEndDate(end);
|
|
1139
|
+
}, [end]);
|
|
1140
|
+
return (jsx("div", { className: clsx(className, 'datepicker', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.monthsShown) && 'datepicker_type_multiple-months', (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.customTimeInput) && 'datepicker_type_button', widthClass), children: jsx(DatePicker, __assign({ ref: datepickerRef, endDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? endDate : undefined, locale: ru, minDate: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.disablePastDays) ? new Date() : undefined, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: startDate, startDate: startDate, customInput: jsx(DatePickerCustomInput, { labelTextSize: labelTextSize, clearIcon: clearIcon, clearIconFill: clearIconFill, clearIconFillHover: clearIconFillHover, clearIconFillSize: clearIconFillSize, clearIconItemFill: clearIconItemFill, clearIconItemFillHover: clearIconItemFillHover, clearIconShape: clearIconShape, clearIconSize: clearIconSize, clearIconSrc: clearIconSrc, clearLabel: clearLabel, clearLabelTextColor: clearLabelTextColor, clearLabelTextColorHover: clearLabelTextColorHover, clearLabelTextSize: clearLabelTextSize, datepickerRef: datepickerRef, inputIcon: datePickerProps.inputIcon, inputIconFill: datePickerProps.inputIconFill, inputIconFillHover: datePickerProps.inputIconFillHover, inputIconFillSize: datePickerProps.inputIconFillSize, inputIconItemFill: datePickerProps.inputIconItemFill, inputIconShape: datePickerProps.inputIconShape, inputIconSize: datePickerProps.inputIconSize, inputIconSrc: datePickerProps.inputIconSrc, inputProps: inputProps, isClearable: datePickerProps.isClearable }), onChange: (datePickerProps === null || datePickerProps === void 0 ? void 0 : datePickerProps.selectsRange) ? handleChange : onChange }, datePickerProps, {
|
|
1141
|
+
// Important for use custom clear button
|
|
1142
|
+
isClearable: false })) }));
|
|
1143
|
+
}
|
|
1144
|
+
var DatePickerCustomInput = React.forwardRef(function (props, ref) {
|
|
1145
|
+
var isClearable = props.isClearable, value = props.value, inputProps = props.inputProps, inputIcon = props.inputIcon;
|
|
1146
|
+
var multipleValue = useMemo(function () {
|
|
1147
|
+
if (value) {
|
|
1148
|
+
var twoDates = value.split(' - ');
|
|
1149
|
+
return twoDates[0] === twoDates[1] ? twoDates[0] : value;
|
|
1150
|
+
}
|
|
1151
|
+
return '';
|
|
1152
|
+
}, [value]);
|
|
1153
|
+
return (jsxs(React.Fragment, { children: [jsx(Input, __assign({}, props, inputProps, { ref: ref, value: multipleValue })), inputIcon && jsx(DatePickerInputIcon, __assign({}, props)), isClearable && jsx(DatePickerClearButton, __assign({}, props))] }));
|
|
1154
|
+
});
|
|
1155
|
+
DatePickerCustomInput.displayName = 'DatePickerCustomInput';
|
|
1156
|
+
function DatePickerClearButton(props) {
|
|
1157
|
+
var datepickerRef = props.datepickerRef, clearLabel = props.clearLabel, clearLabelTextSize = props.clearLabelTextSize, clearLabelTextColor = props.clearLabelTextColor, clearIconFill = props.clearIconFill, clearIconFillHover = props.clearIconFillHover, clearLabelTextColorHover = props.clearLabelTextColorHover, clearIconItemFillHover = props.clearIconItemFillHover, clearIconFillSize = props.clearIconFillSize, clearIconItemFill = props.clearIconItemFill, clearIconShape = props.clearIconShape, clearIconSize = props.clearIconSize, clearIcon = props.clearIcon, clearIconSrc = props.clearIconSrc;
|
|
1158
|
+
var onClick = useCallback(function (event) {
|
|
1159
|
+
var _a, _b;
|
|
1160
|
+
(_a = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _a === void 0 ? void 0 : _a.onClearClick(event);
|
|
1161
|
+
(_b = datepickerRef === null || datepickerRef === void 0 ? void 0 : datepickerRef.current) === null || _b === void 0 ? void 0 : _b.handleFocus(event);
|
|
1162
|
+
}, []);
|
|
1163
|
+
return (jsxs(React.Fragment, { children: [clearLabel && (jsx(Label, { className: clsx('react-datepicker__clear-label', 'cursor_type_pointer'), label: clearLabel, labelTextColor: clearLabelTextColor, labelTextColorHover: clearLabelTextColorHover, labelTextSize: clearLabelTextSize, onClick: onClick })), (clearIcon || clearIconSrc) && (jsx(Icon, { className: clsx('react-datepicker__clear-icon', 'cursor_type_pointer'), fill: clearIconFill, fillHover: clearIconFillHover, fillSize: clearIconFillSize, iconFill: clearIconItemFill, iconFillHover: clearIconItemFillHover, imageSrc: clearIconSrc, shape: clearIconShape, size: clearIconSize, SvgImage: clearIcon, onClick: onClick }))] }));
|
|
1164
|
+
}
|
|
1165
|
+
DatePickerClearButton.displayName = 'DatePickerClearButton';
|
|
1166
|
+
function DatePickerInputIcon(props) {
|
|
1167
|
+
var inputIconFill = props.inputIconFill, inputIconFillHover = props.inputIconFillHover, inputIconFillSize = props.inputIconFillSize, inputIconShape = props.inputIconShape, inputIconSize = props.inputIconSize, inputIcon = props.inputIcon, inputIconSrc = props.inputIconSrc, inputIconItemFill = props.inputIconItemFill, onClick = props.onClick;
|
|
1168
|
+
return (jsx(Icon, { className: clsx('react-datepicker__input-icon', 'cursor_type_pointer'), fill: inputIconFill, fillHover: inputIconFillHover, fillSize: inputIconFillSize, iconFill: inputIconItemFill, imageSrc: inputIconSrc, shape: inputIconShape, size: inputIconSize, onClick: function () { return onClick && onClick(); }, SvgImage: inputIcon }));
|
|
1169
|
+
}
|
|
1170
|
+
DatePickerInputIcon.displayName = 'DatePickerInputIcon';
|
|
1171
|
+
|
|
1172
|
+
export { DatePickerInput };
|