@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
package/dist/components/Chips.js
CHANGED
|
@@ -1,35 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
require('lodash/camelCase');
|
|
21
|
-
require('../context/UIContext.js');
|
|
22
|
-
require('../hooks/useMediaQueries.js');
|
|
23
|
-
require('react-responsive');
|
|
24
|
-
require('lodash/maxBy');
|
|
25
|
-
require('lodash/upperFirst');
|
|
26
|
-
require('../hooks/styleAttributes.js');
|
|
27
|
-
|
|
28
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
29
|
-
|
|
30
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
31
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
32
|
-
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { T as Text } from '../Text-DffpwlYq.js';
|
|
5
|
+
import borderTypeProps from '../constants/componentProps/borderType.js';
|
|
6
|
+
import sizeProps from '../constants/componentProps/size.js';
|
|
7
|
+
import fillProps from '../constants/componentProps/fill.js';
|
|
8
|
+
import shapeProps from '../constants/componentProps/shape.js';
|
|
9
|
+
import { useDeviceTargetClass } from '../hooks/useDeviceTargetClass.js';
|
|
10
|
+
import { useStyles } from '../hooks/useStyles.js';
|
|
11
|
+
import '../jsx-runtime-ClDdVO4Q.js';
|
|
12
|
+
import 'lodash/castArray';
|
|
13
|
+
import 'lodash/camelCase';
|
|
14
|
+
import '../context/UIContext.js';
|
|
15
|
+
import '../hooks/useMediaQueries.js';
|
|
16
|
+
import 'react-responsive';
|
|
17
|
+
import 'lodash/maxBy';
|
|
18
|
+
import 'lodash/upperFirst';
|
|
19
|
+
import '../hooks/styleAttributes.js';
|
|
33
20
|
|
|
34
21
|
const chipsConfig = {
|
|
35
22
|
appearance: {},
|
|
@@ -49,90 +36,90 @@ function Chips(props) {
|
|
|
49
36
|
type,
|
|
50
37
|
onClick
|
|
51
38
|
} = props;
|
|
52
|
-
const alignDirectionClass = useDeviceTargetClass
|
|
39
|
+
const alignDirectionClass = useDeviceTargetClass(props, {
|
|
53
40
|
prefix: 'align_',
|
|
54
41
|
propsKey: 'alignDirection'
|
|
55
42
|
});
|
|
56
|
-
const alignClass = useDeviceTargetClass
|
|
43
|
+
const alignClass = useDeviceTargetClass(props, {
|
|
57
44
|
prefix: 'align_',
|
|
58
45
|
propsKey: 'align'
|
|
59
46
|
});
|
|
60
|
-
const fillClass = useDeviceTargetClass
|
|
47
|
+
const fillClass = useDeviceTargetClass(props, {
|
|
61
48
|
prefix: 'fill_',
|
|
62
49
|
propsKey: 'fill'
|
|
63
50
|
});
|
|
64
|
-
const fillHoverClass = useDeviceTargetClass
|
|
51
|
+
const fillHoverClass = useDeviceTargetClass(props, {
|
|
65
52
|
prefix: 'fill_hover_',
|
|
66
53
|
propsKey: 'fillHover'
|
|
67
54
|
});
|
|
68
|
-
const sizeClass = useDeviceTargetClass
|
|
55
|
+
const sizeClass = useDeviceTargetClass(props, {
|
|
69
56
|
prefix: 'chips_size_',
|
|
70
57
|
propsKey: 'size'
|
|
71
58
|
});
|
|
72
|
-
const shapeClass = useDeviceTargetClass
|
|
59
|
+
const shapeClass = useDeviceTargetClass(props, {
|
|
73
60
|
prefix: 'chips_shape_',
|
|
74
61
|
propsKey: 'shape'
|
|
75
62
|
});
|
|
76
|
-
const borderClass = useDeviceTargetClass
|
|
63
|
+
const borderClass = useDeviceTargetClass(props, {
|
|
77
64
|
prefix: 'border-color_',
|
|
78
65
|
propsKey: 'border'
|
|
79
66
|
});
|
|
80
|
-
const borderTypeClass = useDeviceTargetClass
|
|
67
|
+
const borderTypeClass = useDeviceTargetClass(props, {
|
|
81
68
|
prefix: 'border_type_',
|
|
82
69
|
propsKey: 'borderType'
|
|
83
70
|
});
|
|
84
|
-
const cursorClass = useDeviceTargetClass
|
|
71
|
+
const cursorClass = useDeviceTargetClass(props, {
|
|
85
72
|
prefix: 'cursor_',
|
|
86
73
|
propsKey: 'cursor'
|
|
87
74
|
});
|
|
88
75
|
const {
|
|
89
76
|
styles: chipsStyles
|
|
90
|
-
} = useStyles
|
|
91
|
-
return /*#__PURE__*/React__default.
|
|
92
|
-
className:
|
|
77
|
+
} = useStyles(props);
|
|
78
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
79
|
+
className: clsx(className, 'chips', fillClass || chipsConfig.appearance[appearance]?.fill && `fill_${chipsConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase(), fillHoverClass || chipsConfig.appearance[appearance]?.fillHover && `fill_hover_${chipsConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase(), shapeClass, borderClass || chipsConfig.appearance[appearance]?.border && `border-color_${chipsConfig.appearance[appearance].border}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderTypeClass, sizeClass, alignDirectionClass, alignClass, type && `chips_type_${type}`, cursorClass),
|
|
93
80
|
style: chipsStyles,
|
|
94
81
|
onClick: onClick
|
|
95
|
-
}, /*#__PURE__*/React__default.
|
|
82
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
96
83
|
className: "chips__inner"
|
|
97
|
-
}, typeof label === 'string' ? /*#__PURE__*/React__default.
|
|
84
|
+
}, typeof label === 'string' ? /*#__PURE__*/React__default.createElement(Text, {
|
|
98
85
|
className: "chips__label",
|
|
99
86
|
textColor: labelTextColor || chipsConfig.appearance[appearance]?.labelTextColor && chipsConfig.appearance[appearance].labelTextColor.replace(/([A-Z])/g, '-$1').toLowerCase(),
|
|
100
87
|
textWeight: labelTextWeight,
|
|
101
88
|
size: labelSize
|
|
102
|
-
}, label) : /*#__PURE__*/React__default.
|
|
89
|
+
}, label) : /*#__PURE__*/React__default.createElement("div", {
|
|
103
90
|
className: "chips__label"
|
|
104
91
|
}, label), children));
|
|
105
92
|
}
|
|
106
93
|
Chips.propTypes = {
|
|
107
|
-
children:
|
|
108
|
-
className:
|
|
109
|
-
border:
|
|
110
|
-
borderDesktop:
|
|
111
|
-
borderMobile:
|
|
112
|
-
borderTablet:
|
|
113
|
-
borderType:
|
|
114
|
-
borderTypeDesktop:
|
|
115
|
-
borderTypeMobile:
|
|
116
|
-
borderTypeTablet:
|
|
117
|
-
fill:
|
|
118
|
-
fillDesktop:
|
|
119
|
-
fillMobile:
|
|
120
|
-
fillTablet:
|
|
121
|
-
fillHover:
|
|
122
|
-
shape:
|
|
123
|
-
shapeDesktop:
|
|
124
|
-
shapeMobile:
|
|
125
|
-
shapeTablet:
|
|
126
|
-
label:
|
|
127
|
-
labelSize:
|
|
128
|
-
labelSizeDesktop:
|
|
129
|
-
labelSizeMobile:
|
|
130
|
-
labelSizeTablet:
|
|
131
|
-
size:
|
|
132
|
-
sizeDesktop:
|
|
133
|
-
sizeMobile:
|
|
134
|
-
sizeTablet:
|
|
135
|
-
type:
|
|
94
|
+
children: PropTypes.any,
|
|
95
|
+
className: PropTypes.string,
|
|
96
|
+
border: PropTypes.string,
|
|
97
|
+
borderDesktop: PropTypes.string,
|
|
98
|
+
borderMobile: PropTypes.string,
|
|
99
|
+
borderTablet: PropTypes.string,
|
|
100
|
+
borderType: PropTypes.oneOf(borderTypeProps),
|
|
101
|
+
borderTypeDesktop: PropTypes.oneOf(borderTypeProps),
|
|
102
|
+
borderTypeMobile: PropTypes.oneOf(borderTypeProps),
|
|
103
|
+
borderTypeTablet: PropTypes.oneOf(borderTypeProps),
|
|
104
|
+
fill: PropTypes.oneOf(fillProps),
|
|
105
|
+
fillDesktop: PropTypes.oneOf(fillProps),
|
|
106
|
+
fillMobile: PropTypes.oneOf(fillProps),
|
|
107
|
+
fillTablet: PropTypes.oneOf(fillProps),
|
|
108
|
+
fillHover: PropTypes.oneOf(fillProps),
|
|
109
|
+
shape: PropTypes.oneOf(shapeProps),
|
|
110
|
+
shapeDesktop: PropTypes.oneOf(shapeProps),
|
|
111
|
+
shapeMobile: PropTypes.oneOf(shapeProps),
|
|
112
|
+
shapeTablet: PropTypes.oneOf(shapeProps),
|
|
113
|
+
label: PropTypes.any,
|
|
114
|
+
labelSize: PropTypes.oneOf(sizeProps),
|
|
115
|
+
labelSizeDesktop: PropTypes.oneOf(sizeProps),
|
|
116
|
+
labelSizeMobile: PropTypes.oneOf(sizeProps),
|
|
117
|
+
labelSizeTablet: PropTypes.oneOf(sizeProps),
|
|
118
|
+
size: PropTypes.oneOf(sizeProps),
|
|
119
|
+
sizeDesktop: PropTypes.oneOf(sizeProps),
|
|
120
|
+
sizeMobile: PropTypes.oneOf(sizeProps),
|
|
121
|
+
sizeTablet: PropTypes.oneOf(sizeProps),
|
|
122
|
+
type: PropTypes.string
|
|
136
123
|
};
|
|
137
124
|
Chips.defaultProps = {
|
|
138
125
|
label: 'Chips'
|
|
@@ -394,5 +381,4 @@ Chips.__docgenInfo = {
|
|
|
394
381
|
}
|
|
395
382
|
};
|
|
396
383
|
|
|
397
|
-
|
|
398
|
-
exports.chipsConfig = chipsConfig;
|
|
384
|
+
export { Chips, chipsConfig };
|
|
@@ -1,49 +1,40 @@
|
|
|
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
|
-
require('../constants/componentProps/wrap.js');
|
|
39
|
-
require('../constants/componentProps/textSize.js');
|
|
40
|
-
require('lodash/castArray');
|
|
41
|
-
|
|
42
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
43
|
-
|
|
44
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
45
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
46
|
-
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
1
|
+
import React__default, { useRef, useMemo, createRef, useCallback } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { T as Text } from '../Text-DffpwlYq.js';
|
|
5
|
+
import { Icon } from './Icon.js';
|
|
6
|
+
import { useDeviceTargetClass } from '../hooks/useDeviceTargetClass.js';
|
|
7
|
+
import '../jsx-runtime-ClDdVO4Q.js';
|
|
8
|
+
import '../hooks/useStyles.js';
|
|
9
|
+
import 'lodash/camelCase';
|
|
10
|
+
import 'lodash/maxBy';
|
|
11
|
+
import 'lodash/upperFirst';
|
|
12
|
+
import '../hooks/styleAttributes.js';
|
|
13
|
+
import '../context/UIContext.js';
|
|
14
|
+
import '../hooks/useMediaQueries.js';
|
|
15
|
+
import 'react-responsive';
|
|
16
|
+
import 'react-inlinesvg';
|
|
17
|
+
import './Link.js';
|
|
18
|
+
import '../constants/componentProps/fill.js';
|
|
19
|
+
import '../constants/componentProps/size.js';
|
|
20
|
+
import '../constants/componentProps/textColor.js';
|
|
21
|
+
import '../constants/componentProps/textGradient.js';
|
|
22
|
+
import '../constants/componentProps/textStyle.js';
|
|
23
|
+
import '../constants/componentProps/textWeight.js';
|
|
24
|
+
import '../constants/componentProps/type.js';
|
|
25
|
+
import '../constants/componentProps/underline.js';
|
|
26
|
+
import '../constants/componentProps/borderColor.js';
|
|
27
|
+
import '../constants/componentProps/borderType.js';
|
|
28
|
+
import '../constants/componentProps/iconSize.js';
|
|
29
|
+
import '../constants/componentProps/shape.js';
|
|
30
|
+
import '../constants/componentProps/strokeColor.js';
|
|
31
|
+
import './Tooltip.js';
|
|
32
|
+
import './Title.js';
|
|
33
|
+
import '../constants/componentProps/textAlign.js';
|
|
34
|
+
import '../constants/componentProps/titleSize.js';
|
|
35
|
+
import '../constants/componentProps/wrap.js';
|
|
36
|
+
import '../constants/componentProps/textSize.js';
|
|
37
|
+
import 'lodash/castArray';
|
|
47
38
|
|
|
48
39
|
const choiceConfig = {
|
|
49
40
|
appearance: {},
|
|
@@ -51,7 +42,7 @@ const choiceConfig = {
|
|
|
51
42
|
choiceConfig.appearance = newComponent;
|
|
52
43
|
}
|
|
53
44
|
};
|
|
54
|
-
const Choice = /*#__PURE__*/React__default.
|
|
45
|
+
const Choice = /*#__PURE__*/React__default.forwardRef(function Choice(props, ref) {
|
|
55
46
|
const {
|
|
56
47
|
appearance,
|
|
57
48
|
name,
|
|
@@ -80,58 +71,58 @@ const Choice = /*#__PURE__*/React__default.default.forwardRef(function Choice(pr
|
|
|
80
71
|
iconStroke,
|
|
81
72
|
isMultiple
|
|
82
73
|
} = props;
|
|
83
|
-
const controlRef =
|
|
84
|
-
const optionsRefs =
|
|
85
|
-
const onChange =
|
|
74
|
+
const controlRef = useRef(null);
|
|
75
|
+
const optionsRefs = useMemo(() => new Map(options.map(item => [item.value, /*#__PURE__*/createRef()])), [options]);
|
|
76
|
+
const onChange = useCallback((event, item) => {
|
|
86
77
|
const isChecked = isMultiple ? event.target.checked : true;
|
|
87
78
|
setActiveSegment && setActiveSegment(item, isChecked);
|
|
88
79
|
}, [isMultiple, setActiveSegment]);
|
|
89
|
-
const borderColorClass = useDeviceTargetClass
|
|
80
|
+
const borderColorClass = useDeviceTargetClass(props, {
|
|
90
81
|
prefix: 'border-color_',
|
|
91
82
|
propsKey: 'borderColor'
|
|
92
83
|
});
|
|
93
|
-
const borderWidthClass = useDeviceTargetClass
|
|
84
|
+
const borderWidthClass = useDeviceTargetClass(props, {
|
|
94
85
|
prefix: 'border-width_',
|
|
95
86
|
propsKey: 'borderWidth'
|
|
96
87
|
});
|
|
97
|
-
const borderTypeClass = useDeviceTargetClass
|
|
88
|
+
const borderTypeClass = useDeviceTargetClass(props, {
|
|
98
89
|
prefix: 'border_type_',
|
|
99
90
|
propsKey: 'borderType'
|
|
100
91
|
});
|
|
101
|
-
const shapeClass = useDeviceTargetClass
|
|
92
|
+
const shapeClass = useDeviceTargetClass(props, {
|
|
102
93
|
prefix: 'choice_shape_',
|
|
103
94
|
propsKey: 'shape'
|
|
104
95
|
});
|
|
105
|
-
const fillClass = useDeviceTargetClass
|
|
96
|
+
const fillClass = useDeviceTargetClass(props, {
|
|
106
97
|
prefix: 'fill_',
|
|
107
98
|
propsKey: 'fill'
|
|
108
99
|
});
|
|
109
|
-
const fillDisabledClass = useDeviceTargetClass
|
|
100
|
+
const fillDisabledClass = useDeviceTargetClass(props, {
|
|
110
101
|
prefix: 'fill_disabled_',
|
|
111
102
|
propsKey: 'fillDisabled'
|
|
112
103
|
});
|
|
113
|
-
const fillHoverClass = useDeviceTargetClass
|
|
104
|
+
const fillHoverClass = useDeviceTargetClass(props, {
|
|
114
105
|
prefix: 'fill_hover_',
|
|
115
106
|
propsKey: 'fillHover'
|
|
116
107
|
});
|
|
117
|
-
const fillActiveClass = useDeviceTargetClass
|
|
108
|
+
const fillActiveClass = useDeviceTargetClass(props, {
|
|
118
109
|
prefix: 'fill_active_',
|
|
119
110
|
propsKey: 'fillActive'
|
|
120
111
|
});
|
|
121
|
-
const fillActiveDisabledClass = useDeviceTargetClass
|
|
112
|
+
const fillActiveDisabledClass = useDeviceTargetClass(props, {
|
|
122
113
|
prefix: 'fill_active_disabled_',
|
|
123
114
|
propsKey: 'fillActiveDisabled'
|
|
124
115
|
});
|
|
125
|
-
return /*#__PURE__*/React__default.
|
|
126
|
-
className:
|
|
116
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
117
|
+
className: clsx(className, 'choice', shapeClass || choiceConfig.appearance[appearance]?.shape && `choice_shape_${choiceConfig.appearance[appearance].shape}`.replace(/([A-Z])/g, '-$1').toLowerCase(), !isDisabled ? fillClass || choiceConfig.appearance[appearance]?.fill && `fill_${choiceConfig.appearance[appearance].fill}`.replace(/([A-Z])/g, '-$1').toLowerCase() : fillDisabledClass, borderColorClass || choiceConfig.appearance[appearance]?.borderColor && `border-color_${choiceConfig.appearance[appearance].borderColor}`.replace(/([A-Z])/g, '-$1').toLowerCase(), borderWidthClass, borderTypeClass, set && `choice_set_${set}`, size && `choice_size_${size}`, type && `choice_type_${type}`),
|
|
127
118
|
ref: controlRef
|
|
128
|
-
}, /*#__PURE__*/React__default.
|
|
119
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
129
120
|
className: "choice__wrapper"
|
|
130
|
-
}, options?.map((item, i) => /*#__PURE__*/React__default.
|
|
131
|
-
className:
|
|
121
|
+
}, options?.map((item, i) => /*#__PURE__*/React__default.createElement("div", {
|
|
122
|
+
className: clsx('choice__item', !isDisabled && (fillHoverClass || choiceConfig.appearance[appearance]?.fillHover && `fill_active_${choiceConfig.appearance[appearance].fillHover}`.replace(/([A-Z])/g, '-$1').toLowerCase()), item.value !== active.value && isDisabled && 'choice__item_state_disabled', item.value === active.value ? !isDisabled ? fillActiveClass || choiceConfig.appearance[appearance]?.fillActive && `fill_active_${choiceConfig.appearance[appearance].fillActive}`.replace(/([A-Z])/g, '-$1').toLowerCase() : fillActiveDisabledClass : !isDisabled ? fillClass : fillDisabledClass, item.value === active.value && isDisabled && 'choice__item_active_state_disabled', item.value === active.value && 'choice__item_active'),
|
|
132
123
|
key: item.value,
|
|
133
124
|
ref: optionsRefs.get(item.value)
|
|
134
|
-
}, /*#__PURE__*/React__default.
|
|
125
|
+
}, /*#__PURE__*/React__default.createElement("input", {
|
|
135
126
|
checked: item.value === active.value,
|
|
136
127
|
className: "choice__item-radio",
|
|
137
128
|
id: `${name}-${item.value}`,
|
|
@@ -140,13 +131,13 @@ const Choice = /*#__PURE__*/React__default.default.forwardRef(function Choice(pr
|
|
|
140
131
|
type: isMultiple ? 'checkbox' : 'radio',
|
|
141
132
|
value: item.value,
|
|
142
133
|
onChange: event => onChange(event, item)
|
|
143
|
-
}), /*#__PURE__*/React__default.
|
|
144
|
-
className:
|
|
134
|
+
}), /*#__PURE__*/React__default.createElement("label", {
|
|
135
|
+
className: clsx('choice__item-label', isDisabled && 'choice__item-label_state_disabled'),
|
|
145
136
|
htmlFor: `${name}-${item.value}`
|
|
146
|
-
}, before, item.label && /*#__PURE__*/React__default.
|
|
147
|
-
size: labelTextSize || choiceConfig.appearance[appearance]
|
|
148
|
-
textColor: item.value === active.value ? !isDisabled ? labelTextActiveColor || choiceConfig.appearance[appearance]
|
|
149
|
-
}, item.label), (icon || activeIcon) && /*#__PURE__*/React__default.
|
|
137
|
+
}, before, item.label && /*#__PURE__*/React__default.createElement(Text, {
|
|
138
|
+
size: labelTextSize || choiceConfig.appearance[appearance]?.labelTextSize,
|
|
139
|
+
textColor: item.value === active.value ? !isDisabled ? labelTextActiveColor || choiceConfig.appearance[appearance]?.labelTextActiveColor : labelTextActiveColorDisabled : !isDisabled ? labelTextColor || choiceConfig.appearance[appearance]?.labelTextColor : labelTextColorDisabled
|
|
140
|
+
}, item.label), (icon || activeIcon) && /*#__PURE__*/React__default.createElement(Icon, {
|
|
150
141
|
className: "choice__item-icon",
|
|
151
142
|
iconFill: item.value === active.value ? activeIconItemFill : iconItemFill,
|
|
152
143
|
iconFillDisabled: isDisabled && iconFillDisabled,
|
|
@@ -157,26 +148,26 @@ const Choice = /*#__PURE__*/React__default.default.forwardRef(function Choice(pr
|
|
|
157
148
|
}), after)))));
|
|
158
149
|
});
|
|
159
150
|
Choice.propTypes = {
|
|
160
|
-
active:
|
|
161
|
-
value:
|
|
162
|
-
label:
|
|
151
|
+
active: PropTypes.shape({
|
|
152
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
153
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
163
154
|
}),
|
|
164
|
-
after:
|
|
165
|
-
before:
|
|
166
|
-
className:
|
|
167
|
-
isMultiple:
|
|
168
|
-
labelTextActiveColor:
|
|
169
|
-
labelTextColor:
|
|
170
|
-
labelTextSize:
|
|
171
|
-
name:
|
|
172
|
-
options:
|
|
173
|
-
value:
|
|
174
|
-
label:
|
|
155
|
+
after: PropTypes.any,
|
|
156
|
+
before: PropTypes.any,
|
|
157
|
+
className: PropTypes.string,
|
|
158
|
+
isMultiple: PropTypes.bool,
|
|
159
|
+
labelTextActiveColor: PropTypes.string,
|
|
160
|
+
labelTextColor: PropTypes.string,
|
|
161
|
+
labelTextSize: PropTypes.string,
|
|
162
|
+
name: PropTypes.string,
|
|
163
|
+
options: PropTypes.arrayOf(PropTypes.shape({
|
|
164
|
+
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
165
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.element])
|
|
175
166
|
})),
|
|
176
|
-
set:
|
|
177
|
-
setActiveSegment:
|
|
178
|
-
size:
|
|
179
|
-
type:
|
|
167
|
+
set: PropTypes.string,
|
|
168
|
+
setActiveSegment: PropTypes.func,
|
|
169
|
+
size: PropTypes.string,
|
|
170
|
+
type: PropTypes.string
|
|
180
171
|
};
|
|
181
172
|
Choice.defaultProps = {
|
|
182
173
|
active: {},
|
|
@@ -348,5 +339,4 @@ Choice.__docgenInfo = {
|
|
|
348
339
|
}
|
|
349
340
|
};
|
|
350
341
|
|
|
351
|
-
|
|
352
|
-
exports.choiceConfig = choiceConfig;
|
|
342
|
+
export { Choice, choiceConfig };
|
package/dist/components/Code.js
CHANGED
|
@@ -1,32 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
require('../hooks/useMediaQueries.js');
|
|
11
|
-
require('react-responsive');
|
|
12
|
-
|
|
13
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
16
|
-
var PropTypes__default = /*#__PURE__*/_interopDefault(PropTypes);
|
|
17
|
-
var clsx__default = /*#__PURE__*/_interopDefault(clsx);
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useDeviceTargetClass } from '../hooks/useDeviceTargetClass.js';
|
|
5
|
+
import 'lodash/castArray';
|
|
6
|
+
import 'lodash/camelCase';
|
|
7
|
+
import '../context/UIContext.js';
|
|
8
|
+
import '../hooks/useMediaQueries.js';
|
|
9
|
+
import 'react-responsive';
|
|
18
10
|
|
|
19
11
|
var isStyleObject = function (obj) { return typeof obj === 'object' && obj !== null; };
|
|
20
12
|
var OTPInput = function (_a) {
|
|
21
13
|
var _b = _a.value, value = _b === void 0 ? '' : _b, _c = _a.numInputs, numInputs = _c === void 0 ? 4 : _c, onChange = _a.onChange, onPaste = _a.onPaste, renderInput = _a.renderInput, _d = _a.shouldAutoFocus, shouldAutoFocus = _d === void 0 ? false : _d, _e = _a.inputType, inputType = _e === void 0 ? 'text' : _e, renderSeparator = _a.renderSeparator, placeholder = _a.placeholder, containerStyle = _a.containerStyle, inputStyle = _a.inputStyle, _f = _a.skipDefaultStyles, skipDefaultStyles = _f === void 0 ? false : _f;
|
|
22
|
-
var _g = React__default.
|
|
23
|
-
var inputRefs = React__default.
|
|
14
|
+
var _g = React__default.useState(0), activeInput = _g[0], setActiveInput = _g[1];
|
|
15
|
+
var inputRefs = React__default.useRef([]);
|
|
24
16
|
var getOTPValue = function () { return (value ? value.toString().split('') : []); };
|
|
25
17
|
var isInputNum = inputType === 'number' || inputType === 'tel';
|
|
26
|
-
React__default.
|
|
18
|
+
React__default.useEffect(function () {
|
|
27
19
|
inputRefs.current = inputRefs.current.slice(0, numInputs);
|
|
28
20
|
}, [numInputs]);
|
|
29
|
-
React__default.
|
|
21
|
+
React__default.useEffect(function () {
|
|
30
22
|
var _a;
|
|
31
23
|
if (shouldAutoFocus) {
|
|
32
24
|
(_a = inputRefs.current[0]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
@@ -162,9 +154,9 @@ var OTPInput = function (_a) {
|
|
|
162
154
|
focusInput(nextActiveInput);
|
|
163
155
|
handleOTPChange(otp);
|
|
164
156
|
};
|
|
165
|
-
return (React__default.
|
|
157
|
+
return (React__default.createElement("div", { style: Object.assign({ display: 'flex', alignItems: 'center' }, isStyleObject(containerStyle) && containerStyle), className: typeof containerStyle === 'string' ? containerStyle : undefined, onPaste: onPaste }, Array.from({ length: numInputs }, function (_, index) { return index; }).map(function (index) {
|
|
166
158
|
var _a, _b, _c;
|
|
167
|
-
return (React__default.
|
|
159
|
+
return (React__default.createElement(React__default.Fragment, { key: index },
|
|
168
160
|
renderInput({
|
|
169
161
|
value: (_a = getOTPValue()[index]) !== null && _a !== void 0 ? _a : '',
|
|
170
162
|
placeholder: (_c = (_b = getPlaceholderValue()) === null || _b === void 0 ? void 0 : _b[index]) !== null && _c !== void 0 ? _c : undefined,
|
|
@@ -200,73 +192,73 @@ function Code(props) {
|
|
|
200
192
|
onChange,
|
|
201
193
|
onFocus
|
|
202
194
|
} = props;
|
|
203
|
-
const [otp, setOtp] =
|
|
204
|
-
const fillClass = useDeviceTargetClass
|
|
195
|
+
const [otp, setOtp] = useState('');
|
|
196
|
+
const fillClass = useDeviceTargetClass(props, {
|
|
205
197
|
prefix: 'fill_',
|
|
206
198
|
propsKey: 'inputFill'
|
|
207
199
|
});
|
|
208
|
-
const fillHoverClass = useDeviceTargetClass
|
|
200
|
+
const fillHoverClass = useDeviceTargetClass(props, {
|
|
209
201
|
prefix: 'fill_hover_',
|
|
210
202
|
propsKey: 'inputFillHover'
|
|
211
203
|
});
|
|
212
|
-
const sizeClass = useDeviceTargetClass
|
|
204
|
+
const sizeClass = useDeviceTargetClass(props, {
|
|
213
205
|
prefix: 'code__input_size_',
|
|
214
206
|
propsKey: 'inputSize'
|
|
215
207
|
});
|
|
216
|
-
const shapeClass = useDeviceTargetClass
|
|
208
|
+
const shapeClass = useDeviceTargetClass(props, {
|
|
217
209
|
prefix: 'code__input_shape_',
|
|
218
210
|
propsKey: 'inputShape'
|
|
219
211
|
});
|
|
220
|
-
const textSizeClass = useDeviceTargetClass
|
|
212
|
+
const textSizeClass = useDeviceTargetClass(props, {
|
|
221
213
|
prefix: 'text_size_',
|
|
222
214
|
propsKey: 'inputTextSize'
|
|
223
215
|
});
|
|
224
|
-
const textColorClass = useDeviceTargetClass
|
|
216
|
+
const textColorClass = useDeviceTargetClass(props, {
|
|
225
217
|
prefix: 'text-color_',
|
|
226
218
|
propsKey: 'inputTextColor'
|
|
227
219
|
});
|
|
228
|
-
const caretClass = useDeviceTargetClass
|
|
220
|
+
const caretClass = useDeviceTargetClass(props, {
|
|
229
221
|
prefix: 'caret-color_',
|
|
230
222
|
propsKey: 'inputCaretColor'
|
|
231
223
|
});
|
|
232
|
-
const placeholderClass = useDeviceTargetClass
|
|
224
|
+
const placeholderClass = useDeviceTargetClass(props, {
|
|
233
225
|
prefix: 'placeholder-text-color_',
|
|
234
226
|
propsKey: 'inputPlaceholderTextColor'
|
|
235
227
|
});
|
|
236
|
-
const weightClass = useDeviceTargetClass
|
|
228
|
+
const weightClass = useDeviceTargetClass(props, {
|
|
237
229
|
prefix: 'text-weight_',
|
|
238
230
|
propsKey: 'inputTextWeight'
|
|
239
231
|
});
|
|
240
|
-
const borderWidthClass = useDeviceTargetClass
|
|
232
|
+
const borderWidthClass = useDeviceTargetClass(props, {
|
|
241
233
|
prefix: 'border-width_',
|
|
242
234
|
propsKey: 'inputBorderWidth'
|
|
243
235
|
});
|
|
244
|
-
const borderColorClass = useDeviceTargetClass
|
|
236
|
+
const borderColorClass = useDeviceTargetClass(props, {
|
|
245
237
|
prefix: 'border-color_',
|
|
246
238
|
propsKey: 'inputBorderColor'
|
|
247
239
|
});
|
|
248
|
-
const borderColorHoverClass = useDeviceTargetClass
|
|
240
|
+
const borderColorHoverClass = useDeviceTargetClass(props, {
|
|
249
241
|
prefix: 'border-color_hover_',
|
|
250
242
|
propsKey: 'inputBorderColorHover'
|
|
251
243
|
});
|
|
252
|
-
const borderColorFocusClass = useDeviceTargetClass
|
|
244
|
+
const borderColorFocusClass = useDeviceTargetClass(props, {
|
|
253
245
|
prefix: 'border-color_focus_',
|
|
254
246
|
propsKey: 'inputBorderFocusColor'
|
|
255
247
|
});
|
|
256
|
-
const gapClass = useDeviceTargetClass
|
|
248
|
+
const gapClass = useDeviceTargetClass(props, {
|
|
257
249
|
prefix: 'gap_',
|
|
258
250
|
propsKey: 'gap'
|
|
259
251
|
});
|
|
260
|
-
const widthClass = useDeviceTargetClass
|
|
252
|
+
const widthClass = useDeviceTargetClass(props, {
|
|
261
253
|
prefix: 'width_',
|
|
262
254
|
propsKey: 'width'
|
|
263
255
|
});
|
|
264
256
|
|
|
265
257
|
// NOTE: too many dependencies for "useCallback" and possible too many checks
|
|
266
258
|
const renderInput = otpInputProps => {
|
|
267
|
-
return /*#__PURE__*/React__default.
|
|
259
|
+
return /*#__PURE__*/React__default.createElement("input", Object.assign({}, otpInputProps, {
|
|
268
260
|
autocomplete: "one-time-code",
|
|
269
|
-
className:
|
|
261
|
+
className: clsx('code__input', caretClass, fillClass, fillHoverClass, placeholderClass, shapeClass, textSizeClass, textColorClass, weightClass, borderWidthClass, borderColorClass, borderColorHoverClass, borderColorFocusClass, sizeClass, fillClass),
|
|
270
262
|
onBlur: event => {
|
|
271
263
|
onBlur && onBlur(event);
|
|
272
264
|
otpInputProps.onBlur(event);
|
|
@@ -277,13 +269,13 @@ function Code(props) {
|
|
|
277
269
|
}
|
|
278
270
|
}));
|
|
279
271
|
};
|
|
280
|
-
|
|
272
|
+
useEffect(() => {
|
|
281
273
|
onChange && onChange(otp);
|
|
282
274
|
}, [otp]);
|
|
283
|
-
return /*#__PURE__*/React__default.
|
|
284
|
-
className:
|
|
285
|
-
}, before, /*#__PURE__*/React__default.
|
|
286
|
-
containerStyle:
|
|
275
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
276
|
+
className: clsx(className, 'code', widthClass)
|
|
277
|
+
}, before, /*#__PURE__*/React__default.createElement(OTPInput, {
|
|
278
|
+
containerStyle: clsx(className, 'code__wrapper', gapClass),
|
|
287
279
|
inputType: inputType,
|
|
288
280
|
numInputs: inputCount,
|
|
289
281
|
placeholder: inputPlaceholder,
|
|
@@ -295,7 +287,7 @@ function Code(props) {
|
|
|
295
287
|
}), after);
|
|
296
288
|
}
|
|
297
289
|
Code.propTypes = {
|
|
298
|
-
value:
|
|
290
|
+
value: PropTypes.number
|
|
299
291
|
};
|
|
300
292
|
Code.defaultProps = {
|
|
301
293
|
inputCount: 6,
|
|
@@ -434,4 +426,4 @@ Code.__docgenInfo = {
|
|
|
434
426
|
}
|
|
435
427
|
};
|
|
436
428
|
|
|
437
|
-
|
|
429
|
+
export { Code };
|