@itcase/ui 1.2.34 → 1.3.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-B9tt2YPa.js +76 -0
- package/dist/{Badge-DBjlLLfX.js → Badge-DMRagi5O.js} +7 -45
- package/dist/Button-CX3x7Z6Q.js +99 -0
- package/dist/Button-P0c3lMg1.js +103 -0
- package/dist/Divider-DBvDCUqP.js +30 -0
- package/dist/Divider-Goh6mpPK.js +34 -0
- package/dist/DropdownItem-BuMJdUAk.js +92 -0
- package/dist/DropdownItem-DaN20LFe.js +97 -0
- package/dist/Group-B9L2NTgM.js +34 -0
- package/dist/Group-D6CXN4hS.js +38 -0
- package/dist/Icon-CZrDqG76.js +61 -0
- package/dist/Icon-hqYZoh4h.js +65 -0
- package/dist/Image-6dFSePnG.js +17 -0
- package/dist/Image-Dx4AWHLO.js +15 -0
- package/dist/Input-BrV5_NoV.js +95 -0
- package/dist/Input-ffioh1sj.js +100 -0
- package/dist/Label-DQyB2ThM.js +93 -0
- package/dist/Label-HKRKV3mn.js +97 -0
- package/dist/Link-DGj-cNje.js +53 -0
- package/dist/{Link-CeQuavin.js → Link-_A9ZfNln.js} +6 -52
- package/dist/Loader-Dn036JwE.js +56 -0
- package/dist/Loader-K_DJmah6.js +52 -0
- package/dist/MenuItem-Dokk3UXj.js +40 -0
- package/dist/MenuItem-LyqjzhjP.js +44 -0
- package/dist/Overlay-Dy6JQwJn.js +15 -0
- package/dist/Overlay-HlYxCGtp.js +17 -0
- package/dist/Text-Beslj4Ns.js +34 -0
- package/dist/Text-JayJa3hj.js +30 -0
- package/dist/Title-CHgrIarR.js +48 -0
- package/dist/Title-DBaHcpvB.js +52 -0
- package/dist/Tooltip-1Jbub0K6.js +89 -0
- package/dist/Tooltip-CNua1g76.js +93 -0
- package/dist/cjs/components/Accordion.js +14 -65
- package/dist/cjs/components/Avatar.js +14 -28
- package/dist/cjs/components/Badge.js +4 -3
- package/dist/cjs/components/Breadcrumbs.js +16 -48
- package/dist/cjs/components/Button.js +9 -9
- package/dist/cjs/components/Caption.js +5 -14
- package/dist/cjs/components/Card.js +7 -12
- package/dist/cjs/components/Cell.js +11 -61
- package/dist/cjs/components/Checkbox.js +15 -61
- package/dist/cjs/components/Chips.js +9 -55
- package/dist/cjs/components/Choice.js +20 -85
- package/dist/cjs/components/Code.js +9 -80
- package/dist/cjs/components/CookiesWarning.js +13 -22
- package/dist/cjs/components/DadataHintField.js +4 -4
- package/dist/cjs/components/DatePicker.js +20 -23
- package/dist/cjs/components/Divider.js +4 -2
- package/dist/cjs/components/Dot.js +5 -22
- package/dist/cjs/components/Drawer.js +3 -3
- package/dist/cjs/components/Dropdown.js +7 -6
- package/dist/cjs/components/Flex.js +8 -95
- package/dist/cjs/components/Grid.js +12 -125
- package/dist/cjs/components/Group.js +4 -2
- package/dist/cjs/components/HTMLContent.js +5 -74
- package/dist/cjs/components/Icon.js +7 -6
- package/dist/cjs/components/Image.js +3 -2
- package/dist/cjs/components/Input.js +5 -2
- package/dist/cjs/components/InputMask.js +27 -109
- package/dist/cjs/components/InputPassword.js +20 -83
- package/dist/cjs/components/Label.js +6 -5
- package/dist/cjs/components/Link.js +2 -2
- package/dist/cjs/components/List.js +15 -31
- package/dist/cjs/components/Loader.js +5 -3
- package/dist/cjs/components/Logo.js +8 -21
- package/dist/cjs/components/Menu.js +9 -23
- package/dist/cjs/components/MenuItem.js +6 -5
- package/dist/cjs/components/Modal.js +11 -43
- package/dist/cjs/components/ModalSheetBottom.js +4 -15
- package/dist/cjs/components/Notification.js +9 -18
- package/dist/cjs/components/Overlay.js +3 -2
- package/dist/cjs/components/Pagination.js +16 -36
- package/dist/cjs/components/Panel.js +10 -78
- package/dist/cjs/components/Radio.js +17 -61
- package/dist/cjs/components/RangeSlider.js +7 -39
- package/dist/cjs/components/Response.js +20 -65
- package/dist/cjs/components/SVGContent.js +5 -10
- package/dist/cjs/components/ScrollOnDrag.js +5 -35
- package/dist/cjs/components/ScrollToView.js +5 -46
- package/dist/cjs/components/Search.js +19 -81
- package/dist/cjs/components/Segmented.js +11 -53
- package/dist/cjs/components/Select.js +42 -160
- package/dist/cjs/components/SiteMenu.js +13 -15
- package/dist/cjs/components/Swiper.js +9 -22
- package/dist/cjs/components/Switch.js +5 -2
- package/dist/cjs/components/Tab.js +16 -112
- package/dist/cjs/components/Text.js +4 -2
- package/dist/cjs/components/Textarea.js +17 -76
- package/dist/cjs/components/Tile.js +11 -46
- package/dist/cjs/components/Title.js +4 -2
- package/dist/cjs/components/Tooltip.js +6 -4
- package/dist/cjs/components/Video.js +5 -5
- package/dist/cjs/components/Wrapper.js +5 -30
- package/dist/cjs/hooks/useDeviceTargetClassGenerator.interface.js +2 -0
- package/dist/cjs/hooks/useDeviceTargetClassGenerator.js +97 -0
- package/dist/components/Accordion.js +14 -65
- package/dist/components/Avatar.js +14 -29
- package/dist/components/Badge.js +4 -3
- package/dist/components/Breadcrumbs.js +16 -48
- package/dist/components/Button.js +9 -9
- package/dist/components/Caption.js +5 -14
- package/dist/components/Card.js +7 -12
- package/dist/components/Cell.js +11 -61
- package/dist/components/Checkbox.js +14 -62
- package/dist/components/Chips.js +9 -55
- package/dist/components/Choice.js +20 -86
- package/dist/components/Code.js +9 -81
- package/dist/components/CookiesWarning.js +13 -22
- package/dist/components/DadataHintField.js +4 -4
- package/dist/components/DatePicker.js +20 -24
- package/dist/components/Divider.js +3 -2
- package/dist/components/Dot.js +5 -22
- package/dist/components/Drawer.js +3 -3
- package/dist/components/Dropdown.js +6 -6
- package/dist/components/Flex.js +8 -95
- package/dist/components/Grid.js +12 -125
- package/dist/components/Group.js +3 -2
- package/dist/components/HTMLContent.js +5 -74
- package/dist/components/Icon.js +6 -6
- package/dist/components/Image.js +3 -2
- package/dist/components/Input.js +3 -2
- package/dist/components/InputMask.js +28 -110
- package/dist/components/InputPassword.js +19 -84
- package/dist/components/Label.js +6 -5
- package/dist/components/Link.js +2 -2
- package/dist/components/List.js +15 -31
- package/dist/components/Loader.js +4 -3
- package/dist/components/Logo.js +8 -21
- package/dist/components/Menu.js +9 -23
- package/dist/components/MenuItem.js +5 -5
- package/dist/components/Modal.js +11 -44
- package/dist/components/ModalSheetBottom.js +4 -15
- package/dist/components/Notification.js +9 -18
- package/dist/components/Overlay.js +3 -2
- package/dist/components/Pagination.js +16 -37
- package/dist/components/Panel.js +10 -78
- package/dist/components/Radio.js +16 -62
- package/dist/components/RangeSlider.js +7 -39
- package/dist/components/Response.js +20 -65
- package/dist/components/SVGContent.js +5 -10
- package/dist/components/ScrollOnDrag.js +5 -35
- package/dist/components/ScrollToView.js +5 -46
- package/dist/components/Search.js +19 -82
- package/dist/components/Segmented.js +11 -54
- package/dist/components/Select.js +43 -161
- package/dist/components/SiteMenu.js +13 -16
- package/dist/components/Swiper.js +10 -23
- package/dist/components/Switch.js +5 -3
- package/dist/components/Tab.js +16 -112
- package/dist/components/Text.js +3 -2
- package/dist/components/Textarea.js +16 -77
- package/dist/components/Tile.js +11 -47
- package/dist/components/Title.js +3 -2
- package/dist/components/Tooltip.js +5 -4
- package/dist/components/Video.js +5 -5
- package/dist/components/Wrapper.js +5 -30
- package/dist/css/components/Avatar/Avatar.css +7 -6
- package/dist/css/components/Code/Code.css +0 -8
- package/dist/css/components/Code/Code.tokens.css +3 -0
- package/dist/hooks/useDeviceTargetClassGenerator.interface.js +1 -0
- package/dist/hooks/useDeviceTargetClassGenerator.js +95 -0
- package/dist/stories/Appearance.stories.js +2 -3
- package/dist/stories/Badge.stories.js +1 -1
- package/dist/stories/Button.stories.js +1 -2
- package/dist/stories/Group.stories.js +2 -3
- package/dist/stories/Icon.stories.js +2 -4
- package/dist/stories/Select.stories.js +69 -6
- package/dist/stories/Size.stories.js +1 -2
- package/dist/stories/State.stories.js +1 -2
- package/dist/stories/Tile.stories.js +1 -2
- package/dist/stories/appearance.mdx +6 -11
- package/dist/types/components/Accordion/Accordion.interface.d.ts +2 -0
- package/dist/types/components/Avatar/Avatar.d.ts +2 -2
- package/dist/types/components/Avatar/Avatar.interface.d.ts +8 -5
- package/dist/types/components/Avatar/index.d.ts +1 -0
- package/dist/types/components/Badge/Badge.d.ts +3 -3
- package/dist/types/components/Badge/Badge.interface.d.ts +10 -7
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/dist/types/components/Breadcrumbs/Breadcrumbs.interface.d.ts +11 -9
- 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 +18 -15
- package/dist/types/components/Caption/Caption.d.ts +2 -2
- package/dist/types/components/Caption/Caption.interface.d.ts +7 -6
- package/dist/types/components/Card/Card.d.ts +2 -2
- package/dist/types/components/Card/Card.interface.d.ts +11 -10
- package/dist/types/components/Cell/Cell.d.ts +2 -2
- package/dist/types/components/Cell/Cell.interface.d.ts +5 -4
- package/dist/types/components/Checkbox/Checkbox.interface.d.ts +4 -1
- package/dist/types/components/Checkbox/index.d.ts +1 -0
- package/dist/types/components/Chips/Chips.interface.d.ts +4 -1
- package/dist/types/components/Choice/Choice.d.ts +2 -2
- package/dist/types/components/Choice/Choice.interface.d.ts +3 -0
- package/dist/types/components/Choice/index.d.ts +1 -0
- package/dist/types/components/Code/Code.d.ts +2 -2
- package/dist/types/components/Code/Code.interface.d.ts +8 -5
- package/dist/types/components/Code/index.d.ts +1 -0
- package/dist/types/components/CookiesWarning/CookiesWarning.d.ts +2 -2
- package/dist/types/components/CookiesWarning/CookiesWarning.interface.d.ts +6 -5
- package/dist/types/components/DadataHintField/DadataHintField.d.ts +2 -2
- package/dist/types/components/DadataHintField/DadataHintField.interface.d.ts +4 -4
- package/dist/types/components/DatePicker/DatePicker.d.ts +3 -3
- package/dist/types/components/DatePicker/DatePicker.interface.d.ts +11 -8
- package/dist/types/components/DatePicker/index.d.ts +1 -0
- package/dist/types/components/Divider/Divider.d.ts +2 -2
- package/dist/types/components/Divider/Divider.interface.d.ts +8 -5
- package/dist/types/components/Divider/index.d.ts +1 -0
- package/dist/types/components/Dot/Dot.d.ts +2 -2
- package/dist/types/components/Dot/Dot.interface.d.ts +4 -3
- package/dist/types/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/types/components/Dropdown/Dropdown.interface.d.ts +9 -5
- package/dist/types/components/Dropdown/DropdownItem.d.ts +2 -2
- package/dist/types/components/Dropdown/index.d.ts +2 -1
- package/dist/types/components/Flex/Flex.d.ts +2 -2
- package/dist/types/components/Flex/Flex.interface.d.ts +5 -3
- 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 +7 -4
- 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.d.ts +3 -3
- package/dist/types/components/Group/Group.interface.d.ts +8 -5
- package/dist/types/components/Group/index.d.ts +1 -0
- package/dist/types/components/HTMLContent/HTMLContent.d.ts +2 -2
- package/dist/types/components/HTMLContent/HTMLContent.interface.d.ts +3 -2
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/Icon/Icon.interface.d.ts +1 -0
- package/dist/types/components/Icon/index.d.ts +1 -0
- package/dist/types/components/Image/Image.d.ts +2 -2
- package/dist/types/components/Image/Image.interface.d.ts +3 -2
- package/dist/types/components/Input/Input.d.ts +1 -1
- package/dist/types/components/Input/Input.interface.d.ts +4 -1
- package/dist/types/components/Input/index.d.ts +1 -0
- package/dist/types/components/InputMask/Input.d.ts +2 -2
- package/dist/types/components/InputMask/Input.interface.d.ts +10 -7
- package/dist/types/components/InputPassword/InputPassword.d.ts +3 -3
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +9 -6
- package/dist/types/components/InputPassword/index.d.ts +1 -0
- package/dist/types/components/Label/Label.d.ts +3 -3
- package/dist/types/components/Label/Label.interface.d.ts +10 -7
- package/dist/types/components/Link/Link.d.ts +4 -4
- package/dist/types/components/Link/Link.interface.d.ts +7 -6
- package/dist/types/components/List/List.d.ts +2 -2
- package/dist/types/components/List/List.interface.d.ts +5 -3
- 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 +9 -6
- package/dist/types/components/Loader/index.d.ts +1 -0
- package/dist/types/components/Logo/Logo.d.ts +3 -3
- package/dist/types/components/Logo/Logo.interface.d.ts +10 -7
- package/dist/types/components/Menu/Menu.d.ts +2 -2
- package/dist/types/components/Menu/Menu.interface.d.ts +3 -2
- package/dist/types/components/MenuItem/MenuItem.d.ts +3 -3
- package/dist/types/components/MenuItem/MenuItem.interface.d.ts +9 -6
- package/dist/types/components/MenuItem/index.d.ts +1 -0
- package/dist/types/components/Modal/Modal.d.ts +2 -2
- package/dist/types/components/Modal/Modal.interface.d.ts +8 -5
- package/dist/types/components/Modal/ModalLoader.d.ts +1 -1
- package/dist/types/components/Modal/index.d.ts +2 -1
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.d.ts +1 -1
- package/dist/types/components/ModalSheetBottom/ModalSheetBottom.interface.d.ts +3 -0
- package/dist/types/components/Notification/Notification.interface.d.ts +10 -7
- 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.d.ts +1 -1
- package/dist/types/components/Overlay/Overlay.interface.d.ts +1 -0
- package/dist/types/components/Pagination/Pagination.d.ts +2 -2
- package/dist/types/components/Pagination/Pagination.interface.d.ts +9 -6
- package/dist/types/components/Pagination/index.d.ts +1 -0
- package/dist/types/components/Panel/Panel.d.ts +3 -3
- package/dist/types/components/Panel/Panel.interface.d.ts +9 -6
- package/dist/types/components/Radio/Radio.d.ts +3 -3
- package/dist/types/components/Radio/Radio.interface.d.ts +13 -10
- package/dist/types/components/Radio/index.d.ts +1 -0
- package/dist/types/components/RangeSlider/RangeSlider.d.ts +2 -2
- package/dist/types/components/RangeSlider/RangeSlider.interface.d.ts +3 -2
- package/dist/types/components/Response/Response.d.ts +3 -3
- package/dist/types/components/Response/Response.interface.d.ts +11 -8
- package/dist/types/components/SVGContent/SVGContent.d.ts +2 -2
- package/dist/types/components/SVGContent/SVGContent.interface.d.ts +2 -1
- package/dist/types/components/ScrollOnDrag/ScrollOnDrag.d.ts +2 -2
- package/dist/types/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +3 -2
- 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.interface.d.ts +11 -7
- package/dist/types/components/Search/SearchInput.d.ts +3 -3
- package/dist/types/components/Search/SearchResult.d.ts +1 -2
- package/dist/types/components/Search/index.d.ts +2 -1
- package/dist/types/components/Segmented/Segmented.d.ts +3 -3
- package/dist/types/components/Segmented/Segmented.interface.d.ts +15 -9
- package/dist/types/components/Segmented/index.d.ts +1 -0
- package/dist/types/components/Select/Select.interface.d.ts +2 -0
- package/dist/types/components/Select/SelectContainer.d.ts +4 -3
- package/dist/types/components/Select/index.d.ts +1 -3
- package/dist/types/components/SiteMenu/SiteMenu.d.ts +2 -2
- package/dist/types/components/SiteMenu/SiteMenu.interface.d.ts +9 -6
- package/dist/types/components/SiteMenu/SiteMenuButton.d.ts +2 -2
- package/dist/types/components/SiteMenu/index.d.ts +2 -1
- package/dist/types/components/Swiper/Swiper.d.ts +2 -2
- package/dist/types/components/Swiper/Swiper.interface.d.ts +9 -8
- package/dist/types/components/Switch/Switch.d.ts +2 -2
- package/dist/types/components/Switch/Switch.interface.d.ts +4 -4
- package/dist/types/components/Switch/index.d.ts +1 -0
- package/dist/types/components/Tab/Tab.d.ts +1 -1
- package/dist/types/components/Tab/Tab.interface.d.ts +4 -0
- package/dist/types/components/Tab/TabGroup.d.ts +1 -1
- package/dist/types/components/Text/Text.interface.d.ts +4 -1
- package/dist/types/components/Text/index.d.ts +1 -0
- package/dist/types/components/Textarea/Textarea.d.ts +3 -3
- package/dist/types/components/Textarea/Textarea.interface.d.ts +13 -10
- package/dist/types/components/Textarea/index.d.ts +1 -0
- package/dist/types/components/Tile/Tile.d.ts +2 -2
- package/dist/types/components/Tile/Tile.interface.d.ts +8 -5
- package/dist/types/components/Tile/index.d.ts +1 -0
- package/dist/types/components/Title/Title.d.ts +3 -3
- package/dist/types/components/Title/Title.interface.d.ts +17 -14
- package/dist/types/components/Title/index.d.ts +1 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +3 -3
- package/dist/types/components/Tooltip/Tooltip.interface.d.ts +9 -6
- package/dist/types/components/Tooltip/index.d.ts +1 -0
- package/dist/types/components/Video/Video.d.ts +2 -2
- package/dist/types/components/Video/Video.interface.d.ts +1 -1
- package/dist/types/components/Wrapper/Wrapper.d.ts +2 -2
- package/dist/types/components/Wrapper/Wrapper.interface.d.ts +4 -3
- package/dist/types/config/forms/index.d.ts +1 -2
- package/dist/types/hooks/useDeviceTargetClassGenerator.d.ts +3 -0
- package/dist/types/hooks/useDeviceTargetClassGenerator.interface.d.ts +20 -0
- package/dist/types/types/componentProps/appearanceKeys.d.ts +1 -1
- package/package.json +8 -7
- package/dist/Badge-_xQzAcyN.js +0 -114
- package/dist/Button-C8MATksY.js +0 -150
- package/dist/Button-ChSAts3j.js +0 -154
- package/dist/Divider-BoB-f9Gr.js +0 -74
- package/dist/Divider-DHIuQUsH.js +0 -71
- package/dist/DropdownItem-B8IMNQww.js +0 -182
- package/dist/DropdownItem-E9HkOU63.js +0 -186
- package/dist/Group-BCvs5UxK.js +0 -136
- package/dist/Group-u6YDbMxn.js +0 -139
- package/dist/Icon-C8ACV9r7.js +0 -122
- package/dist/Icon-DptCmI_y.js +0 -119
- package/dist/Image-8t6PvsaZ.js +0 -65
- package/dist/Image-DrUlRMHa.js +0 -67
- package/dist/Input-CgjHxZmK.js +0 -188
- package/dist/Input-KgHOW5DR.js +0 -191
- package/dist/Label-B06hLCqo.js +0 -139
- package/dist/Label-zOLL6ePu.js +0 -135
- package/dist/Link-CqWzwh8V.js +0 -99
- package/dist/Loader-DHNcD09o.js +0 -82
- package/dist/Loader-DReoCdZ2.js +0 -85
- package/dist/MenuItem-BXogEsbS.js +0 -104
- package/dist/MenuItem-C7frDyBO.js +0 -101
- package/dist/Overlay-CFXouKnl.js +0 -27
- package/dist/Overlay-DO5dnSRE.js +0 -25
- package/dist/Text-C4Bg2Mv6.js +0 -81
- package/dist/Text-R6XNq6Ca.js +0 -84
- package/dist/Title-DWIc05TX.js +0 -114
- package/dist/Title-YVzIwk68.js +0 -111
- package/dist/Tooltip--c-4Qp04.js +0 -150
- package/dist/Tooltip-BswHy19O.js +0 -153
- package/dist/cjs/components/ContextMenu.js +0 -52
- package/dist/cjs/components/LanguageSelector.js +0 -33
- package/dist/cjs/components/Page.js +0 -48
- package/dist/components/ContextMenu.js +0 -49
- package/dist/components/LanguageSelector.js +0 -31
- package/dist/components/Page.js +0 -46
- package/dist/css/components/ContextMenu/ContextMenu.css +0 -38
- package/dist/css/components/ContextMenu/css/__item/context-menu__item.css +0 -9
- package/dist/css/components/Page/Page.css +0 -8
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +0 -3
- package/dist/types/components/ContextMenu/ContextMenu.interface.d.ts +0 -36
- package/dist/types/components/ContextMenu/ContextMenuItem.d.ts +0 -3
- package/dist/types/components/ContextMenu/index.d.ts +0 -3
- package/dist/types/components/LanguageSelector/Label.interface.d.ts +0 -20
- package/dist/types/components/LanguageSelector/LanguageSelector.d.ts +0 -3
- package/dist/types/components/LanguageSelector/index.d.ts +0 -1
- package/dist/types/components/Page/Page.d.ts +0 -3
- package/dist/types/components/Page/Page.interface.d.ts +0 -18
- package/dist/types/components/Page/index.d.ts +0 -1
- package/dist/types/config/forms/select.d.ts +0 -50
- package/dist/types/hooks/useDeviceTargetClass.d.ts +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import {
|
|
3
|
+
import { useDeviceTargetClassGenerator } from '../hooks/useDeviceTargetClassGenerator.js';
|
|
4
4
|
import { useStyles } from '../hooks/useStyles.js';
|
|
5
|
+
import '../tslib.es6-5FtW-kfi.js';
|
|
5
6
|
import 'react';
|
|
6
7
|
import 'lodash/camelCase';
|
|
7
8
|
import 'lodash/castArray';
|
|
@@ -14,37 +15,11 @@ import '../hooks/styleAttributes.js';
|
|
|
14
15
|
|
|
15
16
|
function Wrapper(props) {
|
|
16
17
|
var id = props.id, children = props.children, after = props.after, before = props.before, _a = props.className, className = _a === void 0 ? 'wrapper' : _a, _b = props.tag, Tag = _b === void 0 ? 'div' : _b, type = props.type;
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
propsKey: 'alignDirection',
|
|
20
|
-
});
|
|
21
|
-
var alignClass = useDeviceTargetClass(props, {
|
|
22
|
-
prefix: 'align_',
|
|
23
|
-
propsKey: 'align',
|
|
24
|
-
});
|
|
25
|
-
var resizeHorizontalClass = useDeviceTargetClass(props, {
|
|
26
|
-
prefix: 'wrapper_resize-horizontal_',
|
|
27
|
-
propsKey: 'horizontalResizing',
|
|
28
|
-
});
|
|
29
|
-
var resizeVerticalClass = useDeviceTargetClass(props, {
|
|
30
|
-
prefix: 'wrapper_resize-vertical_',
|
|
31
|
-
propsKey: 'verticalResizing',
|
|
32
|
-
});
|
|
33
|
-
var fillClass = useDeviceTargetClass(props, {
|
|
34
|
-
prefix: 'fill_',
|
|
35
|
-
propsKey: 'fill',
|
|
36
|
-
});
|
|
37
|
-
var positionClass = useDeviceTargetClass(props, {
|
|
38
|
-
prefix: 'position_',
|
|
39
|
-
propsKey: 'position',
|
|
40
|
-
});
|
|
41
|
-
var wrapperPositionClass = useDeviceTargetClass(props, {
|
|
42
|
-
prefix: 'position_',
|
|
43
|
-
propsKey: 'wrapperPosition',
|
|
44
|
-
});
|
|
18
|
+
var classGenerator = useDeviceTargetClassGenerator(props);
|
|
19
|
+
var alignClass = classGenerator.alignClass, alignDirectionClass = classGenerator.alignDirectionClass, fillClass = classGenerator.fillClass, horizontalResizingClass = classGenerator.horizontalResizingClass, positionClass = classGenerator.positionClass, verticalResizingClass = classGenerator.verticalResizingClass, wrapperPositionClass = classGenerator.wrapperPositionClass;
|
|
45
20
|
// @ts-expect-error
|
|
46
21
|
var _c = useStyles(props), innerStyles = _c.inner, wrapperStyles = _c.styles;
|
|
47
|
-
return (jsx(Tag, { className: clsx(className, type && "".concat(className, "_type_").concat(type), fillClass,
|
|
22
|
+
return (jsx(Tag, { className: clsx(className, type && "".concat(className, "_type_").concat(type), fillClass && "fill_".concat(fillClass), horizontalResizingClass && "wrapper_resize-horizontal_".concat(horizontalResizingClass), verticalResizingClass && "wrapper_resize-vertical_".concat(verticalResizingClass), positionClass && "position_".concat(positionClass)), id: id, style: wrapperStyles, children: jsxs("div", { className: clsx("".concat(className, "__inner"), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), wrapperPositionClass && "position_".concat(wrapperPositionClass)), style: innerStyles, children: [before, children, after] }) }));
|
|
48
23
|
}
|
|
49
24
|
|
|
50
25
|
export { Wrapper };
|
|
@@ -71,22 +71,23 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
+
/* stylelint-disable prettier/prettier */
|
|
74
75
|
.avatar {
|
|
75
76
|
&_size {
|
|
76
77
|
@each $size in 14, 16, 20, 24, 32, 40, 48, 56, 60, 64, 72, 80, 96, 112, 144, 240 {
|
|
77
78
|
&_$(size) {
|
|
78
79
|
^^&__wrapper {
|
|
79
|
-
width: $(size)
|
|
80
|
-
height: $(size)
|
|
80
|
+
width: $(size)px;
|
|
81
|
+
height: $(size)px;
|
|
81
82
|
display: flex;
|
|
82
83
|
justify-content: center;
|
|
83
84
|
align-items: center;
|
|
84
85
|
^^^&__image {
|
|
85
|
-
width: $(size)
|
|
86
|
-
height: $(size)
|
|
86
|
+
width: $(size)px;
|
|
87
|
+
height: $(size)px;
|
|
87
88
|
& .image__item {
|
|
88
|
-
width: $(size)
|
|
89
|
-
height: $(size)
|
|
89
|
+
width: $(size)px;
|
|
90
|
+
height: $(size)px;
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
}
|
|
@@ -36,11 +36,3 @@
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
:root {
|
|
40
|
-
--code-input-size-compact-width: 36px;
|
|
41
|
-
--code-input-size-compact-height: 36px;
|
|
42
|
-
--code-input-size-compact-padding: 5px;
|
|
43
|
-
--code-input-size-normal-width: 48px;
|
|
44
|
-
--code-input-size-normal-height: 48px;
|
|
45
|
-
--code-input-size-normal-padding: 10px 12px;
|
|
46
|
-
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { b as __spreadArray } from '../tslib.es6-5FtW-kfi.js';
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import camelCase from 'lodash/camelCase';
|
|
4
|
+
import castArray from 'lodash/castArray';
|
|
5
|
+
import { useUserDeviceContext } from '../context/UIContext.js';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
7
|
+
import './useMediaQueries.js';
|
|
8
|
+
import 'react-responsive';
|
|
9
|
+
|
|
10
|
+
function useDeviceTargetClassGenerator(componentProps, appearanceConfig) {
|
|
11
|
+
/** Generate a class depending on the user's device.
|
|
12
|
+
* Props:
|
|
13
|
+
* - "componentProps" - "props" from component
|
|
14
|
+
* - "appearanceConfig" - special appearance dictionary with styles presets
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* const appearanceConfig = (
|
|
18
|
+
* appearance && componentConfig.appearance && componentConfig.appearance[appearance]
|
|
19
|
+
* )
|
|
20
|
+
* const classGenerator = useDeviceTargetClassGenerator(props, appearanceConfig)
|
|
21
|
+
* ---------
|
|
22
|
+
* const fillClass = classGenerator.getClass('fill')
|
|
23
|
+
* "fillClass" - is "surface-secondary"
|
|
24
|
+
* ---------
|
|
25
|
+
* const fillClass = classGenerator.getClass('fill', { prefix: 'fill_' })
|
|
26
|
+
* "fillClass" - is "fill_surface-secondary"
|
|
27
|
+
* ---------
|
|
28
|
+
* const fillClass = classGenerator.fill / classGenerator.fillClass
|
|
29
|
+
* "fill" / "fillClass" - is "surface-secondary"
|
|
30
|
+
* ---------
|
|
31
|
+
* const { fill / fillClass } = classGenerator
|
|
32
|
+
* "fill" / "fillClass" - is "surface-secondary"
|
|
33
|
+
**/
|
|
34
|
+
var _a = useUserDeviceContext(), isMobile = _a.isMobile, isTablet = _a.isTablet, isDesktop = _a.isDesktop;
|
|
35
|
+
var deviceTargetClassGenerator = useMemo(function () {
|
|
36
|
+
var classGenerator = {
|
|
37
|
+
getClass: function (propsKey, params) {
|
|
38
|
+
if (params === void 0) { params = {}; }
|
|
39
|
+
var _a = params.prefix, prefix = _a === void 0 ? '' : _a, _b = params.replace, replace = _b === void 0 ? [/([A-Z])/g, '-$1'] : _b;
|
|
40
|
+
// prettier-ignore
|
|
41
|
+
var deviceBasePart = ((isMobile && 'Mobile') ||
|
|
42
|
+
(isTablet && 'Tablet') ||
|
|
43
|
+
(isDesktop && 'Desktop') ||
|
|
44
|
+
'');
|
|
45
|
+
var valueForDevice = componentProps["".concat(propsKey).concat(deviceBasePart)];
|
|
46
|
+
var valueDefault = componentProps[propsKey];
|
|
47
|
+
var appearanceForDevice = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig["".concat(propsKey).concat(deviceBasePart)];
|
|
48
|
+
var appearanceDefault = appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig[propsKey];
|
|
49
|
+
// prettier-ignore
|
|
50
|
+
var targetClassValue = (
|
|
51
|
+
// Value for device from props is first priority
|
|
52
|
+
valueForDevice ||
|
|
53
|
+
// Value without device from props is second priority
|
|
54
|
+
valueDefault ||
|
|
55
|
+
// Value for device from appearance config is third priority
|
|
56
|
+
appearanceForDevice ||
|
|
57
|
+
// Value without device from appearance config is last priority
|
|
58
|
+
appearanceDefault);
|
|
59
|
+
if (targetClassValue) {
|
|
60
|
+
var cleanClassValue = camelCase(String(targetClassValue));
|
|
61
|
+
if (replace) {
|
|
62
|
+
var replaceList = castArray(replace);
|
|
63
|
+
cleanClassValue = cleanClassValue.replace(replaceList[0], replaceList[1] || '');
|
|
64
|
+
}
|
|
65
|
+
return "".concat(prefix).concat(cleanClassValue).toLowerCase();
|
|
66
|
+
}
|
|
67
|
+
// If target key not exists in props and appearance config - return empty class
|
|
68
|
+
return '';
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
var generatorProxyHandler = {
|
|
72
|
+
get: function (target, prop, receiver) {
|
|
73
|
+
var args = [];
|
|
74
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
75
|
+
args[_i - 3] = arguments[_i];
|
|
76
|
+
}
|
|
77
|
+
if (typeof prop === 'string') {
|
|
78
|
+
if (!Reflect.has(target, prop)) {
|
|
79
|
+
if (prop.endsWith('Class')) {
|
|
80
|
+
var shortProp = prop.substring(0, prop.lastIndexOf('Class'));
|
|
81
|
+
return target.getClass(shortProp);
|
|
82
|
+
}
|
|
83
|
+
return target.getClass(prop);
|
|
84
|
+
}
|
|
85
|
+
return Reflect.get.apply(Reflect, __spreadArray([target, prop, receiver], args, false));
|
|
86
|
+
}
|
|
87
|
+
return prop;
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
return new Proxy(classGenerator, generatorProxyHandler);
|
|
91
|
+
}, [componentProps, appearanceConfig, isDesktop, isMobile, isTablet]);
|
|
92
|
+
return deviceTargetClassGenerator;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export { useDeviceTargetClassGenerator };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { badgeConfig } from '../../Badge'
|
|
2
|
-
import { badgeAppearance } from '../../Badge/Badge.appearance.'
|
|
1
|
+
import { badgeAppearance, badgeConfig } from '../../Badge'
|
|
3
2
|
import { Tab, tabConfig } from '../Tab'
|
|
4
3
|
import { tabAppearance } from '../Tab.appearance'
|
|
5
4
|
import { argTypes } from './args'
|
|
6
5
|
|
|
7
|
-
tabConfig.setAppearance(tabAppearance)
|
|
8
6
|
badgeConfig.setAppearance(badgeAppearance)
|
|
7
|
+
tabConfig.setAppearance(tabAppearance)
|
|
9
8
|
|
|
10
9
|
export default {
|
|
11
10
|
argTypes: {
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
textColorProps,
|
|
10
10
|
} from '../../../constants'
|
|
11
11
|
import { Badge, badgeConfig } from '../Badge'
|
|
12
|
-
import { badgeAppearance } from '../Badge.appearance
|
|
12
|
+
import { badgeAppearance } from '../Badge.appearance'
|
|
13
13
|
|
|
14
14
|
badgeConfig.setAppearance(badgeAppearance)
|
|
15
15
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// import { icon24 } from '../../../___icons'
|
|
2
|
-
import { Badge, badgeConfig } from '../../Badge'
|
|
3
|
-
import { badgeAppearance } from '../../Badge/Badge.appearance.'
|
|
2
|
+
import { Badge, badgeAppearance, badgeConfig } from '../../Badge'
|
|
4
3
|
import { Button, buttonConfig } from '../Button'
|
|
5
4
|
import { buttonAppearance } from '../Button.appearance'
|
|
6
5
|
import { argTypes } from './args'
|
|
@@ -6,14 +6,13 @@ import {
|
|
|
6
6
|
widthProps,
|
|
7
7
|
wrapProps,
|
|
8
8
|
} from '../../../constants'
|
|
9
|
-
import { badgeConfig } from '../../Badge'
|
|
10
|
-
import { badgeAppearance } from '../../Badge/Badge.appearance.'
|
|
9
|
+
import { badgeAppearance, badgeConfig } from '../../Badge'
|
|
11
10
|
import { Tab, tabConfig } from '../Tab'
|
|
12
11
|
import { tabAppearance } from '../Tab.appearance'
|
|
13
12
|
import { TabGroup } from '../TabGroup'
|
|
14
13
|
|
|
15
|
-
tabConfig.setAppearance(tabAppearance)
|
|
16
14
|
badgeConfig.setAppearance(badgeAppearance)
|
|
15
|
+
tabConfig.setAppearance(tabAppearance)
|
|
17
16
|
|
|
18
17
|
const tabs = {
|
|
19
18
|
1: {
|
|
@@ -8,14 +8,12 @@ import {
|
|
|
8
8
|
shapeProps,
|
|
9
9
|
sizePXProps,
|
|
10
10
|
} from '../../../constants'
|
|
11
|
-
import { Badge, badgeConfig } from '../../Badge'
|
|
12
|
-
import { badgeAppearance } from '../../Badge/Badge.appearance.'
|
|
11
|
+
import { Badge, badgeAppearance, badgeConfig } from '../../Badge'
|
|
13
12
|
import { Icon, iconConfig } from '../Icon'
|
|
14
13
|
import { iconAppearance } from '../Icon.appearance'
|
|
15
14
|
|
|
16
|
-
iconConfig.setAppearance(iconAppearance)
|
|
17
|
-
|
|
18
15
|
badgeConfig.setAppearance(badgeAppearance)
|
|
16
|
+
iconConfig.setAppearance(iconAppearance)
|
|
19
17
|
|
|
20
18
|
export default {
|
|
21
19
|
argTypes: {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { defaultSelectProps } from '../../../config/forms'
|
|
2
1
|
import {
|
|
3
2
|
borderColorHoverProps,
|
|
4
3
|
borderColorProps,
|
|
@@ -12,19 +11,66 @@ import { Button } from '../../Button'
|
|
|
12
11
|
import { Loader } from '../../Loader'
|
|
13
12
|
import { Select } from '../index'
|
|
14
13
|
|
|
15
|
-
// import { Select } from '../Select'
|
|
16
|
-
|
|
17
|
-
// import { icon16 } from 'src/icons'
|
|
18
|
-
|
|
19
14
|
export default {
|
|
20
15
|
args: {
|
|
21
|
-
|
|
16
|
+
elevation: 8,
|
|
22
17
|
isClearable: true,
|
|
23
18
|
isMulti: false,
|
|
24
19
|
isSearchable: false,
|
|
20
|
+
badgeAppearance: 'accent',
|
|
21
|
+
badgeSize: 'm',
|
|
22
|
+
badgeTextSize: 'm',
|
|
23
|
+
// clearIcon: icon24.Clear,
|
|
24
|
+
clearIconFill: 'surfaceItemPrimary',
|
|
25
|
+
closeMenuOnSelect: true,
|
|
26
|
+
dividerDirection: 'horizontal',
|
|
27
|
+
// optionSelected: <Icon iconFill="surfaceItemAccent" SvgImage={icon24.Check} />,
|
|
28
|
+
|
|
29
|
+
dividerFill: 'surfaceTertiary',
|
|
30
|
+
dividerSize: 'xxs',
|
|
31
|
+
// dropdownIcon: icon24.ChevronDownSmall,
|
|
25
32
|
dropdownIconFill: 'surfaceItemPrimary',
|
|
33
|
+
// error
|
|
34
|
+
errorInputBorderColor: 'errorBorderPrimary',
|
|
35
|
+
headingFill: 'surfaceSecondary',
|
|
36
|
+
headingTextColor: 'surfaceTextPrimary',
|
|
37
|
+
headingTextSize: 'm',
|
|
38
|
+
|
|
39
|
+
headingTextWeight: '600',
|
|
26
40
|
hideSelectedOptions: false,
|
|
41
|
+
inputBorderColor: 'surfaceBorderTertiary',
|
|
42
|
+
inputBorderColorHover: 'surfaceBorderQuaternary',
|
|
43
|
+
inputCaretColor: 'secondaryItemPrimary',
|
|
44
|
+
|
|
45
|
+
inputFill: 'surfacePrimary',
|
|
46
|
+
|
|
47
|
+
inputShape: 'rounded',
|
|
48
|
+
inputTextColor: 'surfaceTextPrimary',
|
|
49
|
+
inputTextSize: 'm',
|
|
50
|
+
loadingMessage: (
|
|
51
|
+
<Loader
|
|
52
|
+
width="fill"
|
|
53
|
+
height="fill"
|
|
54
|
+
fill="surfacePrimary"
|
|
55
|
+
position="absolute"
|
|
56
|
+
left="0px"
|
|
57
|
+
right="0px"
|
|
58
|
+
zIndex="1"
|
|
59
|
+
itemFill="surfaceItemAccent"
|
|
60
|
+
set="simple"
|
|
61
|
+
/>
|
|
62
|
+
),
|
|
63
|
+
|
|
27
64
|
menuItemSize: 'l',
|
|
65
|
+
multipleItemFill: 'accentPrimary',
|
|
66
|
+
multipleItemFillHover: 'accentPrimaryHover',
|
|
67
|
+
// multipleItemIcon: icon14.Remove,
|
|
68
|
+
multipleItemIconFill: 'accentItemPrimary',
|
|
69
|
+
multipleItemTextColor: 'accentTextPrimary',
|
|
70
|
+
|
|
71
|
+
multipleItemTextSize: 'm',
|
|
72
|
+
|
|
73
|
+
noOptionsSearchText: 'Ничего не найдено...',
|
|
28
74
|
noOptionsText: (
|
|
29
75
|
<Loader
|
|
30
76
|
width="fill"
|
|
@@ -38,6 +84,10 @@ export default {
|
|
|
38
84
|
set="simple"
|
|
39
85
|
/>
|
|
40
86
|
),
|
|
87
|
+
noOptionsTextColor: 'surfaceTextPrimary',
|
|
88
|
+
noOptionsTextSize: 'm',
|
|
89
|
+
|
|
90
|
+
optionBorder: 'none',
|
|
41
91
|
optionFill: 'surfacePrimary',
|
|
42
92
|
optionFillHover: 'surfacePrimaryHover',
|
|
43
93
|
options: [
|
|
@@ -48,9 +98,22 @@ export default {
|
|
|
48
98
|
{ label: 'Планируемые', value: 'planned' },
|
|
49
99
|
{ label: 'Продолжены', value: 'continued' },
|
|
50
100
|
],
|
|
101
|
+
optionShape: 'rounded',
|
|
102
|
+
|
|
51
103
|
optionTextColor: 'surfaceTextPrimary',
|
|
52
104
|
optionTextSize: 'l',
|
|
105
|
+
placeholder: 'Выбрать...',
|
|
106
|
+
|
|
107
|
+
placeholderTextColor: 'surfaceTextQuaternary',
|
|
108
|
+
|
|
109
|
+
placeholderTextSize: 'm',
|
|
110
|
+
// appearance depending on the type of error
|
|
111
|
+
// required
|
|
112
|
+
requiredInputBorderColor: 'warningBorderPrimary',
|
|
113
|
+
showBadge: false,
|
|
53
114
|
showDivider: false,
|
|
115
|
+
|
|
116
|
+
size: 'm',
|
|
54
117
|
},
|
|
55
118
|
argTypes: {
|
|
56
119
|
elevation: {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { badgeConfig } from '../../Badge'
|
|
2
|
-
import { badgeAppearance } from '../../Badge/Badge.appearance.'
|
|
1
|
+
import { badgeAppearance, badgeConfig } from '../../Badge'
|
|
3
2
|
import { Tab, tabConfig } from '../Tab'
|
|
4
3
|
import { tabAppearance } from '../Tab.appearance'
|
|
5
4
|
import { argTypes } from './args'
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { badgeConfig } from '../../Badge'
|
|
2
|
-
import { badgeAppearance } from '../../Badge/Badge.appearance.'
|
|
1
|
+
import { badgeAppearance, badgeConfig } from '../../Badge'
|
|
3
2
|
import { Tab, tabConfig } from '../Tab'
|
|
4
3
|
import { tabAppearance } from '../Tab.appearance'
|
|
5
4
|
import { argTypes } from './args'
|
|
@@ -17,8 +17,7 @@ import {
|
|
|
17
17
|
titleSizeProps,
|
|
18
18
|
} from '../../../constants'
|
|
19
19
|
// import { icon24 } from '../../../___icons'
|
|
20
|
-
import { badgeConfig } from '../../Badge'
|
|
21
|
-
import { badgeAppearance } from '../../Badge/Badge.appearance.'
|
|
20
|
+
import { badgeAppearance, badgeConfig } from '../../Badge'
|
|
22
21
|
import { Button, buttonConfig } from '../../Button'
|
|
23
22
|
import { buttonAppearance } from '../../Button/Button.appearance'
|
|
24
23
|
import { Tile } from '../Tile'
|
|
@@ -14,7 +14,7 @@ import { Meta } from '@storybook/blocks'
|
|
|
14
14
|
- а также конфиг:
|
|
15
15
|
|
|
16
16
|
```
|
|
17
|
-
const badgeConfig:
|
|
17
|
+
const badgeConfig: iBadgeConfig = {
|
|
18
18
|
appearance: badgeAppearance,
|
|
19
19
|
setAppearance: (newComponent) => {
|
|
20
20
|
badgeConfig.appearance = newComponent
|
|
@@ -25,28 +25,23 @@ const badgeConfig: IBadgeConfig = {
|
|
|
25
25
|
- записать в переменную сокращенное название для дальнейшего использования в коде компонента:
|
|
26
26
|
|
|
27
27
|
```
|
|
28
|
-
const appearanceConfig =
|
|
29
|
-
appearance && badgeConfig.appearance && badgeConfig.appearance[appearance]
|
|
28
|
+
const appearanceConfig = badgeConfig.appearance && badgeConfig.appearance[appearance]
|
|
30
29
|
```
|
|
31
30
|
|
|
32
31
|
- использовать для пропсов:
|
|
33
32
|
|
|
34
33
|
```
|
|
35
|
-
fillClass
|
|
36
|
-
(appearanceConfig?.fill &&
|
|
37
|
-
`fill_${appearanceConfig.fill}`?.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
34
|
+
fillClass && `fill_${fillClass}`,
|
|
38
35
|
|
|
39
|
-
fillHoverClass
|
|
40
|
-
(appearanceConfig?.fillHover &&
|
|
41
|
-
`fill_hover_${appearanceConfig.fillHover}`?.replace(/([A-Z])/g, '-$1').toLowerCase()),
|
|
36
|
+
fillHoverClass && `fill_hover_${fillHoverClass}`,
|
|
42
37
|
|
|
43
38
|
textColor={textColor || appearanceConfig?.textColor}
|
|
44
39
|
```
|
|
45
40
|
|
|
46
|
-
- описать варианты `Appearance` необходимо в `src/
|
|
41
|
+
- описать варианты `Appearance` необходимо в `src/components/Badge/Badge.appearance.ts`
|
|
47
42
|
|
|
48
43
|
```
|
|
49
|
-
import { badgeAppearanceType } from '
|
|
44
|
+
import { badgeAppearanceType } from './Badge.interface'
|
|
50
45
|
|
|
51
46
|
export const badgeAppearance: badgeAppearanceType = {
|
|
52
47
|
surfacePrimary: {
|
|
@@ -8,6 +8,7 @@ interface iAccordionItemEventData {
|
|
|
8
8
|
isExpanded: boolean;
|
|
9
9
|
}
|
|
10
10
|
interface iAccordionProps extends iStyleAttributes {
|
|
11
|
+
[key: number | string | symbol]: any;
|
|
11
12
|
borderColor?: tBorderColorProps;
|
|
12
13
|
children?: Element | React.ReactNode;
|
|
13
14
|
className?: string;
|
|
@@ -28,6 +29,7 @@ interface iAccordionProps extends iStyleAttributes {
|
|
|
28
29
|
}
|
|
29
30
|
interface iAccordionItemProps extends iStyleAttributes {
|
|
30
31
|
id: number | string;
|
|
32
|
+
[key: number | string | symbol]: any;
|
|
31
33
|
afterContent?: ReactNode;
|
|
32
34
|
beforeContent?: ReactNode;
|
|
33
35
|
borderColor?: tBorderColorProps;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { iAvatarConfig,
|
|
1
|
+
import type { iAvatarConfig, iAvatarProps } from './Avatar.interface';
|
|
2
2
|
declare const avatarConfig: iAvatarConfig;
|
|
3
|
-
declare function Avatar(props:
|
|
3
|
+
declare function Avatar(props: iAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export { Avatar, avatarConfig };
|
|
@@ -2,7 +2,8 @@ import { ElementType, ReactNode } from 'react';
|
|
|
2
2
|
import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
3
3
|
import { iconFillSizePropsType, iconSizePropsType, sizePXPropsType, tFillHoverProps, tFillProps, tItemColorProps, tShapeProps, tTextColorProps, tTextSizeProps, tTextWeightProps } from '../../types';
|
|
4
4
|
import { tAppearanceKeysDefault } from '../../types/componentProps/appearanceKeys';
|
|
5
|
-
export interface
|
|
5
|
+
export interface iAvatarThemeColor {
|
|
6
|
+
[key: number | string | symbol]: any;
|
|
6
7
|
fill?: tFillProps;
|
|
7
8
|
fillHover?: tFillHoverProps;
|
|
8
9
|
icon?: ElementType;
|
|
@@ -18,17 +19,19 @@ export interface IAvatarThemeColor {
|
|
|
18
19
|
textSize?: tTextSizeProps;
|
|
19
20
|
textWeight?: tTextWeightProps;
|
|
20
21
|
}
|
|
21
|
-
type
|
|
22
|
+
type tAppearanceKeys = tAppearanceKeysDefault & {};
|
|
22
23
|
export type avatarAppearanceType = {
|
|
23
|
-
[key in
|
|
24
|
+
[key in tAppearanceKeys]?: iAvatarThemeColor;
|
|
24
25
|
};
|
|
25
26
|
export interface iAvatarConfig {
|
|
27
|
+
[key: number | string | symbol]: any;
|
|
26
28
|
appearance: avatarAppearanceType | undefined;
|
|
27
29
|
setAppearance: (newComponent: avatarAppearanceType) => void;
|
|
28
30
|
}
|
|
29
|
-
export interface
|
|
31
|
+
export interface iAvatarProps extends iAvatarThemeColor, iStyleAttributes {
|
|
32
|
+
[key: number | string | symbol]: any;
|
|
30
33
|
after?: ReactNode;
|
|
31
|
-
appearance?:
|
|
34
|
+
appearance?: tAppearanceKeys;
|
|
32
35
|
before?: ReactNode;
|
|
33
36
|
className?: string;
|
|
34
37
|
Dot?: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const badgeConfig:
|
|
3
|
-
declare function Badge(props:
|
|
1
|
+
import type { iBadgeConfig, iBadgeProps } from './Badge.interface';
|
|
2
|
+
declare const badgeConfig: iBadgeConfig;
|
|
3
|
+
declare function Badge(props: iBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare namespace Badge {
|
|
5
5
|
var defaultProps: {
|
|
6
6
|
shape: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
3
|
-
import { borderColorHoverPropsType,
|
|
3
|
+
import { borderColorHoverPropsType, borderTypePropsType, tBorderColorProps, tBorderWidthProps, tFillHoverProps, tFillProps, tShapeProps, tSizeProps, tTextColorProps, tTextSizeProps } from '../../types';
|
|
4
4
|
import { tAppearanceKeysDefault } from '../../types/componentProps/appearanceKeys';
|
|
5
|
-
export interface
|
|
5
|
+
export interface iBadgeThemeColor {
|
|
6
|
+
[key: number | string | symbol]: any;
|
|
6
7
|
borderColor?: tBorderColorProps;
|
|
7
8
|
borderColorHover?: borderColorHoverPropsType;
|
|
8
9
|
borderType?: borderTypePropsType;
|
|
@@ -14,16 +15,18 @@ export interface IBadgeThemeColor {
|
|
|
14
15
|
textColor?: tTextColorProps;
|
|
15
16
|
textSize?: tTextSizeProps;
|
|
16
17
|
}
|
|
17
|
-
type
|
|
18
|
+
type tAppearanceKeys = tAppearanceKeysDefault & {};
|
|
18
19
|
export type badgeAppearanceType = {
|
|
19
|
-
[key in
|
|
20
|
+
[key in tAppearanceKeys]?: iBadgeThemeColor;
|
|
20
21
|
};
|
|
21
|
-
export interface
|
|
22
|
+
export interface iBadgeConfig {
|
|
23
|
+
[key: number | string | symbol]: any;
|
|
22
24
|
appearance: badgeAppearanceType | undefined;
|
|
23
25
|
setAppearance: (newComponent: badgeAppearanceType) => void;
|
|
24
26
|
}
|
|
25
|
-
export interface
|
|
26
|
-
|
|
27
|
+
export interface iBadgeProps extends iBadgeThemeColor, iStyleAttributes {
|
|
28
|
+
[key: number | string | symbol]: any;
|
|
29
|
+
appearance?: tAppearanceKeys;
|
|
27
30
|
children?: ReactNode;
|
|
28
31
|
className?: string;
|
|
29
32
|
mode?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare function Breadcrumbs(props:
|
|
1
|
+
import type { iBreadcrumbsProps } from './Breadcrumbs.interface';
|
|
2
|
+
declare function Breadcrumbs(props: iBreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace Breadcrumbs {
|
|
4
4
|
var defaultProps: {
|
|
5
5
|
direction: string;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { iStyleAttributes } from '../../hooks/styleAttributes.interface';
|
|
3
|
-
import {
|
|
4
|
-
export interface
|
|
3
|
+
import { iconSizePropsType, positionPropsType, tDirectionProps, tFillProps, tShapeProps, tTextColorHoverProps, tTextColorProps, tTextSizeProps, tUnderlineProps, tWidthProps } from '../../types';
|
|
4
|
+
export interface iBreadcrumbsItemProps extends iStyleAttributes {
|
|
5
|
+
id?: string;
|
|
6
|
+
[key: number | string | symbol]: any;
|
|
5
7
|
children?: ReactNode;
|
|
6
8
|
className?: string;
|
|
7
9
|
cursor?: string;
|
|
@@ -11,16 +13,14 @@ export interface IBreadcrumbsItemProps extends iStyleAttributes {
|
|
|
11
13
|
fillTablet?: tFillProps;
|
|
12
14
|
href?: string;
|
|
13
15
|
iconAfter?: ElementType;
|
|
14
|
-
itemIconAfter?: ElementType;
|
|
15
16
|
iconAfterBgFill?: tFillProps;
|
|
16
17
|
iconAfterFill?: tFillProps;
|
|
17
18
|
iconAfterSize?: iconSizePropsType;
|
|
18
|
-
|
|
19
|
+
itemIconAfter?: ElementType;
|
|
19
20
|
position?: positionPropsType;
|
|
20
21
|
positionDesktop?: positionPropsType;
|
|
21
22
|
positionMobile?: positionPropsType;
|
|
22
23
|
positionTablet?: positionPropsType;
|
|
23
|
-
set?: string;
|
|
24
24
|
shape?: tShapeProps;
|
|
25
25
|
shapeDesktop?: tShapeProps;
|
|
26
26
|
shapeMobile?: tShapeProps;
|
|
@@ -30,13 +30,15 @@ export interface IBreadcrumbsItemProps extends iStyleAttributes {
|
|
|
30
30
|
textColor?: tTextColorProps;
|
|
31
31
|
textColorHover?: tTextColorHoverProps;
|
|
32
32
|
textSize?: tTextSizeProps;
|
|
33
|
-
onClick?: () => void;
|
|
34
33
|
underline?: tUnderlineProps;
|
|
34
|
+
onClick?: () => void;
|
|
35
|
+
set?: string;
|
|
35
36
|
}
|
|
36
|
-
export interface
|
|
37
|
+
export interface iBreadcrumbsProps extends iStyleAttributes {
|
|
38
|
+
[key: number | string | symbol]: any;
|
|
37
39
|
breadcrumbsList?: {
|
|
38
|
-
href?: string;
|
|
39
40
|
id?: string;
|
|
41
|
+
href?: string;
|
|
40
42
|
text?: string;
|
|
41
43
|
}[];
|
|
42
44
|
children?: ReactNode;
|
|
@@ -59,7 +61,6 @@ export interface IBreadcrumbsProps extends iStyleAttributes {
|
|
|
59
61
|
positionDesktop?: positionPropsType;
|
|
60
62
|
positionMobile?: positionPropsType;
|
|
61
63
|
positionTablet?: positionPropsType;
|
|
62
|
-
set?: string;
|
|
63
64
|
shape?: tShapeProps;
|
|
64
65
|
shapeDesktop?: tShapeProps;
|
|
65
66
|
shapeMobile?: tShapeProps;
|
|
@@ -68,4 +69,5 @@ export interface IBreadcrumbsProps extends iStyleAttributes {
|
|
|
68
69
|
widthDesktop?: tWidthProps;
|
|
69
70
|
widthMobile?: tWidthProps;
|
|
70
71
|
widthTablet?: tWidthProps;
|
|
72
|
+
set?: string;
|
|
71
73
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare function BreadcrumbsItem(props:
|
|
1
|
+
import type { iBreadcrumbsItemProps } from './Breadcrumbs.interface';
|
|
2
|
+
declare function BreadcrumbsItem(props: iBreadcrumbsItemProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export { BreadcrumbsItem };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const buttonAppearance:
|
|
1
|
+
import { tButtonAppearance } from './Button.interface';
|
|
2
|
+
export declare const buttonAppearance: tButtonAppearance;
|