@itcase/ui 1.4.13 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Badge-DnWTbwXq.js → Badge-JXM0G_0I.js} +28 -28
- package/dist/{Badge-BxT2_kz_.js → Badge-ydSHGXSG.js} +29 -29
- package/dist/{Button-BiJZz4Bx.js → Button-BmSyIDb_.js} +14 -14
- package/dist/{Button-xYLCmT3D.js → Button-DCtRrkgc.js} +15 -15
- 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-BOEOspTF.js +63 -0
- package/dist/{Icon-BcBOnVKH.js → Icon-DU2T-nfY.js} +9 -7
- 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-UmzWKcxT.js} +18 -11
- package/dist/{Link-DaKqf1pb.js → Link-aBsZ1d0Q.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 +32 -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
package/dist/components/Cell.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import { _ as __assign } from '../tslib.es6-Bwu1Cn-t.js';
|
|
1
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
3
|
import clsx from 'clsx';
|
|
3
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
4
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
5
|
-
import { I as Icon } from '../Icon-
|
|
6
|
-
import { L as Label } from '../Label-
|
|
7
|
-
import { T as Text } from '../Text-
|
|
8
|
-
import '../tslib.es6-5FtW-kfi.js';
|
|
6
|
+
import { I as Icon } from '../Icon-BOEOspTF.js';
|
|
7
|
+
import { L as Label } from '../Label-CfE08vBy.js';
|
|
8
|
+
import { T as Text } from '../Text-CI2prtf6.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'lodash/camelCase';
|
|
11
11
|
import 'lodash/castArray';
|
|
12
12
|
import 'lodash/upperFirst';
|
|
13
|
+
import '../context/Notifications.js';
|
|
14
|
+
import 'uuid';
|
|
15
|
+
import '@itcase/common';
|
|
13
16
|
import '../context/UIContext.js';
|
|
14
17
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
15
18
|
import 'react-responsive';
|
|
@@ -17,9 +20,9 @@ import '../utils/setViewportProperty.js';
|
|
|
17
20
|
import 'lodash/maxBy';
|
|
18
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
19
22
|
import 'react-inlinesvg';
|
|
20
|
-
import '../Link-
|
|
21
|
-
import '../Tooltip-
|
|
22
|
-
import '../Title-
|
|
23
|
+
import '../Link-aBsZ1d0Q.js';
|
|
24
|
+
import '../Tooltip-EOu0a93a.js';
|
|
25
|
+
import '../Title-CaXw1KBQ.js';
|
|
23
26
|
|
|
24
27
|
var cellAppearance = {
|
|
25
28
|
dev: {},
|
|
@@ -32,17 +35,19 @@ var cellConfig = {
|
|
|
32
35
|
},
|
|
33
36
|
};
|
|
34
37
|
function Cell(props) {
|
|
35
|
-
var className = props.className, appearance = props.appearance, title = props.title, titleIcon = props.titleIcon, titleIconFill = props.titleIconFill, titleIconFillHover = props.titleIconFillHover, titleIconFillSize = props.titleIconFillSize, titleIconItemFill = props.titleIconItemFill, titleIconShape = props.titleIconShape, titleIconSrc = props.titleIconSrc, titleLabel = props.titleLabel, titleLabelAppearance = props.titleLabelAppearance, titleLabelShape = props.titleLabelShape, titleLabelSize = props.titleLabelSize,
|
|
38
|
+
var className = props.className, appearance = props.appearance, size = props.size, title = props.title, titleIcon = props.titleIcon, titleIconFill = props.titleIconFill, titleIconFillHover = props.titleIconFillHover, titleIconFillSize = props.titleIconFillSize, titleIconItemFill = props.titleIconItemFill, titleIconShape = props.titleIconShape, titleIconSrc = props.titleIconSrc, titleLabel = props.titleLabel, titleLabelAppearance = props.titleLabelAppearance, titleLabelShape = props.titleLabelShape, titleLabelSize = props.titleLabelSize,
|
|
36
39
|
// titleLabelTextSize,
|
|
37
40
|
titleTag = props.titleTag, titleTextColor = props.titleTextColor,
|
|
38
41
|
// titleTextSize,
|
|
39
|
-
titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, mode = props.mode, reverse = props.reverse, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel,
|
|
42
|
+
titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, mode = props.mode, reverse = props.reverse, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel, value = props.value, valueIcon = props.valueIcon, valueIconFill = props.valueIconFill, valueIconFillHover = props.valueIconFillHover, valueIconFillSize = props.valueIconFillSize, valueIconItemFill = props.valueIconItemFill, valueIconShape = props.valueIconShape, valueIconSrc = props.valueIconSrc, valueLabel = props.valueLabel, valueLabelAppearance = props.valueLabelAppearance, valueLabelShape = props.valueLabelShape, valueLabelSize = props.valueLabelSize,
|
|
40
43
|
// valueLabelTextSize,
|
|
41
44
|
valueTag = props.valueTag, valueTextAlign = props.valueTextAlign, valueTextColor = props.valueTextColor,
|
|
42
45
|
// valueTextSize,
|
|
43
|
-
valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, before = props.before, after = props.after, isActive = props.isActive,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, before = props.before, after = props.after, isActive = props.isActive, isEqual = props.isEqual, set = props.set, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
47
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
|
|
48
|
+
var _a;
|
|
49
|
+
return (__assign(__assign({}, resultAppearance), (_a = cellConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
50
|
+
}, {});
|
|
46
51
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
47
52
|
/* eslint-disable perfectionist/sort-objects */
|
|
48
53
|
// Values for "Desktop*" or "Tablet*" or "Mobile*" device type
|
|
@@ -58,7 +63,7 @@ function Cell(props) {
|
|
|
58
63
|
bgFillDisabledClass &&
|
|
59
64
|
"fill_disabled_".concat(bgFillDisabledClass), bgShapeClass && "cell_shape_".concat(bgShapeClass), widthClass && !(cellStyles === null || cellStyles === void 0 ? void 0 : cellStyles.width) && "width_".concat(widthClass), zeroPadding && 'cell_reset-padding', zeroGap && 'cell_reset-gap', reverse && 'cell_reverse'), style: cellStyles, onClick: onClick, onMouseEnter: onMouseEnter, children: [before && jsx("div", { className: "cell__before", children: before }), jsxs("div", { className: clsx('cell__wrapper', directionClass && "cell__wrapper_direction_".concat(directionClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), isActive && fillActiveClass && "fill_active_".concat(fillActiveClass), isDisabled &&
|
|
60
65
|
fillDisabledClass &&
|
|
61
|
-
"fill_disabled_".concat(fillDisabledClass), shapeClass && "cell__wrapper_shape_".concat(shapeClass), isEqual && 'cell__wrapper-equal'), children: [title && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__title", textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap,
|
|
66
|
+
"fill_disabled_".concat(fillDisabledClass), shapeClass && "cell__wrapper_shape_".concat(shapeClass), isEqual && 'cell__wrapper-equal'), children: [title && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__title", size: titleTextSize, textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, tag: titleTag, children: title }), (titleIcon || titleIconSrc) && (jsx(Icon, { className: "cell__icon", fill: titleIconFill, fillSize: titleIconFillSize, iconFill: titleIconItemFill, iconFillHover: titleIconFillHover, imageSrc: titleIconSrc, shape: titleIconShape, SvgImage: titleIcon })), showTitleLabel && (jsx(Label, { appearance: titleLabelAppearance, size: titleLabelSize, label: titleLabel, labelTextSize: titleLabelTextSize, shape: titleLabelShape }))] })), value && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__value", size: valueTextSize, textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, tag: valueTag, children: value }), (valueIcon || valueIconSrc) && (jsx(Icon, { className: "cell__icon", fill: valueIconFill, fillSize: valueIconFillSize, iconFill: valueIconItemFill, iconFillHover: valueIconFillHover, imageSrc: valueIconSrc, shape: valueIconShape, SvgImage: valueIcon })), showValueLabel && (jsx(Label, { appearance: valueLabelAppearance, size: valueLabelSize, label: valueLabel, labelTextSize: valueLabelTextSize, shape: valueLabelShape }))] }))] }), after && jsx("div", { className: "cell__after", children: after })] }));
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
export { Cell, cellAppearance, cellConfig };
|
|
@@ -1,12 +1,15 @@
|
|
|
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
|
-
import { T as Text } from '../Text-
|
|
5
|
+
import { T as Text } from '../Text-CI2prtf6.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import 'lodash/upperFirst';
|
|
10
|
+
import '../context/Notifications.js';
|
|
11
|
+
import 'uuid';
|
|
12
|
+
import '@itcase/common';
|
|
10
13
|
import '../context/UIContext.js';
|
|
11
14
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
12
15
|
import 'react-responsive';
|
|
@@ -17,10 +20,10 @@ import '../hooks/useStyles/styleAttributes.js';
|
|
|
17
20
|
|
|
18
21
|
var checkboxAppearance = {
|
|
19
22
|
dev: {
|
|
20
|
-
descTextColor: 'surfaceTextPrimary',
|
|
21
|
-
descTextSize: 'm',
|
|
22
23
|
labelTextColor: 'surfaceTextPrimary',
|
|
23
24
|
labelTextSize: 'm',
|
|
25
|
+
descTextColor: 'surfaceTextPrimary',
|
|
26
|
+
descTextSize: 'm',
|
|
24
27
|
stateBorderColor: 'surfaceBorderQuaternary',
|
|
25
28
|
stateBorderWidth: '1',
|
|
26
29
|
stateCheckmarkFill: 'accentItemPrimary',
|
|
@@ -60,9 +63,9 @@ function Checkbox(props) {
|
|
|
60
63
|
var stateCheckmarkFillClass = propsGenerator.getClassName(disabled ? 'stateCheckmarkFillDisabled' : 'stateCheckmarkFill', { prefix: 'checkbox_checkmark_fill_' });
|
|
61
64
|
var stateBorderColorClass = propsGenerator.getClassName(checked ? 'stateBorderColorChecked' : 'stateBorderColor', { prefix: 'border-color_' });
|
|
62
65
|
var stateBorderColorDisabledClass = propsGenerator.getClassName(checked ? 'stateBorderColorDisabledChecked' : 'stateBorderColorDisabled', { prefix: 'border-color_' });
|
|
63
|
-
return (jsxs(Tag, { className: clsx(className, 'checkbox', fillClass && "fill_".concat(fillClass), shapeClass && "checkbox_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass), isSkeleton && "checkbox_skeleton"), htmlFor: Tag === 'label' && id, children: [before, jsxs("div", { className: clsx('checkbox__item', stateCheckmarkFillClass), children: [jsx("input", {
|
|
66
|
+
return (jsxs(Tag, { className: clsx(className, 'checkbox', fillClass && "fill_".concat(fillClass), shapeClass && "checkbox_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass), isSkeleton && "checkbox_skeleton"), htmlFor: Tag === 'label' && id, children: [before, jsxs("div", { className: clsx('checkbox__item', stateCheckmarkFillClass), children: [jsx("input", {
|
|
64
67
|
// @ts-expect-error
|
|
65
|
-
id: id, type: "checkbox", value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsx("div", { className: clsx('checkbox__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass, stateShapeClass && "checkbox__state_shape_".concat(stateShapeClass), stateBorderWidthClass && "border-width_".concat(stateBorderWidthClass)), children: "\u00A0" }), jsx("div", { className: "checkbox__state-checkmark", children: "\u00A0" })] }), label && (jsx(Text, { className: "checkbox__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textColor: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "checkbox__desc", size: descTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextSize), textColor: descTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextColor), textWeight: descTextWeight, children: desc })), after && jsx("div", { className: "checkbox__after", children: after })] }));
|
|
68
|
+
id: id, className: "checkbox__input", type: "checkbox", disabled: disabled, checked: checked, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus }), jsx("div", { className: clsx('checkbox__state', disabled ? stateFillDisabledClass : stateFillClass, disabled ? stateBorderColorDisabledClass : stateBorderColorClass, stateShapeClass && "checkbox__state_shape_".concat(stateShapeClass), stateBorderWidthClass && "border-width_".concat(stateBorderWidthClass)), children: "\u00A0" }), jsx("div", { className: "checkbox__state-checkmark", children: "\u00A0" })] }), label && (jsx(Text, { className: "checkbox__label", size: labelTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextSize), textColor: labelTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelTextColor), textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "checkbox__desc", size: descTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextSize), textColor: descTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.descTextColor), textWeight: descTextWeight, children: desc })), after && jsx("div", { className: "checkbox__after", children: after })] }));
|
|
66
69
|
}
|
|
67
70
|
|
|
68
71
|
export { Checkbox, checkboxAppearance, checkboxConfig, checkboxState };
|
|
@@ -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';
|
|
@@ -7,6 +7,9 @@ import 'react';
|
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import 'lodash/upperFirst';
|
|
10
|
+
import '../context/Notifications.js';
|
|
11
|
+
import 'uuid';
|
|
12
|
+
import '@itcase/common';
|
|
10
13
|
import '../context/UIContext.js';
|
|
11
14
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
12
15
|
import 'react-responsive';
|
|
@@ -68,7 +71,7 @@ var checkmarkConfig = {
|
|
|
68
71
|
},
|
|
69
72
|
};
|
|
70
73
|
function Checkmark(props) {
|
|
71
|
-
var className = props.className, appearance = props.appearance,
|
|
74
|
+
var className = props.className, appearance = props.appearance, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, isChecked = props.isChecked, onClick = props.onClick;
|
|
72
75
|
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultApperance, appearance) {
|
|
73
76
|
var _a;
|
|
74
77
|
return (__assign(__assign({}, resultApperance), (_a = checkmarkConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
@@ -77,8 +80,7 @@ function Checkmark(props) {
|
|
|
77
80
|
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderWidthClass = propsGenerator.borderWidthClass, checkmarkFillClass = propsGenerator.checkmarkFillClass, sizeClass = propsGenerator.sizeClass;
|
|
78
81
|
// @ts-expect-error
|
|
79
82
|
var checkmarkStyles = useStyles(props).styles;
|
|
80
|
-
return (jsx("div", { className: clsx(className, 'checkmark', sizeClass && "checkmark_size_".concat(sizeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_".concat(fillHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderColorHoverClass &&
|
|
81
|
-
"border-color_hover_".concat(borderColorHoverClass), borderColorClass && "border-color_".concat(borderColorClass), isDisabled), style: checkmarkStyles, onClick: onClick, children: isChecked && (jsx("div", { className: clsx('checkmark__icon', "svg_fill_".concat(checkmarkFillClass)), children: jsx("svg", { width: "32", height: "24", fill: "none", viewBox: "0 0 32 24", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { fill: "none", d: "M28.0896 0.706312L11.4967 18.1772L3.9104 10.1895C3.01576 9.24775 1.56549 9.24775 0.670845 10.1895C-0.223615 11.1315 -0.223615 12.6585 0.670845 13.6005L9.87695 23.2936C10.3243 23.7644 10.9105 24 11.4967 24C12.083 24 12.6692 23.7644 13.1165 23.2936L31.3292 4.11744C32.2236 3.17547 32.2236 1.64848 31.3292 0.706504C30.4345 -0.235469 28.9841 -0.235469 28.0896 0.706312Z" }) }) })) }));
|
|
83
|
+
return (jsx("div", { className: clsx(className, 'checkmark', sizeClass && "checkmark_size_".concat(sizeClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_".concat(fillHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderColorClass && "border-color_".concat(borderColorClass), isDisabled), style: checkmarkStyles, onClick: onClick, children: isChecked && (jsx("div", { className: clsx('checkmark__icon', "svg_fill_".concat(checkmarkFillClass)), children: jsx("svg", { width: "32", height: "24", fill: "none", viewBox: "0 0 32 24", xmlns: "http://www.w3.org/2000/svg", children: jsx("path", { fill: "none", d: "M28.0896 0.706312L11.4967 18.1772L3.9104 10.1895C3.01576 9.24775 1.56549 9.24775 0.670845 10.1895C-0.223615 11.1315 -0.223615 12.6585 0.670845 13.6005L9.87695 23.2936C10.3243 23.7644 10.9105 24 11.4967 24C12.083 24 12.6692 23.7644 13.1165 23.2936L31.3292 4.11744C32.2236 3.17547 32.2236 1.64848 31.3292 0.706504C30.4345 -0.235469 28.9841 -0.235469 28.0896 0.706312Z" }) }) })) }));
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
export { Checkmark, checkmarkAppearance, checkmarkConfig };
|
package/dist/components/Chips.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
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 { useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
6
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
-
import { I as Icon } from '../Icon-
|
|
8
|
-
import { T as Text } from '../Text-
|
|
7
|
+
import { I as Icon } from '../Icon-BOEOspTF.js';
|
|
8
|
+
import { T as Text } from '../Text-CI2prtf6.js';
|
|
9
9
|
import 'lodash/camelCase';
|
|
10
10
|
import 'lodash/castArray';
|
|
11
11
|
import 'lodash/upperFirst';
|
|
12
|
+
import '../context/Notifications.js';
|
|
13
|
+
import 'uuid';
|
|
14
|
+
import '@itcase/common';
|
|
12
15
|
import '../context/UIContext.js';
|
|
13
16
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
14
17
|
import 'react-responsive';
|
|
@@ -16,9 +19,9 @@ import '../utils/setViewportProperty.js';
|
|
|
16
19
|
import 'lodash/maxBy';
|
|
17
20
|
import '../hooks/useStyles/styleAttributes.js';
|
|
18
21
|
import 'react-inlinesvg';
|
|
19
|
-
import '../Link-
|
|
20
|
-
import '../Tooltip-
|
|
21
|
-
import '../Title-
|
|
22
|
+
import '../Link-aBsZ1d0Q.js';
|
|
23
|
+
import '../Tooltip-EOu0a93a.js';
|
|
24
|
+
import '../Title-CaXw1KBQ.js';
|
|
22
25
|
|
|
23
26
|
var chipsAppearanceAccent = {
|
|
24
27
|
accent: {
|
|
@@ -35,7 +38,9 @@ var chipsAppearanceDisabled = {
|
|
|
35
38
|
disabled: {
|
|
36
39
|
fill: 'disabledPrimary',
|
|
37
40
|
fillActive: 'disabledPrimary',
|
|
41
|
+
fillHover: 'disabledPrimary',
|
|
38
42
|
labelTextColor: 'disabledTextPrimary',
|
|
43
|
+
labelTextHoverColor: 'disabledTextPrimary',
|
|
39
44
|
borderColor: 'disabledBorderPrimary',
|
|
40
45
|
},
|
|
41
46
|
};
|
|
@@ -70,8 +75,12 @@ var chipsAppearanceSuccess = {};
|
|
|
70
75
|
var chipsAppearanceSurface = {
|
|
71
76
|
surfacePrimary: {
|
|
72
77
|
fill: 'surfacePrimary',
|
|
78
|
+
fillActive: 'accentPrimary',
|
|
79
|
+
fillActiveHover: 'accentSecondary',
|
|
73
80
|
fillHover: 'surfacePrimaryHover',
|
|
81
|
+
labelTextActiveColor: 'accentTextPrimary',
|
|
74
82
|
labelTextColor: 'surfaceTextPrimary',
|
|
83
|
+
labelTextHoverColor: 'surfaceTextPrimary',
|
|
75
84
|
borderColor: 'surfaceBorderTertiary',
|
|
76
85
|
},
|
|
77
86
|
surfaceSecondary: {
|
|
@@ -99,26 +108,35 @@ var chipsConfig = {
|
|
|
99
108
|
},
|
|
100
109
|
};
|
|
101
110
|
function Chips(props) {
|
|
102
|
-
var className = props.className, appearance = props.appearance, _a = props.label, label = _a === void 0 ? '' : _a, dataTestId = props.dataTestId, dataTour = props.dataTour, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, isActive = props.isActive,
|
|
111
|
+
var className = props.className, appearance = props.appearance, _a = props.label, label = _a === void 0 ? '' : _a, isDisabled = props.isDisabled, dataTestId = props.dataTestId, dataTour = props.dataTour, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, isActive = props.isActive, onClick = props.onClick, children = props.children;
|
|
103
112
|
var appearanceConfig = useMemo(function () {
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
113
|
+
if (appearance) {
|
|
114
|
+
var appearanceProps = appearance.split(' ').reduce(function (resultApperance, appearance) {
|
|
115
|
+
var _a;
|
|
116
|
+
return (__assign(__assign({}, resultApperance), (_a = chipsConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
117
|
+
}, {});
|
|
118
|
+
if (isDisabled && chipsConfig.appearance.disabled) {
|
|
119
|
+
Object.assign(appearanceProps, chipsConfig.appearance.disabled);
|
|
120
|
+
}
|
|
121
|
+
return appearanceProps;
|
|
110
122
|
}
|
|
111
|
-
|
|
123
|
+
if (isDisabled) {
|
|
124
|
+
return chipsConfig.appearance.disabled;
|
|
125
|
+
}
|
|
126
|
+
return {};
|
|
112
127
|
}, [appearance, isDisabled]);
|
|
113
128
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
114
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextColor = propsGenerator.labelTextColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
|
|
129
|
+
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
|
|
115
130
|
// @ts-expect-error
|
|
116
131
|
var chipsStyles = useStyles(props).styles;
|
|
132
|
+
console.log(fillClass);
|
|
117
133
|
return (jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', fillClass && !isActive
|
|
118
134
|
? "fill_".concat(fillClass)
|
|
119
|
-
: "fill_active_".concat(fillActiveClass),
|
|
120
|
-
? "fill_hover_".concat(fillHoverClass)
|
|
121
|
-
: "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor,
|
|
135
|
+
: "fill_active_".concat(fillActiveClass), !isActive
|
|
136
|
+
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
137
|
+
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColor: labelTextColor, textColorActive: isActive && labelTextActiveColor, textColorHover: !isDisabled && !isActive
|
|
138
|
+
? labelTextHoverColor
|
|
139
|
+
: labelTextActiveHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter }))] }) }));
|
|
122
140
|
}
|
|
123
141
|
|
|
124
142
|
export { Chips, chipsAppearance, chipsConfig };
|
|
@@ -1,47 +1,50 @@
|
|
|
1
|
+
import { _ as __assign } from '../tslib.es6-Bwu1Cn-t.js';
|
|
1
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
3
|
import React, { useRef, useMemo, createRef, useCallback } from 'react';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
|
-
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
7
|
+
import { I as Icon } from '../Icon-BOEOspTF.js';
|
|
8
|
+
import { L as Loader } from '../Loader-CRN4MAbm.js';
|
|
9
|
+
import { T as Text } from '../Text-CI2prtf6.js';
|
|
9
10
|
import 'lodash/camelCase';
|
|
10
|
-
import 'lodash/
|
|
11
|
+
import 'lodash/castArray';
|
|
11
12
|
import 'lodash/upperFirst';
|
|
13
|
+
import '../context/Notifications.js';
|
|
14
|
+
import 'uuid';
|
|
15
|
+
import '@itcase/common';
|
|
12
16
|
import '../context/UIContext.js';
|
|
13
|
-
import '../tslib.es6-5FtW-kfi.js';
|
|
14
17
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
15
18
|
import 'react-responsive';
|
|
16
19
|
import '../utils/setViewportProperty.js';
|
|
20
|
+
import 'lodash/maxBy';
|
|
17
21
|
import '../hooks/useStyles/styleAttributes.js';
|
|
18
|
-
import 'lodash/castArray';
|
|
19
22
|
import 'react-inlinesvg';
|
|
20
|
-
import '../Link-
|
|
21
|
-
import '../Tooltip-
|
|
22
|
-
import '../Title-
|
|
23
|
+
import '../Link-aBsZ1d0Q.js';
|
|
24
|
+
import '../Tooltip-EOu0a93a.js';
|
|
25
|
+
import '../Title-CaXw1KBQ.js';
|
|
23
26
|
|
|
24
27
|
var choiceAppearance = {
|
|
25
28
|
accent: {
|
|
26
|
-
|
|
29
|
+
size: 'normal',
|
|
27
30
|
fill: 'surfacePrimary',
|
|
28
31
|
fillActive: 'accentPrimary',
|
|
29
32
|
labelTextActiveColor: 'accentTextPrimary',
|
|
30
33
|
labelTextColor: 'surfaceTextPrimary',
|
|
31
34
|
labelTextSize: 's',
|
|
35
|
+
borderColor: 'surfaceBorderSecondary',
|
|
32
36
|
shape: 'rounded',
|
|
33
|
-
size: 'normal',
|
|
34
37
|
},
|
|
35
38
|
dev: {
|
|
36
|
-
|
|
39
|
+
size: 'normal',
|
|
37
40
|
fill: 'surfacePrimary',
|
|
38
41
|
fillActive: 'surfaceTertiary',
|
|
39
42
|
fillHover: 'surfacePrimaryHover',
|
|
40
43
|
labelTextActiveColor: 'surfaceTextPrimary',
|
|
41
44
|
labelTextColor: 'surfaceTextPrimary',
|
|
42
45
|
labelTextSize: 'm',
|
|
46
|
+
borderColor: 'surfaceBorderTertiary',
|
|
43
47
|
shape: 'rounded',
|
|
44
|
-
size: 'normal',
|
|
45
48
|
},
|
|
46
49
|
};
|
|
47
50
|
|
|
@@ -52,7 +55,7 @@ var choiceConfig = {
|
|
|
52
55
|
},
|
|
53
56
|
};
|
|
54
57
|
function Choice(props) {
|
|
55
|
-
var id = props.id, className = props.className, type = props.type, name = props.name, appearance = props.appearance, _a = props.size, size = _a === void 0 ? 'normal' : _a, labelTextActiveColor = props.labelTextActiveColor, labelTextColor = props.labelTextColor, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, iconFillDisabled = props.iconFillDisabled,
|
|
58
|
+
var id = props.id, className = props.className, type = props.type, name = props.name, appearance = props.appearance, _a = props.size, size = _a === void 0 ? 'normal' : _a, labelTextActiveColor = props.labelTextActiveColor, labelTextActiveColorDisabled = props.labelTextActiveColorDisabled, labelTextColor = props.labelTextColor, labelTextColorDisabled = props.labelTextColorDisabled, labelTextSize = props.labelTextSize, labelTextWeight = props.labelTextWeight, iconFillDisabled = props.iconFillDisabled, _b = props.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = props.active, active = _c === void 0 ? { value: undefined } : _c, activeIcon = props.activeIcon, activeIconItemFill = props.activeIconItemFill, dataTestId = props.dataTestId, dataTour = props.dataTour, icon = props.icon, iconItemFill = props.iconItemFill, iconSize = props.iconSize, _d = props.options, options = _d === void 0 ? [] : _d, before = props.before, after = props.after, _e = props.isCheckbox, isCheckbox = _e === void 0 ? false : _e, _f = props.isLoading, isLoading = _f === void 0 ? false : _f, set = props.set, setActiveSegment = props.setActiveSegment;
|
|
56
59
|
var controlRef = useRef(null);
|
|
57
60
|
var optionsRefs = useMemo(function () {
|
|
58
61
|
return new Map(options.map(function (item) { return [item.value, createRef()]; }));
|
|
@@ -61,9 +64,12 @@ function Choice(props) {
|
|
|
61
64
|
var isChecked = isCheckbox ? event.target.checked : true;
|
|
62
65
|
setActiveSegment && setActiveSegment(item, isChecked);
|
|
63
66
|
}, [isCheckbox, setActiveSegment]);
|
|
64
|
-
var appearanceConfig =
|
|
67
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
|
|
68
|
+
var _a;
|
|
69
|
+
return (__assign(__assign({}, resultAppearance), (_a = choiceConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
70
|
+
}, {});
|
|
65
71
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
66
|
-
var fillActiveClass = propsGenerator.fillActiveClass,
|
|
72
|
+
var fillActiveClass = propsGenerator.fillActiveClass, fillActiveDisabledClass = propsGenerator.fillActiveDisabledClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, shapeClass = propsGenerator.shapeClass, wrapClass = propsGenerator.wrapClass;
|
|
67
73
|
// @ts-expect-error
|
|
68
74
|
var styles = useStyles(props).styles;
|
|
69
75
|
return (jsx("div", { id: id, className: clsx(className, 'choice', shapeClass && "choice_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), set && "choice_set_".concat(set), size && "choice_size_".concat(size), type && "choice_type_".concat(type), wrapClass && "choice_wrap_".concat(wrapClass)), "data-testid": dataTestId && "".concat(dataTestId, "Button"), "data-tour": dataTour, ref: controlRef, style: styles, children: isLoading ? (jsx(Loader, { width: "fill", height: "fill", fill: "surfacePrimary", itemFill: "surfaceItemAccent", set: "simple" })) : (jsx(React.Fragment, { children: options.map(function (item) {
|
package/dist/components/Code.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 { useState, useEffect } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
@@ -7,6 +7,9 @@ import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDev
|
|
|
7
7
|
import 'lodash/camelCase';
|
|
8
8
|
import 'lodash/castArray';
|
|
9
9
|
import 'lodash/upperFirst';
|
|
10
|
+
import '../context/Notifications.js';
|
|
11
|
+
import 'uuid';
|
|
12
|
+
import '@itcase/common';
|
|
10
13
|
import '../context/UIContext.js';
|
|
11
14
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
12
15
|
import 'react-responsive';
|
|
@@ -25,10 +28,12 @@ var codeConfig = {
|
|
|
25
28
|
function Code(props) {
|
|
26
29
|
var className = props.className, appearance = props.appearance, inputAutoFocus = props.inputAutoFocus, _a = props.inputCount, inputCount = _a === void 0 ? 6 : _a, _b = props.inputPlaceholder, inputPlaceholder = _b === void 0 ? 0 : _b, _c = props.inputType, inputType = _c === void 0 ? 'number' : _c, separatorComponent = props.separatorComponent, before = props.before, after = props.after, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus;
|
|
27
30
|
var _d = useState(''), otp = _d[0], setOtp = _d[1];
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
|
|
32
|
+
var _a;
|
|
33
|
+
return (__assign(__assign({}, resultAppearance), (_a = codeConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
34
|
+
}, {});
|
|
30
35
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
31
|
-
var
|
|
36
|
+
var inputBorderColorClass = propsGenerator.inputBorderColorClass, inputBorderColorHoverClass = propsGenerator.inputBorderColorHoverClass, inputBorderFocusColorClass = propsGenerator.inputBorderFocusColorClass, inputBorderWidthClass = propsGenerator.inputBorderWidthClass, inputCaretColorClass = propsGenerator.inputCaretColorClass, inputFillClass = propsGenerator.inputFillClass, inputFillHoverClass = propsGenerator.inputFillHoverClass, inputPlaceholderTextColorClass = propsGenerator.inputPlaceholderTextColorClass, inputShapeClass = propsGenerator.inputShapeClass, inputSizeClass = propsGenerator.inputSizeClass, inputTextColorClass = propsGenerator.inputTextColorClass, inputTextSizeClass = propsGenerator.inputTextSizeClass, inputTextWeightClass = propsGenerator.inputTextWeightClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
32
37
|
// NOTE: too many dependencies for "useCallback" and possible too many checks
|
|
33
38
|
var renderInput = function (otpInputProps, index) {
|
|
34
39
|
return (jsx("input", __assign({}, otpInputProps, { className: clsx('code__input', inputCaretColorClass && "caret-color_".concat(inputCaretColorClass), inputFillClass && "fill_".concat(inputFillClass), inputFillHoverClass && "fill_hover_".concat(inputFillHoverClass), inputPlaceholderTextColorClass &&
|
|
@@ -45,7 +50,7 @@ function Code(props) {
|
|
|
45
50
|
useEffect(function () {
|
|
46
51
|
onChange && onChange(otp);
|
|
47
52
|
}, [otp]);
|
|
48
|
-
return (jsxs("div", { className: clsx(className, 'code', widthClass), children: [before, jsx(OtpInput, { containerStyle: clsx(className, 'code__wrapper'
|
|
53
|
+
return (jsxs("div", { className: clsx(className, 'code', widthClass, sizeClass && "code_size_".concat(sizeClass)), children: [before, jsx(OtpInput, { containerStyle: clsx(className, 'code__wrapper'), inputType: inputType, numInputs: inputCount, placeholder: inputPlaceholder, renderInput: renderInput, renderSeparator: separatorComponent || null, shouldAutoFocus: inputAutoFocus, value: otp, onChange: setOtp }), after] }));
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
export { Code, codeAppearance, codeConfig };
|
|
@@ -3,29 +3,32 @@ import { useRef, useMemo, useCallback, useEffect } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Cookies from 'js-cookie';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { B as Button } from '../Button-
|
|
7
|
-
import { G as Group } from '../Group-
|
|
8
|
-
import { T as Text } from '../Text-
|
|
9
|
-
import '../tslib.es6-
|
|
6
|
+
import { B as Button } from '../Button-DCtRrkgc.js';
|
|
7
|
+
import { G as Group } from '../Group-OkygpKiJ.js';
|
|
8
|
+
import { T as Text } from '../Text-CI2prtf6.js';
|
|
9
|
+
import '../tslib.es6-Bwu1Cn-t.js';
|
|
10
10
|
import 'lodash/camelCase';
|
|
11
11
|
import 'lodash/castArray';
|
|
12
12
|
import 'lodash/upperFirst';
|
|
13
|
+
import '../context/Notifications.js';
|
|
14
|
+
import 'uuid';
|
|
15
|
+
import '@itcase/common';
|
|
13
16
|
import '../context/UIContext.js';
|
|
14
17
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
15
18
|
import 'react-responsive';
|
|
16
19
|
import '../utils/setViewportProperty.js';
|
|
17
|
-
import '../Icon-
|
|
20
|
+
import '../Icon-BOEOspTF.js';
|
|
18
21
|
import 'react-inlinesvg';
|
|
19
22
|
import '../hooks/useStyles/useStyles.js';
|
|
20
23
|
import 'lodash/maxBy';
|
|
21
24
|
import '../hooks/useStyles/styleAttributes.js';
|
|
22
|
-
import '../Link-
|
|
23
|
-
import '../Tooltip-
|
|
24
|
-
import '../Title-
|
|
25
|
-
import '../Loader-
|
|
25
|
+
import '../Link-aBsZ1d0Q.js';
|
|
26
|
+
import '../Tooltip-EOu0a93a.js';
|
|
27
|
+
import '../Title-CaXw1KBQ.js';
|
|
28
|
+
import '../Loader-CRN4MAbm.js';
|
|
26
29
|
|
|
27
30
|
function CookiesWarning(props) {
|
|
28
|
-
var _a = props.
|
|
31
|
+
var className = props.className, _a = props.message, message = _a === void 0 ? 'The site uses cookies to collect technical information, to optimize the design and improvement of the website, and to provide certain functions. By using the website, you agree to the use of «cookies».' : _a, textColor = props.textColor, textSize = props.textSize, buttonFill = props.buttonFill, buttonFillHover = props.buttonFillHover, _b = props.buttonLabel, buttonLabel = _b === void 0 ? 'I agree' : _b, buttonLabelSize = props.buttonLabelSize, buttonLabelTextColor = props.buttonLabelTextColor, buttonShape = props.buttonShape, buttonSize = props.buttonSize, buttonWidth = props.buttonWidth, _c = props.isHideOnScroll, isHideOnScroll = _c === void 0 ? false : _c;
|
|
29
32
|
var cookiesWarningRef = useRef(null);
|
|
30
33
|
var isOpen = useMemo(function () { return Cookies.get('cookies-warning') !== 'close'; }, []);
|
|
31
34
|
var closeCookiesWarning = useCallback(function () {
|
|
@@ -49,7 +52,7 @@ function CookiesWarning(props) {
|
|
|
49
52
|
}, [isOpen]);
|
|
50
53
|
var propsGenerator = useDevicePropsGenerator(props);
|
|
51
54
|
var fillClass = propsGenerator.fillClass, fillGradientClass = propsGenerator.fillGradientClass, gapClass = propsGenerator.gapClass;
|
|
52
|
-
return isOpen ? (jsx("div", { className: clsx('cookies-warning', className, fillClass && "fill_".concat(fillClass), fillGradientClass && "fill-gradient_".concat(fillGradientClass)), ref: cookiesWarningRef, children: jsxs(Group, { className: clsx('cookies-warning__inner', gapClass && "gap_".concat(gapClass)), direction: "vertical", children: [jsx(Text, { size: textSize, textColor: textColor, children: message }), jsx(Button, { width: buttonWidth,
|
|
55
|
+
return isOpen ? (jsx("div", { className: clsx('cookies-warning', className, fillClass && "fill_".concat(fillClass), fillGradientClass && "fill-gradient_".concat(fillGradientClass)), ref: cookiesWarningRef, children: jsxs(Group, { className: clsx('cookies-warning__inner', gapClass && "gap_".concat(gapClass)), direction: "vertical", children: [jsx(Text, { size: textSize, textColor: textColor, children: message }), jsx(Button, { width: buttonWidth, size: buttonSize, fill: buttonFill, fillHover: buttonFillHover, labelTextColor: buttonLabelTextColor, labelTextSize: buttonLabelSize, shape: buttonShape, onClick: closeCookiesWarning, children: buttonLabel })] }) })) : null;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
export { CookiesWarning };
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
import { _ as __assign,
|
|
1
|
+
import { _ as __assign, b as __rest } from '../tslib.es6-Bwu1Cn-t.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { PartySuggestions } from 'react-dadata';
|
|
6
|
-
import { I as Input } from '../Input-
|
|
6
|
+
import { I as Input } from '../Input-ChiH90mV.js';
|
|
7
7
|
import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import 'lodash/camelCase';
|
|
9
9
|
import 'lodash/castArray';
|
|
10
10
|
import 'lodash/upperFirst';
|
|
11
|
+
import '../context/Notifications.js';
|
|
12
|
+
import 'uuid';
|
|
13
|
+
import '@itcase/common';
|
|
11
14
|
import '../context/UIContext.js';
|
|
12
15
|
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
13
16
|
import 'react-responsive';
|
|
14
17
|
import '../utils/setViewportProperty.js';
|
|
15
18
|
|
|
16
19
|
function DadataHintField(props) {
|
|
17
|
-
var delay = props.delay, input = props.input, inputProps = props.inputProps, meta = props.meta,
|
|
20
|
+
var delay = props.delay, input = props.input, inputProps = props.inputProps, meta = props.meta, token = props.token, setValue = props.setValue;
|
|
18
21
|
var dadataInputProps = useMemo(function () {
|
|
19
|
-
return __assign(__assign({}, inputProps), { className: clsx('react-dadata__input', meta.active && 'input_state_focus', meta.error &&
|
|
22
|
+
return __assign(__assign({}, inputProps), { className: clsx('react-dadata__input', meta.active && 'input_state_focus', meta.error &&
|
|
23
|
+
meta.touched &&
|
|
24
|
+
"input_state_".concat(meta.error.key || 'error')),
|
|
20
25
|
// https://www.npmjs.com/package/react-dadata
|
|
21
26
|
// "Свойство value игнорируется."
|
|
22
27
|
// value: input.value,
|
|
@@ -31,7 +36,7 @@ function DadataHintField(props) {
|
|
|
31
36
|
input.onBlur,
|
|
32
37
|
input.onChange,
|
|
33
38
|
]);
|
|
34
|
-
return (jsx(PartySuggestions, { customInput: DadataСustomInput, delay: delay || 750, inputProps: dadataInputProps,
|
|
39
|
+
return (jsx(PartySuggestions, { minChars: 3, customInput: DadataСustomInput, delay: delay || 750, inputProps: dadataInputProps, token: token, onChange: setValue }));
|
|
35
40
|
}
|
|
36
41
|
function DadataСustomInput(props) {
|
|
37
42
|
var inputValue = props.inputValue, otherProps = __rest(props, ["inputValue"]);
|