@itcase/ui 1.4.13 → 1.5.0
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/{Badge-DnWTbwXq.js → Badge-CURAYlMs.js} +28 -28
- package/dist/{Badge-BxT2_kz_.js → Badge-LjfcZycz.js} +29 -29
- package/dist/{Button-xYLCmT3D.js → Button-CMB-ELfe.js} +15 -15
- package/dist/{Button-BiJZz4Bx.js → Button-iPtstCWk.js} +14 -14
- package/dist/{Divider-ImOOytuN.js → Divider-D8hUUrwe.js} +1 -1
- package/dist/{Divider-BQcBkzt1.js → Divider-DhXzYcNF.js} +2 -2
- package/dist/DropdownItem-C8CumsgX.js +117 -0
- package/dist/DropdownItem-CBJeJPbP.js +122 -0
- package/dist/{Group-qq4Iisll.js → Group-BVlu5z77.js} +7 -3
- package/dist/{Group-BICb8bYQ.js → Group-OkygpKiJ.js} +7 -3
- package/dist/{Icon-BcBOnVKH.js → Icon-Ch-L2dOj.js} +9 -7
- package/dist/Icon-CoBJRPlP.js +63 -0
- package/dist/Image-CSzHhlA1.js +17 -0
- package/dist/Image-DuIBtUq5.js +19 -0
- package/dist/{Input-DHJIVk1z.js → Input-ChiH90mV.js} +33 -30
- package/dist/{Input-DiFnIFT7.js → Input-e0kLrbs6.js} +33 -30
- package/dist/{Label-D-LcvthP.js → Label-CP8IAPOM.js} +5 -5
- package/dist/{Label-y2hx5Q81.js → Label-CfE08vBy.js} +6 -6
- package/dist/{Link-BnqN6ysn.js → Link-C04g00r2.js} +18 -11
- package/dist/{Link-DaKqf1pb.js → Link-Sr03Kia9.js} +19 -13
- package/dist/{Loader-VK3q7PBN.js → Loader-CRN4MAbm.js} +2 -2
- package/dist/{Loader-DdKHrLnw.js → Loader-rzo8nnRI.js} +1 -1
- package/dist/{Overlay-CZixnXZ6.js → Overlay-CRIofShk.js} +6 -3
- package/dist/{Overlay-Myen2mqz.js → Overlay-CZFSerUl.js} +6 -3
- package/dist/{Scrollbar-Bo7z7ELm.js → Scrollbar-CThJeCLF.js} +4 -4
- package/dist/{Scrollbar-CKbA0jQU.js → Scrollbar-DcKOfcNp.js} +4 -4
- package/dist/{Text-C49zj3jO.js → Text-CEcBg-F5.js} +6 -3
- package/dist/{Text-C6NSmetx.js → Text-CI2prtf6.js} +6 -3
- package/dist/{Title-BLGDdlnX.js → Title-C4xUtigh.js} +12 -2
- package/dist/{Title-Byi9vhDt.js → Title-CaXw1KBQ.js} +13 -3
- package/dist/{Tooltip-5lQyt5-Y.js → Tooltip-EOu0a93a.js} +9 -9
- package/dist/{Tooltip-DRta8lK_.js → Tooltip-Lhx-Fefx.js} +8 -8
- package/dist/cjs/components/Accordion.js +17 -9
- package/dist/cjs/components/Avatar.js +9 -6
- package/dist/cjs/components/Badge.js +9 -6
- package/dist/cjs/components/Breadcrumbs.js +11 -8
- package/dist/cjs/components/Button.js +10 -7
- package/dist/cjs/components/Cell.js +18 -13
- package/dist/cjs/components/Checkbox.js +8 -5
- package/dist/cjs/components/Checkmark.js +5 -3
- package/dist/cjs/components/Chips.js +35 -17
- package/dist/cjs/components/Choice.js +23 -17
- package/dist/cjs/components/Code.js +9 -4
- package/dist/cjs/components/CookiesWarning.js +13 -10
- package/dist/cjs/components/DadataHintField.js +9 -4
- package/dist/cjs/components/DatePicker.js +24 -42
- package/dist/cjs/components/Divider.js +4 -1
- package/dist/cjs/components/Dot.js +3 -0
- package/dist/cjs/components/Drawer.js +3 -3
- package/dist/cjs/components/Dropdown.js +6 -4
- package/dist/cjs/components/Flex.js +7 -4
- package/dist/cjs/components/Grid.js +12 -9
- package/dist/cjs/components/Group.js +5 -2
- package/dist/cjs/components/HTMLContent.js +5 -2
- package/dist/cjs/components/HeroTitle.js +12 -6
- package/dist/cjs/components/Icon.js +8 -5
- package/dist/cjs/components/Image.js +4 -1
- package/dist/cjs/components/Input.js +5 -2
- package/dist/cjs/components/InputMask.js +11 -6
- package/dist/cjs/components/InputPassword.js +34 -28
- package/dist/cjs/components/Label.js +7 -4
- package/dist/cjs/components/Link.js +6 -5
- package/dist/cjs/components/List.js +6 -3
- package/dist/cjs/components/Loader.js +5 -2
- package/dist/cjs/components/Logo.js +7 -4
- package/dist/cjs/components/MenuItem.js +15 -13
- package/dist/cjs/components/Modal.js +11 -8
- package/dist/cjs/components/ModalSheetBottom.js +5 -2
- package/dist/cjs/components/Notification.js +15 -14
- package/dist/cjs/components/Overlay.js +5 -2
- package/dist/cjs/components/Pagination.js +54 -33
- package/dist/cjs/components/Panel.js +13 -8
- package/dist/cjs/components/Radio.js +15 -11
- package/dist/cjs/components/RangeSlider.js +8 -3
- package/dist/cjs/components/Response.js +15 -12
- package/dist/cjs/components/SVGContent.js +3 -0
- package/dist/cjs/components/ScrollOnDrag.js +4 -1
- package/dist/cjs/components/ScrollToView.js +7 -2
- package/dist/cjs/components/Scrollbar.js +1 -1
- package/dist/cjs/components/Search.js +20 -15
- package/dist/cjs/components/Segmented.js +20 -20
- package/dist/cjs/components/Select.js +28 -21
- package/dist/cjs/components/Swiper.js +7 -4
- package/dist/cjs/components/Switch.js +25 -6
- package/dist/cjs/components/Tab.js +14 -11
- package/dist/cjs/components/Text.js +5 -2
- package/dist/cjs/components/Textarea.js +26 -20
- package/dist/cjs/components/Tile.js +12 -10
- package/dist/cjs/components/Title.js +4 -1
- package/dist/cjs/components/Tooltip.js +6 -3
- package/dist/cjs/components/Video.js +4 -1
- package/dist/cjs/context/Notifications.js +2 -2
- package/dist/cjs/context/UIContext.js +2 -2
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +3 -0
- package/dist/cjs/hooks/useDevicePropsGenerator.js +4 -1
- package/dist/cjs/hooks/useStyles/useStyles.js +3 -0
- package/dist/cjs/hooks/useStyles.js +4 -1
- package/dist/cjs/hooks/useViewportFix.js +1 -1
- package/dist/components/Accordion.js +18 -10
- package/dist/components/Avatar.js +10 -7
- package/dist/components/Badge.js +10 -7
- package/dist/components/Breadcrumbs.js +12 -9
- package/dist/components/Button.js +11 -8
- package/dist/components/Cell.js +18 -13
- package/dist/components/Checkbox.js +9 -6
- package/dist/components/Checkmark.js +6 -4
- package/dist/components/Chips.js +36 -18
- package/dist/components/Choice.js +23 -17
- package/dist/components/Code.js +10 -5
- package/dist/components/CookiesWarning.js +14 -11
- package/dist/components/DadataHintField.js +10 -5
- package/dist/components/DatePicker.js +25 -43
- package/dist/components/Divider.js +5 -2
- package/dist/components/Dot.js +4 -1
- package/dist/components/Drawer.js +3 -3
- package/dist/components/Dropdown.js +7 -5
- package/dist/components/Flex.js +8 -5
- package/dist/components/Grid.js +13 -10
- package/dist/components/Group.js +5 -2
- package/dist/components/HTMLContent.js +6 -3
- package/dist/components/HeroTitle.js +12 -6
- package/dist/components/Icon.js +9 -6
- package/dist/components/Image.js +5 -2
- package/dist/components/Input.js +5 -2
- package/dist/components/InputMask.js +11 -6
- package/dist/components/InputPassword.js +34 -28
- package/dist/components/Label.js +8 -5
- package/dist/components/Link.js +5 -8
- package/dist/components/List.js +7 -4
- package/dist/components/Loader.js +6 -3
- package/dist/components/Logo.js +8 -5
- package/dist/components/MenuItem.js +15 -13
- package/dist/components/Modal.js +12 -9
- package/dist/components/ModalSheetBottom.js +6 -3
- package/dist/components/Notification.js +16 -15
- package/dist/components/Overlay.js +5 -2
- package/dist/components/Pagination.js +54 -33
- package/dist/components/Panel.js +13 -8
- package/dist/components/Radio.js +15 -11
- package/dist/components/RangeSlider.js +9 -4
- package/dist/components/Response.js +16 -13
- package/dist/components/SVGContent.js +4 -1
- package/dist/components/ScrollOnDrag.js +5 -2
- package/dist/components/ScrollToView.js +8 -3
- package/dist/components/Scrollbar.js +1 -1
- package/dist/components/Search.js +20 -15
- package/dist/components/Segmented.js +20 -20
- package/dist/components/Select.js +29 -22
- package/dist/components/Swiper.js +8 -5
- package/dist/components/Switch.js +25 -6
- package/dist/components/Tab.js +15 -12
- package/dist/components/Text.js +5 -2
- package/dist/components/Textarea.js +26 -20
- package/dist/components/Tile.js +13 -11
- package/dist/components/Title.js +5 -2
- package/dist/components/Tooltip.js +7 -4
- package/dist/components/Video.js +4 -1
- package/dist/context/Notifications.js +3 -3
- package/dist/context/UIContext.js +3 -3
- package/dist/css/components/Accordion/Accordion.css +7 -5
- package/dist/css/components/Avatar/Avatar.css +5 -5
- package/dist/css/components/Checkbox/Checkbox.css +1 -1
- package/dist/css/components/Checkmark/Checkmark.css +24 -1
- package/dist/css/components/Chips/Chips.css +2 -2
- package/dist/css/components/Choice/Choice.css +3 -3
- package/dist/css/components/Code/Code.css +26 -2
- package/dist/css/components/DatePicker/DatePicker.css +23 -33
- package/dist/css/components/Divider/Divider.css +3 -3
- package/dist/css/components/Dot/Dot.css +6 -6
- package/dist/css/components/Drawer/Drawer.css +4 -1
- package/dist/css/components/Dropdown/Dropdown.css +13 -13
- package/dist/css/components/Icon/Icon.css +5 -1
- package/dist/css/components/Image/Image.css +6 -3
- package/dist/css/components/Input/Input.css +21 -35
- package/dist/css/components/InputMask/Input.css +6 -6
- package/dist/css/components/InputPassword/InputPassword.css +2 -2
- package/dist/css/components/Label/Label.css +3 -3
- package/dist/css/components/List/List.css +8 -7
- package/dist/css/components/Loader/Loader.css +0 -2
- package/dist/css/components/Logo/Logo.css +1 -1
- package/dist/css/components/MenuItem/MenuItem.css +24 -6
- package/dist/css/components/Modal/Modal.css +2 -2
- package/dist/css/components/ModalSheetBottom/ModalSheetBottom.css +1 -1
- package/dist/css/components/Notification/Notification.css +22 -10
- package/dist/css/components/Notification/css/__item/notification__item_set_float.css +2 -2
- package/dist/css/components/Notification/css/__item/notification__item_set_form.css +5 -5
- package/dist/css/components/Notification/css/__item/notification__item_set_toast.css +2 -2
- package/dist/css/components/Notification/css/__item/notification__item_set_top.css +1 -1
- package/dist/css/components/Overlay/Overlay.css +5 -1
- package/dist/css/components/Pagination/Pagination.css +16 -8
- package/dist/css/components/Pagination/css/__item/pagination__item.css +7 -4
- package/dist/css/components/Pagination/css/__item/pagination__item_state_active.css +4 -1
- package/dist/css/components/Pagination/css/__item/pagination__item_state_disabled.css +1 -1
- package/dist/css/components/Radio/Radio.css +9 -4
- package/dist/css/components/RangeSlider/RangeSlider.css +14 -8
- package/dist/css/components/ScrollToView/ScrollToView.css +2 -2
- package/dist/css/components/Search/Search.css +16 -8
- package/dist/css/components/Search/css/search-input/search-input_shape.css +1 -1
- package/dist/css/components/Search/css/search-input/search-input_size.css +1 -1
- package/dist/css/components/Segmented/Segmented.css +10 -7
- package/dist/css/components/Select/Select.css +10 -10
- package/dist/css/components/Select/css/__control/select__control_shape.css +1 -1
- package/dist/css/components/Select/css/__input-container/select__input-container.css +3 -3
- package/dist/css/components/Select/css/__menu/select__menu-list-item_size.css +2 -2
- package/dist/css/components/Select/css/__menu/select__menu.css +2 -2
- package/dist/css/components/Select/css/__multi-value/select__multi-value.css +2 -2
- package/dist/css/components/Switch/Switch.css +19 -1
- package/dist/css/components/Tab/Tab.css +2 -2
- package/dist/css/components/Text/Text.css +1 -1
- package/dist/css/components/Textarea/Textarea.css +2 -2
- package/dist/css/components/Tile/Tile.css +16 -7
- package/dist/css/components/Tooltip/Tooltip.css +16 -2
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +4 -1
- package/dist/hooks/useDevicePropsGenerator.js +5 -2
- package/dist/hooks/useDeviceTargetClass.js +1 -1
- package/dist/hooks/useStyles/useStyles.js +4 -1
- package/dist/hooks/useStyles.js +5 -2
- package/dist/hooks/useViewportFix.js +1 -1
- package/dist/{tslib.es6-5FtW-kfi.js → tslib.es6-Bwu1Cn-t.js} +1 -1
- package/dist/types/components/Accordion/Accordion.appearance.d.ts +3 -3
- package/dist/types/components/Accordion/Accordion.d.ts +3 -3
- package/dist/types/components/Accordion/Accordion.interface.d.ts +60 -61
- package/dist/types/components/Accordion/AccordionItem.d.ts +3 -3
- package/dist/types/components/Avatar/Avatar.appearance.d.ts +2 -2
- package/dist/types/components/Avatar/Avatar.d.ts +3 -3
- package/dist/types/components/Avatar/Avatar.interface.d.ts +24 -25
- package/dist/types/components/Badge/Badge.appearance.d.ts +2 -2
- package/dist/types/components/Badge/Badge.d.ts +3 -3
- package/dist/types/components/Badge/Badge.interface.d.ts +21 -22
- package/dist/types/components/Badge/appearance/badgeAccent.d.ts +3 -3
- package/dist/types/components/Badge/appearance/badgeDisabled.d.ts +1 -1
- package/dist/types/components/Badge/appearance/badgeError.d.ts +1 -1
- package/dist/types/components/Badge/appearance/badgeInfo.d.ts +2 -2
- package/dist/types/components/Badge/appearance/badgePrimary.d.ts +1 -1
- package/dist/types/components/Badge/appearance/badgeSecondary.d.ts +1 -1
- package/dist/types/components/Badge/appearance/badgeSize.d.ts +7 -7
- package/dist/types/components/Badge/appearance/badgeSuccess.d.ts +1 -1
- package/dist/types/components/Badge/appearance/badgeSurface.d.ts +7 -7
- package/dist/types/components/Badge/appearance/badgeWarning.d.ts +1 -1
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/types/components/Breadcrumbs/Breadcrumbs.interface.d.ts +49 -49
- package/dist/types/components/Breadcrumbs/BreadcrumbsItem.d.ts +2 -2
- package/dist/types/components/Button/Button.appearance.d.ts +2 -2
- package/dist/types/components/Button/Button.d.ts +3 -3
- package/dist/types/components/Button/Button.interface.d.ts +44 -45
- package/dist/types/components/Button/appearance/buttonAccent.d.ts +10 -10
- package/dist/types/components/Cell/Cell.appearance.d.ts +2 -2
- package/dist/types/components/Cell/Cell.d.ts +3 -3
- package/dist/types/components/Cell/Cell.interface.d.ts +40 -41
- package/dist/types/components/Checkbox/Checkbox.appearance.d.ts +3 -3
- package/dist/types/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/types/components/Checkbox/Checkbox.interface.d.ts +36 -37
- package/dist/types/components/Checkmark/Checkmark.appearance.d.ts +2 -2
- package/dist/types/components/Checkmark/Checkmark.d.ts +3 -3
- package/dist/types/components/Checkmark/Checkmark.interface.d.ts +15 -17
- package/dist/types/components/Chips/Chips.appearance.d.ts +2 -2
- package/dist/types/components/Chips/Chips.d.ts +3 -3
- package/dist/types/components/Chips/Chips.interface.d.ts +30 -31
- package/dist/types/components/Chips/appearance/chipsDisabled.d.ts +2 -0
- package/dist/types/components/Chips/appearance/chipsSurface.d.ts +4 -0
- package/dist/types/components/Choice/Choice.appearance.d.ts +2 -2
- package/dist/types/components/Choice/Choice.d.ts +3 -3
- package/dist/types/components/Choice/Choice.interface.d.ts +35 -36
- package/dist/types/components/Code/Code.appearance.d.ts +2 -2
- package/dist/types/components/Code/Code.d.ts +3 -3
- package/dist/types/components/Code/Code.interface.d.ts +31 -32
- package/dist/types/components/CookiesWarning/CookiesWarning.d.ts +2 -2
- package/dist/types/components/CookiesWarning/CookiesWarning.interface.d.ts +10 -10
- package/dist/types/components/DadataHintField/DadataHintField.d.ts +2 -2
- package/dist/types/components/DadataHintField/DadataHintField.interface.d.ts +3 -3
- package/dist/types/components/DatePicker/DatePicker.appearance.d.ts +2 -2
- package/dist/types/components/DatePicker/DatePicker.d.ts +3 -3
- package/dist/types/components/DatePicker/DatePicker.interface.d.ts +71 -72
- package/dist/types/components/Divider/Divider.d.ts +3 -3
- package/dist/types/components/Divider/Divider.interface.d.ts +29 -30
- package/dist/types/components/Dot/Dot.d.ts +2 -2
- package/dist/types/components/Dot/Dot.interface.d.ts +21 -21
- package/dist/types/components/Drawer/Drawer.appearance.d.ts +2 -2
- package/dist/types/components/Drawer/Drawer.d.ts +3 -3
- package/dist/types/components/Drawer/Drawer.interface.d.ts +12 -12
- package/dist/types/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/types/components/Dropdown/Dropdown.interface.d.ts +51 -53
- package/dist/types/components/Dropdown/DropdownItem.appearance.d.ts +2 -2
- package/dist/types/components/Dropdown/DropdownItem.d.ts +3 -3
- package/dist/types/components/Dropdown/appearance/dropdownSurface.d.ts +25 -0
- package/dist/types/components/Flex/Flex.d.ts +2 -2
- package/dist/types/components/Flex/Flex.interface.d.ts +83 -83
- package/dist/types/components/Flex/FlexItem.d.ts +2 -2
- package/dist/types/components/Grid/Grid.d.ts +2 -2
- package/dist/types/components/Grid/Grid.interface.d.ts +47 -47
- package/dist/types/components/Grid/GridItem.d.ts +2 -2
- package/dist/types/components/Grid/GridRow.d.ts +2 -2
- package/dist/types/components/Group/Group.appearance.d.ts +2 -2
- package/dist/types/components/Group/Group.d.ts +3 -3
- package/dist/types/components/Group/Group.interface.d.ts +28 -29
- package/dist/types/components/HTMLContent/HTMLContent.d.ts +2 -2
- package/dist/types/components/HTMLContent/HTMLContent.interface.d.ts +20 -20
- package/dist/types/components/HeroTitle/HeroTitle.appearance.d.ts +2 -2
- package/dist/types/components/HeroTitle/HeroTitle.d.ts +3 -3
- package/dist/types/components/HeroTitle/HeroTitle.interface.d.ts +27 -28
- package/dist/types/components/Icon/Icon.appearance.d.ts +2 -2
- package/dist/types/components/Icon/Icon.d.ts +3 -3
- package/dist/types/components/Icon/Icon.interface.d.ts +49 -50
- package/dist/types/components/Image/Image.d.ts +2 -2
- package/dist/types/components/Image/Image.interface.d.ts +10 -10
- package/dist/types/components/Input/Input.appearance.d.ts +3 -3
- package/dist/types/components/Input/Input.d.ts +3 -3
- package/dist/types/components/Input/Input.interface.d.ts +31 -33
- package/dist/types/components/InputMask/Input.d.ts +3 -3
- package/dist/types/components/InputMask/Input.interface.d.ts +31 -33
- package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +3 -3
- package/dist/types/components/InputPassword/InputPassword.d.ts +3 -3
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +31 -33
- package/dist/types/components/Label/Label.appearance.d.ts +2 -2
- package/dist/types/components/Label/Label.d.ts +3 -3
- package/dist/types/components/Label/Label.interface.d.ts +31 -32
- package/dist/types/components/Link/Link.appearance.d.ts +2 -2
- package/dist/types/components/Link/Link.d.ts +4 -4
- package/dist/types/components/Link/Link.interface.d.ts +31 -32
- package/dist/types/components/List/List.d.ts +2 -2
- package/dist/types/components/List/List.interface.d.ts +13 -13
- package/dist/types/components/List/ListItem.d.ts +2 -2
- package/dist/types/components/Loader/Loader.d.ts +3 -3
- package/dist/types/components/Loader/Loader.interface.d.ts +18 -19
- package/dist/types/components/Logo/Logo.d.ts +3 -3
- package/dist/types/components/Logo/Logo.interface.d.ts +16 -17
- package/dist/types/components/MenuItem/MenuItem.appearance.d.ts +2 -2
- package/dist/types/components/MenuItem/MenuItem.d.ts +3 -10
- package/dist/types/components/MenuItem/MenuItem.interface.d.ts +41 -42
- package/dist/types/components/Modal/Modal.appearance.d.ts +2 -2
- package/dist/types/components/Modal/Modal.d.ts +2 -2
- package/dist/types/components/Modal/Modal.interface.d.ts +20 -21
- package/dist/types/components/Modal/ModalLoader.d.ts +1 -2
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.d.ts +2 -2
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.interface.d.ts +4 -3
- package/dist/types/components/Notification/Notification.interface.d.ts +26 -27
- package/dist/types/components/Notification/NotificationItem.appearance.d.ts +2 -2
- package/dist/types/components/Notification/NotificationItem.d.ts +3 -3
- package/dist/types/components/Notification/NotificationList.d.ts +2 -2
- package/dist/types/components/Overlay/Overlay.appearance.d.ts +2 -2
- package/dist/types/components/Overlay/Overlay.d.ts +3 -3
- package/dist/types/components/Overlay/Overlay.interface.d.ts +14 -15
- package/dist/types/components/Pagination/Pagination.appearance.d.ts +2 -2
- package/dist/types/components/Pagination/Pagination.d.ts +3 -3
- package/dist/types/components/Pagination/Pagination.interface.d.ts +37 -38
- package/dist/types/components/Panel/Panel.d.ts +3 -3
- package/dist/types/components/Panel/Panel.interface.d.ts +33 -34
- package/dist/types/components/Radio/Radio.appearance.d.ts +1 -1
- package/dist/types/components/Radio/Radio.d.ts +3 -3
- package/dist/types/components/Radio/Radio.interface.d.ts +34 -35
- package/dist/types/components/RangeSlider/RangeSlider.d.ts +2 -2
- package/dist/types/components/RangeSlider/RangeSlider.interface.d.ts +12 -12
- package/dist/types/components/Response/Response.d.ts +3 -3
- package/dist/types/components/Response/Response.interface.d.ts +41 -42
- package/dist/types/components/SVGContent/SVGContent.d.ts +2 -2
- package/dist/types/components/SVGContent/SVGContent.interface.d.ts +5 -5
- package/dist/types/components/ScrollOnDrag/ScrollOnDrag.d.ts +2 -2
- package/dist/types/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +11 -11
- package/dist/types/components/Scrollbar/Scrollbar.d.ts +2 -2
- package/dist/types/components/Scrollbar/Scrollbar.interface.d.ts +2 -2
- package/dist/types/components/Search/Search.appearance.d.ts +2 -2
- package/dist/types/components/Search/Search.interface.d.ts +36 -37
- package/dist/types/components/Search/SearchInput.d.ts +3 -3
- package/dist/types/components/Segmented/Segmented.appearance.d.ts +2 -2
- package/dist/types/components/Segmented/Segmented.d.ts +3 -3
- package/dist/types/components/Segmented/Segmented.interface.d.ts +28 -29
- package/dist/types/components/Select/Select.appearance.d.ts +2 -2
- package/dist/types/components/Select/Select.interface.d.ts +48 -49
- package/dist/types/components/Select/SelectContainer.d.ts +3 -3
- package/dist/types/components/Swiper/Swiper.d.ts +2 -2
- package/dist/types/components/Swiper/Swiper.interface.d.ts +10 -10
- package/dist/types/components/Switch/Switch.appearance.d.ts +2 -2
- package/dist/types/components/Switch/Switch.d.ts +3 -3
- package/dist/types/components/Switch/Switch.interface.d.ts +11 -11
- package/dist/types/components/Tab/Tab.appearance.d.ts +2 -2
- package/dist/types/components/Tab/Tab.d.ts +3 -3
- package/dist/types/components/Tab/Tab.interface.d.ts +55 -56
- package/dist/types/components/Tab/TabGroup.d.ts +2 -2
- package/dist/types/components/Text/Text.appearance.d.ts +2 -2
- package/dist/types/components/Text/Text.d.ts +3 -3
- package/dist/types/components/Text/Text.interface.d.ts +33 -34
- package/dist/types/components/Textarea/Textarea.appearance.d.ts +3 -3
- package/dist/types/components/Textarea/Textarea.d.ts +3 -3
- package/dist/types/components/Textarea/Textarea.interface.d.ts +27 -29
- package/dist/types/components/Tile/Tile.appearance.d.ts +2 -2
- package/dist/types/components/Tile/Tile.d.ts +3 -3
- package/dist/types/components/Tile/Tile.interface.d.ts +32 -33
- package/dist/types/components/Title/Title.appearance.d.ts +2 -2
- package/dist/types/components/Title/Title.d.ts +3 -3
- package/dist/types/components/Title/Title.interface.d.ts +27 -28
- package/dist/types/components/Tooltip/Tooltip.appearance.d.ts +2 -2
- package/dist/types/components/Tooltip/Tooltip.d.ts +3 -3
- package/dist/types/components/Tooltip/Tooltip.interface.d.ts +26 -27
- package/dist/types/components/Video/Video.d.ts +2 -2
- package/dist/types/components/Video/Video.interface.d.ts +2 -2
- package/dist/types/context/Notifications.d.ts +4 -5
- package/dist/types/context/Notifications.interface.d.ts +14 -14
- package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.d.ts +2 -2
- package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.interface.d.ts +7 -7
- package/dist/types/hooks/useStyles/styleAttributes.interface.d.ts +80 -80
- package/package.json +7 -6
- package/dist/DropdownItem-B3E-_Cwp.js +0 -88
- package/dist/DropdownItem-Qg-_2YWD.js +0 -93
- package/dist/Icon-OJ_3E3eM.js +0 -61
- package/dist/Image-BEGwuGBM.js +0 -17
- package/dist/Image-DWfyapuD.js +0 -15
- package/dist/stories/Dev.mdx +0 -9
- package/dist/types/types/componentProps/align.d.ts +0 -2
- package/dist/types/types/componentProps/alignDirection.d.ts +0 -3
- package/dist/types/types/componentProps/alignment.d.ts +0 -3
- package/dist/types/types/componentProps/appearanceKeys.d.ts +0 -1
- package/dist/types/types/componentProps/borderColor.d.ts +0 -3
- package/dist/types/types/componentProps/borderColorHover.d.ts +0 -3
- package/dist/types/types/componentProps/borderType.d.ts +0 -3
- package/dist/types/types/componentProps/borderWidth.d.ts +0 -3
- package/dist/types/types/componentProps/direction.d.ts +0 -3
- package/dist/types/types/componentProps/elevation.d.ts +0 -3
- package/dist/types/types/componentProps/fill.d.ts +0 -3
- package/dist/types/types/componentProps/fillGradient.d.ts +0 -3
- package/dist/types/types/componentProps/fillHover.d.ts +0 -3
- package/dist/types/types/componentProps/fillType.d.ts +0 -3
- package/dist/types/types/componentProps/flexAlign.d.ts +0 -3
- package/dist/types/types/componentProps/flexGrow.d.ts +0 -3
- package/dist/types/types/componentProps/flexJustifyContent.d.ts +0 -3
- package/dist/types/types/componentProps/flexWrap.d.ts +0 -3
- package/dist/types/types/componentProps/gridAlign.d.ts +0 -3
- package/dist/types/types/componentProps/gridAlignSelf.d.ts +0 -3
- package/dist/types/types/componentProps/gridJustifyItems.d.ts +0 -3
- package/dist/types/types/componentProps/gridJustifySelf.d.ts +0 -3
- package/dist/types/types/componentProps/height.d.ts +0 -3
- package/dist/types/types/componentProps/horizontalContentAlign.d.ts +0 -3
- package/dist/types/types/componentProps/horizontalResizeMode.d.ts +0 -3
- package/dist/types/types/componentProps/iconFillSize.d.ts +0 -3
- package/dist/types/types/componentProps/iconSize.d.ts +0 -3
- package/dist/types/types/componentProps/itemColor.d.ts +0 -3
- package/dist/types/types/componentProps/justifyContent.d.ts +0 -3
- package/dist/types/types/componentProps/overflow.d.ts +0 -3
- package/dist/types/types/componentProps/position.d.ts +0 -3
- package/dist/types/types/componentProps/resizeMode.d.ts +0 -3
- package/dist/types/types/componentProps/shape.d.ts +0 -3
- package/dist/types/types/componentProps/size.d.ts +0 -3
- package/dist/types/types/componentProps/sizeOption.d.ts +0 -3
- package/dist/types/types/componentProps/sizePX.d.ts +0 -3
- package/dist/types/types/componentProps/stacking.d.ts +0 -3
- package/dist/types/types/componentProps/state.d.ts +0 -3
- package/dist/types/types/componentProps/stateKeys.d.ts +0 -1
- package/dist/types/types/componentProps/svgFill.d.ts +0 -3
- package/dist/types/types/componentProps/textAlign.d.ts +0 -3
- package/dist/types/types/componentProps/textColor.d.ts +0 -3
- package/dist/types/types/componentProps/textColorActive.d.ts +0 -3
- package/dist/types/types/componentProps/textColorHover.d.ts +0 -3
- package/dist/types/types/componentProps/textGradient.d.ts +0 -3
- package/dist/types/types/componentProps/textSize.d.ts +0 -3
- package/dist/types/types/componentProps/textStyle.d.ts +0 -3
- package/dist/types/types/componentProps/textTag.d.ts +0 -3
- package/dist/types/types/componentProps/textWeight.d.ts +0 -3
- package/dist/types/types/componentProps/textWrap.d.ts +0 -3
- package/dist/types/types/componentProps/titleSize.d.ts +0 -5
- package/dist/types/types/componentProps/type.d.ts +0 -3
- package/dist/types/types/componentProps/underline.d.ts +0 -3
- package/dist/types/types/componentProps/verticalContentAlign.d.ts +0 -3
- package/dist/types/types/componentProps/verticalResizeMode.d.ts +0 -3
- package/dist/types/types/componentProps/width.d.ts +0 -3
- package/dist/types/types/componentProps/wrap.d.ts +0 -3
- package/dist/types/types/index.d.ts +0 -55
|
@@ -5,8 +5,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
7
7
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
8
|
-
var Icon = require('./Icon-
|
|
9
|
-
var Text = require('./Text-
|
|
8
|
+
var Icon = require('./Icon-Ch-L2dOj.js');
|
|
9
|
+
var Text = require('./Text-CEcBg-F5.js');
|
|
10
10
|
|
|
11
11
|
var defaultAppearance = {
|
|
12
12
|
accent: {
|
|
@@ -44,9 +44,9 @@ var defaultAppearance = {
|
|
|
44
44
|
var badgeAppearanceAccent = {
|
|
45
45
|
accent: tslib_es6.__assign(tslib_es6.__assign({}, defaultAppearance.accent), { dotFill: 'accentItemPrimary', iconFill: 'accentItemPrimary' }),
|
|
46
46
|
accentPrimary: tslib_es6.__assign(tslib_es6.__assign({}, defaultAppearance.accentPrimary), { dotFill: 'accentItemPrimary' }),
|
|
47
|
+
accentQuaternary: tslib_es6.__assign(tslib_es6.__assign({}, defaultAppearance.accentQuaternary), { dotFill: 'accentItemPrimary' }),
|
|
47
48
|
accentSecondary: tslib_es6.__assign(tslib_es6.__assign({}, defaultAppearance.accentSecondary), { dotFill: 'accentItemPrimary' }),
|
|
48
49
|
accentTertiary: tslib_es6.__assign(tslib_es6.__assign({}, defaultAppearance.accentTertiary), { dotFill: 'accentItemPrimary' }),
|
|
49
|
-
accentQuaternary: tslib_es6.__assign(tslib_es6.__assign({}, defaultAppearance.accentQuaternary), { dotFill: 'accentItemPrimary' }),
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
var badgeAppearanceDanger = {
|
|
@@ -66,9 +66,9 @@ var badgeAppearanceError = {
|
|
|
66
66
|
fillHover: 'errorPrimaryHover',
|
|
67
67
|
labelTextColor: 'errorTextPrimary',
|
|
68
68
|
labelTextColorHover: 'errorTextPrimary',
|
|
69
|
+
iconFill: 'errorItemPrimary',
|
|
69
70
|
loaderFill: 'errorPrimary',
|
|
70
71
|
loaderItemFill: 'errorItemPrimary',
|
|
71
|
-
iconFill: 'errorItemPrimary',
|
|
72
72
|
},
|
|
73
73
|
};
|
|
74
74
|
|
|
@@ -76,16 +76,16 @@ var badgeAppearanceInfo = {
|
|
|
76
76
|
info: {
|
|
77
77
|
fill: 'infoPrimary',
|
|
78
78
|
fillHover: 'infoPrimaryHover',
|
|
79
|
-
textColor: 'infoTextPrimary',
|
|
80
79
|
borderColor: 'infoBorderSecondary',
|
|
80
|
+
textColor: 'infoTextPrimary',
|
|
81
81
|
dotFill: 'infoItemPrimary',
|
|
82
82
|
iconFill: 'infoItemPrimary',
|
|
83
83
|
},
|
|
84
84
|
infoSecondary: {
|
|
85
85
|
fill: 'infoSecondary',
|
|
86
86
|
fillHover: 'infoSecondaryHover',
|
|
87
|
-
textColor: 'infoTextSecondary',
|
|
88
87
|
borderColor: 'infoBorderSecondary',
|
|
88
|
+
textColor: 'infoTextSecondary',
|
|
89
89
|
dotFill: 'infoItemSecondary',
|
|
90
90
|
},
|
|
91
91
|
};
|
|
@@ -94,8 +94,8 @@ var badgeAppearancePrimary = {
|
|
|
94
94
|
primary: {
|
|
95
95
|
fill: 'primaryPrimary',
|
|
96
96
|
fillHover: 'primaryPrimaryHover',
|
|
97
|
-
textColor: 'primaryTextPrimary',
|
|
98
97
|
borderColor: 'primaryBorderSecondary',
|
|
98
|
+
textColor: 'primaryTextPrimary',
|
|
99
99
|
dotFill: 'primaryItemPrimary',
|
|
100
100
|
iconFill: 'primaryItemPrimary',
|
|
101
101
|
},
|
|
@@ -105,8 +105,8 @@ var badgeAppearanceSecondary = {
|
|
|
105
105
|
secondary: {
|
|
106
106
|
fill: 'secondaryPrimary',
|
|
107
107
|
fillHover: 'secondaryPrimaryHover',
|
|
108
|
-
textColor: 'secondaryTextPrimary',
|
|
109
108
|
borderColor: 'secondaryBorderSecondary',
|
|
109
|
+
textColor: 'secondaryTextPrimary',
|
|
110
110
|
dotFill: 'secondaryItemPrimary',
|
|
111
111
|
iconFill: 'secondaryItemPrimary',
|
|
112
112
|
},
|
|
@@ -114,33 +114,33 @@ var badgeAppearanceSecondary = {
|
|
|
114
114
|
|
|
115
115
|
var badgeAppearanceSize = {
|
|
116
116
|
sizeXXL: {
|
|
117
|
-
textSize: 'xl',
|
|
118
117
|
size: 'xxl',
|
|
119
|
-
|
|
118
|
+
textSize: 'xl',
|
|
119
|
+
iconSize: 24,
|
|
120
120
|
},
|
|
121
121
|
sizeXL: {
|
|
122
|
-
textSize: 'l',
|
|
123
122
|
size: 'xl',
|
|
123
|
+
textSize: 'l',
|
|
124
124
|
},
|
|
125
125
|
sizeL: {
|
|
126
|
-
textSize: 'l',
|
|
127
126
|
size: 'l',
|
|
127
|
+
textSize: 'l',
|
|
128
128
|
},
|
|
129
129
|
sizeM: {
|
|
130
|
-
textSize: 'm',
|
|
131
130
|
size: 'm',
|
|
131
|
+
textSize: 'm',
|
|
132
132
|
},
|
|
133
133
|
sizeS: {
|
|
134
|
-
textSize: 's',
|
|
135
134
|
size: 's',
|
|
135
|
+
textSize: 's',
|
|
136
136
|
},
|
|
137
137
|
sizeXS: {
|
|
138
|
-
textSize: 'xs',
|
|
139
138
|
size: 'xs',
|
|
139
|
+
textSize: 'xs',
|
|
140
140
|
},
|
|
141
141
|
sizeXXS: {
|
|
142
|
-
textSize: 'xs',
|
|
143
142
|
size: 'xxs',
|
|
143
|
+
textSize: 'xs',
|
|
144
144
|
},
|
|
145
145
|
};
|
|
146
146
|
|
|
@@ -164,8 +164,8 @@ var badgeAppearanceSuccess = {
|
|
|
164
164
|
success: {
|
|
165
165
|
fill: 'successPrimary',
|
|
166
166
|
fillHover: 'successPrimaryHover',
|
|
167
|
-
textColor: 'successTextPrimary',
|
|
168
167
|
borderColor: 'successBorderPrimary',
|
|
168
|
+
textColor: 'successTextPrimary',
|
|
169
169
|
dotFill: 'successItemPrimary',
|
|
170
170
|
iconFill: 'successItemPrimary',
|
|
171
171
|
},
|
|
@@ -175,28 +175,28 @@ var badgeAppearanceSurface = {
|
|
|
175
175
|
surfacePrimary: {
|
|
176
176
|
fill: 'surfacePrimary',
|
|
177
177
|
fillHover: 'surfacePrimaryHover',
|
|
178
|
-
textColor: 'surfaceTextPrimary',
|
|
179
178
|
borderColor: 'surfaceBorderTertiary',
|
|
179
|
+
textColor: 'surfaceTextPrimary',
|
|
180
180
|
dotFill: 'surfaceItemPrimary',
|
|
181
181
|
iconFill: 'surfaceItemPrimary',
|
|
182
182
|
},
|
|
183
|
+
surfaceQuaternary: {
|
|
184
|
+
fill: 'accentPrimary',
|
|
185
|
+
fillHover: 'surfaceTertiaryHover',
|
|
186
|
+
borderColor: 'surfaceBorderPrimary',
|
|
187
|
+
textColor: 'surfaceTextInverse',
|
|
188
|
+
},
|
|
183
189
|
surfaceSecondary: {
|
|
184
190
|
fill: 'surfaceSecondary',
|
|
185
191
|
fillHover: 'surfaceSecondaryHover',
|
|
186
|
-
textColor: 'surfaceTextPrimary',
|
|
187
192
|
borderColor: 'surfaceBorderSecondary',
|
|
193
|
+
textColor: 'surfaceTextPrimary',
|
|
188
194
|
},
|
|
189
195
|
surfaceTertiary: {
|
|
190
196
|
fill: 'surfaceTertiary',
|
|
191
197
|
fillHover: 'surfaceTertiaryHover',
|
|
192
|
-
textColor: 'surfaceTextPrimary',
|
|
193
198
|
borderColor: 'surfaceBorderTertiary',
|
|
194
|
-
|
|
195
|
-
surfaceQuaternary: {
|
|
196
|
-
fill: 'accentPrimary',
|
|
197
|
-
fillHover: 'surfaceTertiaryHover',
|
|
198
|
-
textColor: 'surfaceTextInverse',
|
|
199
|
-
borderColor: 'surfaceBorderPrimary',
|
|
199
|
+
textColor: 'surfaceTextPrimary',
|
|
200
200
|
},
|
|
201
201
|
};
|
|
202
202
|
|
|
@@ -204,8 +204,8 @@ var badgeAppearanceWarning = {
|
|
|
204
204
|
warning: {
|
|
205
205
|
fill: 'warningPrimary',
|
|
206
206
|
fillHover: 'warningPrimary',
|
|
207
|
-
textColor: 'warningTextSecondary',
|
|
208
207
|
borderColor: 'warningBorderPrimary',
|
|
208
|
+
textColor: 'warningTextSecondary',
|
|
209
209
|
dotFill: 'warningItemPrimary',
|
|
210
210
|
iconFill: 'warningItemPrimary',
|
|
211
211
|
},
|
|
@@ -240,7 +240,7 @@ function Badge(props) {
|
|
|
240
240
|
: dot
|
|
241
241
|
? 'badge_type_dot'
|
|
242
242
|
: 'badge_type_fill';
|
|
243
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'badge', borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), positionClass && "position_".concat(positionClass), sizeClass && "badge_size_".concat(sizeClass), shapeClass && "badge_shape_".concat(shapeClass), badgeTypeClass, isSkeleton &&
|
|
243
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'badge', borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), positionClass && "position_".concat(positionClass), sizeClass && "badge_size_".concat(sizeClass), shapeClass && "badge_shape_".concat(shapeClass), badgeTypeClass, isSkeleton && 'badge_skeleton'), style: badgeStyles, children: [dot && (jsxRuntime.jsx("div", { className: clsx('badge__dot', dotFillClass && "svg_fill_".concat(dotFillClass)), children: jsxRuntime.jsx("svg", { width: "6", height: "6", viewBox: "0 0 6 6", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsx("rect", { width: "6", height: "6", rx: "50" }) }) })), icon && (jsxRuntime.jsx(Icon.Icon, { className: "badge__icon", size: iconSize, iconFill: iconFill, imageSrc: iconSrc, shape: iconShape, SvgImage: icon })), children ||
|
|
244
244
|
(value && (jsxRuntime.jsx(Text.Text, { className: "badge__value", size: textSize, textColor: textColor, children: value })))] }));
|
|
245
245
|
}
|
|
246
246
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6-
|
|
1
|
+
import { _ as __assign } from './tslib.es6-Bwu1Cn-t.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
6
|
-
import { I as Icon } from './Icon-
|
|
7
|
-
import { T as Text } from './Text-
|
|
6
|
+
import { I as Icon } from './Icon-CoBJRPlP.js';
|
|
7
|
+
import { T as Text } from './Text-CI2prtf6.js';
|
|
8
8
|
|
|
9
9
|
var defaultAppearance = {
|
|
10
10
|
accent: {
|
|
@@ -42,9 +42,9 @@ var defaultAppearance = {
|
|
|
42
42
|
var badgeAppearanceAccent = {
|
|
43
43
|
accent: __assign(__assign({}, defaultAppearance.accent), { dotFill: 'accentItemPrimary', iconFill: 'accentItemPrimary' }),
|
|
44
44
|
accentPrimary: __assign(__assign({}, defaultAppearance.accentPrimary), { dotFill: 'accentItemPrimary' }),
|
|
45
|
+
accentQuaternary: __assign(__assign({}, defaultAppearance.accentQuaternary), { dotFill: 'accentItemPrimary' }),
|
|
45
46
|
accentSecondary: __assign(__assign({}, defaultAppearance.accentSecondary), { dotFill: 'accentItemPrimary' }),
|
|
46
47
|
accentTertiary: __assign(__assign({}, defaultAppearance.accentTertiary), { dotFill: 'accentItemPrimary' }),
|
|
47
|
-
accentQuaternary: __assign(__assign({}, defaultAppearance.accentQuaternary), { dotFill: 'accentItemPrimary' }),
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
var badgeAppearanceDanger = {
|
|
@@ -64,9 +64,9 @@ var badgeAppearanceError = {
|
|
|
64
64
|
fillHover: 'errorPrimaryHover',
|
|
65
65
|
labelTextColor: 'errorTextPrimary',
|
|
66
66
|
labelTextColorHover: 'errorTextPrimary',
|
|
67
|
+
iconFill: 'errorItemPrimary',
|
|
67
68
|
loaderFill: 'errorPrimary',
|
|
68
69
|
loaderItemFill: 'errorItemPrimary',
|
|
69
|
-
iconFill: 'errorItemPrimary',
|
|
70
70
|
},
|
|
71
71
|
};
|
|
72
72
|
|
|
@@ -74,16 +74,16 @@ var badgeAppearanceInfo = {
|
|
|
74
74
|
info: {
|
|
75
75
|
fill: 'infoPrimary',
|
|
76
76
|
fillHover: 'infoPrimaryHover',
|
|
77
|
-
textColor: 'infoTextPrimary',
|
|
78
77
|
borderColor: 'infoBorderSecondary',
|
|
78
|
+
textColor: 'infoTextPrimary',
|
|
79
79
|
dotFill: 'infoItemPrimary',
|
|
80
80
|
iconFill: 'infoItemPrimary',
|
|
81
81
|
},
|
|
82
82
|
infoSecondary: {
|
|
83
83
|
fill: 'infoSecondary',
|
|
84
84
|
fillHover: 'infoSecondaryHover',
|
|
85
|
-
textColor: 'infoTextSecondary',
|
|
86
85
|
borderColor: 'infoBorderSecondary',
|
|
86
|
+
textColor: 'infoTextSecondary',
|
|
87
87
|
dotFill: 'infoItemSecondary',
|
|
88
88
|
},
|
|
89
89
|
};
|
|
@@ -92,8 +92,8 @@ var badgeAppearancePrimary = {
|
|
|
92
92
|
primary: {
|
|
93
93
|
fill: 'primaryPrimary',
|
|
94
94
|
fillHover: 'primaryPrimaryHover',
|
|
95
|
-
textColor: 'primaryTextPrimary',
|
|
96
95
|
borderColor: 'primaryBorderSecondary',
|
|
96
|
+
textColor: 'primaryTextPrimary',
|
|
97
97
|
dotFill: 'primaryItemPrimary',
|
|
98
98
|
iconFill: 'primaryItemPrimary',
|
|
99
99
|
},
|
|
@@ -103,8 +103,8 @@ var badgeAppearanceSecondary = {
|
|
|
103
103
|
secondary: {
|
|
104
104
|
fill: 'secondaryPrimary',
|
|
105
105
|
fillHover: 'secondaryPrimaryHover',
|
|
106
|
-
textColor: 'secondaryTextPrimary',
|
|
107
106
|
borderColor: 'secondaryBorderSecondary',
|
|
107
|
+
textColor: 'secondaryTextPrimary',
|
|
108
108
|
dotFill: 'secondaryItemPrimary',
|
|
109
109
|
iconFill: 'secondaryItemPrimary',
|
|
110
110
|
},
|
|
@@ -112,33 +112,33 @@ var badgeAppearanceSecondary = {
|
|
|
112
112
|
|
|
113
113
|
var badgeAppearanceSize = {
|
|
114
114
|
sizeXXL: {
|
|
115
|
-
textSize: 'xl',
|
|
116
115
|
size: 'xxl',
|
|
117
|
-
|
|
116
|
+
textSize: 'xl',
|
|
117
|
+
iconSize: 24,
|
|
118
118
|
},
|
|
119
119
|
sizeXL: {
|
|
120
|
-
textSize: 'l',
|
|
121
120
|
size: 'xl',
|
|
121
|
+
textSize: 'l',
|
|
122
122
|
},
|
|
123
123
|
sizeL: {
|
|
124
|
-
textSize: 'l',
|
|
125
124
|
size: 'l',
|
|
125
|
+
textSize: 'l',
|
|
126
126
|
},
|
|
127
127
|
sizeM: {
|
|
128
|
-
textSize: 'm',
|
|
129
128
|
size: 'm',
|
|
129
|
+
textSize: 'm',
|
|
130
130
|
},
|
|
131
131
|
sizeS: {
|
|
132
|
-
textSize: 's',
|
|
133
132
|
size: 's',
|
|
133
|
+
textSize: 's',
|
|
134
134
|
},
|
|
135
135
|
sizeXS: {
|
|
136
|
-
textSize: 'xs',
|
|
137
136
|
size: 'xs',
|
|
137
|
+
textSize: 'xs',
|
|
138
138
|
},
|
|
139
139
|
sizeXXS: {
|
|
140
|
-
textSize: 'xs',
|
|
141
140
|
size: 'xxs',
|
|
141
|
+
textSize: 'xs',
|
|
142
142
|
},
|
|
143
143
|
};
|
|
144
144
|
|
|
@@ -162,8 +162,8 @@ var badgeAppearanceSuccess = {
|
|
|
162
162
|
success: {
|
|
163
163
|
fill: 'successPrimary',
|
|
164
164
|
fillHover: 'successPrimaryHover',
|
|
165
|
-
textColor: 'successTextPrimary',
|
|
166
165
|
borderColor: 'successBorderPrimary',
|
|
166
|
+
textColor: 'successTextPrimary',
|
|
167
167
|
dotFill: 'successItemPrimary',
|
|
168
168
|
iconFill: 'successItemPrimary',
|
|
169
169
|
},
|
|
@@ -173,28 +173,28 @@ var badgeAppearanceSurface = {
|
|
|
173
173
|
surfacePrimary: {
|
|
174
174
|
fill: 'surfacePrimary',
|
|
175
175
|
fillHover: 'surfacePrimaryHover',
|
|
176
|
-
textColor: 'surfaceTextPrimary',
|
|
177
176
|
borderColor: 'surfaceBorderTertiary',
|
|
177
|
+
textColor: 'surfaceTextPrimary',
|
|
178
178
|
dotFill: 'surfaceItemPrimary',
|
|
179
179
|
iconFill: 'surfaceItemPrimary',
|
|
180
180
|
},
|
|
181
|
+
surfaceQuaternary: {
|
|
182
|
+
fill: 'accentPrimary',
|
|
183
|
+
fillHover: 'surfaceTertiaryHover',
|
|
184
|
+
borderColor: 'surfaceBorderPrimary',
|
|
185
|
+
textColor: 'surfaceTextInverse',
|
|
186
|
+
},
|
|
181
187
|
surfaceSecondary: {
|
|
182
188
|
fill: 'surfaceSecondary',
|
|
183
189
|
fillHover: 'surfaceSecondaryHover',
|
|
184
|
-
textColor: 'surfaceTextPrimary',
|
|
185
190
|
borderColor: 'surfaceBorderSecondary',
|
|
191
|
+
textColor: 'surfaceTextPrimary',
|
|
186
192
|
},
|
|
187
193
|
surfaceTertiary: {
|
|
188
194
|
fill: 'surfaceTertiary',
|
|
189
195
|
fillHover: 'surfaceTertiaryHover',
|
|
190
|
-
textColor: 'surfaceTextPrimary',
|
|
191
196
|
borderColor: 'surfaceBorderTertiary',
|
|
192
|
-
|
|
193
|
-
surfaceQuaternary: {
|
|
194
|
-
fill: 'accentPrimary',
|
|
195
|
-
fillHover: 'surfaceTertiaryHover',
|
|
196
|
-
textColor: 'surfaceTextInverse',
|
|
197
|
-
borderColor: 'surfaceBorderPrimary',
|
|
197
|
+
textColor: 'surfaceTextPrimary',
|
|
198
198
|
},
|
|
199
199
|
};
|
|
200
200
|
|
|
@@ -202,8 +202,8 @@ var badgeAppearanceWarning = {
|
|
|
202
202
|
warning: {
|
|
203
203
|
fill: 'warningPrimary',
|
|
204
204
|
fillHover: 'warningPrimary',
|
|
205
|
-
textColor: 'warningTextSecondary',
|
|
206
205
|
borderColor: 'warningBorderPrimary',
|
|
206
|
+
textColor: 'warningTextSecondary',
|
|
207
207
|
dotFill: 'warningItemPrimary',
|
|
208
208
|
iconFill: 'warningItemPrimary',
|
|
209
209
|
},
|
|
@@ -238,7 +238,7 @@ function Badge(props) {
|
|
|
238
238
|
: dot
|
|
239
239
|
? 'badge_type_dot'
|
|
240
240
|
: 'badge_type_fill';
|
|
241
|
-
return (jsxs("div", { className: clsx(className, 'badge', borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), positionClass && "position_".concat(positionClass), sizeClass && "badge_size_".concat(sizeClass), shapeClass && "badge_shape_".concat(shapeClass), badgeTypeClass, isSkeleton &&
|
|
241
|
+
return (jsxs("div", { className: clsx(className, 'badge', borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), positionClass && "position_".concat(positionClass), sizeClass && "badge_size_".concat(sizeClass), shapeClass && "badge_shape_".concat(shapeClass), badgeTypeClass, isSkeleton && 'badge_skeleton'), style: badgeStyles, children: [dot && (jsx("div", { className: clsx('badge__dot', dotFillClass && "svg_fill_".concat(dotFillClass)), children: jsx("svg", { width: "6", height: "6", viewBox: "0 0 6 6", xmlns: "http://www.w3.org/2000/svg", children: jsx("rect", { width: "6", height: "6", rx: "50" }) }) })), icon && (jsx(Icon, { className: "badge__icon", size: iconSize, iconFill: iconFill, imageSrc: iconSrc, shape: iconShape, SvgImage: icon })), children ||
|
|
242
242
|
(value && (jsx(Text, { className: "badge__value", size: textSize, textColor: textColor, children: value })))] }));
|
|
243
243
|
}
|
|
244
244
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6-
|
|
1
|
+
import { _ as __assign } from './tslib.es6-Bwu1Cn-t.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { I as Icon } from './Icon-
|
|
6
|
-
import {
|
|
7
|
-
import { L as Loader } from './Loader-
|
|
8
|
-
import { T as Text } from './Text-
|
|
5
|
+
import { I as Icon } from './Icon-CoBJRPlP.js';
|
|
6
|
+
import { a as LinkWrapper } from './Link-Sr03Kia9.js';
|
|
7
|
+
import { L as Loader } from './Loader-CRN4MAbm.js';
|
|
8
|
+
import { T as Text } from './Text-CI2prtf6.js';
|
|
9
9
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
10
10
|
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
11
11
|
|
|
@@ -13,9 +13,9 @@ var buttonAppearanceAccent = {
|
|
|
13
13
|
accent: {
|
|
14
14
|
fill: 'accentPrimary',
|
|
15
15
|
fillHover: 'accentPrimaryHover',
|
|
16
|
-
borderColor: 'accentBorderPrimary',
|
|
17
16
|
labelTextColor: 'accentTextPrimary',
|
|
18
17
|
labelTextColorHover: 'accentTextPrimary',
|
|
18
|
+
borderColor: 'accentBorderPrimary',
|
|
19
19
|
iconAfterFillIcon: 'accentItemPrimary',
|
|
20
20
|
iconBeforeFillIcon: 'accentItemPrimary',
|
|
21
21
|
loaderFill: 'accentPrimary',
|
|
@@ -24,9 +24,9 @@ var buttonAppearanceAccent = {
|
|
|
24
24
|
accentPrimary: {
|
|
25
25
|
fill: 'accentPrimary',
|
|
26
26
|
fillHover: 'accentPrimaryHover',
|
|
27
|
-
borderColor: 'accentBorderPrimary',
|
|
28
27
|
labelTextColor: 'accentTextPrimary',
|
|
29
28
|
labelTextColorHover: 'accentTextPrimary',
|
|
29
|
+
borderColor: 'accentBorderPrimary',
|
|
30
30
|
iconAfterFillIcon: 'accentItemPrimary',
|
|
31
31
|
iconBeforeFillIcon: 'accentItemPrimary',
|
|
32
32
|
loaderFill: 'accentPrimary',
|
|
@@ -35,27 +35,27 @@ var buttonAppearanceAccent = {
|
|
|
35
35
|
accentSecondary: {
|
|
36
36
|
fill: 'accentPrimary',
|
|
37
37
|
fillHover: 'accentPrimaryHover',
|
|
38
|
-
borderColor: 'accentBorderPrimary',
|
|
39
38
|
labelTextColor: 'accentTextSecondary',
|
|
40
39
|
labelTextColorHover: 'accentTextSecondary',
|
|
40
|
+
borderColor: 'accentBorderPrimary',
|
|
41
41
|
loaderFill: 'accentPrimary',
|
|
42
42
|
loaderItemFill: 'accentItemPrimary',
|
|
43
43
|
},
|
|
44
44
|
full: {},
|
|
45
|
-
|
|
46
|
-
fill:
|
|
45
|
+
ghost: {
|
|
46
|
+
fill: null,
|
|
47
|
+
labelTextColor: 'accentTextSecondary',
|
|
47
48
|
borderColor: null,
|
|
48
|
-
labelTextColor: 'accentTextPrimary',
|
|
49
49
|
},
|
|
50
50
|
outlined: {
|
|
51
51
|
fill: null,
|
|
52
|
-
borderColor: 'accentBorderPrimary',
|
|
53
52
|
labelTextColor: 'accentTextSecondary',
|
|
53
|
+
borderColor: 'accentBorderPrimary',
|
|
54
54
|
},
|
|
55
|
-
|
|
56
|
-
fill:
|
|
55
|
+
solid: {
|
|
56
|
+
fill: 'accentPrimary',
|
|
57
|
+
labelTextColor: 'accentTextPrimary',
|
|
57
58
|
borderColor: null,
|
|
58
|
-
labelTextColor: 'accentTextSecondary',
|
|
59
59
|
},
|
|
60
60
|
};
|
|
61
61
|
|
|
@@ -4,10 +4,10 @@ var tslib_es6 = require('./tslib.es6-CCZ3TN_7.js');
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var clsx = require('clsx');
|
|
7
|
-
var Icon = require('./Icon-
|
|
8
|
-
var Link = require('./Link-
|
|
9
|
-
var Loader = require('./Loader-
|
|
10
|
-
var Text = require('./Text-
|
|
7
|
+
var Icon = require('./Icon-Ch-L2dOj.js');
|
|
8
|
+
var Link = require('./Link-C04g00r2.js');
|
|
9
|
+
var Loader = require('./Loader-rzo8nnRI.js');
|
|
10
|
+
var Text = require('./Text-CEcBg-F5.js');
|
|
11
11
|
var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
12
12
|
var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
13
13
|
|
|
@@ -15,9 +15,9 @@ var buttonAppearanceAccent = {
|
|
|
15
15
|
accent: {
|
|
16
16
|
fill: 'accentPrimary',
|
|
17
17
|
fillHover: 'accentPrimaryHover',
|
|
18
|
-
borderColor: 'accentBorderPrimary',
|
|
19
18
|
labelTextColor: 'accentTextPrimary',
|
|
20
19
|
labelTextColorHover: 'accentTextPrimary',
|
|
20
|
+
borderColor: 'accentBorderPrimary',
|
|
21
21
|
iconAfterFillIcon: 'accentItemPrimary',
|
|
22
22
|
iconBeforeFillIcon: 'accentItemPrimary',
|
|
23
23
|
loaderFill: 'accentPrimary',
|
|
@@ -26,9 +26,9 @@ var buttonAppearanceAccent = {
|
|
|
26
26
|
accentPrimary: {
|
|
27
27
|
fill: 'accentPrimary',
|
|
28
28
|
fillHover: 'accentPrimaryHover',
|
|
29
|
-
borderColor: 'accentBorderPrimary',
|
|
30
29
|
labelTextColor: 'accentTextPrimary',
|
|
31
30
|
labelTextColorHover: 'accentTextPrimary',
|
|
31
|
+
borderColor: 'accentBorderPrimary',
|
|
32
32
|
iconAfterFillIcon: 'accentItemPrimary',
|
|
33
33
|
iconBeforeFillIcon: 'accentItemPrimary',
|
|
34
34
|
loaderFill: 'accentPrimary',
|
|
@@ -37,27 +37,27 @@ var buttonAppearanceAccent = {
|
|
|
37
37
|
accentSecondary: {
|
|
38
38
|
fill: 'accentPrimary',
|
|
39
39
|
fillHover: 'accentPrimaryHover',
|
|
40
|
-
borderColor: 'accentBorderPrimary',
|
|
41
40
|
labelTextColor: 'accentTextSecondary',
|
|
42
41
|
labelTextColorHover: 'accentTextSecondary',
|
|
42
|
+
borderColor: 'accentBorderPrimary',
|
|
43
43
|
loaderFill: 'accentPrimary',
|
|
44
44
|
loaderItemFill: 'accentItemPrimary',
|
|
45
45
|
},
|
|
46
46
|
full: {},
|
|
47
|
-
|
|
48
|
-
fill:
|
|
47
|
+
ghost: {
|
|
48
|
+
fill: null,
|
|
49
|
+
labelTextColor: 'accentTextSecondary',
|
|
49
50
|
borderColor: null,
|
|
50
|
-
labelTextColor: 'accentTextPrimary',
|
|
51
51
|
},
|
|
52
52
|
outlined: {
|
|
53
53
|
fill: null,
|
|
54
|
-
borderColor: 'accentBorderPrimary',
|
|
55
54
|
labelTextColor: 'accentTextSecondary',
|
|
55
|
+
borderColor: 'accentBorderPrimary',
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
fill:
|
|
57
|
+
solid: {
|
|
58
|
+
fill: 'accentPrimary',
|
|
59
|
+
labelTextColor: 'accentTextPrimary',
|
|
59
60
|
borderColor: null,
|
|
60
|
-
labelTextColor: 'accentTextSecondary',
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
63
|
|
|
@@ -23,7 +23,7 @@ function Divider(props) {
|
|
|
23
23
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultApperance), (_a = dividerConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
24
24
|
}, {});
|
|
25
25
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
26
|
-
var directionClass = propsGenerator.directionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass,
|
|
26
|
+
var directionClass = propsGenerator.directionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, _a = propsGenerator.sizeClass, sizeClass = _a === void 0 ? 'xs' : _a, widthClass = propsGenerator.widthClass;
|
|
27
27
|
// @ts-expect-error
|
|
28
28
|
var hrStyles = useStyles.useStyles(props).styles;
|
|
29
29
|
return (jsxRuntime.jsx("hr", { className: clsx(className, 'divider', widthClass && "width_".concat(widthClass), directionClass && "divider_direction_".concat(directionClass), sizeClass && "divider_size_".concat(sizeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), fillDisabledClass && "fill_disabled_".concat(fillDisabledClass)), style: hrStyles }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6-
|
|
1
|
+
import { _ as __assign } from './tslib.es6-Bwu1Cn-t.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
@@ -21,7 +21,7 @@ function Divider(props) {
|
|
|
21
21
|
return (__assign(__assign({}, resultApperance), (_a = dividerConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
22
22
|
}, {});
|
|
23
23
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
24
|
-
var directionClass = propsGenerator.directionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass,
|
|
24
|
+
var directionClass = propsGenerator.directionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, _a = propsGenerator.sizeClass, sizeClass = _a === void 0 ? 'xs' : _a, widthClass = propsGenerator.widthClass;
|
|
25
25
|
// @ts-expect-error
|
|
26
26
|
var hrStyles = useStyles(props).styles;
|
|
27
27
|
return (jsx("hr", { className: clsx(className, 'divider', widthClass && "width_".concat(widthClass), directionClass && "divider_direction_".concat(directionClass), sizeClass && "divider_size_".concat(sizeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), fillDisabledClass && "fill_disabled_".concat(fillDisabledClass)), style: hrStyles }));
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React, { useRef, useState, useCallback, useEffect } from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
|
+
import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
6
|
+
import { _ as __assign } from './tslib.es6-Bwu1Cn-t.js';
|
|
7
|
+
import { D as Divider } from './Divider-DhXzYcNF.js';
|
|
8
|
+
import { T as Text } from './Text-CI2prtf6.js';
|
|
9
|
+
|
|
10
|
+
function Dropdown(props) {
|
|
11
|
+
var className = props.className, _a = props.animationClose, animationClose = _a === void 0 ? 'dropdown_animation_close' : _a, _b = props.animationOpen, animationOpen = _b === void 0 ? 'dropdown_animation_open' : _b, before = props.before, after = props.after, isOpen = props.isOpen, _c = props.set, set = _c === void 0 ? 'normal' : _c, setIsOpen = props.setIsOpen, children = props.children;
|
|
12
|
+
var dropdownRef = useRef(null);
|
|
13
|
+
// const [isOpen, setIsOpen] = useState(false)
|
|
14
|
+
var _d = useState({
|
|
15
|
+
className: '',
|
|
16
|
+
}), animationState = _d[0], setAnimationState = _d[1];
|
|
17
|
+
var onAnimationEnd = useCallback(function () {
|
|
18
|
+
// When component is change his visibility(display) in DOM,
|
|
19
|
+
// animation of close can run unnecessary on showing element.
|
|
20
|
+
// const dropdownElement = dropdownRef.current
|
|
21
|
+
setAnimationState(function (prevState) { return ({
|
|
22
|
+
className: isOpen ? prevState.className : '',
|
|
23
|
+
}); });
|
|
24
|
+
}, [isOpen]);
|
|
25
|
+
useEffect(function () {
|
|
26
|
+
if (animationOpen && animationClose) {
|
|
27
|
+
setAnimationState(function () { return ({
|
|
28
|
+
className: isOpen ? animationOpen : animationClose,
|
|
29
|
+
}); });
|
|
30
|
+
}
|
|
31
|
+
}, [isOpen, animationOpen, animationClose]);
|
|
32
|
+
// Close dropdown by click outside
|
|
33
|
+
useEffect(function () {
|
|
34
|
+
// Add a handler to keep track of the click target.
|
|
35
|
+
function onClickWindow(event) {
|
|
36
|
+
var dropdownElement = dropdownRef.current;
|
|
37
|
+
if (dropdownElement && animationOpen) {
|
|
38
|
+
// Is event target inside of dropdown element
|
|
39
|
+
var isContainsTarget = dropdownElement.contains(event.target);
|
|
40
|
+
// Is dropdown element has "open" class
|
|
41
|
+
var hasOpenClass = dropdownElement.classList.contains(animationOpen);
|
|
42
|
+
if (!isContainsTarget && hasOpenClass) {
|
|
43
|
+
// Trigger close event with animation
|
|
44
|
+
// dropdownElement.click() - trigger "onClickWindow" again
|
|
45
|
+
setIsOpen(false);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
// Add event listener for current dropdown on first render
|
|
50
|
+
window.addEventListener('click', onClickWindow);
|
|
51
|
+
return function () {
|
|
52
|
+
// Remove event listener for current dropdown on unmount
|
|
53
|
+
window.removeEventListener('click', onClickWindow);
|
|
54
|
+
};
|
|
55
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
56
|
+
}, []);
|
|
57
|
+
var propsGenerator = useDevicePropsGenerator(props);
|
|
58
|
+
var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass;
|
|
59
|
+
// @ts-expect-error
|
|
60
|
+
var styles = useStyles(props).styles;
|
|
61
|
+
return (jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), set && "dropdown_set_".concat(set), shapeClass && "dropdown_shape_".concat(shapeClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, children && (jsx("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
|
|
62
|
+
// Add "onAnimationEnd" only for wrapper for ignore dropdown button
|
|
63
|
+
onAnimationEnd: onAnimationEnd, children: children })), after] }));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var dropdownAppearanceSurface = {
|
|
67
|
+
surfacePrimary: {
|
|
68
|
+
fill: 'surfacePrimary',
|
|
69
|
+
fillHover: 'surfacePrimaryHover',
|
|
70
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
71
|
+
},
|
|
72
|
+
surfaceQuaternary: {
|
|
73
|
+
fill: 'surfaceQuaternary',
|
|
74
|
+
fillHover: 'surfaceQuaternaryHover',
|
|
75
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
76
|
+
},
|
|
77
|
+
surfaceSecondary: {
|
|
78
|
+
fill: 'surfaceSecondary',
|
|
79
|
+
fillHover: 'surfaceSecondaryHover',
|
|
80
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
81
|
+
loaderFill: 'surfaceSecondary',
|
|
82
|
+
loaderItemFill: 'surfaceItemPrimary',
|
|
83
|
+
},
|
|
84
|
+
surfaceTertiary: {
|
|
85
|
+
fill: 'surfaceTertiary',
|
|
86
|
+
fillHover: 'surfaceTertiaryHover',
|
|
87
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
var dropdownItemAppearance = __assign({}, dropdownAppearanceSurface);
|
|
92
|
+
|
|
93
|
+
var dropdownItemConfig = {
|
|
94
|
+
appearance: dropdownItemAppearance,
|
|
95
|
+
setAppearance: function (appearanceConfig) {
|
|
96
|
+
dropdownItemConfig.appearance = appearanceConfig;
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
function DropdownItem(props) {
|
|
100
|
+
var className = props.className, appearance = props.appearance, label = props.label, desc = props.desc, isDisabled = props.isDisabled, showDivider = props.showDivider, before = props.before, after = props.after, isActive = props.isActive, isHover = props.isHover, set = props.set, onClick = props.onClick, onMouseEnter = props.onMouseEnter, children = props.children;
|
|
101
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
|
|
102
|
+
var _a;
|
|
103
|
+
return (__assign(__assign({}, resultAppearance), (_a = dropdownItemConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
104
|
+
}, {});
|
|
105
|
+
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
106
|
+
var directionClass = propsGenerator.directionClass, justifyContentClass = propsGenerator.justifyContentClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextAlign = propsGenerator.labelTextAlign, labelTextColor = propsGenerator.labelTextColor, labelTextColorActive = propsGenerator.labelTextColorActive, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextGradient = propsGenerator.labelTextGradient, labelTextSize = propsGenerator.labelTextSize, labelTextStyle = propsGenerator.labelTextStyle, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, descTextColor = propsGenerator.descTextColor, descTextColorHover = propsGenerator.descTextColorHover, descTextGradient = propsGenerator.descTextGradient, descTextSize = propsGenerator.descTextSize, descTextStyle = propsGenerator.descTextStyle, descTextWeight = propsGenerator.descTextWeight, descTextWrap = propsGenerator.descTextWrap, dividerDirection = propsGenerator.dividerDirection, dividerFill = propsGenerator.dividerFill, dividerSize = propsGenerator.dividerSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, typeClass = propsGenerator.typeClass, widthClass = propsGenerator.widthClass;
|
|
107
|
+
// @ts-expect-error
|
|
108
|
+
var dropdownItem = useStyles(props).styles;
|
|
109
|
+
return (jsxs("div", { className: clsx('dropdown__item', isActive && 'dropdown__item_state_active', isHover && 'dropdown__item_state_hover', fillClass && !isActive
|
|
110
|
+
? "fill_".concat(fillClass)
|
|
111
|
+
: "fill_active_".concat(fillActiveClass), fillHoverClass && !isDisabled && !isActive
|
|
112
|
+
? "fill_hover_".concat(fillHoverClass)
|
|
113
|
+
: "fill_active_hover_".concat(fillActiveHoverClass), directionClass && "dropdown__item_direction_".concat(directionClass), className, fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), sizeClass && "dropdown__item_size_".concat(sizeClass), shapeClass && "dropdown__item_shape_".concat(shapeClass), typeClass && "dropdown__item_type_".concat(typeClass), widthClass && "dropdown__item_width_".concat(widthClass), isDisabled && "dropdown__item_state_disabled", onClick && 'cursor_type_pointer', set && "dropdown__item_set_".concat(set), justifyContentClass &&
|
|
114
|
+
"dropdown__item_justify-content_".concat(justifyContentClass)), style: dropdownItem, onClick: onClick, onMouseEnter: onMouseEnter, children: [jsx("div", { className: "dropdown__item-wrapper", children: jsxs(React.Fragment, { children: [before, children || (jsxs(React.Fragment, { children: [label && (jsx(Text, { className: "dropdown__item-label", size: labelTextSize, textAlign: labelTextAlign, textColor: labelTextColor, textColorActive: isActive ? labelTextColorActive : undefined, textColorGradient: labelTextGradient, textColorHover: labelTextColorHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })), desc && (jsx(Text, { className: "dropdown__item-desc", size: descTextSize, textColor: descTextColor, textColorGradient: descTextGradient, textColorHover: descTextColorHover, textStyle: descTextStyle, textWeight: descTextWeight, textWrap: descTextWrap, children: desc }))] })), after] }) }), showDivider && (jsx(Divider, { width: "fill", direction: dividerDirection, size: dividerSize, fill: dividerFill }))] }));
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export { Dropdown as D, DropdownItem as a, dropdownItemConfig as b, dropdownItemAppearance as d };
|