@itcase/ui 1.1.6 → 1.1.8
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/Accordion-CqPVnTKh.js +173 -0
- package/dist/Avatar-diLCwtnd.js +49 -0
- package/dist/Breadcrumbs-B79kOtMG.js +619 -0
- package/dist/Button-B7vbiqrJ.js +100 -0
- package/dist/ContextMenuItem-BPqsjmSA.js +204 -0
- package/dist/Divider-BlBwMHgl.js +45 -0
- package/dist/Dot-C3R1y59u.js +34 -0
- package/dist/DropdownItem-Dgf0LRhx.js +644 -0
- package/dist/FlexItem-DzNgFIa0.js +118 -0
- package/dist/GridRow-Cc-rz56R.js +158 -0
- package/dist/Group-fbVPmr8W.js +111 -0
- package/dist/Icon-Dn2eEZvb.js +128 -0
- package/dist/Link-ByBzBRDH.js +132 -0
- package/dist/ListItem-Cf8r3w8t.js +479 -0
- package/dist/ModalLoader-DJVKhIZR.js +374 -0
- package/dist/NotificationList-CJyEnxWw.js +38 -0
- package/dist/SearchResult-erxB06IL.js +530 -0
- package/dist/SelectField-CpQMWXaC.js +571 -0
- package/dist/SiteMenuButton-BFmti8pF.js +181 -0
- package/dist/TabGroup-CjmtgOMw.js +1071 -0
- package/dist/Text-BcGbRc14.js +75 -0
- package/dist/cjs/Accordion-DcZ9P5kP.js +182 -0
- package/dist/cjs/Avatar-DQ5fNpnO.js +55 -0
- package/dist/cjs/Breadcrumbs-HubY1qZQ.js +629 -0
- package/dist/cjs/Button-3GkRq8Pv.js +108 -0
- package/dist/cjs/ContextMenuItem-DmbSoGn1.js +213 -0
- package/dist/cjs/Divider-CIYsHYud.js +51 -0
- package/dist/cjs/Dot-vDSigHDs.js +40 -0
- package/dist/cjs/DropdownItem-Bl-Ghc_6.js +653 -0
- package/dist/cjs/FlexItem-BnORv6q3.js +125 -0
- package/dist/cjs/GridRow-mzs0CkNG.js +166 -0
- package/dist/cjs/Group-4zWTDvKx.js +118 -0
- package/dist/cjs/Icon-UBahY607.js +137 -0
- package/dist/cjs/Link-BoShjCEw.js +142 -0
- package/dist/cjs/ListItem-MrHApmF3.js +488 -0
- package/dist/cjs/ModalLoader-4mmV5G4E.js +384 -0
- package/dist/cjs/NotificationList-DnI8DqyE.js +46 -0
- package/dist/cjs/SearchResult-bTwR5A-g.js +540 -0
- package/dist/cjs/SelectField-BJTu7BXO.js +583 -0
- package/dist/cjs/SiteMenuButton-BGi0gR1z.js +190 -0
- package/dist/cjs/TabGroup-DIWmGIp2.js +1081 -0
- package/dist/cjs/Text-D7Aq1i5R.js +82 -0
- package/dist/cjs/components/Accordion/Accordion.d.ts +8 -0
- package/dist/cjs/components/Accordion/Accordion.interface.d.ts +68 -0
- package/dist/cjs/components/Accordion/AccordionItem.d.ts +8 -0
- package/dist/cjs/components/Accordion/index.d.ts +3 -0
- package/dist/cjs/components/Accordion.js +40 -0
- package/dist/cjs/components/Avatar/Avatar.d.ts +13 -0
- package/dist/cjs/components/Avatar/Avatar.interface.d.ts +44 -0
- package/dist/cjs/components/Avatar/index.d.ts +1 -0
- package/dist/cjs/components/Avatar.js +43 -0
- package/dist/cjs/components/Badge.js +206 -0
- package/dist/cjs/components/Breadcrumbs.js +43 -0
- package/dist/cjs/components/Button/Button.d.ts +5 -0
- package/dist/cjs/components/Button/Button.interface.d.ts +78 -0
- package/dist/cjs/components/Button/index.d.ts +1 -0
- package/dist/cjs/components/Button.js +41 -0
- package/dist/cjs/components/Caption.js +197 -0
- package/dist/cjs/components/Card.js +279 -0
- package/dist/cjs/components/Cell.js +422 -0
- package/dist/cjs/components/Checkbox.js +166 -0
- package/dist/cjs/components/Chips.js +393 -0
- package/dist/cjs/components/Choice.js +346 -0
- package/dist/cjs/components/Code.js +437 -0
- package/dist/cjs/components/ContextMenu.js +41 -0
- package/dist/cjs/components/CookiesWarning.js +180 -0
- package/dist/cjs/components/DadataHintField.js +1193 -0
- package/dist/cjs/components/DatePicker.js +14097 -0
- package/dist/cjs/components/Divider/Divider.d.ts +3 -0
- package/dist/cjs/components/Divider/Divider.interface.d.ts +28 -0
- package/dist/cjs/components/Divider/index.d.ts +1 -0
- package/dist/cjs/components/Divider.js +21 -0
- package/dist/cjs/components/Dot/Dot.d.ts +6 -0
- package/dist/cjs/components/Dot/Dot.interface.d.ts +26 -0
- package/dist/cjs/components/Dot/index.d.ts +1 -0
- package/dist/cjs/components/Dot.js +21 -0
- package/dist/cjs/components/Drawer.js +284 -0
- package/dist/cjs/components/Dropdown.js +30 -0
- package/dist/cjs/components/Flex/Flex.d.ts +8 -0
- package/dist/cjs/components/Flex/Flex.interface.d.ts +118 -0
- package/dist/cjs/components/Flex/FlexItem.d.ts +8 -0
- package/dist/cjs/components/Flex/index.d.ts +3 -0
- package/dist/cjs/components/Flex.js +22 -0
- package/dist/cjs/components/FormField.js +53 -0
- package/dist/cjs/components/Grid/Grid.d.ts +8 -0
- package/dist/cjs/components/Grid/Grid.interface.d.ts +147 -0
- package/dist/cjs/components/Grid/GridItem.d.ts +3 -0
- package/dist/cjs/components/Grid/GridRow.d.ts +8 -0
- package/dist/cjs/components/Grid/index.d.ts +4 -0
- package/dist/cjs/components/Grid.js +23 -0
- package/dist/cjs/components/Group/Group.d.ts +9 -0
- package/dist/cjs/components/Group/Group.interface.d.ts +51 -0
- package/dist/cjs/components/Group/index.d.ts +1 -0
- package/dist/cjs/components/Group.js +22 -0
- package/dist/cjs/components/Icon/Icon.d.ts +5 -0
- package/dist/cjs/components/Icon/Icon.interface.d.ts +100 -0
- package/dist/cjs/components/Icon/index.d.ts +1 -0
- package/dist/cjs/components/Icon.js +39 -0
- package/dist/cjs/components/Image.js +480 -0
- package/dist/cjs/components/Input.js +233 -0
- package/dist/cjs/components/InputMask.js +233 -0
- package/dist/cjs/components/InputPassword.js +255 -0
- package/dist/cjs/components/Label.js +643 -0
- package/dist/cjs/components/LanguageSelector.js +125 -0
- package/dist/cjs/components/Link/Link.d.ts +11 -0
- package/dist/cjs/components/Link/Link.interface.d.ts +57 -0
- package/dist/cjs/components/Link/index.d.ts +1 -0
- package/dist/cjs/components/Link.js +23 -0
- package/dist/cjs/components/List.js +30 -0
- package/dist/cjs/components/Loader.js +156 -0
- package/dist/cjs/components/Logo.js +175 -0
- package/dist/cjs/components/Menu.js +196 -0
- package/dist/cjs/components/MenuItem.js +680 -0
- package/dist/cjs/components/Modal.js +28 -0
- package/dist/cjs/components/Notification/Notification.interface.d.ts +49 -0
- package/dist/cjs/components/Notification/NotificationItem.d.ts +10 -0
- package/dist/cjs/components/Notification/NotificationList.d.ts +3 -0
- package/dist/cjs/components/Notification/index.d.ts +3 -0
- package/dist/cjs/components/Notification.js +36 -0
- package/dist/cjs/components/Overlay.js +197 -0
- package/dist/cjs/components/Page.js +422 -0
- package/dist/cjs/components/Pagination.js +371 -0
- package/dist/cjs/components/Radio.js +267 -0
- package/dist/{components/Background.js → cjs/components/RangeSlider.js} +105 -74
- package/dist/cjs/components/Response.js +245 -0
- package/dist/cjs/components/ScrollOnDrag.js +214 -0
- package/dist/cjs/components/Scrollbar.js +71 -0
- package/dist/cjs/components/Search.js +43 -0
- package/dist/cjs/components/Segmented.js +235 -0
- package/dist/cjs/components/Select.js +8531 -0
- package/dist/cjs/components/SiteMenu.js +40 -0
- package/dist/cjs/components/Swiper.js +5655 -0
- package/dist/cjs/components/Switch.js +105 -0
- package/dist/cjs/components/Tab.js +42 -0
- package/dist/cjs/components/Text/Text.d.ts +9 -0
- package/dist/cjs/components/Text/Text.interface.d.ts +53 -0
- package/dist/cjs/components/Text/index.d.ts +1 -0
- package/dist/cjs/components/Text.js +22 -0
- package/dist/cjs/components/Textarea.js +212 -0
- package/dist/cjs/components/Tile.js +568 -0
- package/dist/cjs/components/Title.js +400 -0
- package/dist/cjs/components/Tooltip.js +451 -0
- package/dist/cjs/components/Video.js +175 -0
- package/dist/cjs/components/Wrapper.js +438 -0
- package/dist/cjs/components/index.d.ts +58 -0
- package/dist/cjs/components.js +234 -0
- package/dist/cjs/constants/componentProps/align.js +7 -0
- package/dist/cjs/constants/componentProps/alignDirection.js +7 -0
- package/dist/cjs/constants/componentProps/alignment.js +7 -0
- package/dist/cjs/constants/componentProps/borderColor.js +7 -0
- package/dist/cjs/constants/componentProps/borderColorHover.js +7 -0
- package/dist/cjs/constants/componentProps/borderType.js +7 -0
- package/dist/cjs/constants/componentProps/borderWidth.js +9 -0
- package/dist/cjs/constants/componentProps/captionPosition.js +7 -0
- package/dist/cjs/constants/componentProps/direction.js +7 -0
- package/dist/cjs/constants/componentProps/emojiSize.js +9 -0
- package/dist/cjs/constants/componentProps/fill.js +7 -0
- package/dist/cjs/constants/componentProps/fillGradient.js +7 -0
- package/dist/cjs/constants/componentProps/fillHover.js +7 -0
- package/dist/cjs/constants/componentProps/fillType.js +7 -0
- package/dist/cjs/constants/componentProps/flexAlign.js +7 -0
- package/dist/cjs/constants/componentProps/flexJustifyContent.js +7 -0
- package/dist/cjs/constants/componentProps/flexWrap.js +7 -0
- package/dist/cjs/constants/componentProps/gridAlign.js +7 -0
- package/dist/cjs/constants/componentProps/gridAlignSelf.js +7 -0
- package/dist/cjs/constants/componentProps/gridJustifyItems.js +7 -0
- package/dist/cjs/constants/componentProps/gridJustifySelf.js +7 -0
- package/dist/cjs/constants/componentProps/height.js +7 -0
- package/dist/cjs/constants/componentProps/horizontalContentAlign.js +7 -0
- package/dist/cjs/constants/componentProps/horizontalResizeMode.js +7 -0
- package/dist/cjs/constants/componentProps/iconFillSize.js +9 -0
- package/dist/cjs/constants/componentProps/iconSize.js +9 -0
- package/dist/cjs/constants/componentProps/itemColor.js +7 -0
- package/dist/cjs/constants/componentProps/position.js +7 -0
- package/dist/cjs/constants/componentProps/resizeMode.js +7 -0
- package/dist/cjs/constants/componentProps/shape.js +7 -0
- package/dist/cjs/constants/componentProps/size.js +7 -0
- package/dist/cjs/constants/componentProps/sizeInterface.js +7 -0
- package/dist/cjs/constants/componentProps/sizePX.js +9 -0
- package/dist/cjs/constants/componentProps/stacking.js +7 -0
- package/dist/cjs/constants/componentProps/state.js +7 -0
- package/dist/cjs/constants/componentProps/strokeColor.js +7 -0
- package/dist/cjs/constants/componentProps/textAlign.js +7 -0
- package/dist/cjs/constants/componentProps/textColor.js +7 -0
- package/dist/cjs/constants/componentProps/textColorActive.js +7 -0
- package/dist/cjs/constants/componentProps/textColorHover.js +7 -0
- package/dist/cjs/constants/componentProps/textGradient.js +7 -0
- package/dist/cjs/constants/componentProps/textSize.js +7 -0
- package/dist/cjs/constants/componentProps/textStyle.js +7 -0
- package/dist/cjs/constants/componentProps/textTag.js +7 -0
- package/dist/cjs/constants/componentProps/textWeight.js +9 -0
- package/dist/cjs/constants/componentProps/textWrap.js +7 -0
- package/dist/cjs/constants/componentProps/titleSize.js +7 -0
- package/dist/cjs/constants/componentProps/type.js +7 -0
- package/dist/cjs/constants/componentProps/underline.js +7 -0
- package/dist/cjs/constants/componentProps/verticalContentAlign.js +7 -0
- package/dist/cjs/constants/componentProps/verticalResizeMode.js +7 -0
- package/dist/cjs/constants/componentProps/width.js +7 -0
- package/dist/cjs/constants/componentProps/wrap.js +7 -0
- package/dist/cjs/constants.js +111 -0
- package/dist/cjs/context/Notifications.js +123 -0
- package/dist/cjs/context/UIContext.js +57 -0
- package/dist/cjs/context/index.d.ts +2 -0
- package/dist/cjs/hooks/index.d.ts +3 -0
- package/dist/cjs/hooks/styleAttributes.interface.d.ts +143 -0
- package/dist/cjs/hooks/styleAttributes.js +39 -0
- package/dist/cjs/hooks/useDeviceTargetClass.js +61 -0
- package/dist/cjs/hooks/useMediaQueries.js +139 -0
- package/dist/cjs/hooks/useStyles.js +135 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/jsx-runtime-BCmQOGxJ.js +1363 -0
- package/dist/cjs/types/componentProps/align.d.ts +1 -0
- package/dist/cjs/types/componentProps/alignDirection.d.ts +1 -0
- package/dist/cjs/types/componentProps/alignment.d.ts +1 -0
- package/dist/cjs/types/componentProps/appearanceKeys.d.ts +1 -0
- package/dist/cjs/types/componentProps/borderColor.d.ts +1 -0
- package/dist/cjs/types/componentProps/borderColorHover.d.ts +1 -0
- package/dist/cjs/types/componentProps/borderType.d.ts +1 -0
- package/dist/cjs/types/componentProps/borderWidth.d.ts +1 -0
- package/dist/cjs/types/componentProps/captionPosition.d.ts +1 -0
- package/dist/cjs/types/componentProps/direction.d.ts +1 -0
- package/dist/cjs/types/componentProps/elevation.d.ts +1 -0
- package/dist/cjs/types/componentProps/emojiSize.d.ts +1 -0
- package/dist/cjs/types/componentProps/fill.d.ts +1 -0
- package/dist/cjs/types/componentProps/fillGradient.d.ts +1 -0
- package/dist/cjs/types/componentProps/fillHover.d.ts +1 -0
- package/dist/cjs/types/componentProps/fillType.d.ts +1 -0
- package/dist/cjs/types/componentProps/flexAlign.d.ts +1 -0
- package/dist/cjs/types/componentProps/flexGrow.d.ts +1 -0
- package/dist/cjs/types/componentProps/flexJustifyContent.d.ts +1 -0
- package/dist/cjs/types/componentProps/flexWrap.d.ts +1 -0
- package/dist/cjs/types/componentProps/gridAlign.d.ts +1 -0
- package/dist/cjs/types/componentProps/gridAlignSelf.d.ts +1 -0
- package/dist/cjs/types/componentProps/gridJustifyItems.d.ts +1 -0
- package/dist/cjs/types/componentProps/gridJustifySelf.d.ts +1 -0
- package/dist/cjs/types/componentProps/height.d.ts +1 -0
- package/dist/cjs/types/componentProps/horizontalContentAlign.d.ts +1 -0
- package/dist/cjs/types/componentProps/horizontalResizeMode.d.ts +1 -0
- package/dist/cjs/types/componentProps/iconFillSize.d.ts +1 -0
- package/dist/cjs/types/componentProps/iconSize.d.ts +1 -0
- package/dist/cjs/types/componentProps/itemColor.d.ts +1 -0
- package/dist/cjs/types/componentProps/justifyContent.d.ts +1 -0
- package/dist/cjs/types/componentProps/position.d.ts +1 -0
- package/dist/cjs/types/componentProps/resizeMode.d.ts +1 -0
- package/dist/cjs/types/componentProps/shape.d.ts +1 -0
- package/dist/cjs/types/componentProps/size.d.ts +1 -0
- package/dist/cjs/types/componentProps/sizeInterface.d.ts +1 -0
- package/dist/cjs/types/componentProps/sizePX.d.ts +1 -0
- package/dist/cjs/types/componentProps/stacking.d.ts +1 -0
- package/dist/cjs/types/componentProps/state.d.ts +1 -0
- package/dist/cjs/types/componentProps/strokeColor.d.ts +1 -0
- package/dist/cjs/types/componentProps/textAlign.d.ts +1 -0
- package/dist/cjs/types/componentProps/textColor.d.ts +1 -0
- package/dist/cjs/types/componentProps/textColorActive.d.ts +1 -0
- package/dist/cjs/types/componentProps/textColorHover.d.ts +1 -0
- package/dist/cjs/types/componentProps/textGradient.d.ts +1 -0
- package/dist/cjs/types/componentProps/textSize.d.ts +1 -0
- package/dist/cjs/types/componentProps/textStyle.d.ts +1 -0
- package/dist/cjs/types/componentProps/textTag.d.ts +1 -0
- package/dist/cjs/types/componentProps/textWeight.d.ts +1 -0
- package/dist/cjs/types/componentProps/textWrap.d.ts +1 -0
- package/dist/cjs/types/componentProps/titleSize.d.ts +1 -0
- package/dist/cjs/types/componentProps/type.d.ts +1 -0
- package/dist/cjs/types/componentProps/underline.d.ts +1 -0
- package/dist/cjs/types/componentProps/verticalContentAlign.d.ts +1 -0
- package/dist/cjs/types/componentProps/verticalResizeMode.d.ts +1 -0
- package/dist/cjs/types/componentProps/width.d.ts +1 -0
- package/dist/cjs/types/componentProps/wrap.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +56 -0
- package/dist/components/Accordion/Accordion.d.ts +8 -0
- package/dist/components/Accordion/Accordion.interface.d.ts +68 -0
- package/dist/components/Accordion/AccordionItem.d.ts +8 -0
- package/dist/components/Accordion/index.d.ts +3 -0
- package/dist/components/Accordion.js +33 -697
- package/dist/components/Avatar/Avatar.d.ts +13 -0
- package/dist/components/Avatar/Avatar.interface.d.ts +44 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar.js +37 -257
- package/dist/components/Badge.js +41 -56
- package/dist/components/Breadcrumbs.js +36 -656
- package/dist/components/Button/Button.d.ts +5 -0
- package/dist/components/Button/Button.interface.d.ts +78 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button.js +34 -546
- package/dist/components/Caption.js +37 -45
- package/dist/components/Card.js +47 -60
- package/dist/components/Cell.js +83 -96
- package/dist/components/Checkbox.js +41 -56
- package/dist/components/Chips.js +65 -79
- package/dist/components/Choice.js +76 -91
- package/dist/components/Code.js +40 -48
- package/dist/components/ContextMenu.js +34 -246
- package/dist/components/CookiesWarning.js +55 -73
- package/dist/components/DadataHintField.js +55 -64
- package/dist/components/DatePicker.js +296 -327
- package/dist/components/Divider/Divider.d.ts +3 -0
- package/dist/components/Divider/Divider.interface.d.ts +28 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Divider.js +15 -257
- package/dist/components/Dot/Dot.d.ts +6 -0
- package/dist/components/Dot/Dot.interface.d.ts +26 -0
- package/dist/components/Dot/index.d.ts +1 -0
- package/dist/components/Dot.js +15 -226
- package/dist/components/Drawer.js +39 -37
- package/dist/components/Dropdown.js +23 -657
- package/dist/components/Flex/Flex.d.ts +8 -0
- package/dist/components/Flex/Flex.interface.d.ts +118 -0
- package/dist/components/Flex/FlexItem.d.ts +8 -0
- package/dist/components/Flex/index.d.ts +3 -0
- package/dist/components/Flex.js +15 -1186
- package/dist/components/FormField.js +43 -617
- package/dist/components/Grid/Grid.d.ts +8 -0
- package/dist/components/Grid/Grid.interface.d.ts +147 -0
- package/dist/components/Grid/GridItem.d.ts +3 -0
- package/dist/components/Grid/GridRow.d.ts +8 -0
- package/dist/components/Grid/index.d.ts +4 -0
- package/dist/components/Grid.js +15 -1709
- package/dist/components/Group/Group.d.ts +9 -0
- package/dist/components/Group/Group.interface.d.ts +51 -0
- package/dist/components/Group/index.d.ts +1 -0
- package/dist/components/Group.js +15 -315
- package/dist/components/Icon/Icon.d.ts +5 -0
- package/dist/components/Icon/Icon.interface.d.ts +100 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon.js +32 -642
- package/dist/components/Image.js +79 -87
- package/dist/components/Input.js +40 -49
- package/dist/components/InputMask.js +39 -48
- package/dist/components/InputPassword.js +61 -76
- package/dist/components/Label.js +105 -115
- package/dist/components/LanguageSelector.js +48 -62
- package/dist/components/Link/Link.d.ts +11 -0
- package/dist/components/Link/Link.interface.d.ts +57 -0
- package/dist/components/Link/index.d.ts +1 -0
- package/dist/components/Link.js +15 -505
- package/dist/components/List.js +23 -498
- package/dist/components/Loader.js +41 -56
- package/dist/components/Logo.js +40 -55
- package/dist/components/Menu.js +55 -58
- package/dist/components/MenuItem.js +102 -110
- package/dist/components/Modal.js +21 -402
- package/dist/components/Notification/Notification.interface.d.ts +49 -0
- package/dist/components/Notification/NotificationItem.d.ts +10 -0
- package/dist/components/Notification/NotificationList.d.ts +3 -0
- package/dist/components/Notification/index.d.ts +3 -0
- package/dist/components/Notification.js +28 -281
- package/dist/components/Overlay.js +37 -45
- package/dist/components/Page.js +66 -74
- package/dist/components/Pagination.js +225 -57
- package/dist/components/Radio.js +55 -70
- package/dist/components/RangeSlider.js +53 -62
- package/dist/components/Response.js +104 -120
- package/dist/components/ScrollOnDrag.js +71 -172
- package/dist/components/Scrollbar.js +15 -18
- package/dist/components/Search.js +35 -571
- package/dist/components/Segmented.js +54 -69
- package/dist/components/Select.js +274 -324
- package/dist/components/SiteMenu.js +33 -221
- package/dist/components/Swiper.js +140 -148
- package/dist/components/Switch.js +17 -25
- package/dist/components/Tab.js +34 -1089
- package/dist/components/Text/Text.d.ts +9 -0
- package/dist/components/Text/Text.interface.d.ts +53 -0
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/Text.js +15 -362
- package/dist/components/Textarea.js +37 -46
- package/dist/components/Tile.js +100 -112
- package/dist/components/Title.js +66 -75
- package/dist/components/Tooltip.js +83 -93
- package/dist/components/Video.js +32 -40
- package/dist/components/Wrapper.js +67 -75
- package/dist/components/index.d.ts +58 -0
- package/dist/components.js +117 -0
- package/dist/constants/componentProps/align.js +1 -3
- package/dist/constants/componentProps/alignDirection.js +1 -3
- package/dist/constants/componentProps/alignment.js +1 -3
- package/dist/constants/componentProps/borderColor.js +1 -3
- package/dist/constants/componentProps/borderColorHover.js +1 -3
- package/dist/constants/componentProps/borderType.js +1 -3
- package/dist/constants/componentProps/borderWidth.js +1 -3
- package/dist/constants/componentProps/captionPosition.js +1 -3
- package/dist/constants/componentProps/direction.js +1 -3
- package/dist/constants/componentProps/emojiSize.js +1 -3
- package/dist/constants/componentProps/fill.js +1 -3
- package/dist/constants/componentProps/fillGradient.js +1 -3
- package/dist/constants/componentProps/fillHover.js +1 -3
- package/dist/constants/componentProps/fillType.js +1 -3
- package/dist/constants/componentProps/flexAlign.js +1 -3
- package/dist/constants/componentProps/flexJustifyContent.js +1 -3
- package/dist/constants/componentProps/flexWrap.js +1 -3
- package/dist/constants/componentProps/gridAlign.js +1 -3
- package/dist/constants/componentProps/gridAlignSelf.js +1 -3
- package/dist/constants/componentProps/gridJustifyItems.js +1 -3
- package/dist/constants/componentProps/gridJustifySelf.js +1 -3
- package/dist/constants/componentProps/height.js +1 -3
- package/dist/constants/componentProps/horizontalContentAlign.js +1 -3
- package/dist/constants/componentProps/horizontalResizeMode.js +1 -3
- package/dist/constants/componentProps/iconFillSize.js +1 -3
- package/dist/constants/componentProps/iconSize.js +1 -3
- package/dist/constants/componentProps/itemColor.js +1 -3
- package/dist/constants/componentProps/position.js +1 -3
- package/dist/constants/componentProps/resizeMode.js +1 -3
- package/dist/constants/componentProps/shape.js +1 -3
- package/dist/constants/componentProps/size.js +1 -3
- package/dist/constants/componentProps/sizeInterface.js +1 -3
- package/dist/constants/componentProps/sizePX.js +1 -3
- package/dist/constants/componentProps/stacking.js +1 -3
- package/dist/constants/componentProps/state.js +1 -3
- package/dist/constants/componentProps/strokeColor.js +1 -3
- package/dist/constants/componentProps/textAlign.js +1 -3
- package/dist/constants/componentProps/textColor.js +1 -3
- package/dist/constants/componentProps/textColorActive.js +1 -3
- package/dist/constants/componentProps/textColorHover.js +1 -3
- package/dist/constants/componentProps/textGradient.js +1 -3
- package/dist/constants/componentProps/textSize.js +1 -3
- package/dist/constants/componentProps/textStyle.js +1 -3
- package/dist/constants/componentProps/textTag.js +1 -3
- package/dist/constants/componentProps/textWeight.js +1 -3
- package/dist/constants/componentProps/textWrap.js +1 -3
- package/dist/constants/componentProps/titleSize.js +1 -3
- package/dist/constants/componentProps/type.js +1 -3
- package/dist/constants/componentProps/underline.js +1 -3
- package/dist/constants/componentProps/verticalContentAlign.js +1 -3
- package/dist/constants/componentProps/verticalResizeMode.js +1 -3
- package/dist/constants/componentProps/width.js +1 -3
- package/dist/constants/componentProps/wrap.js +1 -3
- package/dist/constants.js +53 -111
- package/dist/context/Notifications.js +17 -25
- package/dist/context/UIContext.js +21 -29
- package/dist/context/index.d.ts +2 -0
- package/dist/css/components/Avatar/Avatar.css +10 -0
- package/dist/css/components/Button/Button.css +13 -2
- package/dist/css/components/Dot/Dot.css +10 -4
- package/dist/css/components/Dropdown/Dropdown.css +41 -15
- package/dist/css/components/Pagination/Pagination.css +55 -32
- package/dist/css/components/Pagination/css/__item/pagination__item.css +27 -25
- package/dist/css/components/ScrollOnDrag/ScrollOnDrag.css +28 -13
- package/dist/css/components/Scrollbar/Scrollbar.css +56 -0
- package/dist/css/components/Select/Select.css +8 -0
- package/dist/css/components/Swiper/Swiper.css +2 -2
- package/dist/css/styles/fill/fill_active_hover.css +6 -3
- package/dist/css/styles/text-color/text-color_active.css +4 -2
- package/dist/floating-ui.dom-BQ7wiYTi.js +1374 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/styleAttributes.interface.d.ts +143 -0
- package/dist/hooks/styleAttributes.js +2 -4
- package/dist/hooks/useDeviceTargetClass.js +13 -20
- package/dist/hooks/useMediaQueries.js +16 -10
- package/dist/hooks/useStyles.js +22 -30
- package/dist/index.d.ts +4 -0
- package/dist/jsx-runtime-ClDdVO4Q.js +1357 -0
- package/dist/types/componentProps/align.d.ts +1 -0
- package/dist/types/componentProps/alignDirection.d.ts +1 -0
- package/dist/types/componentProps/alignment.d.ts +1 -0
- package/dist/types/componentProps/appearanceKeys.d.ts +1 -0
- package/dist/types/componentProps/borderColor.d.ts +1 -0
- package/dist/types/componentProps/borderColorHover.d.ts +1 -0
- package/dist/types/componentProps/borderType.d.ts +1 -0
- package/dist/types/componentProps/borderWidth.d.ts +1 -0
- package/dist/types/componentProps/captionPosition.d.ts +1 -0
- package/dist/types/componentProps/direction.d.ts +1 -0
- package/dist/types/componentProps/elevation.d.ts +1 -0
- package/dist/types/componentProps/emojiSize.d.ts +1 -0
- package/dist/types/componentProps/fill.d.ts +1 -0
- package/dist/types/componentProps/fillGradient.d.ts +1 -0
- package/dist/types/componentProps/fillHover.d.ts +1 -0
- package/dist/types/componentProps/fillType.d.ts +1 -0
- package/dist/types/componentProps/flexAlign.d.ts +1 -0
- package/dist/types/componentProps/flexGrow.d.ts +1 -0
- package/dist/types/componentProps/flexJustifyContent.d.ts +1 -0
- package/dist/types/componentProps/flexWrap.d.ts +1 -0
- package/dist/types/componentProps/gridAlign.d.ts +1 -0
- package/dist/types/componentProps/gridAlignSelf.d.ts +1 -0
- package/dist/types/componentProps/gridJustifyItems.d.ts +1 -0
- package/dist/types/componentProps/gridJustifySelf.d.ts +1 -0
- package/dist/types/componentProps/height.d.ts +1 -0
- package/dist/types/componentProps/horizontalContentAlign.d.ts +1 -0
- package/dist/types/componentProps/horizontalResizeMode.d.ts +1 -0
- package/dist/types/componentProps/iconFillSize.d.ts +1 -0
- package/dist/types/componentProps/iconSize.d.ts +1 -0
- package/dist/types/componentProps/itemColor.d.ts +1 -0
- package/dist/types/componentProps/justifyContent.d.ts +1 -0
- package/dist/types/componentProps/position.d.ts +1 -0
- package/dist/types/componentProps/resizeMode.d.ts +1 -0
- package/dist/types/componentProps/shape.d.ts +1 -0
- package/dist/types/componentProps/size.d.ts +1 -0
- package/dist/types/componentProps/sizeInterface.d.ts +1 -0
- package/dist/types/componentProps/sizePX.d.ts +1 -0
- package/dist/types/componentProps/stacking.d.ts +1 -0
- package/dist/types/componentProps/state.d.ts +1 -0
- package/dist/types/componentProps/strokeColor.d.ts +1 -0
- package/dist/types/componentProps/textAlign.d.ts +1 -0
- package/dist/types/componentProps/textColor.d.ts +1 -0
- package/dist/types/componentProps/textColorActive.d.ts +1 -0
- package/dist/types/componentProps/textColorHover.d.ts +1 -0
- package/dist/types/componentProps/textGradient.d.ts +1 -0
- package/dist/types/componentProps/textSize.d.ts +1 -0
- package/dist/types/componentProps/textStyle.d.ts +1 -0
- package/dist/types/componentProps/textTag.d.ts +1 -0
- package/dist/types/componentProps/textWeight.d.ts +1 -0
- package/dist/types/componentProps/textWrap.d.ts +1 -0
- package/dist/types/componentProps/titleSize.d.ts +1 -0
- package/dist/types/componentProps/type.d.ts +1 -0
- package/dist/types/componentProps/underline.d.ts +1 -0
- package/dist/types/componentProps/verticalContentAlign.d.ts +1 -0
- package/dist/types/componentProps/verticalResizeMode.d.ts +1 -0
- package/dist/types/componentProps/width.d.ts +1 -0
- package/dist/types/componentProps/wrap.d.ts +1 -0
- package/dist/types/index.d.ts +56 -0
- package/package.json +86 -29
- package/dist/css/components/Background/Background.css +0 -11
- /package/dist/{floating-ui.dom-C34fOuI9.js → cjs/floating-ui.dom-C34fOuI9.js} +0 -0
|
@@ -1,75 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
require('../constants/componentProps/underline.js');
|
|
43
|
-
require('../constants/componentProps/width.js');
|
|
44
|
-
require('react-inlinesvg');
|
|
45
|
-
require('../constants/componentProps/borderColor.js');
|
|
46
|
-
require('../constants/componentProps/iconSize.js');
|
|
47
|
-
require('../constants/componentProps/strokeColor.js');
|
|
48
|
-
|
|
49
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
50
|
-
|
|
51
|
-
function _interopNamespace(e) {
|
|
52
|
-
if (e && e.__esModule) return e;
|
|
53
|
-
var n = Object.create(null);
|
|
54
|
-
if (e) {
|
|
55
|
-
Object.keys(e).forEach(function (k) {
|
|
56
|
-
if (k !== 'default') {
|
|
57
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
58
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
59
|
-
enumerable: true,
|
|
60
|
-
get: function () { return e[k]; }
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
n.default = e;
|
|
66
|
-
return Object.freeze(n);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
70
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
71
|
-
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
72
|
-
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { createElement, Component, useLayoutEffect, useEffect, createRef, useRef, useMemo, useState, useCallback } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import clsx$1, { clsx } from 'clsx';
|
|
5
|
+
import * as ReactDOM from 'react-dom';
|
|
6
|
+
import ReactDOM__default, { findDOMNode } from 'react-dom';
|
|
7
|
+
import { b as arrow$1, c as computePosition, p as platform, i as isElement, a as autoUpdate, f as flip, o as offset } from '../floating-ui.dom-BQ7wiYTi.js';
|
|
8
|
+
import { Input } from './Input.js';
|
|
9
|
+
import { T as Text } from '../Text-BcGbRc14.js';
|
|
10
|
+
import { Label } from './Label.js';
|
|
11
|
+
import { B as Button } from '../Button-B7vbiqrJ.js';
|
|
12
|
+
import { I as Icon } from '../Icon-Dn2eEZvb.js';
|
|
13
|
+
import { useDeviceTargetClass } from '../hooks/useDeviceTargetClass.js';
|
|
14
|
+
import 'lodash/castArray';
|
|
15
|
+
import 'lodash/camelCase';
|
|
16
|
+
import '../context/UIContext.js';
|
|
17
|
+
import '../hooks/useMediaQueries.js';
|
|
18
|
+
import 'react-responsive';
|
|
19
|
+
import '../jsx-runtime-ClDdVO4Q.js';
|
|
20
|
+
import '../hooks/useStyles.js';
|
|
21
|
+
import 'lodash/maxBy';
|
|
22
|
+
import 'lodash/upperFirst';
|
|
23
|
+
import '../hooks/styleAttributes.js';
|
|
24
|
+
import '../constants/componentProps/borderType.js';
|
|
25
|
+
import '../constants/componentProps/fill.js';
|
|
26
|
+
import '../constants/componentProps/shape.js';
|
|
27
|
+
import '../constants/componentProps/size.js';
|
|
28
|
+
import '../constants/componentProps/textAlign.js';
|
|
29
|
+
import './Tooltip.js';
|
|
30
|
+
import './Title.js';
|
|
31
|
+
import '../constants/componentProps/textColor.js';
|
|
32
|
+
import '../constants/componentProps/textGradient.js';
|
|
33
|
+
import '../constants/componentProps/textStyle.js';
|
|
34
|
+
import '../constants/componentProps/textWeight.js';
|
|
35
|
+
import '../constants/componentProps/titleSize.js';
|
|
36
|
+
import '../constants/componentProps/type.js';
|
|
37
|
+
import '../constants/componentProps/wrap.js';
|
|
38
|
+
import '../constants/componentProps/textSize.js';
|
|
39
|
+
import '../Link-ByBzBRDH.js';
|
|
40
|
+
import './Loader.js';
|
|
41
|
+
import 'react-inlinesvg';
|
|
73
42
|
|
|
74
43
|
/**
|
|
75
44
|
* @name isDate
|
|
@@ -7304,7 +7273,7 @@ function onClickOutsideHOC(WrappedComponent, config) {
|
|
|
7304
7273
|
return instance.setClickOutsideRef();
|
|
7305
7274
|
}
|
|
7306
7275
|
|
|
7307
|
-
return
|
|
7276
|
+
return findDOMNode(instance);
|
|
7308
7277
|
};
|
|
7309
7278
|
|
|
7310
7279
|
_this.enableOnClickOutside = function () {
|
|
@@ -7452,11 +7421,11 @@ function onClickOutsideHOC(WrappedComponent, config) {
|
|
|
7452
7421
|
|
|
7453
7422
|
props.disableOnClickOutside = this.disableOnClickOutside;
|
|
7454
7423
|
props.enableOnClickOutside = this.enableOnClickOutside;
|
|
7455
|
-
return
|
|
7424
|
+
return createElement(WrappedComponent, props);
|
|
7456
7425
|
};
|
|
7457
7426
|
|
|
7458
7427
|
return onClickOutside;
|
|
7459
|
-
}(
|
|
7428
|
+
}(Component), _class.displayName = "OnClickOutside(" + componentName + ")", _class.defaultProps = {
|
|
7460
7429
|
eventTypes: ['mousedown', 'touchstart'],
|
|
7461
7430
|
excludeScrollbar: config && config.excludeScrollbar || false,
|
|
7462
7431
|
outsideClickIgnoreClass: IGNORE_CLASS_NAME,
|
|
@@ -7487,7 +7456,7 @@ const arrow = options => {
|
|
|
7487
7456
|
} = typeof options === 'function' ? options(state) : options;
|
|
7488
7457
|
if (element && isRef(element)) {
|
|
7489
7458
|
if (element.current != null) {
|
|
7490
|
-
return
|
|
7459
|
+
return arrow$1({
|
|
7491
7460
|
element: element.current,
|
|
7492
7461
|
padding
|
|
7493
7462
|
}).fn(state);
|
|
@@ -7495,7 +7464,7 @@ const arrow = options => {
|
|
|
7495
7464
|
return {};
|
|
7496
7465
|
}
|
|
7497
7466
|
if (element) {
|
|
7498
|
-
return
|
|
7467
|
+
return arrow$1({
|
|
7499
7468
|
element,
|
|
7500
7469
|
padding
|
|
7501
7470
|
}).fn(state);
|
|
@@ -7505,7 +7474,7 @@ const arrow = options => {
|
|
|
7505
7474
|
};
|
|
7506
7475
|
};
|
|
7507
7476
|
|
|
7508
|
-
var index$1 = typeof document !== 'undefined' ?
|
|
7477
|
+
var index$1 = typeof document !== 'undefined' ? useLayoutEffect : useEffect;
|
|
7509
7478
|
|
|
7510
7479
|
// Fork of `fast-deep-equal` that only does the comparisons we need and compares
|
|
7511
7480
|
// functions
|
|
@@ -7573,7 +7542,7 @@ function roundByDPR(element, value) {
|
|
|
7573
7542
|
}
|
|
7574
7543
|
|
|
7575
7544
|
function useLatestRef(value) {
|
|
7576
|
-
const ref =
|
|
7545
|
+
const ref = React.useRef(value);
|
|
7577
7546
|
index$1(() => {
|
|
7578
7547
|
ref.current = value;
|
|
7579
7548
|
});
|
|
@@ -7601,7 +7570,7 @@ function useFloating$1(options) {
|
|
|
7601
7570
|
whileElementsMounted,
|
|
7602
7571
|
open
|
|
7603
7572
|
} = options;
|
|
7604
|
-
const [data, setData] =
|
|
7573
|
+
const [data, setData] = React.useState({
|
|
7605
7574
|
x: 0,
|
|
7606
7575
|
y: 0,
|
|
7607
7576
|
strategy,
|
|
@@ -7609,19 +7578,19 @@ function useFloating$1(options) {
|
|
|
7609
7578
|
middlewareData: {},
|
|
7610
7579
|
isPositioned: false
|
|
7611
7580
|
});
|
|
7612
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
7581
|
+
const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
|
|
7613
7582
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
7614
7583
|
setLatestMiddleware(middleware);
|
|
7615
7584
|
}
|
|
7616
|
-
const [_reference, _setReference] =
|
|
7617
|
-
const [_floating, _setFloating] =
|
|
7618
|
-
const setReference =
|
|
7585
|
+
const [_reference, _setReference] = React.useState(null);
|
|
7586
|
+
const [_floating, _setFloating] = React.useState(null);
|
|
7587
|
+
const setReference = React.useCallback(node => {
|
|
7619
7588
|
if (node !== referenceRef.current) {
|
|
7620
7589
|
referenceRef.current = node;
|
|
7621
7590
|
_setReference(node);
|
|
7622
7591
|
}
|
|
7623
7592
|
}, []);
|
|
7624
|
-
const setFloating =
|
|
7593
|
+
const setFloating = React.useCallback(node => {
|
|
7625
7594
|
if (node !== floatingRef.current) {
|
|
7626
7595
|
floatingRef.current = node;
|
|
7627
7596
|
_setFloating(node);
|
|
@@ -7629,13 +7598,13 @@ function useFloating$1(options) {
|
|
|
7629
7598
|
}, []);
|
|
7630
7599
|
const referenceEl = externalReference || _reference;
|
|
7631
7600
|
const floatingEl = externalFloating || _floating;
|
|
7632
|
-
const referenceRef =
|
|
7633
|
-
const floatingRef =
|
|
7634
|
-
const dataRef =
|
|
7601
|
+
const referenceRef = React.useRef(null);
|
|
7602
|
+
const floatingRef = React.useRef(null);
|
|
7603
|
+
const dataRef = React.useRef(data);
|
|
7635
7604
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
7636
7605
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
7637
7606
|
const platformRef = useLatestRef(platform);
|
|
7638
|
-
const update =
|
|
7607
|
+
const update = React.useCallback(() => {
|
|
7639
7608
|
if (!referenceRef.current || !floatingRef.current) {
|
|
7640
7609
|
return;
|
|
7641
7610
|
}
|
|
@@ -7647,14 +7616,14 @@ function useFloating$1(options) {
|
|
|
7647
7616
|
if (platformRef.current) {
|
|
7648
7617
|
config.platform = platformRef.current;
|
|
7649
7618
|
}
|
|
7650
|
-
|
|
7619
|
+
computePosition(referenceRef.current, floatingRef.current, config).then(data => {
|
|
7651
7620
|
const fullData = {
|
|
7652
7621
|
...data,
|
|
7653
7622
|
isPositioned: true
|
|
7654
7623
|
};
|
|
7655
7624
|
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
7656
7625
|
dataRef.current = fullData;
|
|
7657
|
-
|
|
7626
|
+
ReactDOM.flushSync(() => {
|
|
7658
7627
|
setData(fullData);
|
|
7659
7628
|
});
|
|
7660
7629
|
}
|
|
@@ -7669,7 +7638,7 @@ function useFloating$1(options) {
|
|
|
7669
7638
|
}));
|
|
7670
7639
|
}
|
|
7671
7640
|
}, [open]);
|
|
7672
|
-
const isMountedRef =
|
|
7641
|
+
const isMountedRef = React.useRef(false);
|
|
7673
7642
|
index$1(() => {
|
|
7674
7643
|
isMountedRef.current = true;
|
|
7675
7644
|
return () => {
|
|
@@ -7688,17 +7657,17 @@ function useFloating$1(options) {
|
|
|
7688
7657
|
update();
|
|
7689
7658
|
}
|
|
7690
7659
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
7691
|
-
const refs =
|
|
7660
|
+
const refs = React.useMemo(() => ({
|
|
7692
7661
|
reference: referenceRef,
|
|
7693
7662
|
floating: floatingRef,
|
|
7694
7663
|
setReference,
|
|
7695
7664
|
setFloating
|
|
7696
7665
|
}), [setReference, setFloating]);
|
|
7697
|
-
const elements =
|
|
7666
|
+
const elements = React.useMemo(() => ({
|
|
7698
7667
|
reference: referenceEl,
|
|
7699
7668
|
floating: floatingEl
|
|
7700
7669
|
}), [referenceEl, floatingEl]);
|
|
7701
|
-
const floatingStyles =
|
|
7670
|
+
const floatingStyles = React.useMemo(() => {
|
|
7702
7671
|
const initialStyles = {
|
|
7703
7672
|
position: strategy,
|
|
7704
7673
|
left: 0,
|
|
@@ -7724,7 +7693,7 @@ function useFloating$1(options) {
|
|
|
7724
7693
|
top: y
|
|
7725
7694
|
};
|
|
7726
7695
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
7727
|
-
return
|
|
7696
|
+
return React.useMemo(() => ({
|
|
7728
7697
|
...data,
|
|
7729
7698
|
update,
|
|
7730
7699
|
refs,
|
|
@@ -7734,10 +7703,10 @@ function useFloating$1(options) {
|
|
|
7734
7703
|
}
|
|
7735
7704
|
|
|
7736
7705
|
// `toString()` prevents bundlers from trying to `import { useInsertionEffect } from 'react'`
|
|
7737
|
-
const useInsertionEffect =
|
|
7706
|
+
const useInsertionEffect = React[/*#__PURE__*/'useInsertionEffect'.toString()];
|
|
7738
7707
|
const useSafeInsertionEffect = useInsertionEffect || (fn => fn());
|
|
7739
7708
|
function useEffectEvent(callback) {
|
|
7740
|
-
const ref =
|
|
7709
|
+
const ref = React.useRef(() => {
|
|
7741
7710
|
if (process.env.NODE_ENV !== "production") {
|
|
7742
7711
|
throw new Error('Cannot call an event handler while rendering.');
|
|
7743
7712
|
}
|
|
@@ -7745,7 +7714,7 @@ function useEffectEvent(callback) {
|
|
|
7745
7714
|
useSafeInsertionEffect(() => {
|
|
7746
7715
|
ref.current = callback;
|
|
7747
7716
|
});
|
|
7748
|
-
return
|
|
7717
|
+
return React.useCallback(function () {
|
|
7749
7718
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
7750
7719
|
args[_key] = arguments[_key];
|
|
7751
7720
|
}
|
|
@@ -7753,7 +7722,7 @@ function useEffectEvent(callback) {
|
|
|
7753
7722
|
}, []);
|
|
7754
7723
|
}
|
|
7755
7724
|
|
|
7756
|
-
var index = typeof document !== 'undefined' ?
|
|
7725
|
+
var index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;
|
|
7757
7726
|
|
|
7758
7727
|
function _extends$1() {
|
|
7759
7728
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -7774,7 +7743,7 @@ let serverHandoffComplete = false;
|
|
|
7774
7743
|
let count = 0;
|
|
7775
7744
|
const genId = () => "floating-ui-" + count++;
|
|
7776
7745
|
function useFloatingId() {
|
|
7777
|
-
const [id, setId] =
|
|
7746
|
+
const [id, setId] = React.useState(() => serverHandoffComplete ? genId() : undefined);
|
|
7778
7747
|
|
|
7779
7748
|
// biome-ignore lint/correctness/useExhaustiveDependencies: intentional
|
|
7780
7749
|
index(() => {
|
|
@@ -7782,7 +7751,7 @@ function useFloatingId() {
|
|
|
7782
7751
|
setId(genId());
|
|
7783
7752
|
}
|
|
7784
7753
|
}, []);
|
|
7785
|
-
|
|
7754
|
+
React.useEffect(() => {
|
|
7786
7755
|
if (!serverHandoffComplete) {
|
|
7787
7756
|
serverHandoffComplete = true;
|
|
7788
7757
|
}
|
|
@@ -7791,7 +7760,7 @@ function useFloatingId() {
|
|
|
7791
7760
|
}
|
|
7792
7761
|
|
|
7793
7762
|
// `toString()` prevents bundlers from trying to `import { useId } from 'react'`
|
|
7794
|
-
const useReactId =
|
|
7763
|
+
const useReactId = React[/*#__PURE__*/'useId'.toString()];
|
|
7795
7764
|
|
|
7796
7765
|
/**
|
|
7797
7766
|
* Uses React 18's built-in `useId()` when available, or falls back to a
|
|
@@ -7805,7 +7774,7 @@ const useId = useReactId || useFloatingId;
|
|
|
7805
7774
|
* Renders a pointing arrow triangle.
|
|
7806
7775
|
* @see https://floating-ui.com/docs/FloatingArrow
|
|
7807
7776
|
*/
|
|
7808
|
-
const FloatingArrow = /*#__PURE__*/
|
|
7777
|
+
const FloatingArrow = /*#__PURE__*/React.forwardRef(function FloatingArrow(_ref, ref) {
|
|
7809
7778
|
let {
|
|
7810
7779
|
context: {
|
|
7811
7780
|
placement,
|
|
@@ -7846,7 +7815,7 @@ const FloatingArrow = /*#__PURE__*/React__namespace.forwardRef(function Floating
|
|
|
7846
7815
|
const svgX = width / 2 * (tipRadius / -8 + 1);
|
|
7847
7816
|
const svgY = height / 2 * tipRadius / 4;
|
|
7848
7817
|
const [side, alignment] = placement.split('-');
|
|
7849
|
-
const isRTL =
|
|
7818
|
+
const isRTL = platform.isRTL(floating);
|
|
7850
7819
|
const isCustomShape = !!d;
|
|
7851
7820
|
const isVerticalSide = side === 'top' || side === 'bottom';
|
|
7852
7821
|
const yOffsetProp = staticOffset && alignment === 'end' ? 'bottom' : 'top';
|
|
@@ -7865,7 +7834,7 @@ const FloatingArrow = /*#__PURE__*/React__namespace.forwardRef(function Floating
|
|
|
7865
7834
|
bottom: isCustomShape ? '' : 'rotate(180deg)',
|
|
7866
7835
|
right: isCustomShape ? 'rotate(-90deg)' : 'rotate(90deg)'
|
|
7867
7836
|
}[side];
|
|
7868
|
-
return /*#__PURE__*/
|
|
7837
|
+
return /*#__PURE__*/React.createElement("svg", _extends$1({}, rest, {
|
|
7869
7838
|
"aria-hidden": true,
|
|
7870
7839
|
ref: ref,
|
|
7871
7840
|
width: isCustomShape ? width : width + strokeWidth,
|
|
@@ -7880,7 +7849,7 @@ const FloatingArrow = /*#__PURE__*/React__namespace.forwardRef(function Floating
|
|
|
7880
7849
|
transform: "" + rotation + (transform != null ? transform : ''),
|
|
7881
7850
|
...restStyle
|
|
7882
7851
|
}
|
|
7883
|
-
}), strokeWidth > 0 && /*#__PURE__*/
|
|
7852
|
+
}), strokeWidth > 0 && /*#__PURE__*/React.createElement("path", {
|
|
7884
7853
|
clipPath: "url(#" + clipPathId + ")",
|
|
7885
7854
|
fill: "none",
|
|
7886
7855
|
stroke: stroke
|
|
@@ -7888,12 +7857,12 @@ const FloatingArrow = /*#__PURE__*/React__namespace.forwardRef(function Floating
|
|
|
7888
7857
|
,
|
|
7889
7858
|
strokeWidth: strokeWidth + (d ? 0 : 1),
|
|
7890
7859
|
d: dValue
|
|
7891
|
-
}), /*#__PURE__*/
|
|
7860
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
7892
7861
|
stroke: strokeWidth && !d ? rest.fill : 'none',
|
|
7893
7862
|
d: dValue
|
|
7894
|
-
}), /*#__PURE__*/
|
|
7863
|
+
}), /*#__PURE__*/React.createElement("clipPath", {
|
|
7895
7864
|
id: clipPathId
|
|
7896
|
-
}, /*#__PURE__*/
|
|
7865
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
7897
7866
|
x: -halfStrokeWidth,
|
|
7898
7867
|
y: halfStrokeWidth * (isCustomShape ? -1 : 1),
|
|
7899
7868
|
width: width + strokeWidth,
|
|
@@ -7918,8 +7887,8 @@ function createPubSub() {
|
|
|
7918
7887
|
};
|
|
7919
7888
|
}
|
|
7920
7889
|
|
|
7921
|
-
const FloatingNodeContext = /*#__PURE__*/
|
|
7922
|
-
const FloatingTreeContext = /*#__PURE__*/
|
|
7890
|
+
const FloatingNodeContext = /*#__PURE__*/React.createContext(null);
|
|
7891
|
+
const FloatingTreeContext = /*#__PURE__*/React.createContext(null);
|
|
7923
7892
|
|
|
7924
7893
|
/**
|
|
7925
7894
|
* Returns the parent node id for nested floating elements, if available.
|
|
@@ -7927,13 +7896,13 @@ const FloatingTreeContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
|
7927
7896
|
*/
|
|
7928
7897
|
const useFloatingParentNodeId = () => {
|
|
7929
7898
|
var _React$useContext;
|
|
7930
|
-
return ((_React$useContext =
|
|
7899
|
+
return ((_React$useContext = React.useContext(FloatingNodeContext)) == null ? void 0 : _React$useContext.id) || null;
|
|
7931
7900
|
};
|
|
7932
7901
|
|
|
7933
7902
|
/**
|
|
7934
7903
|
* Returns the nearest floating tree context, if available.
|
|
7935
7904
|
*/
|
|
7936
|
-
const useFloatingTree = () =>
|
|
7905
|
+
const useFloatingTree = () => React.useContext(FloatingTreeContext);
|
|
7937
7906
|
|
|
7938
7907
|
let devMessageSet;
|
|
7939
7908
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -7957,7 +7926,7 @@ function useFloating(options) {
|
|
|
7957
7926
|
if (process.env.NODE_ENV !== "production") {
|
|
7958
7927
|
var _options$elements;
|
|
7959
7928
|
const err = 'Floating UI: Cannot pass a virtual element to the ' + '`elements.reference` option, as it must be a real DOM element. ' + 'Use `refs.setPositionReference` instead.';
|
|
7960
|
-
if ((_options$elements = options.elements) != null && _options$elements.reference && !
|
|
7929
|
+
if ((_options$elements = options.elements) != null && _options$elements.reference && !isElement(options.elements.reference)) {
|
|
7961
7930
|
var _devMessageSet;
|
|
7962
7931
|
if (!((_devMessageSet = devMessageSet) != null && _devMessageSet.has(err))) {
|
|
7963
7932
|
var _devMessageSet2;
|
|
@@ -7966,7 +7935,7 @@ function useFloating(options) {
|
|
|
7966
7935
|
}
|
|
7967
7936
|
}
|
|
7968
7937
|
}
|
|
7969
|
-
const [_domReference, setDomReference] =
|
|
7938
|
+
const [_domReference, setDomReference] = React.useState(null);
|
|
7970
7939
|
const domReference = ((_options$elements2 = options.elements) == null ? void 0 : _options$elements2.reference) || _domReference;
|
|
7971
7940
|
const position = useFloating$1(options);
|
|
7972
7941
|
const tree = useFloatingTree();
|
|
@@ -7983,44 +7952,44 @@ function useFloating(options) {
|
|
|
7983
7952
|
});
|
|
7984
7953
|
unstable_onOpenChange == null || unstable_onOpenChange(open, event, reason);
|
|
7985
7954
|
});
|
|
7986
|
-
const domReferenceRef =
|
|
7987
|
-
const dataRef =
|
|
7988
|
-
const events =
|
|
7955
|
+
const domReferenceRef = React.useRef(null);
|
|
7956
|
+
const dataRef = React.useRef({});
|
|
7957
|
+
const events = React.useState(() => createPubSub())[0];
|
|
7989
7958
|
const floatingId = useId();
|
|
7990
|
-
const setPositionReference =
|
|
7991
|
-
const positionReference =
|
|
7959
|
+
const setPositionReference = React.useCallback(node => {
|
|
7960
|
+
const positionReference = isElement(node) ? {
|
|
7992
7961
|
getBoundingClientRect: () => node.getBoundingClientRect(),
|
|
7993
7962
|
contextElement: node
|
|
7994
7963
|
} : node;
|
|
7995
7964
|
position.refs.setReference(positionReference);
|
|
7996
7965
|
}, [position.refs]);
|
|
7997
|
-
const setReference =
|
|
7998
|
-
if (
|
|
7966
|
+
const setReference = React.useCallback(node => {
|
|
7967
|
+
if (isElement(node) || node === null) {
|
|
7999
7968
|
domReferenceRef.current = node;
|
|
8000
7969
|
setDomReference(node);
|
|
8001
7970
|
}
|
|
8002
7971
|
|
|
8003
7972
|
// Backwards-compatibility for passing a virtual element to `reference`
|
|
8004
7973
|
// after it has set the DOM reference.
|
|
8005
|
-
if (
|
|
7974
|
+
if (isElement(position.refs.reference.current) || position.refs.reference.current === null ||
|
|
8006
7975
|
// Don't allow setting virtual elements using the old technique back to
|
|
8007
7976
|
// `null` to support `positionReference` + an unstable `reference`
|
|
8008
7977
|
// callback ref.
|
|
8009
|
-
node !== null && !
|
|
7978
|
+
node !== null && !isElement(node)) {
|
|
8010
7979
|
position.refs.setReference(node);
|
|
8011
7980
|
}
|
|
8012
7981
|
}, [position.refs]);
|
|
8013
|
-
const refs =
|
|
7982
|
+
const refs = React.useMemo(() => ({
|
|
8014
7983
|
...position.refs,
|
|
8015
7984
|
setReference,
|
|
8016
7985
|
setPositionReference,
|
|
8017
7986
|
domReference: domReferenceRef
|
|
8018
7987
|
}), [position.refs, setReference, setPositionReference]);
|
|
8019
|
-
const elements =
|
|
7988
|
+
const elements = React.useMemo(() => ({
|
|
8020
7989
|
...position.elements,
|
|
8021
7990
|
domReference: domReference
|
|
8022
7991
|
}), [position.elements, domReference]);
|
|
8023
|
-
const context =
|
|
7992
|
+
const context = React.useMemo(() => ({
|
|
8024
7993
|
...position,
|
|
8025
7994
|
refs,
|
|
8026
7995
|
elements,
|
|
@@ -8037,7 +8006,7 @@ function useFloating(options) {
|
|
|
8037
8006
|
node.context = context;
|
|
8038
8007
|
}
|
|
8039
8008
|
});
|
|
8040
|
-
return
|
|
8009
|
+
return React.useMemo(() => ({
|
|
8041
8010
|
...position,
|
|
8042
8011
|
context,
|
|
8043
8012
|
refs,
|
|
@@ -9008,12 +8977,12 @@ var YearDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
|
9008
8977
|
_defineProperty(_this, "renderOptions", function () {
|
|
9009
8978
|
var selectedYear = _this.props.year;
|
|
9010
8979
|
var options = _this.state.yearsList.map(function (year) {
|
|
9011
|
-
return /*#__PURE__*/
|
|
8980
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9012
8981
|
className: selectedYear === year ? "react-datepicker__year-option react-datepicker__year-option--selected_year" : "react-datepicker__year-option",
|
|
9013
8982
|
key: year,
|
|
9014
8983
|
onClick: _this.onChange.bind(_this, year),
|
|
9015
8984
|
"aria-selected": selectedYear === year ? "true" : undefined
|
|
9016
|
-
}, selectedYear === year ? /*#__PURE__*/
|
|
8985
|
+
}, selectedYear === year ? /*#__PURE__*/React__default.createElement("span", {
|
|
9017
8986
|
className: "react-datepicker__year-option--selected"
|
|
9018
8987
|
}, "\u2713") : "", year);
|
|
9019
8988
|
});
|
|
@@ -9022,22 +8991,22 @@ var YearDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
|
9022
8991
|
if (!maxYear || !_this.state.yearsList.find(function (year) {
|
|
9023
8992
|
return year === maxYear;
|
|
9024
8993
|
})) {
|
|
9025
|
-
options.unshift( /*#__PURE__*/
|
|
8994
|
+
options.unshift( /*#__PURE__*/React__default.createElement("div", {
|
|
9026
8995
|
className: "react-datepicker__year-option",
|
|
9027
8996
|
key: "upcoming",
|
|
9028
8997
|
onClick: _this.incrementYears
|
|
9029
|
-
}, /*#__PURE__*/
|
|
8998
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
9030
8999
|
className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"
|
|
9031
9000
|
})));
|
|
9032
9001
|
}
|
|
9033
9002
|
if (!minYear || !_this.state.yearsList.find(function (year) {
|
|
9034
9003
|
return year === minYear;
|
|
9035
9004
|
})) {
|
|
9036
|
-
options.push( /*#__PURE__*/
|
|
9005
|
+
options.push( /*#__PURE__*/React__default.createElement("div", {
|
|
9037
9006
|
className: "react-datepicker__year-option",
|
|
9038
9007
|
key: "previous",
|
|
9039
9008
|
onClick: _this.decrementYears
|
|
9040
|
-
}, /*#__PURE__*/
|
|
9009
|
+
}, /*#__PURE__*/React__default.createElement("a", {
|
|
9041
9010
|
className: "react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"
|
|
9042
9011
|
})));
|
|
9043
9012
|
}
|
|
@@ -9069,7 +9038,7 @@ var YearDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
|
9069
9038
|
_this.state = {
|
|
9070
9039
|
yearsList: generateYears(_this.props.year, noOfYear, _this.props.minDate, _this.props.maxDate)
|
|
9071
9040
|
};
|
|
9072
|
-
_this.dropdownRef = /*#__PURE__*/
|
|
9041
|
+
_this.dropdownRef = /*#__PURE__*/createRef();
|
|
9073
9042
|
return _this;
|
|
9074
9043
|
}
|
|
9075
9044
|
_inherits(YearDropdownOptions, _React$Component);
|
|
@@ -9089,17 +9058,17 @@ var YearDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
|
9089
9058
|
}, {
|
|
9090
9059
|
key: "render",
|
|
9091
9060
|
value: function render() {
|
|
9092
|
-
var dropdownClass = clsx
|
|
9061
|
+
var dropdownClass = clsx({
|
|
9093
9062
|
"react-datepicker__year-dropdown": true,
|
|
9094
9063
|
"react-datepicker__year-dropdown--scrollable": this.props.scrollableYearDropdown
|
|
9095
9064
|
});
|
|
9096
|
-
return /*#__PURE__*/
|
|
9065
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9097
9066
|
className: dropdownClass,
|
|
9098
9067
|
ref: this.dropdownRef
|
|
9099
9068
|
}, this.renderOptions());
|
|
9100
9069
|
}
|
|
9101
9070
|
}]);
|
|
9102
|
-
}(
|
|
9071
|
+
}(React__default.Component);
|
|
9103
9072
|
|
|
9104
9073
|
var WrappedYearDropdownOptions = onClickOutsideHOC(YearDropdownOptions);
|
|
9105
9074
|
var YearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
@@ -9118,7 +9087,7 @@ var YearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9118
9087
|
var maxYear = _this.props.maxDate ? getYear(_this.props.maxDate) : 2100;
|
|
9119
9088
|
var options = [];
|
|
9120
9089
|
for (var i = minYear; i <= maxYear; i++) {
|
|
9121
|
-
options.push( /*#__PURE__*/
|
|
9090
|
+
options.push( /*#__PURE__*/React__default.createElement("option", {
|
|
9122
9091
|
key: i,
|
|
9123
9092
|
value: i
|
|
9124
9093
|
}, i));
|
|
@@ -9129,14 +9098,14 @@ var YearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9129
9098
|
_this.onChange(e.target.value);
|
|
9130
9099
|
});
|
|
9131
9100
|
_defineProperty(_this, "renderSelectMode", function () {
|
|
9132
|
-
return /*#__PURE__*/
|
|
9101
|
+
return /*#__PURE__*/React__default.createElement("select", {
|
|
9133
9102
|
value: _this.props.year,
|
|
9134
9103
|
className: "react-datepicker__year-select",
|
|
9135
9104
|
onChange: _this.onSelectChange
|
|
9136
9105
|
}, _this.renderSelectOptions());
|
|
9137
9106
|
});
|
|
9138
9107
|
_defineProperty(_this, "renderReadView", function (visible) {
|
|
9139
|
-
return /*#__PURE__*/
|
|
9108
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9140
9109
|
key: "read",
|
|
9141
9110
|
style: {
|
|
9142
9111
|
visibility: visible ? "visible" : "hidden"
|
|
@@ -9145,14 +9114,14 @@ var YearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9145
9114
|
onClick: function onClick(event) {
|
|
9146
9115
|
return _this.toggleDropdown(event);
|
|
9147
9116
|
}
|
|
9148
|
-
}, /*#__PURE__*/
|
|
9117
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9149
9118
|
className: "react-datepicker__year-read-view--down-arrow"
|
|
9150
|
-
}), /*#__PURE__*/
|
|
9119
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
9151
9120
|
className: "react-datepicker__year-read-view--selected-year"
|
|
9152
9121
|
}, _this.props.year));
|
|
9153
9122
|
});
|
|
9154
9123
|
_defineProperty(_this, "renderDropdown", function () {
|
|
9155
|
-
return /*#__PURE__*/
|
|
9124
|
+
return /*#__PURE__*/React__default.createElement(WrappedYearDropdownOptions, {
|
|
9156
9125
|
key: "dropdown",
|
|
9157
9126
|
year: _this.props.year,
|
|
9158
9127
|
onChange: _this.onChange,
|
|
@@ -9214,12 +9183,12 @@ var YearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9214
9183
|
renderedDropdown = this.renderSelectMode();
|
|
9215
9184
|
break;
|
|
9216
9185
|
}
|
|
9217
|
-
return /*#__PURE__*/
|
|
9186
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9218
9187
|
className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)
|
|
9219
9188
|
}, renderedDropdown);
|
|
9220
9189
|
}
|
|
9221
9190
|
}]);
|
|
9222
|
-
}(
|
|
9191
|
+
}(React__default.Component);
|
|
9223
9192
|
|
|
9224
9193
|
var MonthDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
9225
9194
|
function MonthDropdownOptions() {
|
|
@@ -9234,12 +9203,12 @@ var MonthDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
|
9234
9203
|
});
|
|
9235
9204
|
_defineProperty(_this, "renderOptions", function () {
|
|
9236
9205
|
return _this.props.monthNames.map(function (month, i) {
|
|
9237
|
-
return /*#__PURE__*/
|
|
9206
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9238
9207
|
className: _this.isSelectedMonth(i) ? "react-datepicker__month-option react-datepicker__month-option--selected_month" : "react-datepicker__month-option",
|
|
9239
9208
|
key: month,
|
|
9240
9209
|
onClick: _this.onChange.bind(_this, i),
|
|
9241
9210
|
"aria-selected": _this.isSelectedMonth(i) ? "true" : undefined
|
|
9242
|
-
}, _this.isSelectedMonth(i) ? /*#__PURE__*/
|
|
9211
|
+
}, _this.isSelectedMonth(i) ? /*#__PURE__*/React__default.createElement("span", {
|
|
9243
9212
|
className: "react-datepicker__month-option--selected"
|
|
9244
9213
|
}, "\u2713") : "", month);
|
|
9245
9214
|
});
|
|
@@ -9256,12 +9225,12 @@ var MonthDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
|
9256
9225
|
return _createClass(MonthDropdownOptions, [{
|
|
9257
9226
|
key: "render",
|
|
9258
9227
|
value: function render() {
|
|
9259
|
-
return /*#__PURE__*/
|
|
9228
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9260
9229
|
className: "react-datepicker__month-dropdown"
|
|
9261
9230
|
}, this.renderOptions());
|
|
9262
9231
|
}
|
|
9263
9232
|
}]);
|
|
9264
|
-
}(
|
|
9233
|
+
}(React__default.Component);
|
|
9265
9234
|
|
|
9266
9235
|
var WrappedMonthDropdownOptions = onClickOutsideHOC(MonthDropdownOptions);
|
|
9267
9236
|
var MonthDropdown = /*#__PURE__*/function (_React$Component) {
|
|
@@ -9277,14 +9246,14 @@ var MonthDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9277
9246
|
});
|
|
9278
9247
|
_defineProperty(_this, "renderSelectOptions", function (monthNames) {
|
|
9279
9248
|
return monthNames.map(function (M, i) {
|
|
9280
|
-
return /*#__PURE__*/
|
|
9249
|
+
return /*#__PURE__*/React__default.createElement("option", {
|
|
9281
9250
|
key: i,
|
|
9282
9251
|
value: i
|
|
9283
9252
|
}, M);
|
|
9284
9253
|
});
|
|
9285
9254
|
});
|
|
9286
9255
|
_defineProperty(_this, "renderSelectMode", function (monthNames) {
|
|
9287
|
-
return /*#__PURE__*/
|
|
9256
|
+
return /*#__PURE__*/React__default.createElement("select", {
|
|
9288
9257
|
value: _this.props.month,
|
|
9289
9258
|
className: "react-datepicker__month-select",
|
|
9290
9259
|
onChange: function onChange(e) {
|
|
@@ -9293,21 +9262,21 @@ var MonthDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9293
9262
|
}, _this.renderSelectOptions(monthNames));
|
|
9294
9263
|
});
|
|
9295
9264
|
_defineProperty(_this, "renderReadView", function (visible, monthNames) {
|
|
9296
|
-
return /*#__PURE__*/
|
|
9265
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9297
9266
|
key: "read",
|
|
9298
9267
|
style: {
|
|
9299
9268
|
visibility: visible ? "visible" : "hidden"
|
|
9300
9269
|
},
|
|
9301
9270
|
className: "react-datepicker__month-read-view",
|
|
9302
9271
|
onClick: _this.toggleDropdown
|
|
9303
|
-
}, /*#__PURE__*/
|
|
9272
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9304
9273
|
className: "react-datepicker__month-read-view--down-arrow"
|
|
9305
|
-
}), /*#__PURE__*/
|
|
9274
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
9306
9275
|
className: "react-datepicker__month-read-view--selected-month"
|
|
9307
9276
|
}, monthNames[_this.props.month]));
|
|
9308
9277
|
});
|
|
9309
9278
|
_defineProperty(_this, "renderDropdown", function (monthNames) {
|
|
9310
|
-
return /*#__PURE__*/
|
|
9279
|
+
return /*#__PURE__*/React__default.createElement(WrappedMonthDropdownOptions, {
|
|
9311
9280
|
key: "dropdown",
|
|
9312
9281
|
month: _this.props.month,
|
|
9313
9282
|
monthNames: monthNames,
|
|
@@ -9355,12 +9324,12 @@ var MonthDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9355
9324
|
renderedDropdown = this.renderSelectMode(monthNames);
|
|
9356
9325
|
break;
|
|
9357
9326
|
}
|
|
9358
|
-
return /*#__PURE__*/
|
|
9327
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9359
9328
|
className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)
|
|
9360
9329
|
}, renderedDropdown);
|
|
9361
9330
|
}
|
|
9362
9331
|
}]);
|
|
9363
|
-
}(
|
|
9332
|
+
}(React__default.Component);
|
|
9364
9333
|
|
|
9365
9334
|
function generateMonthYears(minDate, maxDate) {
|
|
9366
9335
|
var list = [];
|
|
@@ -9381,12 +9350,12 @@ var MonthYearDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
|
9381
9350
|
return _this.state.monthYearsList.map(function (monthYear) {
|
|
9382
9351
|
var monthYearPoint = getTime(monthYear);
|
|
9383
9352
|
var isSameMonthYear = isSameYear(_this.props.date, monthYear) && isSameMonth(_this.props.date, monthYear);
|
|
9384
|
-
return /*#__PURE__*/
|
|
9353
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9385
9354
|
className: isSameMonthYear ? "react-datepicker__month-year-option--selected_month-year" : "react-datepicker__month-year-option",
|
|
9386
9355
|
key: monthYearPoint,
|
|
9387
9356
|
onClick: _this.onChange.bind(_this, monthYearPoint),
|
|
9388
9357
|
"aria-selected": isSameMonthYear ? "true" : undefined
|
|
9389
|
-
}, isSameMonthYear ? /*#__PURE__*/
|
|
9358
|
+
}, isSameMonthYear ? /*#__PURE__*/React__default.createElement("span", {
|
|
9390
9359
|
className: "react-datepicker__month-year-option--selected"
|
|
9391
9360
|
}, "\u2713") : "", formatDate(monthYear, _this.props.dateFormat, _this.props.locale));
|
|
9392
9361
|
});
|
|
@@ -9406,16 +9375,16 @@ var MonthYearDropdownOptions = /*#__PURE__*/function (_React$Component) {
|
|
|
9406
9375
|
return _createClass(MonthYearDropdownOptions, [{
|
|
9407
9376
|
key: "render",
|
|
9408
9377
|
value: function render() {
|
|
9409
|
-
var dropdownClass = clsx
|
|
9378
|
+
var dropdownClass = clsx({
|
|
9410
9379
|
"react-datepicker__month-year-dropdown": true,
|
|
9411
9380
|
"react-datepicker__month-year-dropdown--scrollable": this.props.scrollableMonthYearDropdown
|
|
9412
9381
|
});
|
|
9413
|
-
return /*#__PURE__*/
|
|
9382
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9414
9383
|
className: dropdownClass
|
|
9415
9384
|
}, this.renderOptions());
|
|
9416
9385
|
}
|
|
9417
9386
|
}]);
|
|
9418
|
-
}(
|
|
9387
|
+
}(React__default.Component);
|
|
9419
9388
|
|
|
9420
9389
|
var WrappedMonthYearDropdownOptions = onClickOutsideHOC(MonthYearDropdownOptions);
|
|
9421
9390
|
var MonthYearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
@@ -9435,7 +9404,7 @@ var MonthYearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9435
9404
|
var options = [];
|
|
9436
9405
|
while (!isAfter(currDate, lastDate)) {
|
|
9437
9406
|
var timePoint = getTime(currDate);
|
|
9438
|
-
options.push( /*#__PURE__*/
|
|
9407
|
+
options.push( /*#__PURE__*/React__default.createElement("option", {
|
|
9439
9408
|
key: timePoint,
|
|
9440
9409
|
value: timePoint
|
|
9441
9410
|
}, formatDate(currDate, _this.props.dateFormat, _this.props.locale)));
|
|
@@ -9447,7 +9416,7 @@ var MonthYearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9447
9416
|
_this.onChange(e.target.value);
|
|
9448
9417
|
});
|
|
9449
9418
|
_defineProperty(_this, "renderSelectMode", function () {
|
|
9450
|
-
return /*#__PURE__*/
|
|
9419
|
+
return /*#__PURE__*/React__default.createElement("select", {
|
|
9451
9420
|
value: getTime(getStartOfMonth(_this.props.date)),
|
|
9452
9421
|
className: "react-datepicker__month-year-select",
|
|
9453
9422
|
onChange: _this.onSelectChange
|
|
@@ -9455,7 +9424,7 @@ var MonthYearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9455
9424
|
});
|
|
9456
9425
|
_defineProperty(_this, "renderReadView", function (visible) {
|
|
9457
9426
|
var yearMonth = formatDate(_this.props.date, _this.props.dateFormat, _this.props.locale);
|
|
9458
|
-
return /*#__PURE__*/
|
|
9427
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9459
9428
|
key: "read",
|
|
9460
9429
|
style: {
|
|
9461
9430
|
visibility: visible ? "visible" : "hidden"
|
|
@@ -9464,14 +9433,14 @@ var MonthYearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9464
9433
|
onClick: function onClick(event) {
|
|
9465
9434
|
return _this.toggleDropdown(event);
|
|
9466
9435
|
}
|
|
9467
|
-
}, /*#__PURE__*/
|
|
9436
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9468
9437
|
className: "react-datepicker__month-year-read-view--down-arrow"
|
|
9469
|
-
}), /*#__PURE__*/
|
|
9438
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
9470
9439
|
className: "react-datepicker__month-year-read-view--selected-month-year"
|
|
9471
9440
|
}, yearMonth));
|
|
9472
9441
|
});
|
|
9473
9442
|
_defineProperty(_this, "renderDropdown", function () {
|
|
9474
|
-
return /*#__PURE__*/
|
|
9443
|
+
return /*#__PURE__*/React__default.createElement(WrappedMonthYearDropdownOptions, {
|
|
9475
9444
|
key: "dropdown",
|
|
9476
9445
|
date: _this.props.date,
|
|
9477
9446
|
dateFormat: _this.props.dateFormat,
|
|
@@ -9519,12 +9488,12 @@ var MonthYearDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
9519
9488
|
renderedDropdown = this.renderSelectMode();
|
|
9520
9489
|
break;
|
|
9521
9490
|
}
|
|
9522
|
-
return /*#__PURE__*/
|
|
9491
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9523
9492
|
className: "react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)
|
|
9524
9493
|
}, renderedDropdown);
|
|
9525
9494
|
}
|
|
9526
9495
|
}]);
|
|
9527
|
-
}(
|
|
9496
|
+
}(React__default.Component);
|
|
9528
9497
|
|
|
9529
9498
|
var Day = /*#__PURE__*/function (_React$Component) {
|
|
9530
9499
|
function Day() {
|
|
@@ -9534,7 +9503,7 @@ var Day = /*#__PURE__*/function (_React$Component) {
|
|
|
9534
9503
|
args[_key] = arguments[_key];
|
|
9535
9504
|
}
|
|
9536
9505
|
_this = _callSuper(this, Day, [].concat(args));
|
|
9537
|
-
_defineProperty(_this, "dayEl", /*#__PURE__*/
|
|
9506
|
+
_defineProperty(_this, "dayEl", /*#__PURE__*/React__default.createRef());
|
|
9538
9507
|
_defineProperty(_this, "handleClick", function (event) {
|
|
9539
9508
|
if (!_this.isDisabled() && _this.props.onClick) {
|
|
9540
9509
|
_this.props.onClick(event);
|
|
@@ -9719,7 +9688,7 @@ var Day = /*#__PURE__*/function (_React$Component) {
|
|
|
9719
9688
|
});
|
|
9720
9689
|
_defineProperty(_this, "getClassNames", function (date) {
|
|
9721
9690
|
var dayClassName = _this.props.dayClassName ? _this.props.dayClassName(date) : undefined;
|
|
9722
|
-
return clsx
|
|
9691
|
+
return clsx("react-datepicker__day", dayClassName, "react-datepicker__day--" + getDayOfWeekCode(_this.props.day), {
|
|
9723
9692
|
"react-datepicker__day--disabled": _this.isDisabled(),
|
|
9724
9693
|
"react-datepicker__day--excluded": _this.isExcluded(),
|
|
9725
9694
|
"react-datepicker__day--selected": _this.isSelected(),
|
|
@@ -9814,7 +9783,7 @@ var Day = /*#__PURE__*/function (_React$Component) {
|
|
|
9814
9783
|
return _this.props.renderDayContents ? _this.props.renderDayContents(getDate(_this.props.day), _this.props.day) : getDate(_this.props.day);
|
|
9815
9784
|
});
|
|
9816
9785
|
_defineProperty(_this, "render", function () {
|
|
9817
|
-
return /*#__PURE__*/
|
|
9786
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9818
9787
|
ref: _this.dayEl,
|
|
9819
9788
|
className: _this.getClassNames(_this.props.day),
|
|
9820
9789
|
onKeyDown: _this.handleOnKeyDown,
|
|
@@ -9828,7 +9797,7 @@ var Day = /*#__PURE__*/function (_React$Component) {
|
|
|
9828
9797
|
"aria-disabled": _this.isDisabled(),
|
|
9829
9798
|
"aria-current": _this.isCurrentDay() ? "date" : undefined,
|
|
9830
9799
|
"aria-selected": _this.isSelected() || _this.isInRange()
|
|
9831
|
-
}, _this.renderDayContents(), _this.getTitle() !== "" && /*#__PURE__*/
|
|
9800
|
+
}, _this.renderDayContents(), _this.getTitle() !== "" && /*#__PURE__*/React__default.createElement("span", {
|
|
9832
9801
|
className: "overlay"
|
|
9833
9802
|
}, _this.getTitle()));
|
|
9834
9803
|
});
|
|
@@ -9846,7 +9815,7 @@ var Day = /*#__PURE__*/function (_React$Component) {
|
|
|
9846
9815
|
this.handleFocusDay(prevProps);
|
|
9847
9816
|
}
|
|
9848
9817
|
}]);
|
|
9849
|
-
}(
|
|
9818
|
+
}(React__default.Component);
|
|
9850
9819
|
|
|
9851
9820
|
var WeekNumber = /*#__PURE__*/function (_React$Component) {
|
|
9852
9821
|
function WeekNumber() {
|
|
@@ -9856,7 +9825,7 @@ var WeekNumber = /*#__PURE__*/function (_React$Component) {
|
|
|
9856
9825
|
args[_key] = arguments[_key];
|
|
9857
9826
|
}
|
|
9858
9827
|
_this = _callSuper(this, WeekNumber, [].concat(args));
|
|
9859
|
-
_defineProperty(_this, "weekNumberEl", /*#__PURE__*/
|
|
9828
|
+
_defineProperty(_this, "weekNumberEl", /*#__PURE__*/React__default.createRef());
|
|
9860
9829
|
_defineProperty(_this, "handleClick", function (event) {
|
|
9861
9830
|
if (_this.props.onClick) {
|
|
9862
9831
|
_this.props.onClick(event);
|
|
@@ -9931,9 +9900,9 @@ var WeekNumber = /*#__PURE__*/function (_React$Component) {
|
|
|
9931
9900
|
"react-datepicker__week-number--selected": !!onClick && isSameDay(this.props.date, this.props.selected),
|
|
9932
9901
|
"react-datepicker__week-number--keyboard-selected": this.isKeyboardSelected()
|
|
9933
9902
|
};
|
|
9934
|
-
return /*#__PURE__*/
|
|
9903
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9935
9904
|
ref: this.weekNumberEl,
|
|
9936
|
-
className: clsx
|
|
9905
|
+
className: clsx(weekNumberClasses),
|
|
9937
9906
|
"aria-label": "".concat(ariaLabelPrefix, " ").concat(this.props.weekNumber),
|
|
9938
9907
|
onClick: this.handleClick,
|
|
9939
9908
|
onKeyDown: this.handleOnKeyDown,
|
|
@@ -9948,7 +9917,7 @@ var WeekNumber = /*#__PURE__*/function (_React$Component) {
|
|
|
9948
9917
|
};
|
|
9949
9918
|
}
|
|
9950
9919
|
}]);
|
|
9951
|
-
}(
|
|
9920
|
+
}(React__default.Component);
|
|
9952
9921
|
|
|
9953
9922
|
var Week = /*#__PURE__*/function (_React$Component) {
|
|
9954
9923
|
function Week() {
|
|
@@ -9991,7 +9960,7 @@ var Week = /*#__PURE__*/function (_React$Component) {
|
|
|
9991
9960
|
var weekNumber = _this.formatWeekNumber(startOfWeek);
|
|
9992
9961
|
if (_this.props.showWeekNumber) {
|
|
9993
9962
|
var onClickAction = _this.props.onWeekSelect || _this.props.showWeekPicker ? _this.handleWeekClick.bind(_this, startOfWeek, weekNumber) : undefined;
|
|
9994
|
-
days.push( /*#__PURE__*/
|
|
9963
|
+
days.push( /*#__PURE__*/React__default.createElement(WeekNumber, {
|
|
9995
9964
|
key: "W",
|
|
9996
9965
|
weekNumber: weekNumber,
|
|
9997
9966
|
date: startOfWeek,
|
|
@@ -10009,7 +9978,7 @@ var Week = /*#__PURE__*/function (_React$Component) {
|
|
|
10009
9978
|
}
|
|
10010
9979
|
return days.concat([0, 1, 2, 3, 4, 5, 6].map(function (offset) {
|
|
10011
9980
|
var day = addDays(startOfWeek, offset);
|
|
10012
|
-
return /*#__PURE__*/
|
|
9981
|
+
return /*#__PURE__*/React__default.createElement(Day, {
|
|
10013
9982
|
ariaLabelPrefixWhenEnabled: _this.props.chooseDayAriaLabelPrefix,
|
|
10014
9983
|
ariaLabelPrefixWhenDisabled: _this.props.disabledDayAriaLabelPrefix,
|
|
10015
9984
|
key: day.valueOf(),
|
|
@@ -10072,8 +10041,8 @@ var Week = /*#__PURE__*/function (_React$Component) {
|
|
|
10072
10041
|
"react-datepicker__week--selected": isSameDay(this.startOfWeek(), this.props.selected),
|
|
10073
10042
|
"react-datepicker__week--keyboard-selected": this.isKeyboardSelected()
|
|
10074
10043
|
};
|
|
10075
|
-
return /*#__PURE__*/
|
|
10076
|
-
className: clsx
|
|
10044
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10045
|
+
className: clsx(weekNumberClasses)
|
|
10077
10046
|
}, this.renderDays());
|
|
10078
10047
|
}
|
|
10079
10048
|
}], [{
|
|
@@ -10084,7 +10053,7 @@ var Week = /*#__PURE__*/function (_React$Component) {
|
|
|
10084
10053
|
};
|
|
10085
10054
|
}
|
|
10086
10055
|
}]);
|
|
10087
|
-
}(
|
|
10056
|
+
}(React__default.Component);
|
|
10088
10057
|
|
|
10089
10058
|
var FIXED_HEIGHT_STANDARD_WEEK_COUNT = 6;
|
|
10090
10059
|
var MONTH_COLUMNS_LAYOUT = {
|
|
@@ -10117,10 +10086,10 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10117
10086
|
}
|
|
10118
10087
|
_this = _callSuper(this, Month, [].concat(args));
|
|
10119
10088
|
_defineProperty(_this, "MONTH_REFS", _toConsumableArray(Array(12)).map(function () {
|
|
10120
|
-
return /*#__PURE__*/
|
|
10089
|
+
return /*#__PURE__*/React__default.createRef();
|
|
10121
10090
|
}));
|
|
10122
10091
|
_defineProperty(_this, "QUARTER_REFS", _toConsumableArray(Array(4)).map(function () {
|
|
10123
|
-
return /*#__PURE__*/
|
|
10092
|
+
return /*#__PURE__*/React__default.createRef();
|
|
10124
10093
|
}));
|
|
10125
10094
|
_defineProperty(_this, "isDisabled", function (date) {
|
|
10126
10095
|
return isDayDisabled(date, _this.props);
|
|
@@ -10292,7 +10261,7 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10292
10261
|
var selected = _this.props.showWeekPicker ? getStartOfWeek(_this.props.selected, _this.props.locale, _this.props.calendarStartDay) : _this.props.selected;
|
|
10293
10262
|
var preSelection = _this.props.showWeekPicker ? getStartOfWeek(_this.props.preSelection, _this.props.locale, _this.props.calendarStartDay) : _this.props.preSelection;
|
|
10294
10263
|
while (true) {
|
|
10295
|
-
weeks.push( /*#__PURE__*/
|
|
10264
|
+
weeks.push( /*#__PURE__*/React__default.createElement(Week, {
|
|
10296
10265
|
ariaLabelPrefix: _this.props.weekAriaLabelPrefix,
|
|
10297
10266
|
chooseDayAriaLabelPrefix: _this.props.chooseDayAriaLabelPrefix,
|
|
10298
10267
|
disabledDayAriaLabelPrefix: _this.props.disabledDayAriaLabelPrefix,
|
|
@@ -10471,7 +10440,7 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10471
10440
|
includeDates = _this$props10.includeDates;
|
|
10472
10441
|
var _monthClassName = monthClassName ? monthClassName(setMonth(day, m)) : undefined;
|
|
10473
10442
|
var labelDate = setMonth(day, m);
|
|
10474
|
-
return clsx
|
|
10443
|
+
return clsx("react-datepicker__month-text", "react-datepicker__month-".concat(m), _monthClassName, {
|
|
10475
10444
|
"react-datepicker__month-text--disabled": (minDate || maxDate || excludeDates || includeDates) && isMonthDisabled(labelDate, _this.props),
|
|
10476
10445
|
"react-datepicker__month-text--selected": _this.isSelectedMonth(day, m, selected),
|
|
10477
10446
|
"react-datepicker__month-text--keyboard-selected": !_this.props.disabledKeyboardNavigation && _this.isSelectedMonth(day, m, preSelection),
|
|
@@ -10515,7 +10484,7 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10515
10484
|
maxDate = _this$props12.maxDate,
|
|
10516
10485
|
preSelection = _this$props12.preSelection,
|
|
10517
10486
|
disabledKeyboardNavigation = _this$props12.disabledKeyboardNavigation;
|
|
10518
|
-
return clsx
|
|
10487
|
+
return clsx("react-datepicker__quarter-text", "react-datepicker__quarter-".concat(q), {
|
|
10519
10488
|
"react-datepicker__quarter-text--disabled": (minDate || maxDate) && isQuarterDisabled(setQuarter(day, q), _this.props),
|
|
10520
10489
|
"react-datepicker__quarter-text--selected": _this.isSelectedQuarter(day, q, selected),
|
|
10521
10490
|
"react-datepicker__quarter-text--keyboard-selected": !disabledKeyboardNavigation && _this.isSelectedQuarter(day, q, preSelection),
|
|
@@ -10553,11 +10522,11 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10553
10522
|
selected = _this$props15.selected;
|
|
10554
10523
|
var monthColumns = MONTH_COLUMNS[getMonthColumnsLayout(showFourColumnMonthYearPicker, showTwoColumnMonthYearPicker)].grid;
|
|
10555
10524
|
return monthColumns.map(function (month, i) {
|
|
10556
|
-
return /*#__PURE__*/
|
|
10525
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10557
10526
|
className: "react-datepicker__month-wrapper",
|
|
10558
10527
|
key: i
|
|
10559
10528
|
}, month.map(function (m, j) {
|
|
10560
|
-
return /*#__PURE__*/
|
|
10529
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10561
10530
|
ref: _this.MONTH_REFS[m],
|
|
10562
10531
|
key: j,
|
|
10563
10532
|
onClick: function onClick(ev) {
|
|
@@ -10591,10 +10560,10 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10591
10560
|
day = _this$props16.day,
|
|
10592
10561
|
selected = _this$props16.selected;
|
|
10593
10562
|
var quarters = [1, 2, 3, 4];
|
|
10594
|
-
return /*#__PURE__*/
|
|
10563
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10595
10564
|
className: "react-datepicker__quarter-wrapper"
|
|
10596
10565
|
}, quarters.map(function (q, j) {
|
|
10597
|
-
return /*#__PURE__*/
|
|
10566
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10598
10567
|
key: j,
|
|
10599
10568
|
ref: _this.QUARTER_REFS[j],
|
|
10600
10569
|
role: "option",
|
|
@@ -10625,7 +10594,7 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10625
10594
|
showMonthYearPicker = _this$props17.showMonthYearPicker,
|
|
10626
10595
|
showQuarterYearPicker = _this$props17.showQuarterYearPicker,
|
|
10627
10596
|
showWeekPicker = _this$props17.showWeekPicker;
|
|
10628
|
-
return clsx
|
|
10597
|
+
return clsx("react-datepicker__month", {
|
|
10629
10598
|
"react-datepicker__month--selecting-range": selectingDate && (selectsStart || selectsEnd)
|
|
10630
10599
|
}, {
|
|
10631
10600
|
"react-datepicker__monthPicker": showMonthYearPicker
|
|
@@ -10648,7 +10617,7 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10648
10617
|
_this$props18$ariaLab = _this$props18.ariaLabelPrefix,
|
|
10649
10618
|
ariaLabelPrefix = _this$props18$ariaLab === void 0 ? "Month " : _this$props18$ariaLab;
|
|
10650
10619
|
var formattedAriaLabelPrefix = ariaLabelPrefix ? ariaLabelPrefix.trim() + " " : "";
|
|
10651
|
-
return /*#__PURE__*/
|
|
10620
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10652
10621
|
className: this.getClassNames(),
|
|
10653
10622
|
onMouseLeave: !this.props.usePointerEvent ? this.handleMouseLeave : undefined,
|
|
10654
10623
|
onPointerLeave: this.props.usePointerEvent ? this.handleMouseLeave : undefined,
|
|
@@ -10657,7 +10626,7 @@ var Month = /*#__PURE__*/function (_React$Component) {
|
|
|
10657
10626
|
}, showMonthYearPicker ? this.renderMonths() : showQuarterYearPicker ? this.renderQuarters() : this.renderWeeks());
|
|
10658
10627
|
}
|
|
10659
10628
|
}]);
|
|
10660
|
-
}(
|
|
10629
|
+
}(React__default.Component);
|
|
10661
10630
|
|
|
10662
10631
|
var Time = /*#__PURE__*/function (_React$Component) {
|
|
10663
10632
|
function Time() {
|
|
@@ -10747,7 +10716,7 @@ var Time = /*#__PURE__*/function (_React$Component) {
|
|
|
10747
10716
|
return prev;
|
|
10748
10717
|
}, times[0]);
|
|
10749
10718
|
return times.map(function (time, i) {
|
|
10750
|
-
return /*#__PURE__*/
|
|
10719
|
+
return /*#__PURE__*/React__default.createElement("li", {
|
|
10751
10720
|
key: i,
|
|
10752
10721
|
onClick: _this.handleClick.bind(_this, time),
|
|
10753
10722
|
className: _this.liClasses(time),
|
|
@@ -10785,20 +10754,20 @@ var Time = /*#__PURE__*/function (_React$Component) {
|
|
|
10785
10754
|
value: function render() {
|
|
10786
10755
|
var _this2 = this;
|
|
10787
10756
|
var height = this.state.height;
|
|
10788
|
-
return /*#__PURE__*/
|
|
10757
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10789
10758
|
className: "react-datepicker__time-container ".concat(this.props.todayButton ? "react-datepicker__time-container--with-today-button" : "")
|
|
10790
|
-
}, /*#__PURE__*/
|
|
10759
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10791
10760
|
className: "react-datepicker__header react-datepicker__header--time ".concat(this.props.showTimeSelectOnly ? "react-datepicker__header--time--only" : ""),
|
|
10792
10761
|
ref: function ref(header) {
|
|
10793
10762
|
_this2.header = header;
|
|
10794
10763
|
}
|
|
10795
|
-
}, /*#__PURE__*/
|
|
10764
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10796
10765
|
className: "react-datepicker-time__header"
|
|
10797
|
-
}, this.props.timeCaption)), /*#__PURE__*/
|
|
10766
|
+
}, this.props.timeCaption)), /*#__PURE__*/React__default.createElement("div", {
|
|
10798
10767
|
className: "react-datepicker__time"
|
|
10799
|
-
}, /*#__PURE__*/
|
|
10768
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10800
10769
|
className: "react-datepicker__time-box"
|
|
10801
|
-
}, /*#__PURE__*/
|
|
10770
|
+
}, /*#__PURE__*/React__default.createElement("ul", {
|
|
10802
10771
|
className: "react-datepicker__time-list",
|
|
10803
10772
|
ref: function ref(list) {
|
|
10804
10773
|
_this2.list = list;
|
|
@@ -10821,7 +10790,7 @@ var Time = /*#__PURE__*/function (_React$Component) {
|
|
|
10821
10790
|
};
|
|
10822
10791
|
}
|
|
10823
10792
|
}]);
|
|
10824
|
-
}(
|
|
10793
|
+
}(React__default.Component);
|
|
10825
10794
|
_defineProperty(Time, "calcCenterPosition", function (listHeight, centerLiRef) {
|
|
10826
10795
|
return centerLiRef.offsetTop - (listHeight / 2 - centerLiRef.clientHeight / 2);
|
|
10827
10796
|
});
|
|
@@ -10832,7 +10801,7 @@ var Year = /*#__PURE__*/function (_React$Component) {
|
|
|
10832
10801
|
_classCallCheck(this, Year);
|
|
10833
10802
|
_this = _callSuper(this, Year, [props]);
|
|
10834
10803
|
_defineProperty(_this, "YEAR_REFS", _toConsumableArray(Array(_this.props.yearItemNumber)).map(function () {
|
|
10835
|
-
return /*#__PURE__*/
|
|
10804
|
+
return /*#__PURE__*/React__default.createRef();
|
|
10836
10805
|
}));
|
|
10837
10806
|
_defineProperty(_this, "isDisabled", function (date) {
|
|
10838
10807
|
return isDayDisabled(date, _this.props);
|
|
@@ -10969,7 +10938,7 @@ var Year = /*#__PURE__*/function (_React$Component) {
|
|
|
10969
10938
|
includeDates = _this$props5.includeDates,
|
|
10970
10939
|
filterDate = _this$props5.filterDate,
|
|
10971
10940
|
yearClassName = _this$props5.yearClassName;
|
|
10972
|
-
return clsx
|
|
10941
|
+
return clsx("react-datepicker__year-text", "react-datepicker__year-".concat(y), yearClassName ? yearClassName(setYear(date, y)) : undefined, {
|
|
10973
10942
|
"react-datepicker__year-text--selected": y === getYear(selected),
|
|
10974
10943
|
"react-datepicker__year-text--disabled": (minDate || maxDate || excludeDates || includeDates || filterDate) && isYearDisabled(y, _this.props),
|
|
10975
10944
|
"react-datepicker__year-text--keyboard-selected": _this.isKeyboardSelected(y),
|
|
@@ -10993,7 +10962,7 @@ var Year = /*#__PURE__*/function (_React$Component) {
|
|
|
10993
10962
|
selectsStart = _this$props6.selectsStart,
|
|
10994
10963
|
selectsEnd = _this$props6.selectsEnd,
|
|
10995
10964
|
selectsRange = _this$props6.selectsRange;
|
|
10996
|
-
return clsx
|
|
10965
|
+
return clsx("react-datepicker__year", {
|
|
10997
10966
|
"react-datepicker__year--selecting-range": selectingDate && (selectsStart || selectsEnd || selectsRange)
|
|
10998
10967
|
});
|
|
10999
10968
|
});
|
|
@@ -11017,7 +10986,7 @@ var Year = /*#__PURE__*/function (_React$Component) {
|
|
|
11017
10986
|
startPeriod = _utils$getYearsPeriod2.startPeriod,
|
|
11018
10987
|
endPeriod = _utils$getYearsPeriod2.endPeriod;
|
|
11019
10988
|
var _loop = function _loop(y) {
|
|
11020
|
-
yearsList.push( /*#__PURE__*/
|
|
10989
|
+
yearsList.push( /*#__PURE__*/React__default.createElement("div", {
|
|
11021
10990
|
ref: _this2.YEAR_REFS[y - startPeriod],
|
|
11022
10991
|
onClick: function onClick(ev) {
|
|
11023
10992
|
_this2.onYearClick(ev, y);
|
|
@@ -11050,16 +11019,16 @@ var Year = /*#__PURE__*/function (_React$Component) {
|
|
|
11050
11019
|
for (var y = startPeriod; y <= endPeriod; y++) {
|
|
11051
11020
|
_loop(y);
|
|
11052
11021
|
}
|
|
11053
|
-
return /*#__PURE__*/
|
|
11022
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11054
11023
|
className: this.getYearContainerClassNames()
|
|
11055
|
-
}, /*#__PURE__*/
|
|
11024
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11056
11025
|
className: "react-datepicker__year-wrapper",
|
|
11057
11026
|
onMouseLeave: !this.props.usePointerEvent ? this.props.clearSelectingDate : undefined,
|
|
11058
11027
|
onPointerLeave: this.props.usePointerEvent ? this.props.clearSelectingDate : undefined
|
|
11059
11028
|
}, yearsList));
|
|
11060
11029
|
}
|
|
11061
11030
|
}]);
|
|
11062
|
-
}(
|
|
11031
|
+
}(React__default.Component);
|
|
11063
11032
|
|
|
11064
11033
|
var inputTime = /*#__PURE__*/function (_React$Component) {
|
|
11065
11034
|
function inputTime(props) {
|
|
@@ -11084,13 +11053,13 @@ var inputTime = /*#__PURE__*/function (_React$Component) {
|
|
|
11084
11053
|
timeString = _this$props.timeString,
|
|
11085
11054
|
customTimeInput = _this$props.customTimeInput;
|
|
11086
11055
|
if (customTimeInput) {
|
|
11087
|
-
return /*#__PURE__*/
|
|
11056
|
+
return /*#__PURE__*/React__default.cloneElement(customTimeInput, {
|
|
11088
11057
|
date: date,
|
|
11089
11058
|
value: time,
|
|
11090
11059
|
onChange: _this.onTimeChange
|
|
11091
11060
|
});
|
|
11092
11061
|
}
|
|
11093
|
-
return /*#__PURE__*/
|
|
11062
|
+
return /*#__PURE__*/React__default.createElement("input", {
|
|
11094
11063
|
type: "time",
|
|
11095
11064
|
className: "react-datepicker-time__input",
|
|
11096
11065
|
placeholder: "Time",
|
|
@@ -11111,13 +11080,13 @@ var inputTime = /*#__PURE__*/function (_React$Component) {
|
|
|
11111
11080
|
return _createClass(inputTime, [{
|
|
11112
11081
|
key: "render",
|
|
11113
11082
|
value: function render() {
|
|
11114
|
-
return /*#__PURE__*/
|
|
11083
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11115
11084
|
className: "react-datepicker__input-time-container"
|
|
11116
|
-
}, /*#__PURE__*/
|
|
11085
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11117
11086
|
className: "react-datepicker-time__caption"
|
|
11118
|
-
}, this.props.timeInputLabel), /*#__PURE__*/
|
|
11087
|
+
}, this.props.timeInputLabel), /*#__PURE__*/React__default.createElement("div", {
|
|
11119
11088
|
className: "react-datepicker-time__input-container"
|
|
11120
|
-
}, /*#__PURE__*/
|
|
11089
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11121
11090
|
className: "react-datepicker-time__input"
|
|
11122
11091
|
}, this.renderTimeInput())));
|
|
11123
11092
|
}
|
|
@@ -11134,7 +11103,7 @@ var inputTime = /*#__PURE__*/function (_React$Component) {
|
|
|
11134
11103
|
return null;
|
|
11135
11104
|
}
|
|
11136
11105
|
}]);
|
|
11137
|
-
}(
|
|
11106
|
+
}(React__default.Component);
|
|
11138
11107
|
|
|
11139
11108
|
function CalendarContainer(_ref) {
|
|
11140
11109
|
var _ref$showTimeSelectOn = _ref.showTimeSelectOnly,
|
|
@@ -11144,7 +11113,7 @@ function CalendarContainer(_ref) {
|
|
|
11144
11113
|
className = _ref.className,
|
|
11145
11114
|
children = _ref.children;
|
|
11146
11115
|
var ariaLabel = showTimeSelectOnly ? "Choose Time" : "Choose Date".concat(showTime ? " and Time" : "");
|
|
11147
|
-
return /*#__PURE__*/
|
|
11116
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11148
11117
|
className: className,
|
|
11149
11118
|
role: "dialog",
|
|
11150
11119
|
"aria-label": ariaLabel,
|
|
@@ -11317,7 +11286,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11317
11286
|
var startOfWeek = getStartOfWeek(date, _this.props.locale, _this.props.calendarStartDay);
|
|
11318
11287
|
var dayNames = [];
|
|
11319
11288
|
if (_this.props.showWeekNumbers) {
|
|
11320
|
-
dayNames.push( /*#__PURE__*/
|
|
11289
|
+
dayNames.push( /*#__PURE__*/React__default.createElement("div", {
|
|
11321
11290
|
key: "W",
|
|
11322
11291
|
className: "react-datepicker__day-name"
|
|
11323
11292
|
}, _this.props.weekLabel || "#"));
|
|
@@ -11326,9 +11295,9 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11326
11295
|
var day = addDays(startOfWeek, offset);
|
|
11327
11296
|
var weekDayName = _this.formatWeekday(day, _this.props.locale);
|
|
11328
11297
|
var weekDayClassName = _this.props.weekDayClassName ? _this.props.weekDayClassName(day) : undefined;
|
|
11329
|
-
return /*#__PURE__*/
|
|
11298
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11330
11299
|
key: offset,
|
|
11331
|
-
className: clsx
|
|
11300
|
+
className: clsx("react-datepicker__day-name", weekDayClassName)
|
|
11332
11301
|
}, weekDayName);
|
|
11333
11302
|
}));
|
|
11334
11303
|
});
|
|
@@ -11391,13 +11360,13 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11391
11360
|
previousMonthAriaLabel = _this$props3$previous === void 0 ? typeof previousMonthButtonLabel === "string" ? previousMonthButtonLabel : "Previous Month" : _this$props3$previous,
|
|
11392
11361
|
_this$props3$previous2 = _this$props3.previousYearAriaLabel,
|
|
11393
11362
|
previousYearAriaLabel = _this$props3$previous2 === void 0 ? typeof previousYearButtonLabel === "string" ? previousYearButtonLabel : "Previous Year" : _this$props3$previous2;
|
|
11394
|
-
return /*#__PURE__*/
|
|
11363
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
11395
11364
|
type: "button",
|
|
11396
11365
|
className: classes.join(" "),
|
|
11397
11366
|
onClick: clickHandler,
|
|
11398
11367
|
onKeyDown: _this.props.handleOnKeyDown,
|
|
11399
11368
|
"aria-label": isForYear ? previousYearAriaLabel : previousMonthAriaLabel
|
|
11400
|
-
}, /*#__PURE__*/
|
|
11369
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
11401
11370
|
className: iconClasses.join(" ")
|
|
11402
11371
|
}, isForYear ? _this.props.previousYearButtonLabel : _this.props.previousMonthButtonLabel));
|
|
11403
11372
|
});
|
|
@@ -11455,13 +11424,13 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11455
11424
|
nextMonthAriaLabel = _this$props5$nextMont === void 0 ? typeof nextMonthButtonLabel === "string" ? nextMonthButtonLabel : "Next Month" : _this$props5$nextMont,
|
|
11456
11425
|
_this$props5$nextYear = _this$props5.nextYearAriaLabel,
|
|
11457
11426
|
nextYearAriaLabel = _this$props5$nextYear === void 0 ? typeof nextYearButtonLabel === "string" ? nextYearButtonLabel : "Next Year" : _this$props5$nextYear;
|
|
11458
|
-
return /*#__PURE__*/
|
|
11427
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
11459
11428
|
type: "button",
|
|
11460
11429
|
className: classes.join(" "),
|
|
11461
11430
|
onClick: clickHandler,
|
|
11462
11431
|
onKeyDown: _this.props.handleOnKeyDown,
|
|
11463
11432
|
"aria-label": isForYear ? nextYearAriaLabel : nextMonthAriaLabel
|
|
11464
|
-
}, /*#__PURE__*/
|
|
11433
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
11465
11434
|
className: iconClasses.join(" ")
|
|
11466
11435
|
}, isForYear ? _this.props.nextYearButtonLabel : _this.props.nextMonthButtonLabel));
|
|
11467
11436
|
});
|
|
@@ -11477,7 +11446,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11477
11446
|
if (_this.props.showMonthYearDropdown) {
|
|
11478
11447
|
classes.push("react-datepicker__current-month--hasMonthYearDropdown");
|
|
11479
11448
|
}
|
|
11480
|
-
return /*#__PURE__*/
|
|
11449
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11481
11450
|
className: classes.join(" ")
|
|
11482
11451
|
}, formatDate(date, _this.props.dateFormat, _this.props.locale));
|
|
11483
11452
|
});
|
|
@@ -11486,7 +11455,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11486
11455
|
if (!_this.props.showYearDropdown || overrideHide) {
|
|
11487
11456
|
return;
|
|
11488
11457
|
}
|
|
11489
|
-
return /*#__PURE__*/
|
|
11458
|
+
return /*#__PURE__*/React__default.createElement(YearDropdown, {
|
|
11490
11459
|
adjustDateOnChange: _this.props.adjustDateOnChange,
|
|
11491
11460
|
date: _this.state.date,
|
|
11492
11461
|
onSelect: _this.props.onSelect,
|
|
@@ -11505,7 +11474,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11505
11474
|
if (!_this.props.showMonthDropdown || overrideHide) {
|
|
11506
11475
|
return;
|
|
11507
11476
|
}
|
|
11508
|
-
return /*#__PURE__*/
|
|
11477
|
+
return /*#__PURE__*/React__default.createElement(MonthDropdown, {
|
|
11509
11478
|
dropdownMode: _this.props.dropdownMode,
|
|
11510
11479
|
locale: _this.props.locale,
|
|
11511
11480
|
onChange: _this.changeMonth,
|
|
@@ -11518,7 +11487,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11518
11487
|
if (!_this.props.showMonthYearDropdown || overrideHide) {
|
|
11519
11488
|
return;
|
|
11520
11489
|
}
|
|
11521
|
-
return /*#__PURE__*/
|
|
11490
|
+
return /*#__PURE__*/React__default.createElement(MonthYearDropdown, {
|
|
11522
11491
|
dropdownMode: _this.props.dropdownMode,
|
|
11523
11492
|
locale: _this.props.locale,
|
|
11524
11493
|
dateFormat: _this.props.dateFormat,
|
|
@@ -11537,7 +11506,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11537
11506
|
if (!_this.props.todayButton || _this.props.showTimeSelectOnly) {
|
|
11538
11507
|
return;
|
|
11539
11508
|
}
|
|
11540
|
-
return /*#__PURE__*/
|
|
11509
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11541
11510
|
className: "react-datepicker__today-button",
|
|
11542
11511
|
onClick: function onClick(e) {
|
|
11543
11512
|
return _this.handleTodayButtonClick(e);
|
|
@@ -11547,12 +11516,12 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11547
11516
|
_defineProperty(_this, "renderDefaultHeader", function (_ref8) {
|
|
11548
11517
|
var monthDate = _ref8.monthDate,
|
|
11549
11518
|
i = _ref8.i;
|
|
11550
|
-
return /*#__PURE__*/
|
|
11519
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11551
11520
|
className: "react-datepicker__header ".concat(_this.props.showTimeSelect ? "react-datepicker__header--has-time-select" : "")
|
|
11552
|
-
}, _this.renderCurrentMonth(monthDate), /*#__PURE__*/
|
|
11521
|
+
}, _this.renderCurrentMonth(monthDate), /*#__PURE__*/React__default.createElement("div", {
|
|
11553
11522
|
className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(_this.props.dropdownMode),
|
|
11554
11523
|
onFocus: _this.handleDropdownFocus
|
|
11555
|
-
}, _this.renderMonthDropdown(i !== 0), _this.renderMonthYearDropdown(i !== 0), _this.renderYearDropdown(i !== 0)), /*#__PURE__*/
|
|
11524
|
+
}, _this.renderMonthDropdown(i !== 0), _this.renderMonthYearDropdown(i !== 0), _this.renderYearDropdown(i !== 0)), /*#__PURE__*/React__default.createElement("div", {
|
|
11556
11525
|
className: "react-datepicker__day-names"
|
|
11557
11526
|
}, _this.header(monthDate)));
|
|
11558
11527
|
});
|
|
@@ -11568,7 +11537,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11568
11537
|
var prevYearButtonDisabled = yearDisabledBefore(_this.state.date, _this.props);
|
|
11569
11538
|
var nextYearButtonDisabled = yearDisabledAfter(_this.state.date, _this.props);
|
|
11570
11539
|
var showDayNames = !_this.props.showMonthYearPicker && !_this.props.showQuarterYearPicker && !_this.props.showYearPicker;
|
|
11571
|
-
return /*#__PURE__*/
|
|
11540
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11572
11541
|
className: "react-datepicker__header react-datepicker__header--custom",
|
|
11573
11542
|
onFocus: _this.props.onDropdownFocus
|
|
11574
11543
|
}, _this.props.renderCustomHeader(_objectSpread2(_objectSpread2({}, _this.state), {}, {
|
|
@@ -11584,7 +11553,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11584
11553
|
nextMonthButtonDisabled: nextMonthButtonDisabled,
|
|
11585
11554
|
prevYearButtonDisabled: prevYearButtonDisabled,
|
|
11586
11555
|
nextYearButtonDisabled: nextYearButtonDisabled
|
|
11587
|
-
})), showDayNames && /*#__PURE__*/
|
|
11556
|
+
})), showDayNames && /*#__PURE__*/React__default.createElement("div", {
|
|
11588
11557
|
className: "react-datepicker__day-names"
|
|
11589
11558
|
}, _this.header(monthDate)));
|
|
11590
11559
|
});
|
|
@@ -11596,7 +11565,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11596
11565
|
var _getYearsPeriod = getYearsPeriod(monthDate, yearItemNumber),
|
|
11597
11566
|
startPeriod = _getYearsPeriod.startPeriod,
|
|
11598
11567
|
endPeriod = _getYearsPeriod.endPeriod;
|
|
11599
|
-
return /*#__PURE__*/
|
|
11568
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11600
11569
|
className: "react-datepicker__header react-datepicker-year-header"
|
|
11601
11570
|
}, showYearPicker ? "".concat(startPeriod, " - ").concat(endPeriod) : getYear(monthDate));
|
|
11602
11571
|
});
|
|
@@ -11625,7 +11594,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11625
11594
|
var monthKey = "month-".concat(i);
|
|
11626
11595
|
var monthShowsDuplicateDaysEnd = i < _this.props.monthsShown - 1;
|
|
11627
11596
|
var monthShowsDuplicateDaysStart = i > 0;
|
|
11628
|
-
monthList.push( /*#__PURE__*/
|
|
11597
|
+
monthList.push( /*#__PURE__*/React__default.createElement("div", {
|
|
11629
11598
|
key: monthKey,
|
|
11630
11599
|
ref: function ref(div) {
|
|
11631
11600
|
_this.monthContainer = div;
|
|
@@ -11634,7 +11603,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11634
11603
|
}, _this.renderHeader({
|
|
11635
11604
|
monthDate: monthDate,
|
|
11636
11605
|
i: i
|
|
11637
|
-
}), /*#__PURE__*/
|
|
11606
|
+
}), /*#__PURE__*/React__default.createElement(Month, {
|
|
11638
11607
|
chooseDayAriaLabelPrefix: _this.props.chooseDayAriaLabelPrefix,
|
|
11639
11608
|
disabledDayAriaLabelPrefix: _this.props.disabledDayAriaLabelPrefix,
|
|
11640
11609
|
weekAriaLabelPrefix: _this.props.weekAriaLabelPrefix,
|
|
@@ -11707,11 +11676,11 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11707
11676
|
return;
|
|
11708
11677
|
}
|
|
11709
11678
|
if (_this.props.showYearPicker) {
|
|
11710
|
-
return /*#__PURE__*/
|
|
11679
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11711
11680
|
className: "react-datepicker__year--container"
|
|
11712
11681
|
}, _this.renderHeader({
|
|
11713
11682
|
monthDate: _this.state.date
|
|
11714
|
-
}), /*#__PURE__*/
|
|
11683
|
+
}), /*#__PURE__*/React__default.createElement(Year, _extends({
|
|
11715
11684
|
onDayClick: _this.handleDayClick,
|
|
11716
11685
|
selectingDate: _this.state.selectingDate,
|
|
11717
11686
|
clearSelectingDate: _this.clearSelectingDate,
|
|
@@ -11724,7 +11693,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11724
11693
|
});
|
|
11725
11694
|
_defineProperty(_this, "renderTimeSection", function () {
|
|
11726
11695
|
if (_this.props.showTimeSelect && (_this.state.monthContainer || _this.props.showTimeSelectOnly)) {
|
|
11727
|
-
return /*#__PURE__*/
|
|
11696
|
+
return /*#__PURE__*/React__default.createElement(Time, {
|
|
11728
11697
|
selected: _this.props.selected,
|
|
11729
11698
|
openToDate: _this.props.openToDate,
|
|
11730
11699
|
onChange: _this.props.onTimeChange,
|
|
@@ -11755,7 +11724,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11755
11724
|
var timeValid = isValid(time) && Boolean(_this.props.selected);
|
|
11756
11725
|
var timeString = timeValid ? "".concat(addZero(time.getHours()), ":").concat(addZero(time.getMinutes())) : "";
|
|
11757
11726
|
if (_this.props.showTimeInput) {
|
|
11758
|
-
return /*#__PURE__*/
|
|
11727
|
+
return /*#__PURE__*/React__default.createElement(inputTime, {
|
|
11759
11728
|
date: time,
|
|
11760
11729
|
timeString: timeString,
|
|
11761
11730
|
timeInputLabel: _this.props.timeInputLabel,
|
|
@@ -11776,7 +11745,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11776
11745
|
} else {
|
|
11777
11746
|
ariaLiveMessage = "".concat(getMonthInLocale(getMonth(_this.state.date), _this.props.locale), " ").concat(getYear(_this.state.date));
|
|
11778
11747
|
}
|
|
11779
|
-
return /*#__PURE__*/
|
|
11748
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
11780
11749
|
role: "alert",
|
|
11781
11750
|
"aria-live": "polite",
|
|
11782
11751
|
className: "react-datepicker__aria-live"
|
|
@@ -11784,12 +11753,12 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11784
11753
|
});
|
|
11785
11754
|
_defineProperty(_this, "renderChildren", function () {
|
|
11786
11755
|
if (_this.props.children) {
|
|
11787
|
-
return /*#__PURE__*/
|
|
11756
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11788
11757
|
className: "react-datepicker__children-container"
|
|
11789
11758
|
}, _this.props.children);
|
|
11790
11759
|
}
|
|
11791
11760
|
});
|
|
11792
|
-
_this.containerRef = /*#__PURE__*/
|
|
11761
|
+
_this.containerRef = /*#__PURE__*/React__default.createRef();
|
|
11793
11762
|
_this.state = {
|
|
11794
11763
|
date: _this.getDateInView(),
|
|
11795
11764
|
selectingDate: null,
|
|
@@ -11836,13 +11805,13 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11836
11805
|
key: "render",
|
|
11837
11806
|
value: function render() {
|
|
11838
11807
|
var Container = this.props.container || CalendarContainer;
|
|
11839
|
-
return /*#__PURE__*/
|
|
11808
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11840
11809
|
style: {
|
|
11841
11810
|
display: "contents"
|
|
11842
11811
|
},
|
|
11843
11812
|
ref: this.containerRef
|
|
11844
|
-
}, /*#__PURE__*/
|
|
11845
|
-
className: clsx
|
|
11813
|
+
}, /*#__PURE__*/React__default.createElement(Container, {
|
|
11814
|
+
className: clsx("react-datepicker", this.props.className, {
|
|
11846
11815
|
"react-datepicker--time-only": this.props.showTimeSelectOnly
|
|
11847
11816
|
}),
|
|
11848
11817
|
showTime: this.props.showTimeSelect || this.props.showTimeInput,
|
|
@@ -11866,7 +11835,7 @@ var Calendar = /*#__PURE__*/function (_React$Component) {
|
|
|
11866
11835
|
};
|
|
11867
11836
|
}
|
|
11868
11837
|
}]);
|
|
11869
|
-
}(
|
|
11838
|
+
}(React__default.Component);
|
|
11870
11839
|
|
|
11871
11840
|
var CalendarIcon = function CalendarIcon(_ref) {
|
|
11872
11841
|
var icon = _ref.icon,
|
|
@@ -11874,8 +11843,8 @@ var CalendarIcon = function CalendarIcon(_ref) {
|
|
|
11874
11843
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
11875
11844
|
_onClick = _ref.onClick;
|
|
11876
11845
|
var defaultClass = "react-datepicker__calendar-icon";
|
|
11877
|
-
if ( /*#__PURE__*/
|
|
11878
|
-
return /*#__PURE__*/
|
|
11846
|
+
if ( /*#__PURE__*/React__default.isValidElement(icon)) {
|
|
11847
|
+
return /*#__PURE__*/React__default.cloneElement(icon, {
|
|
11879
11848
|
className: "".concat(icon.props.className || "", " ").concat(defaultClass, " ").concat(className),
|
|
11880
11849
|
onClick: function onClick(e) {
|
|
11881
11850
|
if (typeof icon.props.onClick === "function") {
|
|
@@ -11888,7 +11857,7 @@ var CalendarIcon = function CalendarIcon(_ref) {
|
|
|
11888
11857
|
});
|
|
11889
11858
|
}
|
|
11890
11859
|
if (typeof icon === "string") {
|
|
11891
|
-
return /*#__PURE__*/
|
|
11860
|
+
return /*#__PURE__*/React__default.createElement("i", {
|
|
11892
11861
|
className: "".concat(defaultClass, " ").concat(icon, " ").concat(className),
|
|
11893
11862
|
"aria-hidden": "true",
|
|
11894
11863
|
onClick: _onClick
|
|
@@ -11896,12 +11865,12 @@ var CalendarIcon = function CalendarIcon(_ref) {
|
|
|
11896
11865
|
}
|
|
11897
11866
|
|
|
11898
11867
|
// Default SVG Icon
|
|
11899
|
-
return /*#__PURE__*/
|
|
11868
|
+
return /*#__PURE__*/React__default.createElement("svg", {
|
|
11900
11869
|
className: "".concat(defaultClass, " ").concat(className),
|
|
11901
11870
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11902
11871
|
viewBox: "0 0 448 512",
|
|
11903
11872
|
onClick: _onClick
|
|
11904
|
-
}, /*#__PURE__*/
|
|
11873
|
+
}, /*#__PURE__*/React__default.createElement("path", {
|
|
11905
11874
|
d: "M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"
|
|
11906
11875
|
}));
|
|
11907
11876
|
};
|
|
@@ -11935,10 +11904,10 @@ var Portal = /*#__PURE__*/function (_React$Component) {
|
|
|
11935
11904
|
}, {
|
|
11936
11905
|
key: "render",
|
|
11937
11906
|
value: function render() {
|
|
11938
|
-
return /*#__PURE__*/
|
|
11907
|
+
return /*#__PURE__*/ReactDOM__default.createPortal(this.props.children, this.el);
|
|
11939
11908
|
}
|
|
11940
11909
|
}]);
|
|
11941
|
-
}(
|
|
11910
|
+
}(React__default.Component);
|
|
11942
11911
|
|
|
11943
11912
|
// TabLoop prevents the user from tabbing outside of the popper
|
|
11944
11913
|
// It creates a tabindex loop so that "Tab" on the last element will focus the first element
|
|
@@ -11966,7 +11935,7 @@ var TabLoop = /*#__PURE__*/function (_React$Component) {
|
|
|
11966
11935
|
var tabChildren = _this.getTabChildren();
|
|
11967
11936
|
tabChildren && tabChildren.length > 1 && tabChildren[0].focus();
|
|
11968
11937
|
});
|
|
11969
|
-
_this.tabLoopRef = /*#__PURE__*/
|
|
11938
|
+
_this.tabLoopRef = /*#__PURE__*/React__default.createRef();
|
|
11970
11939
|
return _this;
|
|
11971
11940
|
}
|
|
11972
11941
|
_inherits(TabLoop, _React$Component);
|
|
@@ -11976,14 +11945,14 @@ var TabLoop = /*#__PURE__*/function (_React$Component) {
|
|
|
11976
11945
|
if (!this.props.enableTabLoop) {
|
|
11977
11946
|
return this.props.children;
|
|
11978
11947
|
}
|
|
11979
|
-
return /*#__PURE__*/
|
|
11948
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
11980
11949
|
className: "react-datepicker__tab-loop",
|
|
11981
11950
|
ref: this.tabLoopRef
|
|
11982
|
-
}, /*#__PURE__*/
|
|
11951
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11983
11952
|
className: "react-datepicker__tab-loop__start",
|
|
11984
11953
|
tabIndex: "0",
|
|
11985
11954
|
onFocus: this.handleFocusStart
|
|
11986
|
-
}), this.props.children, /*#__PURE__*/
|
|
11955
|
+
}), this.props.children, /*#__PURE__*/React__default.createElement("div", {
|
|
11987
11956
|
className: "react-datepicker__tab-loop__end",
|
|
11988
11957
|
tabIndex: "0",
|
|
11989
11958
|
onFocus: this.handleFocusEnd
|
|
@@ -11997,7 +11966,7 @@ var TabLoop = /*#__PURE__*/function (_React$Component) {
|
|
|
11997
11966
|
};
|
|
11998
11967
|
}
|
|
11999
11968
|
}]);
|
|
12000
|
-
}(
|
|
11969
|
+
}(React__default.Component);
|
|
12001
11970
|
|
|
12002
11971
|
function withFloating(Component) {
|
|
12003
11972
|
var WithFloating = function WithFloating(props) {
|
|
@@ -12006,18 +11975,18 @@ function withFloating(Component) {
|
|
|
12006
11975
|
popperProps: props.popperProps || {},
|
|
12007
11976
|
hidePopper: typeof props.hidePopper === "boolean" ? props.hidePopper : true
|
|
12008
11977
|
});
|
|
12009
|
-
var arrowRef =
|
|
11978
|
+
var arrowRef = React__default.useRef();
|
|
12010
11979
|
var floatingProps = useFloating(_objectSpread2({
|
|
12011
11980
|
open: !alt_props.hidePopper,
|
|
12012
|
-
whileElementsMounted:
|
|
11981
|
+
whileElementsMounted: autoUpdate,
|
|
12013
11982
|
placement: alt_props.popperPlacement,
|
|
12014
|
-
middleware: [
|
|
11983
|
+
middleware: [flip({
|
|
12015
11984
|
padding: 15
|
|
12016
|
-
}),
|
|
11985
|
+
}), offset(10), arrow({
|
|
12017
11986
|
element: arrowRef
|
|
12018
11987
|
})].concat(_toConsumableArray(alt_props.popperModifiers))
|
|
12019
11988
|
}, alt_props.popperProps));
|
|
12020
|
-
return /*#__PURE__*/
|
|
11989
|
+
return /*#__PURE__*/React__default.createElement(Component, _extends({}, alt_props, {
|
|
12021
11990
|
popperProps: _objectSpread2(_objectSpread2({}, floatingProps), {}, {
|
|
12022
11991
|
arrowRef: arrowRef
|
|
12023
11992
|
})
|
|
@@ -12050,16 +12019,16 @@ var PopperComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
12050
12019
|
showArrow = _this$props.showArrow;
|
|
12051
12020
|
var popper;
|
|
12052
12021
|
if (!hidePopper) {
|
|
12053
|
-
var classes = clsx
|
|
12054
|
-
popper = /*#__PURE__*/
|
|
12022
|
+
var classes = clsx("react-datepicker-popper", className);
|
|
12023
|
+
popper = /*#__PURE__*/React__default.createElement(TabLoop, {
|
|
12055
12024
|
enableTabLoop: enableTabLoop
|
|
12056
|
-
}, /*#__PURE__*/
|
|
12025
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12057
12026
|
ref: popperProps.refs.setFloating,
|
|
12058
12027
|
style: popperProps.floatingStyles,
|
|
12059
12028
|
className: classes,
|
|
12060
12029
|
"data-placement": popperProps.placement,
|
|
12061
12030
|
onKeyDown: popperOnKeyDown
|
|
12062
|
-
}, popperComponent, showArrow && /*#__PURE__*/
|
|
12031
|
+
}, popperComponent, showArrow && /*#__PURE__*/React__default.createElement(FloatingArrow, {
|
|
12063
12032
|
ref: popperProps.arrowRef,
|
|
12064
12033
|
context: popperProps.context,
|
|
12065
12034
|
fill: "currentColor",
|
|
@@ -12073,16 +12042,16 @@ var PopperComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
12073
12042
|
})));
|
|
12074
12043
|
}
|
|
12075
12044
|
if (this.props.popperContainer) {
|
|
12076
|
-
popper = /*#__PURE__*/
|
|
12045
|
+
popper = /*#__PURE__*/React__default.createElement(this.props.popperContainer, {}, popper);
|
|
12077
12046
|
}
|
|
12078
12047
|
if (portalId && !hidePopper) {
|
|
12079
|
-
popper = /*#__PURE__*/
|
|
12048
|
+
popper = /*#__PURE__*/React__default.createElement(Portal, {
|
|
12080
12049
|
portalId: portalId,
|
|
12081
12050
|
portalHost: portalHost
|
|
12082
12051
|
}, popper);
|
|
12083
12052
|
}
|
|
12084
|
-
var wrapperClasses = clsx
|
|
12085
|
-
return /*#__PURE__*/
|
|
12053
|
+
var wrapperClasses = clsx("react-datepicker-wrapper", wrapperClassName);
|
|
12054
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
12086
12055
|
ref: popperProps.refs.setReference,
|
|
12087
12056
|
className: wrapperClasses
|
|
12088
12057
|
}, targetComponent), popper);
|
|
@@ -12095,7 +12064,7 @@ var PopperComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
12095
12064
|
};
|
|
12096
12065
|
}
|
|
12097
12066
|
}]);
|
|
12098
|
-
}(
|
|
12067
|
+
}(React__default.Component);
|
|
12099
12068
|
var PopperComponent$1 = withFloating(PopperComponent);
|
|
12100
12069
|
|
|
12101
12070
|
var outsideClickIgnoreClass = "react-datepicker-ignore-onclickoutside";
|
|
@@ -12675,7 +12644,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
12675
12644
|
if (!_this.props.inline && !_this.isCalendarOpen()) {
|
|
12676
12645
|
return null;
|
|
12677
12646
|
}
|
|
12678
|
-
return /*#__PURE__*/
|
|
12647
|
+
return /*#__PURE__*/React__default.createElement(WrappedCalendar, {
|
|
12679
12648
|
ref: function ref(elem) {
|
|
12680
12649
|
_this.calendar = elem;
|
|
12681
12650
|
},
|
|
@@ -12841,7 +12810,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
12841
12810
|
}));
|
|
12842
12811
|
}
|
|
12843
12812
|
}
|
|
12844
|
-
return /*#__PURE__*/
|
|
12813
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
12845
12814
|
role: "alert",
|
|
12846
12815
|
"aria-live": "polite",
|
|
12847
12816
|
className: "react-datepicker__aria-live"
|
|
@@ -12849,15 +12818,15 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
12849
12818
|
});
|
|
12850
12819
|
_defineProperty(_this, "renderDateInput", function () {
|
|
12851
12820
|
var _React$cloneElement;
|
|
12852
|
-
var className = clsx
|
|
12853
|
-
var customInput = _this.props.customInput || /*#__PURE__*/
|
|
12821
|
+
var className = clsx(_this.props.className, _defineProperty({}, outsideClickIgnoreClass, _this.state.open));
|
|
12822
|
+
var customInput = _this.props.customInput || /*#__PURE__*/React__default.createElement("input", {
|
|
12854
12823
|
type: "text"
|
|
12855
12824
|
});
|
|
12856
12825
|
var customInputRef = _this.props.customInputRef || "ref";
|
|
12857
12826
|
var inputValue = typeof _this.props.value === "string" ? _this.props.value : typeof _this.state.inputValue === "string" ? _this.state.inputValue : _this.props.selectsRange ? safeDateRangeFormat(_this.props.startDate, _this.props.endDate, _this.props) : _this.props.selectsMultiple ? safeMultipleDatesFormat(_this.props.selectedDates, _this.props) : safeDateFormat(_this.props.selected, _this.props);
|
|
12858
|
-
return /*#__PURE__*/
|
|
12827
|
+
return /*#__PURE__*/React__default.cloneElement(customInput, (_React$cloneElement = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_React$cloneElement, customInputRef, function (input) {
|
|
12859
12828
|
_this.input = input;
|
|
12860
|
-
}), "value", inputValue), "onBlur", _this.handleBlur), "onChange", _this.handleChange), "onClick", _this.onInputClick), "onFocus", _this.handleFocus), "onKeyDown", _this.onInputKeyDown), "id", _this.props.id), "name", _this.props.name), "form", _this.props.form), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_React$cloneElement, "autoFocus", _this.props.autoFocus), "placeholder", _this.props.placeholderText), "disabled", _this.props.disabled), "autoComplete", _this.props.autoComplete), "className", clsx
|
|
12829
|
+
}), "value", inputValue), "onBlur", _this.handleBlur), "onChange", _this.handleChange), "onClick", _this.onInputClick), "onFocus", _this.handleFocus), "onKeyDown", _this.onInputKeyDown), "id", _this.props.id), "name", _this.props.name), "form", _this.props.form), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_React$cloneElement, "autoFocus", _this.props.autoFocus), "placeholder", _this.props.placeholderText), "disabled", _this.props.disabled), "autoComplete", _this.props.autoComplete), "className", clsx(customInput.props.className, className)), "title", _this.props.title), "readOnly", _this.props.readOnly), "required", _this.props.required), "tabIndex", _this.props.tabIndex), "aria-describedby", _this.props.ariaDescribedBy), _defineProperty(_defineProperty(_defineProperty(_React$cloneElement, "aria-invalid", _this.props.ariaInvalid), "aria-labelledby", _this.props.ariaLabelledBy), "aria-required", _this.props.ariaRequired)));
|
|
12861
12830
|
});
|
|
12862
12831
|
_defineProperty(_this, "renderClearButton", function () {
|
|
12863
12832
|
var _this$props4 = _this.props,
|
|
@@ -12873,9 +12842,9 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
12873
12842
|
ariaLabelClose = _this$props4$ariaLabe === void 0 ? "Close" : _this$props4$ariaLabe,
|
|
12874
12843
|
selectedDates = _this$props4.selectedDates;
|
|
12875
12844
|
if (isClearable && (selected != null || startDate != null || endDate != null || selectedDates !== null && selectedDates !== void 0 && selectedDates.length)) {
|
|
12876
|
-
return /*#__PURE__*/
|
|
12845
|
+
return /*#__PURE__*/React__default.createElement("button", {
|
|
12877
12846
|
type: "button",
|
|
12878
|
-
className: clsx
|
|
12847
|
+
className: clsx("react-datepicker__close-icon", clearButtonClassName, {
|
|
12879
12848
|
"react-datepicker__close-icon--disabled": disabled
|
|
12880
12849
|
}),
|
|
12881
12850
|
disabled: disabled,
|
|
@@ -12943,9 +12912,9 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
12943
12912
|
calendarIconClassname = _this$props5.calendarIconClassname,
|
|
12944
12913
|
toggleCalendarOnIconClick = _this$props5.toggleCalendarOnIconClick;
|
|
12945
12914
|
var open = this.state.open;
|
|
12946
|
-
return /*#__PURE__*/
|
|
12915
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
12947
12916
|
className: "react-datepicker__input-container".concat(showIcon ? " react-datepicker__view-calendar-icon" : "")
|
|
12948
|
-
}, showIcon && /*#__PURE__*/
|
|
12917
|
+
}, showIcon && /*#__PURE__*/React__default.createElement(CalendarIcon$1, _extends({
|
|
12949
12918
|
icon: icon,
|
|
12950
12919
|
className: "".concat(calendarIconClassname, " ").concat(open && "react-datepicker-ignore-onclickoutside")
|
|
12951
12920
|
}, toggleCalendarOnIconClick ? {
|
|
@@ -12958,22 +12927,22 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
12958
12927
|
var calendar = this.renderCalendar();
|
|
12959
12928
|
if (this.props.inline) return calendar;
|
|
12960
12929
|
if (this.props.withPortal) {
|
|
12961
|
-
var portalContainer = this.state.open ? /*#__PURE__*/
|
|
12930
|
+
var portalContainer = this.state.open ? /*#__PURE__*/React__default.createElement(TabLoop, {
|
|
12962
12931
|
enableTabLoop: this.props.enableTabLoop
|
|
12963
|
-
}, /*#__PURE__*/
|
|
12932
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
12964
12933
|
className: "react-datepicker__portal",
|
|
12965
12934
|
tabIndex: -1,
|
|
12966
12935
|
onKeyDown: this.onPortalKeyDown
|
|
12967
12936
|
}, calendar)) : null;
|
|
12968
12937
|
if (this.state.open && this.props.portalId) {
|
|
12969
|
-
portalContainer = /*#__PURE__*/
|
|
12938
|
+
portalContainer = /*#__PURE__*/React__default.createElement(Portal, {
|
|
12970
12939
|
portalId: this.props.portalId,
|
|
12971
12940
|
portalHost: this.props.portalHost
|
|
12972
12941
|
}, portalContainer);
|
|
12973
12942
|
}
|
|
12974
|
-
return /*#__PURE__*/
|
|
12943
|
+
return /*#__PURE__*/React__default.createElement("div", null, this.renderInputContainer(), portalContainer);
|
|
12975
12944
|
}
|
|
12976
|
-
return /*#__PURE__*/
|
|
12945
|
+
return /*#__PURE__*/React__default.createElement(PopperComponent$1, {
|
|
12977
12946
|
className: this.props.popperClassName,
|
|
12978
12947
|
wrapperClassName: this.props.wrapperClassName,
|
|
12979
12948
|
hidePopper: !this.isCalendarOpen(),
|
|
@@ -13052,7 +13021,7 @@ var DatePicker = /*#__PURE__*/function (_React$Component) {
|
|
|
13052
13021
|
};
|
|
13053
13022
|
}
|
|
13054
13023
|
}]);
|
|
13055
|
-
}(
|
|
13024
|
+
}(React__default.Component);
|
|
13056
13025
|
var PRESELECT_CHANGE_VIA_INPUT = "input";
|
|
13057
13026
|
var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
13058
13027
|
|
|
@@ -13863,12 +13832,12 @@ function DatePickerInput(props) {
|
|
|
13863
13832
|
clearLabelTextColor,
|
|
13864
13833
|
clearLabelTextSize
|
|
13865
13834
|
} = props;
|
|
13866
|
-
const widthClass = useDeviceTargetClass
|
|
13835
|
+
const widthClass = useDeviceTargetClass(props, {
|
|
13867
13836
|
prefix: 'width_',
|
|
13868
13837
|
propsKey: 'width'
|
|
13869
13838
|
});
|
|
13870
|
-
const datepickerRef =
|
|
13871
|
-
const start =
|
|
13839
|
+
const datepickerRef = useRef(null);
|
|
13840
|
+
const start = useMemo(() => {
|
|
13872
13841
|
if (value) {
|
|
13873
13842
|
if (typeof value === 'string') {
|
|
13874
13843
|
return new Date(value);
|
|
@@ -13880,7 +13849,7 @@ function DatePickerInput(props) {
|
|
|
13880
13849
|
}
|
|
13881
13850
|
return new Date();
|
|
13882
13851
|
}, [value, datePickerProps.isStartDefaultNull]);
|
|
13883
|
-
const end =
|
|
13852
|
+
const end = useMemo(() => {
|
|
13884
13853
|
if (!endValue) {
|
|
13885
13854
|
return null;
|
|
13886
13855
|
}
|
|
@@ -13889,15 +13858,15 @@ function DatePickerInput(props) {
|
|
|
13889
13858
|
}
|
|
13890
13859
|
return endValue;
|
|
13891
13860
|
}, [endValue]);
|
|
13892
|
-
const [startDate, setStartDate] =
|
|
13893
|
-
const [endDate, setEndDate] =
|
|
13861
|
+
const [startDate, setStartDate] = useState(start);
|
|
13862
|
+
const [endDate, setEndDate] = useState(end);
|
|
13894
13863
|
const handleChange = ([newStartDate, newEndDate]) => {
|
|
13895
13864
|
onChange && onChange(newStartDate, newEndDate);
|
|
13896
13865
|
setStartDate(newStartDate);
|
|
13897
13866
|
setEndDate(newEndDate);
|
|
13898
13867
|
};
|
|
13899
13868
|
const renderDayContents = (day, date) => {
|
|
13900
|
-
return /*#__PURE__*/
|
|
13869
|
+
return /*#__PURE__*/React__default.createElement(Button, {
|
|
13901
13870
|
className: "react-datepicker__day-button",
|
|
13902
13871
|
label: date.getDate(),
|
|
13903
13872
|
labelTextColor: datePickerProps.dayTextColor,
|
|
@@ -13910,9 +13879,9 @@ function DatePickerInput(props) {
|
|
|
13910
13879
|
monthDate,
|
|
13911
13880
|
decreaseMonth,
|
|
13912
13881
|
increaseMonth
|
|
13913
|
-
}) => /*#__PURE__*/
|
|
13882
|
+
}) => /*#__PURE__*/React__default.createElement("div", {
|
|
13914
13883
|
className: "react-datepicker__header--div"
|
|
13915
|
-
}, datePickerProps.iconLeft && /*#__PURE__*/
|
|
13884
|
+
}, datePickerProps.iconLeft && /*#__PURE__*/React__default.createElement(Icon, {
|
|
13916
13885
|
className: "react-datepicker__icon",
|
|
13917
13886
|
fill: datePickerProps.iconFill,
|
|
13918
13887
|
fillHover: datePickerProps.iconFillHover,
|
|
@@ -13923,23 +13892,23 @@ function DatePickerInput(props) {
|
|
|
13923
13892
|
stroke: datePickerProps.iconStroke,
|
|
13924
13893
|
SvgImage: datePickerProps.iconLeft,
|
|
13925
13894
|
onClick: decreaseMonth
|
|
13926
|
-
}), /*#__PURE__*/
|
|
13895
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
13927
13896
|
className: "react-datepicker__data"
|
|
13928
|
-
}, /*#__PURE__*/
|
|
13897
|
+
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
13929
13898
|
className: "react-datepicker__month",
|
|
13930
13899
|
size: datePickerProps.monthTextSize,
|
|
13931
13900
|
textColor: datePickerProps.monthTextColor,
|
|
13932
13901
|
textWeight: datePickerProps.monthTextWeight
|
|
13933
13902
|
}, monthDate.toLocaleString('ru-RU', {
|
|
13934
13903
|
month: 'long'
|
|
13935
|
-
})), /*#__PURE__*/
|
|
13904
|
+
})), /*#__PURE__*/React__default.createElement(Text, {
|
|
13936
13905
|
className: "react-datepicker__year",
|
|
13937
13906
|
size: datePickerProps.yearTextSize,
|
|
13938
13907
|
textColor: datePickerProps.yearTextColor,
|
|
13939
13908
|
textWeight: datePickerProps.yearTextWeight
|
|
13940
13909
|
}, monthDate.toLocaleString('ru-RU', {
|
|
13941
13910
|
year: 'numeric'
|
|
13942
|
-
}))), datePickerProps.iconRight && /*#__PURE__*/
|
|
13911
|
+
}))), datePickerProps.iconRight && /*#__PURE__*/React__default.createElement(Icon, {
|
|
13943
13912
|
className: "react-datepicker__icon",
|
|
13944
13913
|
fill: datePickerProps.iconFill,
|
|
13945
13914
|
fillHover: datePickerProps.iconFillHover,
|
|
@@ -13951,16 +13920,16 @@ function DatePickerInput(props) {
|
|
|
13951
13920
|
SvgImage: datePickerProps.iconRight,
|
|
13952
13921
|
onClick: increaseMonth
|
|
13953
13922
|
}));
|
|
13954
|
-
|
|
13923
|
+
useEffect(() => {
|
|
13955
13924
|
setStartDate(start);
|
|
13956
13925
|
}, [start]);
|
|
13957
|
-
|
|
13926
|
+
useEffect(() => {
|
|
13958
13927
|
setEndDate(end);
|
|
13959
13928
|
}, [end]);
|
|
13960
|
-
return /*#__PURE__*/
|
|
13961
|
-
className:
|
|
13962
|
-
}, /*#__PURE__*/
|
|
13963
|
-
customInput: /*#__PURE__*/
|
|
13929
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
13930
|
+
className: clsx$1(className, 'datepicker', datePickerProps?.monthsShown && 'datepicker_type_multiple-months', datePickerProps?.customTimeInput && 'datepicker_type_button', widthClass)
|
|
13931
|
+
}, /*#__PURE__*/React__default.createElement(DatePicker, Object.assign({
|
|
13932
|
+
customInput: /*#__PURE__*/React__default.createElement(DatePickerCustomInput, {
|
|
13964
13933
|
clearIcon: clearIcon,
|
|
13965
13934
|
clearIconFill: clearIconFill,
|
|
13966
13935
|
clearIconFillHover: clearIconFillHover,
|
|
@@ -13994,30 +13963,30 @@ function DatePickerInput(props) {
|
|
|
13994
13963
|
isClearable: false
|
|
13995
13964
|
})));
|
|
13996
13965
|
}
|
|
13997
|
-
const DatePickerCustomInput = /*#__PURE__*/
|
|
13966
|
+
const DatePickerCustomInput = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
13998
13967
|
const {
|
|
13999
13968
|
isClearable,
|
|
14000
13969
|
value,
|
|
14001
13970
|
inputProps
|
|
14002
13971
|
} = props;
|
|
14003
|
-
const multipleValue =
|
|
13972
|
+
const multipleValue = useMemo(() => {
|
|
14004
13973
|
if (value) {
|
|
14005
13974
|
const twoDates = value.split(' - ');
|
|
14006
13975
|
return twoDates[0] === twoDates[1] ? twoDates[0] : value;
|
|
14007
13976
|
}
|
|
14008
13977
|
return '';
|
|
14009
13978
|
}, [value]);
|
|
14010
|
-
return /*#__PURE__*/
|
|
13979
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Input, Object.assign({}, props, inputProps, {
|
|
14011
13980
|
ref: ref,
|
|
14012
13981
|
value: multipleValue
|
|
14013
|
-
})), isClearable && /*#__PURE__*/
|
|
13982
|
+
})), isClearable && /*#__PURE__*/React__default.createElement(DatePickerClearButton, props));
|
|
14014
13983
|
});
|
|
14015
13984
|
DatePickerCustomInput.displayName = 'DatePickerCustomInput';
|
|
14016
13985
|
DatePickerInput.propTypes = {
|
|
14017
|
-
className:
|
|
14018
|
-
datePickerProps:
|
|
14019
|
-
inputProps:
|
|
14020
|
-
onChange:
|
|
13986
|
+
className: PropTypes.string,
|
|
13987
|
+
datePickerProps: PropTypes.object,
|
|
13988
|
+
inputProps: PropTypes.object,
|
|
13989
|
+
onChange: PropTypes.func
|
|
14021
13990
|
};
|
|
14022
13991
|
function DatePickerClearButton(props, ref) {
|
|
14023
13992
|
const {
|
|
@@ -14037,19 +14006,19 @@ function DatePickerClearButton(props, ref) {
|
|
|
14037
14006
|
clearIcon,
|
|
14038
14007
|
clearIconSrc
|
|
14039
14008
|
} = props;
|
|
14040
|
-
const onClick =
|
|
14009
|
+
const onClick = useCallback(event => {
|
|
14041
14010
|
datepickerRef?.current?.onClearClick(event);
|
|
14042
14011
|
datepickerRef?.current?.handleFocus(event);
|
|
14043
14012
|
}, []);
|
|
14044
|
-
return /*#__PURE__*/
|
|
14045
|
-
className:
|
|
14013
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, clearLabel && /*#__PURE__*/React__default.createElement(Label, {
|
|
14014
|
+
className: clsx$1('react-datepicker__clear-label', onClick && 'cursor_type_pointer'),
|
|
14046
14015
|
label: clearLabel,
|
|
14047
14016
|
labelTextColor: clearLabelTextColor,
|
|
14048
14017
|
labelTextColorHover: clearLabelTextColorHover,
|
|
14049
14018
|
labelTextSize: clearLabelTextSize,
|
|
14050
14019
|
onClick: onClick
|
|
14051
|
-
}), (clearIcon || clearIconSrc) && /*#__PURE__*/
|
|
14052
|
-
className:
|
|
14020
|
+
}), (clearIcon || clearIconSrc) && /*#__PURE__*/React__default.createElement(Icon, {
|
|
14021
|
+
className: clsx$1('react-datepicker__clear-icon', onClick && 'cursor_type_pointer'),
|
|
14053
14022
|
fill: clearIconFill,
|
|
14054
14023
|
fillHover: clearIconFillHover,
|
|
14055
14024
|
fillSize: clearIconFillSize,
|
|
@@ -14100,4 +14069,4 @@ DatePickerInput.__docgenInfo = {
|
|
|
14100
14069
|
}
|
|
14101
14070
|
};
|
|
14102
14071
|
|
|
14103
|
-
|
|
14072
|
+
export { DatePickerInput };
|