@itcase/ui 1.1.5 → 1.1.7
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-JS45IVx7.js +204 -0
- package/dist/Breadcrumbs-KOoMbWmP.js +619 -0
- package/dist/ContextMenuItem-CF5L8xev.js +204 -0
- package/dist/DropdownItem-C0gYXEq6.js +644 -0
- package/dist/FlexItem-DHynUt6v.js +118 -0
- package/dist/GridRow-Buc4dsHd.js +1691 -0
- package/dist/Group-DhYXDvAJ.js +119 -0
- package/dist/ListItem-DYbK4_8c.js +479 -0
- package/dist/ModalLoader-DJVKhIZR.js +374 -0
- package/dist/NotificationList-KbxjrO3o.js +245 -0
- package/dist/SearchResult-DNPmzvp8.js +530 -0
- package/dist/SelectField-uEsQcoxF.js +571 -0
- package/dist/SiteMenuButton-DE_hCJUV.js +181 -0
- package/dist/TabGroup-CCR5jORT.js +1071 -0
- package/dist/Text-DffpwlYq.js +81 -0
- package/dist/cjs/Accordion-BDTE-Lkj.js +213 -0
- package/dist/cjs/Breadcrumbs-BV5q8aPJ.js +629 -0
- package/dist/cjs/ContextMenuItem-C8eg828K.js +213 -0
- package/dist/cjs/DropdownItem-DT8iQfVh.js +653 -0
- package/dist/cjs/FlexItem-CYXxJtYX.js +125 -0
- package/dist/cjs/GridRow-6wilpUeo.js +1701 -0
- package/dist/cjs/Group-DbzIk8kt.js +126 -0
- package/dist/cjs/ListItem-CTDoiG0C.js +488 -0
- package/dist/cjs/ModalLoader-4mmV5G4E.js +384 -0
- package/dist/cjs/NotificationList-B6QbYA9H.js +255 -0
- package/dist/cjs/SearchResult-CdsV7oDb.js +540 -0
- package/dist/cjs/SelectField-DVCsVz6q.js +583 -0
- package/dist/cjs/SiteMenuButton-CVdX1ouh.js +190 -0
- package/dist/cjs/TabGroup-B1LUF9Hg.js +1081 -0
- package/dist/cjs/Text-CfBPhwqK.js +88 -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 +45 -0
- package/dist/cjs/components/Avatar.js +270 -0
- package/dist/cjs/components/Badge.js +206 -0
- package/dist/cjs/components/Breadcrumbs.js +48 -0
- package/dist/cjs/components/Button.js +563 -0
- package/dist/cjs/components/Caption.js +197 -0
- package/dist/cjs/components/Card.js +279 -0
- package/dist/cjs/components/Cell.js +426 -0
- package/dist/cjs/components/Checkbox.js +166 -0
- package/dist/cjs/components/Chips.js +393 -0
- package/dist/cjs/components/Choice.js +351 -0
- package/dist/cjs/components/Code.js +437 -0
- package/dist/cjs/components/ContextMenu.js +48 -0
- package/dist/cjs/components/CookiesWarning.js +186 -0
- package/dist/cjs/components/DadataHintField.js +1193 -0
- package/dist/cjs/components/DatePicker.js +14102 -0
- package/dist/{components/Background.js → cjs/components/Divider.js} +75 -83
- package/dist/cjs/components/Dot.js +226 -0
- package/dist/cjs/components/Drawer.js +274 -0
- package/dist/cjs/components/Dropdown.js +36 -0
- package/dist/cjs/components/Flex/Flex.d.ts +8 -0
- package/dist/cjs/components/Flex/Flex.interface.d.ts +116 -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 +59 -0
- package/dist/cjs/components/Grid.js +30 -0
- package/dist/cjs/components/Group/Group.d.ts +9 -0
- package/dist/cjs/components/Group/Group.interface.d.ts +49 -0
- package/dist/cjs/components/Group/index.d.ts +1 -0
- package/dist/cjs/components/Group.js +22 -0
- package/dist/cjs/components/Icon.js +641 -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 +260 -0
- package/dist/cjs/components/Label.js +643 -0
- package/dist/cjs/components/LanguageSelector.js +130 -0
- package/dist/cjs/components/Link.js +505 -0
- package/dist/cjs/components/List.js +31 -0
- package/dist/cjs/components/Loader.js +156 -0
- package/dist/cjs/components/Logo.js +182 -0
- package/dist/cjs/components/Menu.js +192 -0
- package/dist/cjs/components/MenuItem.js +680 -0
- package/dist/cjs/components/Modal.js +28 -0
- package/dist/cjs/components/Notification.js +37 -0
- package/dist/cjs/components/Overlay.js +197 -0
- package/dist/cjs/components/Page.js +422 -0
- package/dist/cjs/components/Pagination.js +372 -0
- package/dist/cjs/components/Radio.js +267 -0
- package/dist/cjs/components/RangeSlider.js +296 -0
- package/dist/cjs/components/Response.js +248 -0
- package/dist/cjs/components/ScrollOnDrag.js +214 -0
- package/dist/cjs/components/Scrollbar.js +71 -0
- package/dist/cjs/components/Search.js +48 -0
- package/dist/cjs/components/Segmented.js +235 -0
- package/dist/cjs/components/Select.js +8538 -0
- package/dist/cjs/components/SiteMenu.js +45 -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 +51 -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 +571 -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 +241 -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-ts/componentProps/align.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/alignDirection.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/alignment.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/borderColor.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/borderColorHover.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/borderType.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/borderWidth.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/captionPosition.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/direction.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/elevation.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/emojiSize.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/fill.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/fillGradient.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/fillHover.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/fillType.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/flexAlign.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/flexGrow.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/flexJustifyContent.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/flexWrap.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/gridAlign.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/gridAlignSelf.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/gridJustifyItems.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/gridJustifySelf.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/height.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/horizontalContentAlign.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/horizontalResizeMode.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/iconFillSize.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/iconSize.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/itemColor.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/justifyContent.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/position.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/resizeMode.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/shape.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/size.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/sizeInterface.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/sizePX.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/stacking.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/state.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/strokeColor.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textAlign.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textColor.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textColorActive.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textColorHover.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textGradient.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textSize.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textStyle.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textTag.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textWeight.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/textWrap.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/titleSize.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/type.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/underline.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/verticalContentAlign.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/verticalResizeMode.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/width.d.ts +1 -0
- package/dist/cjs/constants-ts/componentProps/wrap.d.ts +1 -0
- package/dist/cjs/constants-ts/index.d.ts +56 -0
- package/dist/cjs/constants.js +111 -0
- package/dist/cjs/context/Notifications.js +122 -0
- package/dist/cjs/context/UIContext.js +56 -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 +145 -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/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 +38 -697
- package/dist/components/Avatar.js +75 -70
- package/dist/components/Badge.js +41 -56
- package/dist/components/Breadcrumbs.js +41 -656
- package/dist/components/Button.js +115 -107
- package/dist/components/Caption.js +37 -45
- package/dist/components/Card.js +47 -60
- package/dist/components/Cell.js +87 -96
- package/dist/components/Checkbox.js +41 -56
- package/dist/components/Chips.js +64 -78
- package/dist/components/Choice.js +81 -91
- package/dist/components/Code.js +40 -48
- package/dist/components/ContextMenu.js +41 -246
- package/dist/components/CookiesWarning.js +61 -73
- package/dist/components/DadataHintField.js +59 -65
- package/dist/components/DatePicker.js +5255 -425
- package/dist/components/Divider.js +47 -55
- package/dist/components/Dot.js +37 -45
- package/dist/components/Drawer.js +26 -34
- package/dist/components/Dropdown.js +29 -657
- package/dist/components/Flex/Flex.d.ts +8 -0
- package/dist/components/Flex/Flex.interface.d.ts +116 -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 -1185
- package/dist/components/FormField.js +49 -617
- package/dist/components/Grid.js +22 -1705
- package/dist/components/Group/Group.d.ts +9 -0
- package/dist/components/Group/Group.interface.d.ts +49 -0
- package/dist/components/Group/index.d.ts +1 -0
- package/dist/components/Group.js +15 -315
- package/dist/components/Icon.js +113 -124
- package/dist/components/Image.js +78 -94
- package/dist/components/Input.js +40 -49
- package/dist/components/InputMask.js +39 -48
- package/dist/components/InputPassword.js +66 -76
- package/dist/components/Label.js +104 -114
- package/dist/components/LanguageSelector.js +53 -62
- package/dist/components/Link.js +74 -84
- package/dist/components/List.js +24 -498
- package/dist/components/Loader.js +41 -56
- package/dist/components/Logo.js +47 -55
- package/dist/components/Menu.js +51 -58
- package/dist/components/MenuItem.js +103 -111
- package/dist/components/Modal.js +21 -402
- package/dist/components/Notification.js +29 -281
- package/dist/components/Overlay.js +37 -45
- package/dist/components/Page.js +66 -74
- package/dist/components/Pagination.js +223 -54
- package/dist/components/Radio.js +55 -70
- package/dist/components/RangeSlider.js +53 -62
- package/dist/components/Response.js +109 -122
- package/dist/components/ScrollOnDrag.js +80 -164
- package/dist/components/Scrollbar.js +15 -18
- package/dist/components/Search.js +40 -571
- package/dist/components/Segmented.js +54 -69
- package/dist/components/Select.js +281 -324
- package/dist/components/SiteMenu.js +38 -221
- package/dist/components/Swiper.js +183 -186
- 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 +51 -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 +103 -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 +124 -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-ts/componentProps/align.d.ts +1 -0
- package/dist/constants-ts/componentProps/alignDirection.d.ts +1 -0
- package/dist/constants-ts/componentProps/alignment.d.ts +1 -0
- package/dist/constants-ts/componentProps/borderColor.d.ts +1 -0
- package/dist/constants-ts/componentProps/borderColorHover.d.ts +1 -0
- package/dist/constants-ts/componentProps/borderType.d.ts +1 -0
- package/dist/constants-ts/componentProps/borderWidth.d.ts +1 -0
- package/dist/constants-ts/componentProps/captionPosition.d.ts +1 -0
- package/dist/constants-ts/componentProps/direction.d.ts +1 -0
- package/dist/constants-ts/componentProps/elevation.d.ts +1 -0
- package/dist/constants-ts/componentProps/emojiSize.d.ts +1 -0
- package/dist/constants-ts/componentProps/fill.d.ts +1 -0
- package/dist/constants-ts/componentProps/fillGradient.d.ts +1 -0
- package/dist/constants-ts/componentProps/fillHover.d.ts +1 -0
- package/dist/constants-ts/componentProps/fillType.d.ts +1 -0
- package/dist/constants-ts/componentProps/flexAlign.d.ts +1 -0
- package/dist/constants-ts/componentProps/flexGrow.d.ts +1 -0
- package/dist/constants-ts/componentProps/flexJustifyContent.d.ts +1 -0
- package/dist/constants-ts/componentProps/flexWrap.d.ts +1 -0
- package/dist/constants-ts/componentProps/gridAlign.d.ts +1 -0
- package/dist/constants-ts/componentProps/gridAlignSelf.d.ts +1 -0
- package/dist/constants-ts/componentProps/gridJustifyItems.d.ts +1 -0
- package/dist/constants-ts/componentProps/gridJustifySelf.d.ts +1 -0
- package/dist/constants-ts/componentProps/height.d.ts +1 -0
- package/dist/constants-ts/componentProps/horizontalContentAlign.d.ts +1 -0
- package/dist/constants-ts/componentProps/horizontalResizeMode.d.ts +1 -0
- package/dist/constants-ts/componentProps/iconFillSize.d.ts +1 -0
- package/dist/constants-ts/componentProps/iconSize.d.ts +1 -0
- package/dist/constants-ts/componentProps/itemColor.d.ts +1 -0
- package/dist/constants-ts/componentProps/justifyContent.d.ts +1 -0
- package/dist/constants-ts/componentProps/position.d.ts +1 -0
- package/dist/constants-ts/componentProps/resizeMode.d.ts +1 -0
- package/dist/constants-ts/componentProps/shape.d.ts +1 -0
- package/dist/constants-ts/componentProps/size.d.ts +1 -0
- package/dist/constants-ts/componentProps/sizeInterface.d.ts +1 -0
- package/dist/constants-ts/componentProps/sizePX.d.ts +1 -0
- package/dist/constants-ts/componentProps/stacking.d.ts +1 -0
- package/dist/constants-ts/componentProps/state.d.ts +1 -0
- package/dist/constants-ts/componentProps/strokeColor.d.ts +1 -0
- package/dist/constants-ts/componentProps/textAlign.d.ts +1 -0
- package/dist/constants-ts/componentProps/textColor.d.ts +1 -0
- package/dist/constants-ts/componentProps/textColorActive.d.ts +1 -0
- package/dist/constants-ts/componentProps/textColorHover.d.ts +1 -0
- package/dist/constants-ts/componentProps/textGradient.d.ts +1 -0
- package/dist/constants-ts/componentProps/textSize.d.ts +1 -0
- package/dist/constants-ts/componentProps/textStyle.d.ts +1 -0
- package/dist/constants-ts/componentProps/textTag.d.ts +1 -0
- package/dist/constants-ts/componentProps/textWeight.d.ts +1 -0
- package/dist/constants-ts/componentProps/textWrap.d.ts +1 -0
- package/dist/constants-ts/componentProps/titleSize.d.ts +1 -0
- package/dist/constants-ts/componentProps/type.d.ts +1 -0
- package/dist/constants-ts/componentProps/underline.d.ts +1 -0
- package/dist/constants-ts/componentProps/verticalContentAlign.d.ts +1 -0
- package/dist/constants-ts/componentProps/verticalResizeMode.d.ts +1 -0
- package/dist/constants-ts/componentProps/width.d.ts +1 -0
- package/dist/constants-ts/componentProps/wrap.d.ts +1 -0
- package/dist/constants-ts/index.d.ts +56 -0
- package/dist/constants.js +53 -111
- package/dist/context/Notifications.js +16 -25
- package/dist/context/UIContext.js +20 -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 +1 -1
- package/dist/css/components/DatePicker/DatePicker.css +11 -10
- package/dist/css/components/Dropdown/Dropdown.css +41 -15
- package/dist/css/components/Grid/Grid.css +9 -17
- package/dist/css/components/MenuItem/MenuItem.css +5 -5
- package/dist/css/components/Modal/Modal.css +1 -0
- 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 +30 -5
- package/dist/css/components/Scrollbar/Scrollbar.css +56 -0
- package/dist/css/components/Select/Select.css +9 -1
- package/dist/css/components/Select/css/__single-value/select__single-value.css +1 -1
- package/dist/css/components/Swiper/Swiper.css +2 -2
- 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 +145 -0
- package/dist/hooks/styleAttributes.js +5 -7
- 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/package.json +91 -40
- package/dist/_commonjsHelpers-CFO10eej.js +0 -7
- 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,77 +1,49 @@
|
|
|
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
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
require('../constants/componentProps/direction.js');
|
|
48
|
-
require('../constants/componentProps/stacking.js');
|
|
49
|
-
require('../constants/componentProps/width.js');
|
|
50
|
-
|
|
51
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
52
|
-
|
|
53
|
-
function _interopNamespace(e) {
|
|
54
|
-
if (e && e.__esModule) return e;
|
|
55
|
-
var n = Object.create(null);
|
|
56
|
-
if (e) {
|
|
57
|
-
Object.keys(e).forEach(function (k) {
|
|
58
|
-
if (k !== 'default') {
|
|
59
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
60
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () { return e[k]; }
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
n.default = e;
|
|
68
|
-
return Object.freeze(n);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
72
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
73
|
-
var Select__default = /*#__PURE__*/_interopDefault(Select$1);
|
|
74
|
-
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { forwardRef, useContext, useLayoutEffect, useEffect, useRef, useState, createContext, useMemo, useCallback, Component, Fragment } from 'react';
|
|
3
|
+
import PropTypes from 'prop-types';
|
|
4
|
+
import { Icon } from './Icon.js';
|
|
5
|
+
import Select$1, { components as components$1 } from 'react-select';
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import { createPortal } from 'react-dom';
|
|
8
|
+
import { a as autoUpdate } from '../floating-ui.dom-BQ7wiYTi.js';
|
|
9
|
+
import { useDeviceTargetClass } from '../hooks/useDeviceTargetClass.js';
|
|
10
|
+
import { Badge } from './Badge.js';
|
|
11
|
+
import { T as Text } from '../Text-DffpwlYq.js';
|
|
12
|
+
import { G as Group$2 } from '../Group-DhYXDvAJ.js';
|
|
13
|
+
import { Divider } from './Divider.js';
|
|
14
|
+
import 'react-inlinesvg';
|
|
15
|
+
import './Link.js';
|
|
16
|
+
import '../constants/componentProps/fill.js';
|
|
17
|
+
import '../constants/componentProps/size.js';
|
|
18
|
+
import '../constants/componentProps/textColor.js';
|
|
19
|
+
import '../constants/componentProps/textGradient.js';
|
|
20
|
+
import '../constants/componentProps/textStyle.js';
|
|
21
|
+
import '../constants/componentProps/textWeight.js';
|
|
22
|
+
import '../constants/componentProps/type.js';
|
|
23
|
+
import '../constants/componentProps/underline.js';
|
|
24
|
+
import '../hooks/useStyles.js';
|
|
25
|
+
import 'lodash/camelCase';
|
|
26
|
+
import 'lodash/maxBy';
|
|
27
|
+
import 'lodash/upperFirst';
|
|
28
|
+
import '../hooks/styleAttributes.js';
|
|
29
|
+
import '../context/UIContext.js';
|
|
30
|
+
import '../hooks/useMediaQueries.js';
|
|
31
|
+
import 'react-responsive';
|
|
32
|
+
import 'lodash/castArray';
|
|
33
|
+
import '../constants/componentProps/borderColor.js';
|
|
34
|
+
import '../constants/componentProps/borderType.js';
|
|
35
|
+
import '../constants/componentProps/iconSize.js';
|
|
36
|
+
import '../constants/componentProps/shape.js';
|
|
37
|
+
import '../constants/componentProps/strokeColor.js';
|
|
38
|
+
import './Tooltip.js';
|
|
39
|
+
import './Title.js';
|
|
40
|
+
import '../constants/componentProps/textAlign.js';
|
|
41
|
+
import '../constants/componentProps/titleSize.js';
|
|
42
|
+
import '../constants/componentProps/wrap.js';
|
|
43
|
+
import '../constants/componentProps/textSize.js';
|
|
44
|
+
import '../jsx-runtime-ClDdVO4Q.js';
|
|
45
|
+
import '../constants/componentProps/direction.js';
|
|
46
|
+
import '../constants/componentProps/width.js';
|
|
75
47
|
|
|
76
48
|
const SelectClearIndicator = props => {
|
|
77
49
|
const {
|
|
@@ -79,17 +51,17 @@ const SelectClearIndicator = props => {
|
|
|
79
51
|
clearIconFill,
|
|
80
52
|
clearIconStroke
|
|
81
53
|
} = props.selectProps;
|
|
82
|
-
return /*#__PURE__*/
|
|
54
|
+
return /*#__PURE__*/React__default.createElement(components$1.ClearIndicator, props, clearIcon ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
83
55
|
SvgImage: clearIcon,
|
|
84
56
|
iconFill: clearIconFill,
|
|
85
57
|
iconStroke: clearIconStroke
|
|
86
58
|
}) : props.children);
|
|
87
59
|
};
|
|
88
60
|
SelectClearIndicator.propTypes = {
|
|
89
|
-
selectProps:
|
|
90
|
-
clearIcon:
|
|
91
|
-
clearIconFill:
|
|
92
|
-
clearIconStroke:
|
|
61
|
+
selectProps: PropTypes.shape({
|
|
62
|
+
clearIcon: PropTypes.string,
|
|
63
|
+
clearIconFill: PropTypes.string,
|
|
64
|
+
clearIconStroke: PropTypes.string
|
|
93
65
|
})
|
|
94
66
|
};
|
|
95
67
|
SelectClearIndicator.__docgenInfo = {
|
|
@@ -159,7 +131,7 @@ function toPrimitive(t, r) {
|
|
|
159
131
|
|
|
160
132
|
function toPropertyKey(t) {
|
|
161
133
|
var i = toPrimitive(t, "string");
|
|
162
|
-
return "symbol" == _typeof(i) ? i :
|
|
134
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
163
135
|
}
|
|
164
136
|
|
|
165
137
|
function _defineProperty(obj, key, value) {
|
|
@@ -2459,14 +2431,14 @@ var syncFallback = function syncFallback(create) {
|
|
|
2459
2431
|
return create();
|
|
2460
2432
|
};
|
|
2461
2433
|
|
|
2462
|
-
var useInsertionEffect =
|
|
2434
|
+
var useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;
|
|
2463
2435
|
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
|
|
2464
|
-
var useInsertionEffectWithLayoutFallback = useInsertionEffect ||
|
|
2436
|
+
var useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;
|
|
2465
2437
|
|
|
2466
2438
|
var isBrowser$1 = typeof document !== 'undefined';
|
|
2467
2439
|
var hasOwn = {}.hasOwnProperty;
|
|
2468
2440
|
|
|
2469
|
-
var EmotionCacheContext = /* #__PURE__ */
|
|
2441
|
+
var EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2470
2442
|
// because this module is primarily intended for the browser and node
|
|
2471
2443
|
// but it's also required in react native and similar environments sometimes
|
|
2472
2444
|
// and we could have a special build just for that
|
|
@@ -2484,9 +2456,9 @@ EmotionCacheContext.Provider;
|
|
|
2484
2456
|
|
|
2485
2457
|
var withEmotionCache = function withEmotionCache(func) {
|
|
2486
2458
|
// $FlowFixMe
|
|
2487
|
-
return /*#__PURE__*/
|
|
2459
|
+
return /*#__PURE__*/forwardRef(function (props, ref) {
|
|
2488
2460
|
// the cache will never be null in the browser
|
|
2489
|
-
var cache =
|
|
2461
|
+
var cache = useContext(EmotionCacheContext);
|
|
2490
2462
|
return func(props, cache, ref);
|
|
2491
2463
|
});
|
|
2492
2464
|
};
|
|
@@ -2494,7 +2466,7 @@ var withEmotionCache = function withEmotionCache(func) {
|
|
|
2494
2466
|
if (!isBrowser$1) {
|
|
2495
2467
|
withEmotionCache = function withEmotionCache(func) {
|
|
2496
2468
|
return function (props) {
|
|
2497
|
-
var cache =
|
|
2469
|
+
var cache = useContext(EmotionCacheContext);
|
|
2498
2470
|
|
|
2499
2471
|
if (cache === null) {
|
|
2500
2472
|
// yes, we're potentially creating this on every render
|
|
@@ -2505,7 +2477,7 @@ if (!isBrowser$1) {
|
|
|
2505
2477
|
cache = createCache({
|
|
2506
2478
|
key: 'css'
|
|
2507
2479
|
});
|
|
2508
|
-
return /*#__PURE__*/
|
|
2480
|
+
return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, {
|
|
2509
2481
|
value: cache
|
|
2510
2482
|
}, func(props, cache));
|
|
2511
2483
|
} else {
|
|
@@ -2515,7 +2487,7 @@ if (!isBrowser$1) {
|
|
|
2515
2487
|
};
|
|
2516
2488
|
}
|
|
2517
2489
|
|
|
2518
|
-
var ThemeContext = /* #__PURE__ */
|
|
2490
|
+
var ThemeContext = /* #__PURE__ */React.createContext({});
|
|
2519
2491
|
|
|
2520
2492
|
if (process.env.NODE_ENV !== 'production') {
|
|
2521
2493
|
ThemeContext.displayName = 'EmotionThemeContext';
|
|
@@ -2611,7 +2583,7 @@ var Insertion$1 = function Insertion(_ref) {
|
|
|
2611
2583
|
next = next.next;
|
|
2612
2584
|
}
|
|
2613
2585
|
|
|
2614
|
-
return /*#__PURE__*/
|
|
2586
|
+
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
2615
2587
|
__html: rules
|
|
2616
2588
|
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
2617
2589
|
}
|
|
@@ -2638,7 +2610,7 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
2638
2610
|
className = props.className + " ";
|
|
2639
2611
|
}
|
|
2640
2612
|
|
|
2641
|
-
var serialized = serializeStyles(registeredStyles, undefined,
|
|
2613
|
+
var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));
|
|
2642
2614
|
|
|
2643
2615
|
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
|
|
2644
2616
|
var labelFromStack = props[labelPropName];
|
|
@@ -2659,11 +2631,11 @@ var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
|
|
|
2659
2631
|
|
|
2660
2632
|
newProps.ref = ref;
|
|
2661
2633
|
newProps.className = className;
|
|
2662
|
-
return /*#__PURE__*/
|
|
2634
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion$1, {
|
|
2663
2635
|
cache: cache,
|
|
2664
2636
|
serialized: serialized,
|
|
2665
2637
|
isStringTag: typeof WrappedComponent === 'string'
|
|
2666
|
-
}), /*#__PURE__*/
|
|
2638
|
+
}), /*#__PURE__*/React.createElement(WrappedComponent, newProps));
|
|
2667
2639
|
});
|
|
2668
2640
|
|
|
2669
2641
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2809,7 +2781,7 @@ var jsx = function jsx(type, props) {
|
|
|
2809
2781
|
|
|
2810
2782
|
if (props == null || !hasOwn.call(props, 'css')) {
|
|
2811
2783
|
// $FlowFixMe
|
|
2812
|
-
return
|
|
2784
|
+
return React.createElement.apply(undefined, args);
|
|
2813
2785
|
}
|
|
2814
2786
|
|
|
2815
2787
|
var argsLength = args.length;
|
|
@@ -2822,7 +2794,7 @@ var jsx = function jsx(type, props) {
|
|
|
2822
2794
|
} // $FlowFixMe
|
|
2823
2795
|
|
|
2824
2796
|
|
|
2825
|
-
return
|
|
2797
|
+
return React.createElement.apply(null, createElementArgArray);
|
|
2826
2798
|
};
|
|
2827
2799
|
|
|
2828
2800
|
var warnedAboutCssPropForGlobal = false; // maintain place over rerenders.
|
|
@@ -2840,7 +2812,7 @@ var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
2840
2812
|
}
|
|
2841
2813
|
|
|
2842
2814
|
var styles = props.styles;
|
|
2843
|
-
var serialized = serializeStyles([styles], undefined,
|
|
2815
|
+
var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));
|
|
2844
2816
|
|
|
2845
2817
|
if (!isBrowser$1) {
|
|
2846
2818
|
var _ref;
|
|
@@ -2865,7 +2837,7 @@ var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
2865
2837
|
return null;
|
|
2866
2838
|
}
|
|
2867
2839
|
|
|
2868
|
-
return /*#__PURE__*/
|
|
2840
|
+
return /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion"] = cache.key + "-global " + serializedNames, _ref.dangerouslySetInnerHTML = {
|
|
2869
2841
|
__html: rules
|
|
2870
2842
|
}, _ref.nonce = cache.sheet.nonce, _ref));
|
|
2871
2843
|
} // yes, i know these hooks are used conditionally
|
|
@@ -2874,7 +2846,7 @@ var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
2874
2846
|
// so it's not actually breaking anything
|
|
2875
2847
|
|
|
2876
2848
|
|
|
2877
|
-
var sheetRef =
|
|
2849
|
+
var sheetRef = React.useRef();
|
|
2878
2850
|
useInsertionEffectWithLayoutFallback(function () {
|
|
2879
2851
|
var key = cache.key + "-global"; // use case of https://github.com/emotion-js/emotion/issues/2675
|
|
2880
2852
|
|
|
@@ -3041,7 +3013,7 @@ var Insertion = function Insertion(_ref) {
|
|
|
3041
3013
|
if (!isBrowser$1 && rules.length !== 0) {
|
|
3042
3014
|
var _ref2;
|
|
3043
3015
|
|
|
3044
|
-
return /*#__PURE__*/
|
|
3016
|
+
return /*#__PURE__*/React.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedArr.map(function (serialized) {
|
|
3045
3017
|
return serialized.name;
|
|
3046
3018
|
}).join(' '), _ref2.dangerouslySetInnerHTML = {
|
|
3047
3019
|
__html: rules
|
|
@@ -3086,11 +3058,11 @@ var ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {
|
|
|
3086
3058
|
var content = {
|
|
3087
3059
|
css: css,
|
|
3088
3060
|
cx: cx,
|
|
3089
|
-
theme:
|
|
3061
|
+
theme: React.useContext(ThemeContext)
|
|
3090
3062
|
};
|
|
3091
3063
|
var ele = props.children(content);
|
|
3092
3064
|
hasRendered = true;
|
|
3093
|
-
return /*#__PURE__*/
|
|
3065
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {
|
|
3094
3066
|
cache: cache,
|
|
3095
3067
|
serializedArr: serializedArr
|
|
3096
3068
|
}), ele);
|
|
@@ -3200,7 +3172,7 @@ function _taggedTemplateLiteral(strings, raw) {
|
|
|
3200
3172
|
}));
|
|
3201
3173
|
}
|
|
3202
3174
|
|
|
3203
|
-
var index = typeof document !== 'undefined' ?
|
|
3175
|
+
var index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;
|
|
3204
3176
|
|
|
3205
3177
|
var _excluded$4 = ["className", "clearValue", "cx", "getStyles", "getClassNames", "getValue", "hasValue", "isMulti", "isRtl", "options", "selectOption", "selectProps", "setValue", "theme"];
|
|
3206
3178
|
// ==============================
|
|
@@ -3678,7 +3650,7 @@ var menuCSS = function menuCSS(_ref2, unstyled) {
|
|
|
3678
3650
|
marginTop: spacing.menuGutter
|
|
3679
3651
|
});
|
|
3680
3652
|
};
|
|
3681
|
-
var PortalPlacementContext = /*#__PURE__*/
|
|
3653
|
+
var PortalPlacementContext = /*#__PURE__*/createContext(null);
|
|
3682
3654
|
|
|
3683
3655
|
// NOTE: internal only
|
|
3684
3656
|
var MenuPlacer = function MenuPlacer(props) {
|
|
@@ -3689,14 +3661,14 @@ var MenuPlacer = function MenuPlacer(props) {
|
|
|
3689
3661
|
menuPosition = props.menuPosition,
|
|
3690
3662
|
menuShouldScrollIntoView = props.menuShouldScrollIntoView,
|
|
3691
3663
|
theme = props.theme;
|
|
3692
|
-
var _ref3 =
|
|
3664
|
+
var _ref3 = useContext(PortalPlacementContext) || {},
|
|
3693
3665
|
setPortalPlacement = _ref3.setPortalPlacement;
|
|
3694
|
-
var ref =
|
|
3695
|
-
var _useState =
|
|
3666
|
+
var ref = useRef(null);
|
|
3667
|
+
var _useState = useState(maxMenuHeight),
|
|
3696
3668
|
_useState2 = _slicedToArray(_useState, 2),
|
|
3697
3669
|
maxHeight = _useState2[0],
|
|
3698
3670
|
setMaxHeight = _useState2[1];
|
|
3699
|
-
var _useState3 =
|
|
3671
|
+
var _useState3 = useState(null),
|
|
3700
3672
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
3701
3673
|
placement = _useState4[0],
|
|
3702
3674
|
setPlacement = _useState4[1];
|
|
@@ -3839,22 +3811,22 @@ var MenuPortal = function MenuPortal(props) {
|
|
|
3839
3811
|
innerProps = props.innerProps,
|
|
3840
3812
|
menuPlacement = props.menuPlacement,
|
|
3841
3813
|
menuPosition = props.menuPosition;
|
|
3842
|
-
var menuPortalRef =
|
|
3843
|
-
var cleanupRef =
|
|
3844
|
-
var _useState5 =
|
|
3814
|
+
var menuPortalRef = useRef(null);
|
|
3815
|
+
var cleanupRef = useRef(null);
|
|
3816
|
+
var _useState5 = useState(coercePlacement(menuPlacement)),
|
|
3845
3817
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
3846
3818
|
placement = _useState6[0],
|
|
3847
3819
|
setPortalPlacement = _useState6[1];
|
|
3848
|
-
var portalPlacementContext =
|
|
3820
|
+
var portalPlacementContext = useMemo(function () {
|
|
3849
3821
|
return {
|
|
3850
3822
|
setPortalPlacement: setPortalPlacement
|
|
3851
3823
|
};
|
|
3852
3824
|
}, []);
|
|
3853
|
-
var _useState7 =
|
|
3825
|
+
var _useState7 = useState(null),
|
|
3854
3826
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
3855
3827
|
computedPosition = _useState8[0],
|
|
3856
3828
|
setComputedPosition = _useState8[1];
|
|
3857
|
-
var updateComputedPosition =
|
|
3829
|
+
var updateComputedPosition = useCallback(function () {
|
|
3858
3830
|
if (!controlElement) return;
|
|
3859
3831
|
var rect = getBoundingClientObj(controlElement);
|
|
3860
3832
|
var scrollDistance = menuPosition === 'fixed' ? 0 : window.pageYOffset;
|
|
@@ -3869,13 +3841,13 @@ var MenuPortal = function MenuPortal(props) {
|
|
|
3869
3841
|
index(function () {
|
|
3870
3842
|
updateComputedPosition();
|
|
3871
3843
|
}, [updateComputedPosition]);
|
|
3872
|
-
var runAutoUpdate =
|
|
3844
|
+
var runAutoUpdate = useCallback(function () {
|
|
3873
3845
|
if (typeof cleanupRef.current === 'function') {
|
|
3874
3846
|
cleanupRef.current();
|
|
3875
3847
|
cleanupRef.current = null;
|
|
3876
3848
|
}
|
|
3877
3849
|
if (controlElement && menuPortalRef.current) {
|
|
3878
|
-
cleanupRef.current =
|
|
3850
|
+
cleanupRef.current = autoUpdate(controlElement, menuPortalRef.current, updateComputedPosition, {
|
|
3879
3851
|
elementResize: 'ResizeObserver' in window
|
|
3880
3852
|
});
|
|
3881
3853
|
}
|
|
@@ -3883,7 +3855,7 @@ var MenuPortal = function MenuPortal(props) {
|
|
|
3883
3855
|
index(function () {
|
|
3884
3856
|
runAutoUpdate();
|
|
3885
3857
|
}, [runAutoUpdate]);
|
|
3886
|
-
var setMenuPortalElement =
|
|
3858
|
+
var setMenuPortalElement = useCallback(function (menuPortalElement) {
|
|
3887
3859
|
menuPortalRef.current = menuPortalElement;
|
|
3888
3860
|
runAutoUpdate();
|
|
3889
3861
|
}, [runAutoUpdate]);
|
|
@@ -3903,7 +3875,7 @@ var MenuPortal = function MenuPortal(props) {
|
|
|
3903
3875
|
}), innerProps), children);
|
|
3904
3876
|
return jsx(PortalPlacementContext.Provider, {
|
|
3905
3877
|
value: portalPlacementContext
|
|
3906
|
-
}, appendTo ? /*#__PURE__*/
|
|
3878
|
+
}, appendTo ? /*#__PURE__*/createPortal(menuWrapper, appendTo) : menuWrapper);
|
|
3907
3879
|
};
|
|
3908
3880
|
|
|
3909
3881
|
// ==============================
|
|
@@ -4734,12 +4706,12 @@ var LiveRegion = function LiveRegion(props) {
|
|
|
4734
4706
|
var ariaLive = selectProps['aria-live'];
|
|
4735
4707
|
|
|
4736
4708
|
// Update aria live message configuration when prop changes
|
|
4737
|
-
var messages =
|
|
4709
|
+
var messages = useMemo(function () {
|
|
4738
4710
|
return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});
|
|
4739
4711
|
}, [ariaLiveMessages]);
|
|
4740
4712
|
|
|
4741
4713
|
// Update aria live selected option when prop changes
|
|
4742
|
-
var ariaSelected =
|
|
4714
|
+
var ariaSelected = useMemo(function () {
|
|
4743
4715
|
var message = '';
|
|
4744
4716
|
if (ariaSelection && messages.onChange) {
|
|
4745
4717
|
var option = ariaSelection.option,
|
|
@@ -4770,7 +4742,7 @@ var LiveRegion = function LiveRegion(props) {
|
|
|
4770
4742
|
}
|
|
4771
4743
|
return message;
|
|
4772
4744
|
}, [ariaSelection, messages, isOptionDisabled, selectValue, getOptionLabel]);
|
|
4773
|
-
var ariaFocused =
|
|
4745
|
+
var ariaFocused = useMemo(function () {
|
|
4774
4746
|
var focusMsg = '';
|
|
4775
4747
|
var focused = focusedOption || focusedValue;
|
|
4776
4748
|
var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));
|
|
@@ -4789,7 +4761,7 @@ var LiveRegion = function LiveRegion(props) {
|
|
|
4789
4761
|
}
|
|
4790
4762
|
return focusMsg;
|
|
4791
4763
|
}, [focusedOption, focusedValue, getOptionLabel, isOptionDisabled, messages, focusableOptions, selectValue, isAppleDevice]);
|
|
4792
|
-
var ariaResults =
|
|
4764
|
+
var ariaResults = useMemo(function () {
|
|
4793
4765
|
var resultsMsg = '';
|
|
4794
4766
|
if (menuIsOpen && options.length && !isLoading && messages.onFilter) {
|
|
4795
4767
|
var resultsMessage = screenReaderStatus({
|
|
@@ -4803,7 +4775,7 @@ var LiveRegion = function LiveRegion(props) {
|
|
|
4803
4775
|
return resultsMsg;
|
|
4804
4776
|
}, [focusableOptions, inputValue, menuIsOpen, messages, options, screenReaderStatus, isLoading]);
|
|
4805
4777
|
var isInitialFocus = (ariaSelection === null || ariaSelection === void 0 ? void 0 : ariaSelection.action) === 'initial-input-focus';
|
|
4806
|
-
var ariaGuidance =
|
|
4778
|
+
var ariaGuidance = useMemo(function () {
|
|
4807
4779
|
var guidanceMsg = '';
|
|
4808
4780
|
if (messages.guidance) {
|
|
4809
4781
|
var context = focusedValue ? 'value' : menuIsOpen ? 'menu' : 'input';
|
|
@@ -4819,7 +4791,7 @@ var LiveRegion = function LiveRegion(props) {
|
|
|
4819
4791
|
}
|
|
4820
4792
|
return guidanceMsg;
|
|
4821
4793
|
}, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled, isSearchable, menuIsOpen, messages, selectValue, tabSelectsValue, isInitialFocus]);
|
|
4822
|
-
var ScreenReaderText = jsx(
|
|
4794
|
+
var ScreenReaderText = jsx(Fragment, null, jsx("span", {
|
|
4823
4795
|
id: "aria-selection"
|
|
4824
4796
|
}, ariaSelected), jsx("span", {
|
|
4825
4797
|
id: "aria-focused"
|
|
@@ -4828,7 +4800,7 @@ var LiveRegion = function LiveRegion(props) {
|
|
|
4828
4800
|
}, ariaResults), jsx("span", {
|
|
4829
4801
|
id: "aria-guidance"
|
|
4830
4802
|
}, ariaGuidance));
|
|
4831
|
-
return jsx(
|
|
4803
|
+
return jsx(Fragment, null, jsx(A11yText$1, {
|
|
4832
4804
|
id: id
|
|
4833
4805
|
}, isInitialFocus && ScreenReaderText), jsx(A11yText$1, {
|
|
4834
4806
|
"aria-live": ariaLive,
|
|
@@ -5188,11 +5160,11 @@ function useScrollCapture(_ref) {
|
|
|
5188
5160
|
onBottomLeave = _ref.onBottomLeave,
|
|
5189
5161
|
onTopArrive = _ref.onTopArrive,
|
|
5190
5162
|
onTopLeave = _ref.onTopLeave;
|
|
5191
|
-
var isBottom =
|
|
5192
|
-
var isTop =
|
|
5193
|
-
var touchStart =
|
|
5194
|
-
var scrollTarget =
|
|
5195
|
-
var handleEventDelta =
|
|
5163
|
+
var isBottom = useRef(false);
|
|
5164
|
+
var isTop = useRef(false);
|
|
5165
|
+
var touchStart = useRef(0);
|
|
5166
|
+
var scrollTarget = useRef(null);
|
|
5167
|
+
var handleEventDelta = useCallback(function (event, delta) {
|
|
5196
5168
|
if (scrollTarget.current === null) return;
|
|
5197
5169
|
var _scrollTarget$current = scrollTarget.current,
|
|
5198
5170
|
scrollTop = _scrollTarget$current.scrollTop,
|
|
@@ -5237,18 +5209,18 @@ function useScrollCapture(_ref) {
|
|
|
5237
5209
|
cancelScroll(event);
|
|
5238
5210
|
}
|
|
5239
5211
|
}, [onBottomArrive, onBottomLeave, onTopArrive, onTopLeave]);
|
|
5240
|
-
var onWheel =
|
|
5212
|
+
var onWheel = useCallback(function (event) {
|
|
5241
5213
|
handleEventDelta(event, event.deltaY);
|
|
5242
5214
|
}, [handleEventDelta]);
|
|
5243
|
-
var onTouchStart =
|
|
5215
|
+
var onTouchStart = useCallback(function (event) {
|
|
5244
5216
|
// set touch start so we can calculate touchmove delta
|
|
5245
5217
|
touchStart.current = event.changedTouches[0].clientY;
|
|
5246
5218
|
}, []);
|
|
5247
|
-
var onTouchMove =
|
|
5219
|
+
var onTouchMove = useCallback(function (event) {
|
|
5248
5220
|
var deltaY = touchStart.current - event.changedTouches[0].clientY;
|
|
5249
5221
|
handleEventDelta(event, deltaY);
|
|
5250
5222
|
}, [handleEventDelta]);
|
|
5251
|
-
var startListening =
|
|
5223
|
+
var startListening = useCallback(function (el) {
|
|
5252
5224
|
// bail early if no element is available to attach to
|
|
5253
5225
|
if (!el) return;
|
|
5254
5226
|
var notPassive = supportsPassiveEvents ? {
|
|
@@ -5258,14 +5230,14 @@ function useScrollCapture(_ref) {
|
|
|
5258
5230
|
el.addEventListener('touchstart', onTouchStart, notPassive);
|
|
5259
5231
|
el.addEventListener('touchmove', onTouchMove, notPassive);
|
|
5260
5232
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
5261
|
-
var stopListening =
|
|
5233
|
+
var stopListening = useCallback(function (el) {
|
|
5262
5234
|
// bail early if no element is available to detach from
|
|
5263
5235
|
if (!el) return;
|
|
5264
5236
|
el.removeEventListener('wheel', onWheel, false);
|
|
5265
5237
|
el.removeEventListener('touchstart', onTouchStart, false);
|
|
5266
5238
|
el.removeEventListener('touchmove', onTouchMove, false);
|
|
5267
5239
|
}, [onTouchMove, onTouchStart, onWheel]);
|
|
5268
|
-
|
|
5240
|
+
useEffect(function () {
|
|
5269
5241
|
if (!isEnabled) return;
|
|
5270
5242
|
var element = scrollTarget.current;
|
|
5271
5243
|
startListening(element);
|
|
@@ -5318,9 +5290,9 @@ function useScrollLock(_ref) {
|
|
|
5318
5290
|
var isEnabled = _ref.isEnabled,
|
|
5319
5291
|
_ref$accountForScroll = _ref.accountForScrollbars,
|
|
5320
5292
|
accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;
|
|
5321
|
-
var originalStyles =
|
|
5322
|
-
var scrollTarget =
|
|
5323
|
-
var addScrollLock =
|
|
5293
|
+
var originalStyles = useRef({});
|
|
5294
|
+
var scrollTarget = useRef(null);
|
|
5295
|
+
var addScrollLock = useCallback(function (touchScrollTarget) {
|
|
5324
5296
|
if (!canUseDOM) return;
|
|
5325
5297
|
var target = document.body;
|
|
5326
5298
|
var targetStyle = target && target.style;
|
|
@@ -5363,7 +5335,7 @@ function useScrollLock(_ref) {
|
|
|
5363
5335
|
// increment active scroll locks
|
|
5364
5336
|
activeScrollLocks += 1;
|
|
5365
5337
|
}, [accountForScrollbars]);
|
|
5366
|
-
var removeScrollLock =
|
|
5338
|
+
var removeScrollLock = useCallback(function (touchScrollTarget) {
|
|
5367
5339
|
if (!canUseDOM) return;
|
|
5368
5340
|
var target = document.body;
|
|
5369
5341
|
var targetStyle = target && target.style;
|
|
@@ -5390,7 +5362,7 @@ function useScrollLock(_ref) {
|
|
|
5390
5362
|
}
|
|
5391
5363
|
}
|
|
5392
5364
|
}, [accountForScrollbars]);
|
|
5393
|
-
|
|
5365
|
+
useEffect(function () {
|
|
5394
5366
|
if (!isEnabled) return;
|
|
5395
5367
|
var element = scrollTarget.current;
|
|
5396
5368
|
addScrollLock(element);
|
|
@@ -5440,7 +5412,7 @@ function ScrollManager(_ref) {
|
|
|
5440
5412
|
setScrollCaptureTarget(element);
|
|
5441
5413
|
setScrollLockTarget(element);
|
|
5442
5414
|
};
|
|
5443
|
-
return jsx(
|
|
5415
|
+
return jsx(Fragment, null, lockEnabled && jsx("div", {
|
|
5444
5416
|
onClick: blurSelectInput,
|
|
5445
5417
|
css: _ref2$1
|
|
5446
5418
|
}), children(targetRef));
|
|
@@ -6725,7 +6697,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6725
6697
|
});
|
|
6726
6698
|
if (!isSearchable) {
|
|
6727
6699
|
// use a dummy input to maintain focus/blur functionality
|
|
6728
|
-
return /*#__PURE__*/
|
|
6700
|
+
return /*#__PURE__*/React.createElement(DummyInput, _extends({
|
|
6729
6701
|
id: id,
|
|
6730
6702
|
innerRef: this.getInputRef,
|
|
6731
6703
|
onBlur: this.onInputBlur,
|
|
@@ -6738,7 +6710,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6738
6710
|
value: ""
|
|
6739
6711
|
}, ariaAttributes));
|
|
6740
6712
|
}
|
|
6741
|
-
return /*#__PURE__*/
|
|
6713
|
+
return /*#__PURE__*/React.createElement(Input, _extends({}, commonProps, {
|
|
6742
6714
|
autoCapitalize: "none",
|
|
6743
6715
|
autoComplete: "off",
|
|
6744
6716
|
autoCorrect: "off",
|
|
@@ -6779,7 +6751,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6779
6751
|
focusedValue = _this$state5.focusedValue,
|
|
6780
6752
|
isFocused = _this$state5.isFocused;
|
|
6781
6753
|
if (!this.hasValue() || !controlShouldRenderValue) {
|
|
6782
|
-
return inputValue ? null : /*#__PURE__*/
|
|
6754
|
+
return inputValue ? null : /*#__PURE__*/React.createElement(Placeholder, _extends({}, commonProps, {
|
|
6783
6755
|
key: "placeholder",
|
|
6784
6756
|
isDisabled: isDisabled,
|
|
6785
6757
|
isFocused: isFocused,
|
|
@@ -6792,7 +6764,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6792
6764
|
return selectValue.map(function (opt, index) {
|
|
6793
6765
|
var isOptionFocused = opt === focusedValue;
|
|
6794
6766
|
var key = "".concat(_this3.getOptionLabel(opt), "-").concat(_this3.getOptionValue(opt));
|
|
6795
|
-
return /*#__PURE__*/
|
|
6767
|
+
return /*#__PURE__*/React.createElement(MultiValue, _extends({}, commonProps, {
|
|
6796
6768
|
components: {
|
|
6797
6769
|
Container: MultiValueContainer,
|
|
6798
6770
|
Label: MultiValueLabel,
|
|
@@ -6821,7 +6793,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6821
6793
|
return null;
|
|
6822
6794
|
}
|
|
6823
6795
|
var singleValue = selectValue[0];
|
|
6824
|
-
return /*#__PURE__*/
|
|
6796
|
+
return /*#__PURE__*/React.createElement(SingleValue, _extends({}, commonProps, {
|
|
6825
6797
|
data: singleValue,
|
|
6826
6798
|
isDisabled: isDisabled
|
|
6827
6799
|
}), this.formatOptionLabel(singleValue, 'value'));
|
|
@@ -6844,7 +6816,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6844
6816
|
onTouchEnd: this.onClearIndicatorTouchEnd,
|
|
6845
6817
|
'aria-hidden': 'true'
|
|
6846
6818
|
};
|
|
6847
|
-
return /*#__PURE__*/
|
|
6819
|
+
return /*#__PURE__*/React.createElement(ClearIndicator, _extends({}, commonProps, {
|
|
6848
6820
|
innerProps: innerProps,
|
|
6849
6821
|
isFocused: isFocused
|
|
6850
6822
|
}));
|
|
@@ -6863,7 +6835,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6863
6835
|
var innerProps = {
|
|
6864
6836
|
'aria-hidden': 'true'
|
|
6865
6837
|
};
|
|
6866
|
-
return /*#__PURE__*/
|
|
6838
|
+
return /*#__PURE__*/React.createElement(LoadingIndicator, _extends({}, commonProps, {
|
|
6867
6839
|
innerProps: innerProps,
|
|
6868
6840
|
isDisabled: isDisabled,
|
|
6869
6841
|
isFocused: isFocused
|
|
@@ -6881,7 +6853,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6881
6853
|
var commonProps = this.commonProps;
|
|
6882
6854
|
var isDisabled = this.props.isDisabled;
|
|
6883
6855
|
var isFocused = this.state.isFocused;
|
|
6884
|
-
return /*#__PURE__*/
|
|
6856
|
+
return /*#__PURE__*/React.createElement(IndicatorSeparator, _extends({}, commonProps, {
|
|
6885
6857
|
isDisabled: isDisabled,
|
|
6886
6858
|
isFocused: isFocused
|
|
6887
6859
|
}));
|
|
@@ -6900,7 +6872,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6900
6872
|
onTouchEnd: this.onDropdownIndicatorTouchEnd,
|
|
6901
6873
|
'aria-hidden': 'true'
|
|
6902
6874
|
};
|
|
6903
|
-
return /*#__PURE__*/
|
|
6875
|
+
return /*#__PURE__*/React.createElement(DropdownIndicator, _extends({}, commonProps, {
|
|
6904
6876
|
innerProps: innerProps,
|
|
6905
6877
|
isDisabled: isDisabled,
|
|
6906
6878
|
isFocused: isFocused
|
|
@@ -6965,7 +6937,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6965
6937
|
'aria-selected': _this4.isAppleDevice ? undefined : isSelected // is not supported on Apple devices
|
|
6966
6938
|
};
|
|
6967
6939
|
|
|
6968
|
-
return /*#__PURE__*/
|
|
6940
|
+
return /*#__PURE__*/React.createElement(Option, _extends({}, commonProps, {
|
|
6969
6941
|
innerProps: innerProps,
|
|
6970
6942
|
data: data,
|
|
6971
6943
|
isDisabled: isDisabled,
|
|
@@ -6987,7 +6959,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
6987
6959
|
groupIndex = item.index;
|
|
6988
6960
|
var groupId = "".concat(_this4.getElementId('group'), "-").concat(groupIndex);
|
|
6989
6961
|
var headingId = "".concat(groupId, "-heading");
|
|
6990
|
-
return /*#__PURE__*/
|
|
6962
|
+
return /*#__PURE__*/React.createElement(Group, _extends({}, commonProps, {
|
|
6991
6963
|
key: groupId,
|
|
6992
6964
|
data: _data,
|
|
6993
6965
|
options: options,
|
|
@@ -7009,13 +6981,13 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7009
6981
|
inputValue: inputValue
|
|
7010
6982
|
});
|
|
7011
6983
|
if (message === null) return null;
|
|
7012
|
-
menuUI = /*#__PURE__*/
|
|
6984
|
+
menuUI = /*#__PURE__*/React.createElement(LoadingMessage, commonProps, message);
|
|
7013
6985
|
} else {
|
|
7014
6986
|
var _message = noOptionsMessage({
|
|
7015
6987
|
inputValue: inputValue
|
|
7016
6988
|
});
|
|
7017
6989
|
if (_message === null) return null;
|
|
7018
|
-
menuUI = /*#__PURE__*/
|
|
6990
|
+
menuUI = /*#__PURE__*/React.createElement(NoOptionsMessage, commonProps, _message);
|
|
7019
6991
|
}
|
|
7020
6992
|
var menuPlacementProps = {
|
|
7021
6993
|
minMenuHeight: minMenuHeight,
|
|
@@ -7024,12 +6996,12 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7024
6996
|
menuPosition: menuPosition,
|
|
7025
6997
|
menuShouldScrollIntoView: menuShouldScrollIntoView
|
|
7026
6998
|
};
|
|
7027
|
-
var menuElement = /*#__PURE__*/
|
|
6999
|
+
var menuElement = /*#__PURE__*/React.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref4) {
|
|
7028
7000
|
var ref = _ref4.ref,
|
|
7029
7001
|
_ref4$placerProps = _ref4.placerProps,
|
|
7030
7002
|
placement = _ref4$placerProps.placement,
|
|
7031
7003
|
maxHeight = _ref4$placerProps.maxHeight;
|
|
7032
|
-
return /*#__PURE__*/
|
|
7004
|
+
return /*#__PURE__*/React.createElement(Menu, _extends({}, commonProps, menuPlacementProps, {
|
|
7033
7005
|
innerRef: ref,
|
|
7034
7006
|
innerProps: {
|
|
7035
7007
|
onMouseDown: _this4.onMenuMouseDown,
|
|
@@ -7037,13 +7009,13 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7037
7009
|
},
|
|
7038
7010
|
isLoading: isLoading,
|
|
7039
7011
|
placement: placement
|
|
7040
|
-
}), /*#__PURE__*/
|
|
7012
|
+
}), /*#__PURE__*/React.createElement(ScrollManager, {
|
|
7041
7013
|
captureEnabled: captureMenuScroll,
|
|
7042
7014
|
onTopArrive: onMenuScrollToTop,
|
|
7043
7015
|
onBottomArrive: onMenuScrollToBottom,
|
|
7044
7016
|
lockEnabled: menuShouldBlockScroll
|
|
7045
7017
|
}, function (scrollTargetRef) {
|
|
7046
|
-
return /*#__PURE__*/
|
|
7018
|
+
return /*#__PURE__*/React.createElement(MenuList, _extends({}, commonProps, {
|
|
7047
7019
|
innerRef: function innerRef(instance) {
|
|
7048
7020
|
_this4.getMenuListRef(instance);
|
|
7049
7021
|
scrollTargetRef(instance);
|
|
@@ -7063,7 +7035,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7063
7035
|
// positioning behaviour is almost identical for portalled and fixed,
|
|
7064
7036
|
// so we use the same component. the actual portalling logic is forked
|
|
7065
7037
|
// within the component based on `menuPosition`
|
|
7066
|
-
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/
|
|
7038
|
+
return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React.createElement(MenuPortal, _extends({}, commonProps, {
|
|
7067
7039
|
appendTo: menuPortalTarget,
|
|
7068
7040
|
controlElement: this.controlRef,
|
|
7069
7041
|
menuPlacement: menuPlacement,
|
|
@@ -7082,7 +7054,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7082
7054
|
required = _this$props13.required;
|
|
7083
7055
|
var selectValue = this.state.selectValue;
|
|
7084
7056
|
if (required && !this.hasValue() && !isDisabled) {
|
|
7085
|
-
return /*#__PURE__*/
|
|
7057
|
+
return /*#__PURE__*/React.createElement(RequiredInput$1, {
|
|
7086
7058
|
name: name,
|
|
7087
7059
|
onFocus: this.onValueInputFocus
|
|
7088
7060
|
});
|
|
@@ -7093,29 +7065,29 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7093
7065
|
var value = selectValue.map(function (opt) {
|
|
7094
7066
|
return _this5.getOptionValue(opt);
|
|
7095
7067
|
}).join(delimiter);
|
|
7096
|
-
return /*#__PURE__*/
|
|
7068
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
7097
7069
|
name: name,
|
|
7098
7070
|
type: "hidden",
|
|
7099
7071
|
value: value
|
|
7100
7072
|
});
|
|
7101
7073
|
} else {
|
|
7102
7074
|
var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {
|
|
7103
|
-
return /*#__PURE__*/
|
|
7075
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
7104
7076
|
key: "i-".concat(i),
|
|
7105
7077
|
name: name,
|
|
7106
7078
|
type: "hidden",
|
|
7107
7079
|
value: _this5.getOptionValue(opt)
|
|
7108
7080
|
});
|
|
7109
|
-
}) : /*#__PURE__*/
|
|
7081
|
+
}) : /*#__PURE__*/React.createElement("input", {
|
|
7110
7082
|
name: name,
|
|
7111
7083
|
type: "hidden",
|
|
7112
7084
|
value: ""
|
|
7113
7085
|
});
|
|
7114
|
-
return /*#__PURE__*/
|
|
7086
|
+
return /*#__PURE__*/React.createElement("div", null, input);
|
|
7115
7087
|
}
|
|
7116
7088
|
} else {
|
|
7117
7089
|
var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';
|
|
7118
|
-
return /*#__PURE__*/
|
|
7090
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
7119
7091
|
name: name,
|
|
7120
7092
|
type: "hidden",
|
|
7121
7093
|
value: _value
|
|
@@ -7133,7 +7105,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7133
7105
|
isFocused = _this$state6.isFocused,
|
|
7134
7106
|
selectValue = _this$state6.selectValue;
|
|
7135
7107
|
var focusableOptions = this.getFocusableOptions();
|
|
7136
|
-
return /*#__PURE__*/
|
|
7108
|
+
return /*#__PURE__*/React.createElement(LiveRegion$1, _extends({}, commonProps, {
|
|
7137
7109
|
id: this.getElementId('live-region'),
|
|
7138
7110
|
ariaSelection: ariaSelection,
|
|
7139
7111
|
focusedOption: focusedOption,
|
|
@@ -7159,7 +7131,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7159
7131
|
menuIsOpen = _this$props14.menuIsOpen;
|
|
7160
7132
|
var isFocused = this.state.isFocused;
|
|
7161
7133
|
var commonProps = this.commonProps = this.getCommonProps();
|
|
7162
|
-
return /*#__PURE__*/
|
|
7134
|
+
return /*#__PURE__*/React.createElement(SelectContainer, _extends({}, commonProps, {
|
|
7163
7135
|
className: className,
|
|
7164
7136
|
innerProps: {
|
|
7165
7137
|
id: id,
|
|
@@ -7167,7 +7139,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7167
7139
|
},
|
|
7168
7140
|
isDisabled: isDisabled,
|
|
7169
7141
|
isFocused: isFocused
|
|
7170
|
-
}), this.renderLiveRegion(), /*#__PURE__*/
|
|
7142
|
+
}), this.renderLiveRegion(), /*#__PURE__*/React.createElement(Control, _extends({}, commonProps, {
|
|
7171
7143
|
innerRef: this.getControlRef,
|
|
7172
7144
|
innerProps: {
|
|
7173
7145
|
onMouseDown: this.onControlMouseDown,
|
|
@@ -7176,9 +7148,9 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7176
7148
|
isDisabled: isDisabled,
|
|
7177
7149
|
isFocused: isFocused,
|
|
7178
7150
|
menuIsOpen: menuIsOpen
|
|
7179
|
-
}), /*#__PURE__*/
|
|
7151
|
+
}), /*#__PURE__*/React.createElement(ValueContainer, _extends({}, commonProps, {
|
|
7180
7152
|
isDisabled: isDisabled
|
|
7181
|
-
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/
|
|
7153
|
+
}), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React.createElement(IndicatorsContainer, _extends({}, commonProps, {
|
|
7182
7154
|
isDisabled: isDisabled
|
|
7183
7155
|
}), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());
|
|
7184
7156
|
}
|
|
@@ -7245,7 +7217,7 @@ var Select = /*#__PURE__*/function (_Component) {
|
|
|
7245
7217
|
}
|
|
7246
7218
|
}]);
|
|
7247
7219
|
return Select;
|
|
7248
|
-
}(
|
|
7220
|
+
}(Component);
|
|
7249
7221
|
Select.defaultProps = defaultProps;
|
|
7250
7222
|
|
|
7251
7223
|
var _excluded$1 = ["defaultInputValue", "defaultMenuIsOpen", "defaultValue", "inputValue", "menuIsOpen", "onChange", "onInputChange", "onMenuClose", "onMenuOpen", "value"];
|
|
@@ -7264,38 +7236,38 @@ function useStateManager(_ref) {
|
|
|
7264
7236
|
propsOnMenuOpen = _ref.onMenuOpen,
|
|
7265
7237
|
propsValue = _ref.value,
|
|
7266
7238
|
restSelectProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
7267
|
-
var _useState =
|
|
7239
|
+
var _useState = useState(propsInputValue !== undefined ? propsInputValue : defaultInputValue),
|
|
7268
7240
|
_useState2 = _slicedToArray(_useState, 2),
|
|
7269
7241
|
stateInputValue = _useState2[0],
|
|
7270
7242
|
setStateInputValue = _useState2[1];
|
|
7271
|
-
var _useState3 =
|
|
7243
|
+
var _useState3 = useState(propsMenuIsOpen !== undefined ? propsMenuIsOpen : defaultMenuIsOpen),
|
|
7272
7244
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
7273
7245
|
stateMenuIsOpen = _useState4[0],
|
|
7274
7246
|
setStateMenuIsOpen = _useState4[1];
|
|
7275
|
-
var _useState5 =
|
|
7247
|
+
var _useState5 = useState(propsValue !== undefined ? propsValue : defaultValue),
|
|
7276
7248
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
7277
7249
|
stateValue = _useState6[0],
|
|
7278
7250
|
setStateValue = _useState6[1];
|
|
7279
|
-
var onChange =
|
|
7251
|
+
var onChange = useCallback(function (value, actionMeta) {
|
|
7280
7252
|
if (typeof propsOnChange === 'function') {
|
|
7281
7253
|
propsOnChange(value, actionMeta);
|
|
7282
7254
|
}
|
|
7283
7255
|
setStateValue(value);
|
|
7284
7256
|
}, [propsOnChange]);
|
|
7285
|
-
var onInputChange =
|
|
7257
|
+
var onInputChange = useCallback(function (value, actionMeta) {
|
|
7286
7258
|
var newValue;
|
|
7287
7259
|
if (typeof propsOnInputChange === 'function') {
|
|
7288
7260
|
newValue = propsOnInputChange(value, actionMeta);
|
|
7289
7261
|
}
|
|
7290
7262
|
setStateInputValue(newValue !== undefined ? newValue : value);
|
|
7291
7263
|
}, [propsOnInputChange]);
|
|
7292
|
-
var onMenuOpen =
|
|
7264
|
+
var onMenuOpen = useCallback(function () {
|
|
7293
7265
|
if (typeof propsOnMenuOpen === 'function') {
|
|
7294
7266
|
propsOnMenuOpen();
|
|
7295
7267
|
}
|
|
7296
7268
|
setStateMenuIsOpen(true);
|
|
7297
7269
|
}, [propsOnMenuOpen]);
|
|
7298
|
-
var onMenuClose =
|
|
7270
|
+
var onMenuClose = useCallback(function () {
|
|
7299
7271
|
if (typeof propsOnMenuClose === 'function') {
|
|
7300
7272
|
propsOnMenuClose();
|
|
7301
7273
|
}
|
|
@@ -7369,16 +7341,16 @@ function useCreatable(_ref) {
|
|
|
7369
7341
|
isMulti = restSelectProps.isMulti,
|
|
7370
7342
|
value = restSelectProps.value,
|
|
7371
7343
|
name = restSelectProps.name;
|
|
7372
|
-
var newOption =
|
|
7344
|
+
var newOption = useMemo(function () {
|
|
7373
7345
|
return isValidNewOption(inputValue, cleanValue(value), propsOptions, {
|
|
7374
7346
|
getOptionValue: getOptionValue$1$1,
|
|
7375
7347
|
getOptionLabel: getOptionLabel$1$1
|
|
7376
7348
|
}) ? getNewOptionData(inputValue, formatCreateLabel(inputValue)) : undefined;
|
|
7377
7349
|
}, [formatCreateLabel, getNewOptionData, getOptionLabel$1$1, getOptionValue$1$1, inputValue, isValidNewOption, propsOptions, value]);
|
|
7378
|
-
var options =
|
|
7350
|
+
var options = useMemo(function () {
|
|
7379
7351
|
return (allowCreateWhileLoading || !isLoading) && newOption ? createOptionPosition === 'first' ? [newOption].concat(_toConsumableArray(propsOptions)) : [].concat(_toConsumableArray(propsOptions), [newOption]) : propsOptions;
|
|
7380
7352
|
}, [allowCreateWhileLoading, createOptionPosition, isLoading, newOption, propsOptions]);
|
|
7381
|
-
var onChange =
|
|
7353
|
+
var onChange = useCallback(function (newValue, actionMeta) {
|
|
7382
7354
|
if (actionMeta.action !== 'select-option') {
|
|
7383
7355
|
return propsOnChange(newValue, actionMeta);
|
|
7384
7356
|
}
|
|
@@ -7403,10 +7375,10 @@ function useCreatable(_ref) {
|
|
|
7403
7375
|
});
|
|
7404
7376
|
}
|
|
7405
7377
|
|
|
7406
|
-
var CreatableSelect = /*#__PURE__*/
|
|
7378
|
+
var CreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
7407
7379
|
var creatableProps = useStateManager(props);
|
|
7408
7380
|
var selectProps = useCreatable(creatableProps);
|
|
7409
|
-
return /*#__PURE__*/
|
|
7381
|
+
return /*#__PURE__*/React.createElement(Select, _extends({
|
|
7410
7382
|
ref: ref
|
|
7411
7383
|
}, selectProps));
|
|
7412
7384
|
});
|
|
@@ -7421,15 +7393,15 @@ const SelectControl = props => {
|
|
|
7421
7393
|
inputBorderColor,
|
|
7422
7394
|
inputBorderColorHover
|
|
7423
7395
|
} = props.selectProps;
|
|
7424
|
-
return /*#__PURE__*/
|
|
7425
|
-
className:
|
|
7396
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, before, /*#__PURE__*/React__default.createElement(components$1.Control, Object.assign({}, props, {
|
|
7397
|
+
className: clsx('select__control', inputFill, inputShape, inputBorderColor && `border-color_${inputBorderColor}`, inputBorderColorHover && `border-color_hover_${inputBorderColorHover}`)
|
|
7426
7398
|
})), after);
|
|
7427
7399
|
};
|
|
7428
7400
|
SelectControl.propTypes = {
|
|
7429
|
-
selectProps:
|
|
7430
|
-
inputFill:
|
|
7431
|
-
inputShape:
|
|
7432
|
-
set:
|
|
7401
|
+
selectProps: PropTypes.shape({
|
|
7402
|
+
inputFill: PropTypes.string,
|
|
7403
|
+
inputShape: PropTypes.string,
|
|
7404
|
+
set: PropTypes.string
|
|
7433
7405
|
})
|
|
7434
7406
|
};
|
|
7435
7407
|
SelectControl.__docgenInfo = {
|
|
@@ -7469,7 +7441,7 @@ const SelectIndicatorsContainer = props => {
|
|
|
7469
7441
|
showBadge,
|
|
7470
7442
|
value
|
|
7471
7443
|
} = props.selectProps;
|
|
7472
|
-
return /*#__PURE__*/
|
|
7444
|
+
return /*#__PURE__*/React__default.createElement(components$1.IndicatorsContainer, props, showBadge && value?.length > 0 ? /*#__PURE__*/React__default.createElement(Badge, {
|
|
7473
7445
|
appearance: badgeAppearance,
|
|
7474
7446
|
size: badgeSize,
|
|
7475
7447
|
textSize: badgeTextSize,
|
|
@@ -7489,18 +7461,18 @@ const SelectDropdownIndicator = props => {
|
|
|
7489
7461
|
dropdownIconFill,
|
|
7490
7462
|
dropdownIconStroke
|
|
7491
7463
|
} = props.selectProps;
|
|
7492
|
-
return /*#__PURE__*/
|
|
7464
|
+
return /*#__PURE__*/React__default.createElement(components$1.DropdownIndicator, props, dropdownIcon ? /*#__PURE__*/React__default.createElement(Icon, {
|
|
7493
7465
|
SvgImage: dropdownIcon,
|
|
7494
7466
|
iconFill: dropdownIconFill,
|
|
7495
7467
|
iconStroke: dropdownIconStroke
|
|
7496
7468
|
}) : props.children);
|
|
7497
7469
|
};
|
|
7498
7470
|
SelectDropdownIndicator.propTypes = {
|
|
7499
|
-
selectProps:
|
|
7471
|
+
selectProps: PropTypes.shape({
|
|
7500
7472
|
// "dropdownIcon" is SvgImage(file.svg)
|
|
7501
|
-
dropdownIcon:
|
|
7502
|
-
dropdownIconFill:
|
|
7503
|
-
dropdownIconStroke:
|
|
7473
|
+
dropdownIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
|
|
7474
|
+
dropdownIconFill: PropTypes.string,
|
|
7475
|
+
dropdownIconStroke: PropTypes.string
|
|
7504
7476
|
})
|
|
7505
7477
|
};
|
|
7506
7478
|
SelectDropdownIndicator.__docgenInfo = {
|
|
@@ -7545,16 +7517,16 @@ const SelectGroupHeading = props => {
|
|
|
7545
7517
|
headingTextSize,
|
|
7546
7518
|
headingTextColor
|
|
7547
7519
|
} = props.selectProps;
|
|
7548
|
-
return /*#__PURE__*/
|
|
7549
|
-
className:
|
|
7550
|
-
}), /*#__PURE__*/
|
|
7520
|
+
return /*#__PURE__*/React__default.createElement(components$1.GroupHeading, Object.assign({}, props, {
|
|
7521
|
+
className: clsx('select__menu-group-heading', headingFill, headingFillHover)
|
|
7522
|
+
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
7551
7523
|
size: headingTextSize,
|
|
7552
7524
|
textWeight: headingTextWeight,
|
|
7553
7525
|
textColor: headingTextColor
|
|
7554
7526
|
}, props.data.label));
|
|
7555
7527
|
};
|
|
7556
7528
|
SelectGroupHeading.propTypes = {
|
|
7557
|
-
selectProps:
|
|
7529
|
+
selectProps: PropTypes.shape({})
|
|
7558
7530
|
};
|
|
7559
7531
|
SelectGroupHeading.__docgenInfo = {
|
|
7560
7532
|
"description": "",
|
|
@@ -7578,17 +7550,17 @@ const SelectInput = props => {
|
|
|
7578
7550
|
inputTextColor,
|
|
7579
7551
|
inputCaretColor
|
|
7580
7552
|
} = props.selectProps;
|
|
7581
|
-
return /*#__PURE__*/
|
|
7582
|
-
className:
|
|
7553
|
+
return /*#__PURE__*/React__default.createElement(components$1.Input, Object.assign({}, props, {
|
|
7554
|
+
className: clsx(inputTextSize && `text_size_${inputTextSize}`, inputTextColor && `text-color_${inputTextColor}`, inputCaretColor && `caret-color_${inputCaretColor}`)
|
|
7583
7555
|
}));
|
|
7584
7556
|
};
|
|
7585
7557
|
SelectInput.propTypes = {
|
|
7586
|
-
selectProps:
|
|
7587
|
-
inputTextSize:
|
|
7588
|
-
inputTextColor:
|
|
7589
|
-
inputCaretColor:
|
|
7558
|
+
selectProps: PropTypes.shape({
|
|
7559
|
+
inputTextSize: PropTypes.string,
|
|
7560
|
+
inputTextColor: PropTypes.string,
|
|
7561
|
+
inputCaretColor: PropTypes.string
|
|
7590
7562
|
}),
|
|
7591
|
-
children:
|
|
7563
|
+
children: PropTypes.any
|
|
7592
7564
|
};
|
|
7593
7565
|
SelectInput.__docgenInfo = {
|
|
7594
7566
|
"description": "",
|
|
@@ -7632,18 +7604,18 @@ const SelectMenu = props => {
|
|
|
7632
7604
|
menuAfter,
|
|
7633
7605
|
menuBefore
|
|
7634
7606
|
} = props.selectProps;
|
|
7635
|
-
return /*#__PURE__*/
|
|
7636
|
-
className:
|
|
7637
|
-
}), menuBefore, props.selectProps.fetchingData ? /*#__PURE__*/
|
|
7607
|
+
return /*#__PURE__*/React__default.createElement(components$1.Menu, Object.assign({}, props, {
|
|
7608
|
+
className: clsx(elevation && `elevation_${elevation}`)
|
|
7609
|
+
}), menuBefore, props.selectProps.fetchingData ? /*#__PURE__*/React__default.createElement("span", {
|
|
7638
7610
|
className: "fetching"
|
|
7639
|
-
}, "Fetching data...") : /*#__PURE__*/
|
|
7611
|
+
}, "Fetching data...") : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, props.children), menuAfter);
|
|
7640
7612
|
};
|
|
7641
7613
|
SelectMenu.propTypes = {
|
|
7642
|
-
selectProps:
|
|
7643
|
-
fetchingData:
|
|
7644
|
-
set:
|
|
7614
|
+
selectProps: PropTypes.shape({
|
|
7615
|
+
fetchingData: PropTypes.any,
|
|
7616
|
+
set: PropTypes.string
|
|
7645
7617
|
}),
|
|
7646
|
-
children:
|
|
7618
|
+
children: PropTypes.any
|
|
7647
7619
|
};
|
|
7648
7620
|
SelectMenu.__docgenInfo = {
|
|
7649
7621
|
"description": "",
|
|
@@ -7682,7 +7654,7 @@ const SelectMultiValueContainer = props => {
|
|
|
7682
7654
|
multipleItemFill,
|
|
7683
7655
|
multipleItemFillHover
|
|
7684
7656
|
} = props.selectProps;
|
|
7685
|
-
return /*#__PURE__*/
|
|
7657
|
+
return /*#__PURE__*/React__default.createElement(components$1.MultiValueContainer, props, /*#__PURE__*/React__default.createElement(Group$2, {
|
|
7686
7658
|
className: "select__multi-value-wrapper",
|
|
7687
7659
|
direction: "horizontal",
|
|
7688
7660
|
alignItems: "center",
|
|
@@ -7702,7 +7674,7 @@ const SelectMultiValueLabel = props => {
|
|
|
7702
7674
|
multipleItemTextSize,
|
|
7703
7675
|
multipleItemTextColor
|
|
7704
7676
|
} = props.selectProps;
|
|
7705
|
-
return /*#__PURE__*/
|
|
7677
|
+
return /*#__PURE__*/React__default.createElement(components$1.MultiValueLabel, props, /*#__PURE__*/React__default.createElement(Text, {
|
|
7706
7678
|
size: multipleItemTextSize,
|
|
7707
7679
|
textColor: multipleItemTextColor
|
|
7708
7680
|
}, props.data.label));
|
|
@@ -7719,7 +7691,7 @@ const SelectMultiValueRemove = props => {
|
|
|
7719
7691
|
multipleItemIcon,
|
|
7720
7692
|
multipleItemIconFill
|
|
7721
7693
|
} = props.selectProps;
|
|
7722
|
-
return /*#__PURE__*/
|
|
7694
|
+
return /*#__PURE__*/React__default.createElement(components$1.MultiValueRemove, props, /*#__PURE__*/React__default.createElement(Icon, {
|
|
7723
7695
|
SvgImage: multipleItemIcon,
|
|
7724
7696
|
iconFill: multipleItemIconFill
|
|
7725
7697
|
}));
|
|
@@ -7740,20 +7712,20 @@ const SelectNoOptions = props => {
|
|
|
7740
7712
|
noOptionsTextColor,
|
|
7741
7713
|
noOptionsText
|
|
7742
7714
|
} = props.selectProps;
|
|
7743
|
-
return /*#__PURE__*/
|
|
7744
|
-
className:
|
|
7745
|
-
}), /*#__PURE__*/
|
|
7715
|
+
return /*#__PURE__*/React__default.createElement(components$1.NoOptionsMessage, Object.assign({}, props, {
|
|
7716
|
+
className: clsx(optionFill, optionBorder, optionBorderType)
|
|
7717
|
+
}), /*#__PURE__*/React__default.createElement(Text, {
|
|
7746
7718
|
size: noOptionsTextSize,
|
|
7747
7719
|
textColor: noOptionsTextColor
|
|
7748
7720
|
}, noOptionsText));
|
|
7749
7721
|
};
|
|
7750
7722
|
SelectNoOptions.propTypes = {
|
|
7751
|
-
selectProps:
|
|
7752
|
-
noOptionsTextSize:
|
|
7753
|
-
noOptionsTextColor:
|
|
7754
|
-
noOptionsText:
|
|
7723
|
+
selectProps: PropTypes.shape({
|
|
7724
|
+
noOptionsTextSize: PropTypes.string,
|
|
7725
|
+
noOptionsTextColor: PropTypes.string,
|
|
7726
|
+
noOptionsText: PropTypes.string
|
|
7755
7727
|
}),
|
|
7756
|
-
children:
|
|
7728
|
+
children: PropTypes.any
|
|
7757
7729
|
};
|
|
7758
7730
|
SelectNoOptions.__docgenInfo = {
|
|
7759
7731
|
"description": "",
|
|
@@ -7814,15 +7786,15 @@ const SelectOption = props => {
|
|
|
7814
7786
|
optionBefore,
|
|
7815
7787
|
optionAfter
|
|
7816
7788
|
} = props.selectProps;
|
|
7817
|
-
return /*#__PURE__*/
|
|
7818
|
-
className:
|
|
7819
|
-
}), optionBefore, /*#__PURE__*/
|
|
7789
|
+
return /*#__PURE__*/React__default.createElement(components$1.Option, Object.assign({}, props, {
|
|
7790
|
+
className: clsx('select__menu-list-item', isSelected && 'select__menu-list-item_state_selected', menuItemSize && `select__menu-list-item_size_${menuItemSize}`, optionFill, optionBorder, optionBorderType, optionFillHover, optionShape)
|
|
7791
|
+
}), optionBefore, /*#__PURE__*/React__default.createElement(Text, {
|
|
7820
7792
|
className: "select__menu-list-item_option",
|
|
7821
7793
|
size: optionTextSize,
|
|
7822
7794
|
textColor: optionTextColor
|
|
7823
|
-
}, label), isSelected && /*#__PURE__*/
|
|
7795
|
+
}, label), isSelected && /*#__PURE__*/React__default.createElement("div", {
|
|
7824
7796
|
className: "select__menu-list-item_selected"
|
|
7825
|
-
}, optionSelected), optionAfter, showDivider && /*#__PURE__*/
|
|
7797
|
+
}, optionSelected), optionAfter, showDivider && /*#__PURE__*/React__default.createElement(Divider, {
|
|
7826
7798
|
direction: dividerDirection,
|
|
7827
7799
|
fill: dividerFill,
|
|
7828
7800
|
size: dividerSize,
|
|
@@ -7830,16 +7802,16 @@ const SelectOption = props => {
|
|
|
7830
7802
|
}));
|
|
7831
7803
|
};
|
|
7832
7804
|
SelectOption.propTypes = {
|
|
7833
|
-
selectProps:
|
|
7834
|
-
optionFill:
|
|
7835
|
-
optionTextSize:
|
|
7836
|
-
optionTextColor:
|
|
7837
|
-
optionShape:
|
|
7838
|
-
optionBefore:
|
|
7839
|
-
optionAfter:
|
|
7805
|
+
selectProps: PropTypes.shape({
|
|
7806
|
+
optionFill: PropTypes.string,
|
|
7807
|
+
optionTextSize: PropTypes.string,
|
|
7808
|
+
optionTextColor: PropTypes.string,
|
|
7809
|
+
optionShape: PropTypes.string,
|
|
7810
|
+
optionBefore: PropTypes.any,
|
|
7811
|
+
optionAfter: PropTypes.any
|
|
7840
7812
|
}),
|
|
7841
|
-
label:
|
|
7842
|
-
isSelected:
|
|
7813
|
+
label: PropTypes.string,
|
|
7814
|
+
isSelected: PropTypes.any
|
|
7843
7815
|
};
|
|
7844
7816
|
SelectOption.__docgenInfo = {
|
|
7845
7817
|
"description": "",
|
|
@@ -7901,17 +7873,17 @@ const SelectPlaceholder = props => {
|
|
|
7901
7873
|
placeholderTextSize,
|
|
7902
7874
|
placeholderTextColor
|
|
7903
7875
|
} = props.selectProps;
|
|
7904
|
-
return /*#__PURE__*/
|
|
7876
|
+
return /*#__PURE__*/React__default.createElement(components$1.Placeholder, props, /*#__PURE__*/React__default.createElement(Text, {
|
|
7905
7877
|
size: placeholderTextSize,
|
|
7906
7878
|
textColor: placeholderTextColor
|
|
7907
7879
|
}, props.children));
|
|
7908
7880
|
};
|
|
7909
7881
|
SelectPlaceholder.propTypes = {
|
|
7910
|
-
selectProps:
|
|
7911
|
-
placeholderTextSize:
|
|
7912
|
-
placeholderTextColor:
|
|
7882
|
+
selectProps: PropTypes.shape({
|
|
7883
|
+
placeholderTextSize: PropTypes.string,
|
|
7884
|
+
placeholderTextColor: PropTypes.string
|
|
7913
7885
|
}),
|
|
7914
|
-
children:
|
|
7886
|
+
children: PropTypes.any
|
|
7915
7887
|
};
|
|
7916
7888
|
SelectPlaceholder.__docgenInfo = {
|
|
7917
7889
|
"description": "",
|
|
@@ -7953,18 +7925,18 @@ const SelectSingleValue = props => {
|
|
|
7953
7925
|
inputTextSize,
|
|
7954
7926
|
inputTextColor
|
|
7955
7927
|
} = props.selectProps;
|
|
7956
|
-
return /*#__PURE__*/
|
|
7928
|
+
return /*#__PURE__*/React__default.createElement(components$1.SingleValue, props, data.optionBefore, /*#__PURE__*/React__default.createElement(Text, {
|
|
7957
7929
|
size: inputTextSize,
|
|
7958
7930
|
textColor: inputTextColor
|
|
7959
7931
|
}, props.children), data.optionAfter);
|
|
7960
7932
|
};
|
|
7961
7933
|
SelectSingleValue.propTypes = {
|
|
7962
|
-
selectProps:
|
|
7963
|
-
inputTextSize:
|
|
7964
|
-
inputTextColor:
|
|
7934
|
+
selectProps: PropTypes.shape({
|
|
7935
|
+
inputTextSize: PropTypes.string,
|
|
7936
|
+
inputTextColor: PropTypes.string
|
|
7965
7937
|
}),
|
|
7966
|
-
children:
|
|
7967
|
-
data:
|
|
7938
|
+
children: PropTypes.any,
|
|
7939
|
+
data: PropTypes.object
|
|
7968
7940
|
};
|
|
7969
7941
|
SelectSingleValue.__docgenInfo = {
|
|
7970
7942
|
"description": "",
|
|
@@ -8010,13 +7982,13 @@ const SelectValueContainer = props => {
|
|
|
8010
7982
|
inputBefore,
|
|
8011
7983
|
inputAfter
|
|
8012
7984
|
} = props.selectProps;
|
|
8013
|
-
return /*#__PURE__*/
|
|
7985
|
+
return /*#__PURE__*/React__default.createElement(components$1.ValueContainer, props, inputBefore, props.children, inputAfter);
|
|
8014
7986
|
};
|
|
8015
7987
|
SelectValueContainer.propTypes = {
|
|
8016
|
-
children:
|
|
8017
|
-
selectProps:
|
|
8018
|
-
inputBefore:
|
|
8019
|
-
inputAfter:
|
|
7988
|
+
children: PropTypes.any,
|
|
7989
|
+
selectProps: PropTypes.shape({
|
|
7990
|
+
inputBefore: PropTypes.any,
|
|
7991
|
+
inputAfter: PropTypes.any
|
|
8020
7992
|
})
|
|
8021
7993
|
};
|
|
8022
7994
|
SelectValueContainer.__docgenInfo = {
|
|
@@ -8051,8 +8023,8 @@ SelectValueContainer.__docgenInfo = {
|
|
|
8051
8023
|
}
|
|
8052
8024
|
};
|
|
8053
8025
|
|
|
8054
|
-
const SelectContainer = /*#__PURE__*/
|
|
8055
|
-
const clearStyle =
|
|
8026
|
+
const SelectContainer = /*#__PURE__*/React__default.forwardRef(function SelectContainer(props, ref) {
|
|
8027
|
+
const clearStyle = useMemo(() => new Proxy({}, {
|
|
8056
8028
|
get: (target, propKey) => () => {}
|
|
8057
8029
|
}), []);
|
|
8058
8030
|
const {
|
|
@@ -8106,107 +8078,107 @@ const SelectContainer = /*#__PURE__*/React__namespace.default.forwardRef(functio
|
|
|
8106
8078
|
value,
|
|
8107
8079
|
onChange
|
|
8108
8080
|
} = props;
|
|
8109
|
-
const defaultRef =
|
|
8081
|
+
const defaultRef = useRef(null);
|
|
8110
8082
|
const selectRef = ref || defaultRef;
|
|
8111
|
-
const borderColorClass = useDeviceTargetClass
|
|
8083
|
+
const borderColorClass = useDeviceTargetClass(props, {
|
|
8112
8084
|
prefix: 'border-color_',
|
|
8113
8085
|
propsKey: 'borderColor'
|
|
8114
8086
|
});
|
|
8115
|
-
const fillClass = useDeviceTargetClass
|
|
8087
|
+
const fillClass = useDeviceTargetClass(props, {
|
|
8116
8088
|
prefix: 'fill_',
|
|
8117
8089
|
propsKey: 'fill'
|
|
8118
8090
|
});
|
|
8119
|
-
const fillHoverClass = useDeviceTargetClass
|
|
8091
|
+
const fillHoverClass = useDeviceTargetClass(props, {
|
|
8120
8092
|
prefix: 'fill_hover_',
|
|
8121
8093
|
propsKey: 'fillHover'
|
|
8122
8094
|
});
|
|
8123
|
-
const shapeClass = useDeviceTargetClass
|
|
8095
|
+
const shapeClass = useDeviceTargetClass(props, {
|
|
8124
8096
|
prefix: 'select_shape_',
|
|
8125
8097
|
propsKey: 'shape'
|
|
8126
8098
|
});
|
|
8127
|
-
const sizeClass = useDeviceTargetClass
|
|
8099
|
+
const sizeClass = useDeviceTargetClass(props, {
|
|
8128
8100
|
prefix: 'select_size_',
|
|
8129
8101
|
propsKey: 'size'
|
|
8130
8102
|
});
|
|
8131
|
-
const optionFillClass = useDeviceTargetClass
|
|
8103
|
+
const optionFillClass = useDeviceTargetClass(props, {
|
|
8132
8104
|
prefix: 'fill_',
|
|
8133
8105
|
propsKey: 'optionFill'
|
|
8134
8106
|
});
|
|
8135
|
-
const optionFillHoverClass = useDeviceTargetClass
|
|
8107
|
+
const optionFillHoverClass = useDeviceTargetClass(props, {
|
|
8136
8108
|
prefix: 'fill_hover_',
|
|
8137
8109
|
propsKey: 'optionFillHover'
|
|
8138
8110
|
});
|
|
8139
|
-
const optionBorderClass = useDeviceTargetClass
|
|
8111
|
+
const optionBorderClass = useDeviceTargetClass(props, {
|
|
8140
8112
|
prefix: 'border-color_',
|
|
8141
8113
|
propsKey: 'optionBorder'
|
|
8142
8114
|
});
|
|
8143
|
-
const optionBorderTypeClass = useDeviceTargetClass
|
|
8115
|
+
const optionBorderTypeClass = useDeviceTargetClass(props, {
|
|
8144
8116
|
prefix: 'border_type_',
|
|
8145
8117
|
propsKey: 'optionBorderType'
|
|
8146
8118
|
});
|
|
8147
|
-
const optionTextSizeClass = useDeviceTargetClass
|
|
8119
|
+
const optionTextSizeClass = useDeviceTargetClass(props, {
|
|
8148
8120
|
propsKey: 'optionTextSize'
|
|
8149
8121
|
});
|
|
8150
|
-
const optionTextColorClass = useDeviceTargetClass
|
|
8122
|
+
const optionTextColorClass = useDeviceTargetClass(props, {
|
|
8151
8123
|
propsKey: 'optionTextColor'
|
|
8152
8124
|
});
|
|
8153
|
-
const optionShapeClass = useDeviceTargetClass
|
|
8125
|
+
const optionShapeClass = useDeviceTargetClass(props, {
|
|
8154
8126
|
propsKey: 'optionShape'
|
|
8155
8127
|
});
|
|
8156
|
-
const inputFillClass = useDeviceTargetClass
|
|
8128
|
+
const inputFillClass = useDeviceTargetClass(props, {
|
|
8157
8129
|
prefix: 'select__control_fill_',
|
|
8158
8130
|
propsKey: 'inputFill'
|
|
8159
8131
|
});
|
|
8160
|
-
const inputShapeClass = useDeviceTargetClass
|
|
8132
|
+
const inputShapeClass = useDeviceTargetClass(props, {
|
|
8161
8133
|
prefix: 'select__control_shape_',
|
|
8162
8134
|
propsKey: 'inputShape'
|
|
8163
8135
|
});
|
|
8164
|
-
const inputTextSizeClass = useDeviceTargetClass
|
|
8136
|
+
const inputTextSizeClass = useDeviceTargetClass(props, {
|
|
8165
8137
|
propsKey: 'inputTextSize'
|
|
8166
8138
|
});
|
|
8167
|
-
const inputTextColorClass = useDeviceTargetClass
|
|
8139
|
+
const inputTextColorClass = useDeviceTargetClass(props, {
|
|
8168
8140
|
propsKey: 'inputTextColor'
|
|
8169
8141
|
});
|
|
8170
|
-
const multipleItemTextSizeClass = useDeviceTargetClass
|
|
8142
|
+
const multipleItemTextSizeClass = useDeviceTargetClass(props, {
|
|
8171
8143
|
propsKey: 'multipleItemTextSize'
|
|
8172
8144
|
});
|
|
8173
|
-
const multipleItemTextColorClass = useDeviceTargetClass
|
|
8145
|
+
const multipleItemTextColorClass = useDeviceTargetClass(props, {
|
|
8174
8146
|
propsKey: 'multipleItemTextColor'
|
|
8175
8147
|
});
|
|
8176
|
-
const inputBorderColorClass = useDeviceTargetClass
|
|
8148
|
+
const inputBorderColorClass = useDeviceTargetClass(props, {
|
|
8177
8149
|
propsKey: 'inputBorderColor'
|
|
8178
8150
|
});
|
|
8179
|
-
const inputBorderColorHoverClass = useDeviceTargetClass
|
|
8151
|
+
const inputBorderColorHoverClass = useDeviceTargetClass(props, {
|
|
8180
8152
|
propsKey: 'inputBorderColorHover'
|
|
8181
8153
|
});
|
|
8182
|
-
const noOptionsTextSizeClass = useDeviceTargetClass
|
|
8154
|
+
const noOptionsTextSizeClass = useDeviceTargetClass(props, {
|
|
8183
8155
|
propsKey: 'noOptionsTextSize'
|
|
8184
8156
|
});
|
|
8185
|
-
const noOptionsTextColorClass = useDeviceTargetClass
|
|
8157
|
+
const noOptionsTextColorClass = useDeviceTargetClass(props, {
|
|
8186
8158
|
propsKey: 'noOptionsTextColor'
|
|
8187
8159
|
});
|
|
8188
|
-
const inputCaretColorClass = useDeviceTargetClass
|
|
8160
|
+
const inputCaretColorClass = useDeviceTargetClass(props, {
|
|
8189
8161
|
propsKey: 'inputCaretColor'
|
|
8190
8162
|
});
|
|
8191
|
-
const headingFillClass = useDeviceTargetClass
|
|
8163
|
+
const headingFillClass = useDeviceTargetClass(props, {
|
|
8192
8164
|
prefix: 'fill_',
|
|
8193
8165
|
propsKey: 'headingFill'
|
|
8194
8166
|
});
|
|
8195
|
-
const headingFillHoverClass = useDeviceTargetClass
|
|
8167
|
+
const headingFillHoverClass = useDeviceTargetClass(props, {
|
|
8196
8168
|
prefix: 'fill_hover_',
|
|
8197
8169
|
propsKey: 'headingFillHover'
|
|
8198
8170
|
});
|
|
8199
|
-
const headingTextSizeClass = useDeviceTargetClass
|
|
8171
|
+
const headingTextSizeClass = useDeviceTargetClass(props, {
|
|
8200
8172
|
propsKey: 'headingTextSize'
|
|
8201
8173
|
});
|
|
8202
|
-
const headingTextWeightClass = useDeviceTargetClass
|
|
8174
|
+
const headingTextWeightClass = useDeviceTargetClass(props, {
|
|
8203
8175
|
propsKey: 'headingTextWeight'
|
|
8204
8176
|
});
|
|
8205
|
-
const headingTextColorClass = useDeviceTargetClass
|
|
8177
|
+
const headingTextColorClass = useDeviceTargetClass(props, {
|
|
8206
8178
|
propsKey: 'headingTextColor'
|
|
8207
8179
|
});
|
|
8208
|
-
const SelectComponent =
|
|
8209
|
-
|
|
8180
|
+
const SelectComponent = useMemo(() => isCreatable ? CreatableSelect$1 : Select$1, [isCreatable]);
|
|
8181
|
+
useEffect(() => {
|
|
8210
8182
|
const onClickOutside = event => {
|
|
8211
8183
|
const isTargetSelectContainer = event.target.hasClass && event.target.hasClass('select_state_hide-value-container');
|
|
8212
8184
|
const isTargetInsideController = selectRef.current.controlRef.contains(event.target);
|
|
@@ -8224,13 +8196,13 @@ const SelectContainer = /*#__PURE__*/React__namespace.default.forwardRef(functio
|
|
|
8224
8196
|
};
|
|
8225
8197
|
}, []);
|
|
8226
8198
|
const selectAppearanceItem = selectConfig.appearance[appearance] || {};
|
|
8227
|
-
return /*#__PURE__*/
|
|
8199
|
+
return /*#__PURE__*/React__default.createElement(SelectComponent, {
|
|
8228
8200
|
after: after,
|
|
8229
8201
|
badgeAppearance: badgeAppearance,
|
|
8230
8202
|
badgeSize: badgeSize,
|
|
8231
8203
|
badgeTextSize: badgeTextSize,
|
|
8232
8204
|
before: before,
|
|
8233
|
-
className:
|
|
8205
|
+
className: clsx(className, 'select', fillClass, fillHoverClass, shapeClass, borderColorClass, sizeClass || selectAppearanceItem.size && `select_size_${selectAppearanceItem.size}`.replace(/([A-Z])/g, '-$1').toLowerCase(), hideValueContainer && 'select_state_hide-value-container', set && `select_set_${set}`),
|
|
8234
8206
|
classNamePrefix: "select",
|
|
8235
8207
|
clearIcon: clearIcon,
|
|
8236
8208
|
clearIconFill: clearIconFill,
|
|
@@ -8321,27 +8293,27 @@ const SelectContainer = /*#__PURE__*/React__namespace.default.forwardRef(functio
|
|
|
8321
8293
|
});
|
|
8322
8294
|
});
|
|
8323
8295
|
SelectContainer.propTypes = {
|
|
8324
|
-
className:
|
|
8296
|
+
className: PropTypes.string,
|
|
8325
8297
|
// "clearIcon" is SvgImage(file.svg)
|
|
8326
|
-
clearIcon:
|
|
8327
|
-
clearIconFill:
|
|
8328
|
-
clearIconStroke:
|
|
8329
|
-
closeMenuOnSelect:
|
|
8298
|
+
clearIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
|
|
8299
|
+
clearIconFill: PropTypes.string,
|
|
8300
|
+
clearIconStroke: PropTypes.string,
|
|
8301
|
+
closeMenuOnSelect: PropTypes.bool,
|
|
8330
8302
|
// "dropdownIcon" is SvgImage(file.svg)
|
|
8331
|
-
dropdownIcon:
|
|
8332
|
-
dropdownIconFill:
|
|
8333
|
-
dropdownIconStroke:
|
|
8334
|
-
filterOption:
|
|
8335
|
-
initialValue:
|
|
8336
|
-
inputAfter:
|
|
8337
|
-
inputBefore:
|
|
8338
|
-
isClearable:
|
|
8339
|
-
isSearchable:
|
|
8340
|
-
noOptionsText:
|
|
8341
|
-
openMenuOnClick:
|
|
8342
|
-
options:
|
|
8343
|
-
set:
|
|
8344
|
-
onChange:
|
|
8303
|
+
dropdownIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.element]),
|
|
8304
|
+
dropdownIconFill: PropTypes.string,
|
|
8305
|
+
dropdownIconStroke: PropTypes.string,
|
|
8306
|
+
filterOption: PropTypes.func,
|
|
8307
|
+
initialValue: PropTypes.any,
|
|
8308
|
+
inputAfter: PropTypes.any,
|
|
8309
|
+
inputBefore: PropTypes.any,
|
|
8310
|
+
isClearable: PropTypes.bool,
|
|
8311
|
+
isSearchable: PropTypes.bool,
|
|
8312
|
+
noOptionsText: PropTypes.string,
|
|
8313
|
+
openMenuOnClick: PropTypes.func,
|
|
8314
|
+
options: PropTypes.arrayOf(PropTypes.object),
|
|
8315
|
+
set: PropTypes.string,
|
|
8316
|
+
onChange: PropTypes.func
|
|
8345
8317
|
};
|
|
8346
8318
|
SelectContainer.defaultProps = {
|
|
8347
8319
|
animationOpen: 'select_animation_open',
|
|
@@ -8522,19 +8494,4 @@ const selectConfig = {
|
|
|
8522
8494
|
}
|
|
8523
8495
|
};
|
|
8524
8496
|
|
|
8525
|
-
|
|
8526
|
-
exports.SelectClearIndicator = SelectClearIndicator;
|
|
8527
|
-
exports.SelectControl = SelectControl;
|
|
8528
|
-
exports.SelectDropdownIndicator = SelectDropdownIndicator;
|
|
8529
|
-
exports.SelectGroupHeading = SelectGroupHeading;
|
|
8530
|
-
exports.SelectIndicatorsContainer = SelectIndicatorsContainer;
|
|
8531
|
-
exports.SelectInput = SelectInput;
|
|
8532
|
-
exports.SelectMenu = SelectMenu;
|
|
8533
|
-
exports.SelectMultiValueContainer = SelectMultiValueContainer;
|
|
8534
|
-
exports.SelectMultiValueLabel = SelectMultiValueLabel;
|
|
8535
|
-
exports.SelectMultiValueRemove = SelectMultiValueRemove;
|
|
8536
|
-
exports.SelectOption = SelectOption;
|
|
8537
|
-
exports.SelectPlaceholder = SelectPlaceholder;
|
|
8538
|
-
exports.SelectSingleValue = SelectSingleValue;
|
|
8539
|
-
exports.SelectValueContainer = SelectValueContainer;
|
|
8540
|
-
exports.selectConfig = selectConfig;
|
|
8497
|
+
export { SelectContainer as Select, SelectClearIndicator, SelectControl, SelectDropdownIndicator, SelectGroupHeading, SelectIndicatorsContainer, SelectInput, SelectMenu, SelectMultiValueContainer, SelectMultiValueLabel, SelectMultiValueRemove, SelectOption, SelectPlaceholder, SelectSingleValue, SelectValueContainer, selectConfig };
|