@itcase/ui 1.3.31 → 1.3.34
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-BX4N91_C.js +250 -0
- package/dist/Badge-CGHosmYx.js +246 -0
- package/dist/Button-D1m2MxZA.js +291 -0
- package/dist/Button-DZ3z7f-A.js +287 -0
- package/dist/Divider-BQcBkzt1.js +30 -0
- package/dist/Divider-ImOOytuN.js +34 -0
- package/dist/{DropdownItem-FNOztnTT.js → DropdownItem-BiiEhR49.js} +12 -16
- package/dist/{DropdownItem-Bq-oPnWX.js → DropdownItem-g5jWbyJy.js} +12 -16
- package/dist/Group-Chtnas-J.js +40 -0
- package/dist/Group-DiMnEfge.js +36 -0
- package/dist/{Icon-pUvizy3W.js → Icon-GVGrUu_Z.js} +6 -6
- package/dist/{Icon-BdHr6E6M.js → Icon-htF_V35Y.js} +7 -7
- package/dist/{Image-BbBG_UGI.js → Image-BEGwuGBM.js} +4 -4
- package/dist/{Image-D-QHhsrC.js → Image-DWfyapuD.js} +4 -4
- package/dist/{Input-BrV5_NoV.js → Input-COFdaiTe.js} +3 -3
- package/dist/{Input-ffioh1sj.js → Input-Dwvk-poq.js} +3 -3
- package/dist/Label-Dpeq55TV.js +233 -0
- package/dist/Label-XTFwl1aq.js +237 -0
- package/dist/{Link-CxWmYMyL.js → Link-B38Hn4G2.js} +5 -5
- package/dist/{Link-DN2LhPjD.js → Link-BhJ5BdyS.js} +6 -6
- package/dist/Loader-CBEbIRnd.js +69 -0
- package/dist/Loader-CsPvc-9g.js +65 -0
- package/dist/{MenuItem-CLDNk2l8.js → MenuItem-Cjlnmfwh.js} +6 -6
- package/dist/{MenuItem-amqx61Y0.js → MenuItem-PJkuGghn.js} +6 -6
- package/dist/{Overlay-B9nOIfLe.js → Overlay-BKh07Vb2.js} +4 -4
- package/dist/{Overlay-Yf9EEclM.js → Overlay-DiCjwUv4.js} +4 -4
- package/dist/{Text-Beslj4Ns.js → Text-C49zj3jO.js} +7 -7
- package/dist/{Text-JayJa3hj.js → Text-C6NSmetx.js} +7 -7
- package/dist/{Title-BfKF5WvZ.js → Title-BWWyRwLY.js} +4 -4
- package/dist/{Title-C7Qv9WfS.js → Title-Dck3eHNM.js} +4 -4
- package/dist/{Tooltip-AodzD-7D.js → Tooltip-BYgzNVYI.js} +18 -14
- package/dist/{Tooltip-BDEyAnd-.js → Tooltip-DpBQQoNo.js} +18 -14
- package/dist/cjs/components/Accordion.js +25 -29
- package/dist/cjs/components/Avatar.js +22 -20
- package/dist/cjs/components/Badge.js +12 -7
- package/dist/cjs/components/Breadcrumbs.js +16 -21
- package/dist/cjs/components/Button.js +13 -13
- package/dist/cjs/components/Card.js +9 -9
- package/dist/cjs/components/Cell.js +32 -17
- package/dist/cjs/components/Checkbox.js +13 -13
- package/dist/cjs/components/Checkmark.js +25 -23
- package/dist/cjs/components/Chips.js +22 -17
- package/dist/cjs/components/Choice.js +13 -13
- package/dist/cjs/components/Code.js +9 -19
- package/dist/cjs/components/CookiesWarning.js +15 -15
- package/dist/cjs/components/DadataHintField.js +4 -3
- package/dist/cjs/components/DatePicker.js +43 -19
- package/dist/cjs/components/Divider.js +7 -7
- package/dist/cjs/components/Dot.js +7 -7
- package/dist/cjs/components/Dropdown.js +9 -9
- package/dist/cjs/components/Flex.js +12 -11
- package/dist/cjs/components/Grid.js +12 -12
- package/dist/cjs/components/Group.js +6 -6
- package/dist/cjs/components/HTMLContent.js +7 -7
- package/dist/cjs/components/HeroTitle.js +9 -9
- package/dist/cjs/components/Icon.js +10 -10
- package/dist/cjs/components/Image.js +6 -6
- package/dist/cjs/components/Input.js +4 -3
- package/dist/cjs/components/InputMask.js +16 -15
- package/dist/cjs/components/InputPassword.js +12 -16
- package/dist/cjs/components/Label.js +10 -10
- package/dist/cjs/components/Link.js +6 -6
- package/dist/cjs/components/List.js +13 -12
- package/dist/cjs/components/Loader.js +8 -8
- package/dist/cjs/components/Logo.js +17 -15
- package/dist/cjs/components/Menu.js +11 -15
- package/dist/cjs/components/MenuItem.js +8 -8
- package/dist/cjs/components/Modal.js +11 -16
- package/dist/cjs/components/ModalSheetBottom.js +3 -3
- package/dist/cjs/components/Notification.js +8 -8
- package/dist/cjs/components/Overlay.js +6 -6
- package/dist/cjs/components/Pagination.js +14 -14
- package/dist/cjs/components/Panel.js +9 -9
- package/dist/cjs/components/Radio.js +16 -19
- package/dist/cjs/components/RangeSlider.js +7 -7
- package/dist/cjs/components/Response.js +15 -15
- package/dist/cjs/components/SVGContent.js +7 -7
- package/dist/cjs/components/ScrollOnDrag.js +8 -11
- package/dist/cjs/components/ScrollToView.js +9 -9
- package/dist/cjs/components/Search.js +16 -19
- package/dist/cjs/components/Segmented.js +8 -8
- package/dist/cjs/components/Select.js +34 -34
- package/dist/cjs/components/Swiper.js +11 -14
- package/dist/cjs/components/Switch.js +1 -1
- package/dist/cjs/components/Tab.js +17 -13
- package/dist/cjs/components/Text.js +6 -6
- package/dist/cjs/components/Textarea.js +8 -11
- package/dist/cjs/components/Tile.js +24 -20
- package/dist/cjs/components/Title.js +8 -8
- package/dist/cjs/components/Tooltip.js +9 -9
- package/dist/cjs/components/Video.js +4 -3
- package/dist/cjs/context/UIContext.js +48 -17
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +120 -0
- package/dist/cjs/hooks/useDevicePropsGenerator.js +17 -0
- package/dist/cjs/hooks/useDeviceTargetClass.js +8 -3
- package/dist/cjs/hooks/useMediaQueries/useMediaQueries.js +129 -0
- package/dist/cjs/hooks/useMediaQueries.js +4 -122
- package/dist/cjs/hooks/{styleAttributes.js → useStyles/styleAttributes.js} +8 -1
- package/dist/cjs/hooks/useStyles/useStyles.js +190 -0
- package/dist/cjs/hooks/useStyles.js +10 -174
- package/dist/components/Accordion.js +26 -30
- package/dist/components/Avatar.js +22 -20
- package/dist/components/Badge.js +13 -8
- package/dist/components/Breadcrumbs.js +17 -22
- package/dist/components/Button.js +13 -13
- package/dist/components/Card.js +10 -10
- package/dist/components/Cell.js +33 -18
- package/dist/components/Checkbox.js +14 -14
- package/dist/components/Checkmark.js +25 -23
- package/dist/components/Chips.js +22 -17
- package/dist/components/Choice.js +14 -14
- package/dist/components/Code.js +10 -20
- package/dist/components/CookiesWarning.js +16 -16
- package/dist/components/DadataHintField.js +5 -4
- package/dist/components/DatePicker.js +44 -20
- package/dist/components/Divider.js +7 -7
- package/dist/components/Dot.js +8 -8
- package/dist/components/Dropdown.js +10 -10
- package/dist/components/Flex.js +13 -12
- package/dist/components/Grid.js +13 -13
- package/dist/components/Group.js +7 -7
- package/dist/components/HTMLContent.js +8 -8
- package/dist/components/HeroTitle.js +9 -9
- package/dist/components/Icon.js +11 -11
- package/dist/components/Image.js +7 -7
- package/dist/components/Input.js +5 -4
- package/dist/components/InputMask.js +17 -16
- package/dist/components/InputPassword.js +13 -17
- package/dist/components/Label.js +10 -10
- package/dist/components/Link.js +7 -7
- package/dist/components/List.js +14 -13
- package/dist/components/Loader.js +8 -8
- package/dist/components/Logo.js +17 -15
- package/dist/components/Menu.js +12 -16
- package/dist/components/MenuItem.js +9 -9
- package/dist/components/Modal.js +12 -17
- package/dist/components/ModalSheetBottom.js +4 -4
- package/dist/components/Notification.js +9 -9
- package/dist/components/Overlay.js +7 -7
- package/dist/components/Pagination.js +15 -15
- package/dist/components/Panel.js +10 -10
- package/dist/components/Radio.js +17 -20
- package/dist/components/RangeSlider.js +8 -8
- package/dist/components/Response.js +16 -16
- package/dist/components/SVGContent.js +8 -8
- package/dist/components/ScrollOnDrag.js +9 -12
- package/dist/components/ScrollToView.js +10 -10
- package/dist/components/Search.js +17 -20
- package/dist/components/Segmented.js +9 -9
- package/dist/components/Select.js +35 -35
- package/dist/components/Swiper.js +12 -15
- package/dist/components/Switch.js +1 -1
- package/dist/components/Tab.js +18 -14
- package/dist/components/Text.js +7 -7
- package/dist/components/Textarea.js +9 -12
- package/dist/components/Tile.js +24 -20
- package/dist/components/Title.js +8 -8
- package/dist/components/Tooltip.js +9 -9
- package/dist/components/Video.js +4 -3
- package/dist/context/Notifications.js +1 -1
- package/dist/context/UIContext.js +50 -18
- package/dist/css/components/Accordion/Accordion.css +5 -8
- package/dist/css/components/Accordion/Accordion.tokens.css +2 -1
- package/dist/css/components/Avatar/Avatar.css +8 -8
- package/dist/css/components/Badge/Badge.css +48 -26
- package/dist/css/components/Badge/Badge.tokens.css +48 -18
- package/dist/css/components/Button/Button.css +67 -303
- package/dist/css/components/Button/Button.tokens.css +37 -115
- package/dist/css/components/Cell/Cell.css +2 -2
- package/dist/css/components/Checkbox/Checkbox.css +6 -4
- package/dist/css/components/Checkmark/Checkmark.css +11 -10
- package/dist/css/components/Checkmark/Checkmark.tokens.css +20 -14
- package/dist/css/components/Chips/Chips.css +47 -43
- package/dist/css/components/Chips/Chips.tokens.css +35 -7
- package/dist/css/components/DadataHintField/DadataHintField.css +0 -8
- package/dist/css/components/DadataHintField/DadataHintField.tokens.css +7 -2
- package/dist/css/components/DatePicker/DatePicker.css +102 -69
- package/dist/css/components/DatePicker/DatePicker.tokens.css +7 -2
- package/dist/css/components/Divider/Divider.css +0 -12
- package/dist/css/components/Divider/Divider.tokens.css +12 -0
- package/dist/css/components/Flex/Flex.css +0 -1
- package/dist/css/components/Grid/Grid.css +1 -5
- package/dist/css/components/HeroTitle/HeroTitle.css +2 -2
- package/dist/css/components/Icon/Icon.css +13 -14
- package/dist/css/components/Icon/Icon.tokens.css +2 -1
- package/dist/css/components/Image/Image.css +3 -3
- package/dist/css/components/Label/Label.css +2 -2
- package/dist/css/components/Loader/Loader.css +12 -5
- package/dist/css/components/Logo/Logo.css +3 -19
- package/dist/css/components/Menu/Menu.css +9 -1
- package/dist/css/components/MenuItem/MenuItem.css +0 -10
- package/dist/css/components/MenuItem/MenuItem.tokens.css +9 -1
- package/dist/css/components/Radio/Radio.css +0 -3
- package/dist/css/components/Radio/Radio.tokens.css +2 -1
- package/dist/css/components/ScrollToView/ScrollToView.css +4 -4
- package/dist/css/components/Select/Select.css +25 -0
- package/dist/css/components/Select/Select.tokens.css +8 -13
- package/dist/css/components/Swiper/Swiper.css +2 -3
- package/dist/css/components/Switch/Switch.css +0 -7
- package/dist/css/components/Text/Text.css +2 -2
- package/dist/css/components/Title/Title.css +2 -2
- package/dist/css/components/Tooltip/Tooltip.css +15 -21
- package/dist/css/components/Tooltip/Tooltip.tokens.css +13 -0
- package/dist/css/styles/fill/fill.css +14 -9
- package/dist/css/styles/fill/fill_active.css +6 -3
- package/dist/css/styles/fill/fill_active_hover.css +8 -6
- package/dist/css/styles/fill/fill_disabled.css +6 -3
- package/dist/css/styles/fill/fill_hover.css +6 -3
- package/dist/css/styles/shape-strength/shape-strength.css +22 -0
- package/dist/css/styles/svg-color/svg_fill.css +27 -17
- package/dist/css/styles/svg-color/svg_fill_hover.css +12 -10
- package/dist/css/styles/svg-color/svg_path_fill.css +13 -9
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +118 -0
- package/dist/hooks/useDevicePropsGenerator.js +11 -0
- package/dist/hooks/useDeviceTargetClass.js +8 -3
- package/dist/hooks/useMediaQueries/useMediaQueries.js +127 -0
- package/dist/hooks/useMediaQueries.js +3 -125
- package/dist/hooks/{styleAttributes.js → useStyles/styleAttributes.js} +8 -1
- package/dist/hooks/useStyles/useStyles.js +188 -0
- package/dist/hooks/useStyles.js +9 -177
- package/dist/stories/AlignContent.mdx +1 -1
- package/dist/stories/AlignItems.mdx +1 -1
- package/dist/stories/AlignSelf.mdx +1 -1
- package/dist/stories/Appearance.mdx +1 -1
- package/dist/stories/Avatar.mdx +1 -1
- package/dist/stories/Checkbox.mdx +1 -1
- package/dist/stories/Checkmark.mdx +7 -3
- package/dist/stories/Chips.mdx +1 -1
- package/dist/stories/Choice.mdx +1 -1
- package/dist/stories/Code.mdx +1 -1
- package/dist/stories/Columns.mdx +1 -1
- package/dist/stories/Components.mdx +197 -0
- package/dist/stories/DatePicker.mdx +1 -1
- package/dist/stories/Dev.mdx +1 -1
- package/dist/stories/DevMode.mdx +1 -1
- package/dist/stories/Direction.mdx +1 -1
- package/dist/stories/Divider.mdx +1 -1
- package/dist/stories/Dot.mdx +1 -1
- package/dist/stories/Drawer.mdx +1 -1
- package/dist/stories/Dropdown.mdx +2 -2
- package/dist/stories/DropdownItem.mdx +1 -1
- package/dist/stories/Group.mdx +1 -1
- package/dist/stories/Grow.mdx +1 -1
- package/dist/stories/HeroTitle.mdx +1 -1
- package/dist/stories/Icon.mdx +1 -1
- package/dist/stories/Image.mdx +1 -1
- package/dist/stories/Input.mdx +1 -1
- package/dist/stories/InputPassword.mdx +1 -1
- package/dist/stories/JustifyContent.mdx +1 -1
- package/dist/stories/Label.mdx +1 -1
- package/dist/stories/Loader.mdx +1 -1
- package/dist/stories/Logo.mdx +1 -1
- package/dist/stories/MenuItem.mdx +1 -1
- package/dist/stories/Message.mdx +1 -1
- package/dist/stories/Notification.mdx +1 -1
- package/dist/stories/Order.mdx +1 -1
- package/dist/stories/Overview.mdx +1 -1
- package/dist/stories/Pagination.mdx +1 -1
- package/dist/stories/Playground.mdx +1 -1
- package/dist/stories/Radio.mdx +1 -1
- package/dist/stories/Response.mdx +1 -1
- package/dist/stories/SearchInput.mdx +1 -1
- package/dist/stories/Segmented.mdx +1 -1
- package/dist/stories/Size.mdx +6 -26
- package/dist/stories/Skeleton.mdx +1 -1
- package/dist/stories/State.mdx +1 -1
- package/dist/stories/Switch.mdx +1 -1
- package/dist/stories/Text.mdx +1 -1
- package/dist/stories/Textarea.mdx +1 -1
- package/dist/stories/Tile.mdx +1 -1
- package/dist/stories/Title.mdx +1 -1
- package/dist/stories/Tooltip.mdx +1 -1
- package/dist/stories/WithTooltip.mdx +1 -1
- package/dist/stories/Wrap.mdx +1 -1
- package/dist/{tslib.es6-Bwu1Cn-t.js → tslib.es6-5FtW-kfi.js} +1 -1
- package/dist/types/appearance/defaultAppearance.d.ts +33 -0
- package/dist/types/appearance/index.d.ts +3 -0
- package/dist/types/appearance/styleAppearance.d.ts +14 -0
- package/dist/types/components/Accordion/Accordion.interface.d.ts +1 -1
- package/dist/types/components/Avatar/Avatar.interface.d.ts +1 -1
- package/dist/types/components/Badge/Badge.d.ts +0 -6
- package/dist/types/components/Badge/Badge.interface.d.ts +1 -1
- package/dist/types/components/Badge/appearance/badgeAccent.d.ts +39 -0
- package/dist/types/components/Badge/appearance/badgeDanger.d.ts +11 -0
- package/dist/types/components/Badge/appearance/badgeDisabled.d.ts +10 -0
- package/dist/types/components/Badge/appearance/badgeError.d.ts +12 -0
- package/dist/types/components/Badge/appearance/badgeInfo.d.ts +18 -0
- package/dist/types/components/Badge/appearance/badgePrimary.d.ts +11 -0
- package/dist/types/components/Badge/appearance/badgeSecondary.d.ts +11 -0
- package/dist/types/components/Badge/appearance/badgeSize.d.ts +32 -0
- package/dist/types/components/Badge/appearance/badgeStyle.d.ts +16 -0
- package/dist/types/components/Badge/appearance/badgeSuccess.d.ts +11 -0
- package/dist/types/components/Badge/appearance/badgeSurface.d.ts +29 -0
- package/dist/types/components/Badge/appearance/badgeWarning.d.ts +11 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +0 -5
- package/dist/types/components/Breadcrumbs/Breadcrumbs.interface.d.ts +1 -1
- package/dist/types/components/Button/Button.interface.d.ts +1 -1
- package/dist/types/components/Button/appearance/buttonAccent.d.ts +50 -0
- package/dist/types/components/Button/appearance/buttonDanger.d.ts +11 -0
- package/dist/types/components/Button/appearance/buttonError.d.ts +11 -0
- package/dist/types/components/Button/appearance/buttonInfo.d.ts +21 -0
- package/dist/types/components/Button/appearance/buttonPrimary.d.ts +8 -0
- package/dist/types/components/Button/appearance/buttonSecondary.d.ts +8 -0
- package/dist/types/components/Button/appearance/buttonSize.d.ts +59 -0
- package/dist/types/components/Button/appearance/buttonStyle.d.ts +16 -0
- package/dist/types/components/Button/appearance/buttonSuccess.d.ts +11 -0
- package/dist/types/components/Button/appearance/buttonSurface.d.ts +25 -0
- package/dist/types/components/Button/appearance/buttonWarning.d.ts +11 -0
- package/dist/types/components/Button/stories/args.d.ts +49 -49
- package/dist/types/components/Card/Card.interface.d.ts +1 -1
- package/dist/types/components/Cell/Cell.interface.d.ts +1 -1
- package/dist/types/components/Checkbox/Checkbox.interface.d.ts +1 -1
- package/dist/types/components/Checkmark/Checkmark.interface.d.ts +1 -1
- package/dist/types/components/Chips/Chips.interface.d.ts +1 -1
- package/dist/types/components/Chips/stories/args.d.ts +2 -2
- package/dist/types/components/Choice/Choice.interface.d.ts +1 -1
- package/dist/types/components/Code/Code.d.ts +0 -15
- package/dist/types/components/Code/Code.interface.d.ts +1 -1
- package/dist/types/components/DadataHintField/DadataHintField.interface.d.ts +1 -1
- package/dist/types/components/Divider/Divider.d.ts +0 -5
- package/dist/types/components/Divider/Divider.interface.d.ts +1 -1
- package/dist/types/components/Dot/Dot.interface.d.ts +1 -1
- package/dist/types/components/Drawer/Drawer.interface.d.ts +1 -1
- package/dist/types/components/Dropdown/Dropdown.interface.d.ts +1 -1
- package/dist/types/components/Dropdown/DropdownItem.d.ts +0 -7
- package/dist/types/components/Flex/Flex.interface.d.ts +1 -1
- package/dist/types/components/Flex/stories/args.d.ts +1 -1
- package/dist/types/components/Grid/Grid.interface.d.ts +1 -1
- package/dist/types/components/Grid/stories/args.d.ts +2 -2
- package/dist/types/components/Group/Group.interface.d.ts +1 -1
- package/dist/types/components/Group/stories/args.d.ts +2 -2
- package/dist/types/components/HTMLContent/HTMLContent.interface.d.ts +1 -1
- package/dist/types/components/HeroTitle/HeroTitle.interface.d.ts +1 -1
- package/dist/types/components/Icon/Icon.interface.d.ts +1 -1
- package/dist/types/components/Image/Image.interface.d.ts +1 -1
- package/dist/types/components/Input/Input.interface.d.ts +1 -1
- package/dist/types/components/InputMask/Input.interface.d.ts +1 -1
- package/dist/types/components/InputPassword/InputPassword.d.ts +0 -6
- package/dist/types/components/InputPassword/InputPassword.interface.d.ts +1 -1
- package/dist/types/components/Label/Label.interface.d.ts +1 -1
- package/dist/types/components/Label/appearance/labelAccent.d.ts +13 -0
- package/dist/types/components/Label/appearance/labelDanger.d.ts +11 -0
- package/dist/types/components/Label/appearance/labelError.d.ts +11 -0
- package/dist/types/components/Label/appearance/labelGradient.d.ts +11 -0
- package/dist/types/components/Label/appearance/labelInfo.d.ts +21 -0
- package/dist/types/components/Label/appearance/labelPrimary.d.ts +8 -0
- package/dist/types/components/Label/appearance/labelSecondary.d.ts +8 -0
- package/dist/types/components/Label/appearance/labelSize.d.ts +59 -0
- package/dist/types/components/Label/appearance/labelStyle.d.ts +16 -0
- package/dist/types/components/Label/appearance/labelSuccess.d.ts +11 -0
- package/dist/types/components/Label/appearance/labelSurface.d.ts +24 -0
- package/dist/types/components/Label/appearance/labelWarning.d.ts +11 -0
- package/dist/types/components/Link/Link.interface.d.ts +1 -1
- package/dist/types/components/List/List.interface.d.ts +1 -1
- package/dist/types/components/Loader/Loader.interface.d.ts +1 -1
- package/dist/types/components/Loader/appearance/loaderAccent.d.ts +7 -0
- package/dist/types/components/Loader/appearance/loaderPrimary.d.ts +7 -0
- package/dist/types/components/Loader/appearance/loaderSecondary.d.ts +7 -0
- package/dist/types/components/Loader/appearance/loaderSurface.d.ts +15 -0
- package/dist/types/components/Logo/Logo.interface.d.ts +1 -1
- package/dist/types/components/Menu/Menu.d.ts +0 -5
- package/dist/types/components/Menu/Menu.interface.d.ts +1 -1
- package/dist/types/components/MenuItem/MenuItem.interface.d.ts +1 -1
- package/dist/types/components/Modal/Modal.interface.d.ts +1 -1
- package/dist/types/components/Notification/Notification.interface.d.ts +1 -1
- package/dist/types/components/Overlay/Overlay.interface.d.ts +1 -1
- package/dist/types/components/Pagination/Pagination.interface.d.ts +1 -1
- package/dist/types/components/Panel/Panel.interface.d.ts +1 -1
- package/dist/types/components/Radio/Radio.d.ts +0 -5
- package/dist/types/components/Radio/Radio.interface.d.ts +1 -1
- package/dist/types/components/RangeSlider/RangeSlider.interface.d.ts +1 -1
- package/dist/types/components/Response/Response.interface.d.ts +1 -1
- package/dist/types/components/Response/stories/args.d.ts +4 -4
- package/dist/types/components/SVGContent/SVGContent.interface.d.ts +1 -1
- package/dist/types/components/ScrollOnDrag/ScrollOnDrag.d.ts +0 -5
- package/dist/types/components/ScrollOnDrag/ScrollOnDrag.interface.d.ts +1 -1
- package/dist/types/components/Scrollbar/Scrollbar.interface.d.ts +1 -1
- package/dist/types/components/Search/Search.interface.d.ts +1 -1
- package/dist/types/components/Segmented/Segmented.interface.d.ts +1 -1
- package/dist/types/components/Swiper/Swiper.d.ts +0 -5
- package/dist/types/components/Swiper/Swiper.interface.d.ts +1 -1
- package/dist/types/components/Switch/Switch.interface.d.ts +1 -1
- package/dist/types/components/Tab/Tab.interface.d.ts +1 -1
- package/dist/types/components/Tab/stories/args.d.ts +3 -3
- package/dist/types/components/Text/Text.interface.d.ts +1 -1
- package/dist/types/components/Textarea/Textarea.d.ts +0 -5
- package/dist/types/components/Textarea/Textarea.interface.d.ts +1 -1
- package/dist/types/components/Tile/Tile.d.ts +0 -5
- package/dist/types/components/Tile/Tile.interface.d.ts +1 -1
- package/dist/types/components/Title/Title.interface.d.ts +1 -1
- package/dist/types/components/Tooltip/Tooltip.interface.d.ts +1 -1
- package/dist/types/components/Video/Video.interface.d.ts +1 -1
- package/dist/types/context/UIContext.d.ts +8 -12
- package/dist/types/hooks/useDevicePropsGenerator/index.d.ts +1 -0
- package/dist/types/hooks/useDevicePropsGenerator/useDevicePropsGenerator.d.ts +3 -0
- package/dist/types/hooks/{useDeviceTargetClassGenerator.interface.d.ts → useDevicePropsGenerator/useDevicePropsGenerator.interface.d.ts} +2 -2
- package/dist/types/hooks/useMediaQueries/index.d.ts +1 -0
- package/dist/types/hooks/useStyles/index.d.ts +1 -0
- package/dist/types/hooks/useStyles/styleAttributes.d.ts +4 -0
- package/dist/types/types/componentProps/appearanceKeys.d.ts +1 -1
- package/dist/types/types/componentProps/borderColor.d.ts +1 -1
- package/dist/types/types/componentProps/fill.d.ts +1 -1
- package/package.json +15 -12
- package/dist/Badge-5gtVywXB.js +0 -111
- package/dist/Badge-DhOJoJgc.js +0 -115
- package/dist/Button-BSnodY9v.js +0 -103
- package/dist/Button-Kcw2DdY0.js +0 -99
- package/dist/Divider-DBvDCUqP.js +0 -30
- package/dist/Divider-Goh6mpPK.js +0 -34
- package/dist/Group-BY8OkVsS.js +0 -38
- package/dist/Group-c3ZkPu8e.js +0 -34
- package/dist/Label-CBwPiUuf.js +0 -97
- package/dist/Label-DgyUhGTQ.js +0 -93
- package/dist/Loader-Dn036JwE.js +0 -56
- package/dist/Loader-K_DJmah6.js +0 -52
- package/dist/cjs/hooks/useDeviceTargetClassGenerator.interface.js +0 -3
- package/dist/cjs/hooks/useDeviceTargetClassGenerator.js +0 -98
- package/dist/css/styles/column-gap/column-gap.css +0 -7
- package/dist/css/styles/gap/gap.css +0 -7
- package/dist/css/styles/row-gap/row-gap.css +0 -7
- package/dist/hooks/useDeviceTargetClassGenerator.interface.js +0 -1
- package/dist/hooks/useDeviceTargetClassGenerator.js +0 -96
- package/dist/stories/Badge.mdx +0 -20
- package/dist/stories/Button.mdx +0 -47
- package/dist/types/components/Badge/stories/args.d.ts +0 -69
- package/dist/types/hooks/styleAttributes.d.ts +0 -2
- package/dist/types/hooks/useDeviceTargetClassGenerator.d.ts +0 -3
- /package/dist/cjs/{hooks.js → hooks/useDevicePropsGenerator/useDevicePropsGenerator.interface.js} +0 -0
- /package/dist/cjs/hooks/{styleAttributes.interface.js → useStyles/styleAttributes.interface.js} +0 -0
- /package/dist/{hooks.js → hooks/useDevicePropsGenerator/useDevicePropsGenerator.interface.js} +0 -0
- /package/dist/hooks/{styleAttributes.interface.js → useStyles/styleAttributes.interface.js} +0 -0
- /package/dist/types/hooks/{useMediaQueries.d.ts → useMediaQueries/useMediaQueries.d.ts} +0 -0
- /package/dist/types/hooks/{styleAttributes.interface.d.ts → useStyles/styleAttributes.interface.d.ts} +0 -0
- /package/dist/types/hooks/{useStyles.d.ts → useStyles/useStyles.d.ts} +0 -0
|
@@ -1,127 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var useMediaQueries = require('./useMediaQueries/useMediaQueries.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('react-responsive');
|
|
4
6
|
|
|
5
|
-
var tablet = "48em";
|
|
6
|
-
var mediaQueries = {
|
|
7
|
-
"mobile-tiny": "15em",
|
|
8
|
-
"mobile-super-extra-large": "40em",
|
|
9
|
-
tablet: tablet,
|
|
10
|
-
"desktop-small": "60em",
|
|
11
|
-
"desktop-huge": "160em"
|
|
12
|
-
};
|
|
13
7
|
|
|
14
|
-
const isSSR = typeof window === 'undefined';
|
|
15
|
-
function useMediaQueries(userDevice = {}) {
|
|
16
|
-
// const isWarning = useMediaQuery({ maxWidth: mediaQueries['mobile-tiny'] })
|
|
17
8
|
|
|
18
|
-
|
|
19
|
-
const isMobile = reactResponsive.useMediaQuery({
|
|
20
|
-
minWidth: mediaQueries['mobile-tiny'],
|
|
21
|
-
maxWidth: mediaQueries['tablet']
|
|
22
|
-
}) || isSSR && Boolean(userDevice.isMobile);
|
|
23
|
-
|
|
24
|
-
// const isMobileTiny = useMediaQuery({
|
|
25
|
-
// minWidth: mediaQueries['mobile-tiny'],
|
|
26
|
-
// maxWidth: mediaQueries['mobile-small'],
|
|
27
|
-
// })
|
|
28
|
-
// const isMobileSmall = useMediaQuery({
|
|
29
|
-
// minWidth: mediaQueries['mobile-small'],
|
|
30
|
-
// maxWidth: mediaQueries['mobile-medium'],
|
|
31
|
-
// })
|
|
32
|
-
// const isMobileMedium = useMediaQuery({
|
|
33
|
-
// minWidth: mediaQueries['mobile-medium'],
|
|
34
|
-
// maxWidth: mediaQueries['mobile-normal'],
|
|
35
|
-
// })
|
|
36
|
-
// const isMobileNormal = useMediaQuery({
|
|
37
|
-
// minWidth: mediaQueries['mobile-normal'],
|
|
38
|
-
// maxWidth: mediaQueries['mobile-large'],
|
|
39
|
-
// })
|
|
40
|
-
// const isMobileStandart = useMediaQuery({
|
|
41
|
-
// minWidth: mediaQueries['mobile-large'],
|
|
42
|
-
// maxWidth: mediaQueries['mobile-extra-large'],
|
|
43
|
-
// })
|
|
44
|
-
// const isMobileLarge = useMediaQuery({
|
|
45
|
-
// minWidth: mediaQueries['mobile-extra-large'],
|
|
46
|
-
// maxWidth: mediaQueries['mobile-super-extra-large'],
|
|
47
|
-
// })
|
|
48
|
-
|
|
49
|
-
reactResponsive.useMediaQuery({
|
|
50
|
-
minWidth: mediaQueries['mobile-super-extra-large'],
|
|
51
|
-
maxWidth: mediaQueries['tablet']
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
// prettier-ignore
|
|
55
|
-
const isTablet = reactResponsive.useMediaQuery({
|
|
56
|
-
minWidth: mediaQueries['tablet'],
|
|
57
|
-
maxWidth: mediaQueries['desktop-small']
|
|
58
|
-
}) || isSSR && Boolean(userDevice.isTablet);
|
|
59
|
-
|
|
60
|
-
// const isTabletSmall = useMediaQuery({
|
|
61
|
-
// minWidth: mediaQueries['tablet-small'],
|
|
62
|
-
// maxWidth: mediaQueries['tablet'],
|
|
63
|
-
// })
|
|
64
|
-
// const isTabletLarge = useMediaQuery({
|
|
65
|
-
// minWidth: mediaQueries['tablet'],
|
|
66
|
-
// maxWidth: mediaQueries['tablet-large'],
|
|
67
|
-
// })
|
|
68
|
-
|
|
69
|
-
// prettier-ignore
|
|
70
|
-
const isDesktop = reactResponsive.useMediaQuery({
|
|
71
|
-
minWidth: mediaQueries['desktop-small'],
|
|
72
|
-
maxWidth: mediaQueries['desktop-super-huge']
|
|
73
|
-
}) || isSSR && Boolean(userDevice.isDesktop);
|
|
74
|
-
|
|
75
|
-
// const isDesktopSmall = useMediaQuery({
|
|
76
|
-
// minWidth: mediaQueries['desktop-small'],
|
|
77
|
-
// maxWidth: mediaQueries['desktop-medium'],
|
|
78
|
-
// })
|
|
79
|
-
// const isDesktopMedium = useMediaQuery({
|
|
80
|
-
// minWidth: mediaQueries['desktop-medium'],
|
|
81
|
-
// maxWidth: mediaQueries['desktop-normal'],
|
|
82
|
-
// })
|
|
83
|
-
// const isDesktopNormal = useMediaQuery({
|
|
84
|
-
// minWidth: mediaQueries['desktop-normal'],
|
|
85
|
-
// maxWidth: mediaQueries['desktop-large'],
|
|
86
|
-
// })
|
|
87
|
-
// const isDesktopStandart = useMediaQuery({
|
|
88
|
-
// minWidth: mediaQueries['desktop-large'],
|
|
89
|
-
// maxWidth: mediaQueries['desktop-extra-large'],
|
|
90
|
-
// })
|
|
91
|
-
// const isDesktopLarge = useMediaQuery({
|
|
92
|
-
// minWidth: mediaQueries['desktop-extra-large'],
|
|
93
|
-
// maxWidth: mediaQueries['desktop-super-extra-large'],
|
|
94
|
-
// })
|
|
95
|
-
// const isDesktopHuge = useMediaQuery({
|
|
96
|
-
// minWidth: mediaQueries['desktop-super-extra-large'],
|
|
97
|
-
// maxWidth: mediaQueries['desktop-huge'],
|
|
98
|
-
// })
|
|
99
|
-
|
|
100
|
-
const isDesktopMega = reactResponsive.useMediaQuery({
|
|
101
|
-
minWidth: mediaQueries['desktop-huge']
|
|
102
|
-
});
|
|
103
|
-
return {
|
|
104
|
-
// isWarning,
|
|
105
|
-
isMobile: isMobile,
|
|
106
|
-
// isMobileTiny,
|
|
107
|
-
// isMobileSmall,
|
|
108
|
-
// isMobileMedium,
|
|
109
|
-
// isMobileNormal,
|
|
110
|
-
// isMobileStandart,
|
|
111
|
-
// isMobileLarge,
|
|
112
|
-
isMobileHuge: isMobile,
|
|
113
|
-
isTablet: isTablet,
|
|
114
|
-
// isTabletSmall,
|
|
115
|
-
// isTabletLarge,
|
|
116
|
-
isDesktop: isDesktop,
|
|
117
|
-
// isDesktopSmall,
|
|
118
|
-
// isDesktopMedium,
|
|
119
|
-
// isDesktopNormal,
|
|
120
|
-
// isDesktopStandart,
|
|
121
|
-
// isDesktopLarge,
|
|
122
|
-
// isDesktopHuge,
|
|
123
|
-
isDesktopMega: isDesktopMega
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
exports.useMediaQueries = useMediaQueries;
|
|
9
|
+
exports.useMediaQueries = useMediaQueries.useMediaQueries;
|
|
@@ -6,7 +6,14 @@ var styleAttributes = [
|
|
|
6
6
|
/**
|
|
7
7
|
* Layout
|
|
8
8
|
*/
|
|
9
|
-
'alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'border', 'borderBottomWidth', 'borderEndWidth', 'borderLeftWidth', 'borderRightWidth', 'borderStartWidth', 'borderTopWidth', 'borderWidth', 'bottom', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'gap', 'rowGap', 'columnGap', 'columnWidth', 'height', 'justifyContent', 'left', 'margin', 'marginBottom', 'marginEnd', 'marginHorizontal', 'marginLeft', 'marginRight', 'marginStart', 'marginTop', 'marginVertical', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'overflow', 'padding', 'paddingBottom', 'paddingEnd', 'paddingHorizontal', 'paddingLeft', 'paddingRight', 'paddingStart', 'paddingTop', 'paddingVertical', 'position', 'right', 'top', 'width',
|
|
9
|
+
'alignContent', 'alignItems', 'alignSelf', 'aspectRatio', 'border', 'borderBottomWidth', 'borderEndWidth', 'borderLeftWidth', 'borderRightWidth', 'borderStartWidth', 'borderTopWidth', 'borderWidth', 'bottom', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'gap', 'rowGap', 'columnGap', 'columnWidth', 'height', 'justifyContent', 'left', 'margin', 'marginBottom', 'marginEnd', 'marginHorizontal', 'marginLeft', 'marginRight', 'marginStart', 'marginTop', 'marginVertical', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'overflow', 'padding', 'paddingBottom', 'paddingEnd', 'paddingHorizontal', 'paddingLeft', 'paddingRight', 'paddingStart', 'paddingTop', 'paddingVertical', 'position', 'right', 'top', ['width', {
|
|
10
|
+
validate: value => {
|
|
11
|
+
// Pass only number value for "width" style.
|
|
12
|
+
// If width have custom value, like "fill", we must set class by this value.
|
|
13
|
+
// "\d" - digit; "+" - 1 or more
|
|
14
|
+
return /\d+/.test(value);
|
|
15
|
+
}
|
|
16
|
+
}], 'zIndex', 'order',
|
|
10
17
|
/**
|
|
11
18
|
* Shadow
|
|
12
19
|
*/
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var camelCase = require('lodash/camelCase');
|
|
5
|
+
var maxBy = require('lodash/maxBy');
|
|
6
|
+
var upperFirst = require('lodash/upperFirst');
|
|
7
|
+
var UIContext = require('../../context/UIContext.js');
|
|
8
|
+
var styleAttributes = require('./styleAttributes.js');
|
|
9
|
+
require('../../../tslib.es6-CCZ3TN_7.js');
|
|
10
|
+
require('react/jsx-runtime');
|
|
11
|
+
require('../useMediaQueries/useMediaQueries.js');
|
|
12
|
+
require('react-responsive');
|
|
13
|
+
require('../../utils/setViewportProperty.js');
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* rule of prop key:
|
|
17
|
+
*
|
|
18
|
+
* first is style second is div target third is device
|
|
19
|
+
* paddingHorizontal GridInnerWrapper MobileNormal
|
|
20
|
+
*
|
|
21
|
+
* paddingHorizontalGridInnerWrapperMobileNormal: "10px"
|
|
22
|
+
*/
|
|
23
|
+
function useStyles(props) {
|
|
24
|
+
const {
|
|
25
|
+
deviceCurrentMainType,
|
|
26
|
+
deviceCurrentType,
|
|
27
|
+
deviceTypesList
|
|
28
|
+
} = UIContext.useUserDeviceContext();
|
|
29
|
+
const propsStyleAttributes = React.useMemo(() => {
|
|
30
|
+
const styles = Object.entries(props).reduce((result, [propKey, propValue]) => {
|
|
31
|
+
const styleAttributeKey = getTargetStyleAttributeKey(propKey, propValue);
|
|
32
|
+
if (styleAttributeKey) {
|
|
33
|
+
result[propKey] = propValue;
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}, {});
|
|
37
|
+
return styles;
|
|
38
|
+
// "props" object maybe big and frequently changing
|
|
39
|
+
}, [props]);
|
|
40
|
+
const collectedStyles = React.useMemo(() => {
|
|
41
|
+
const resultStylesGroups = {};
|
|
42
|
+
for (const [propKey, propValue] of Object.entries(propsStyleAttributes)) {
|
|
43
|
+
let value = null;
|
|
44
|
+
const styleAttributeKey = getTargetStyleAttributeKey(propKey, propValue);
|
|
45
|
+
const isStyleForCurrentDevice = propKey.toLowerCase().endsWith(deviceCurrentType.toLowerCase());
|
|
46
|
+
|
|
47
|
+
// e.g. "GridWrapperInner"
|
|
48
|
+
const targetElementKey = removeDeviceType(propKey.replace(styleAttributeKey, ''), deviceTypesList);
|
|
49
|
+
const targetElementGroupKey = camelCase(targetElementKey) || 'styles';
|
|
50
|
+
if (!resultStylesGroups[targetElementGroupKey]) {
|
|
51
|
+
resultStylesGroups[targetElementGroupKey] = {};
|
|
52
|
+
}
|
|
53
|
+
if (isStyleForCurrentDevice) {
|
|
54
|
+
value = propValue;
|
|
55
|
+
} else {
|
|
56
|
+
const propKeyWithOutDeviceType = `${styleAttributeKey}${targetElementKey}`;
|
|
57
|
+
const propKeyWithBaseDeviceType = `${propKeyWithOutDeviceType}${upperFirst(deviceCurrentMainType)}`;
|
|
58
|
+
const defaultValue = props[propKeyWithBaseDeviceType] || props[propKeyWithOutDeviceType];
|
|
59
|
+
let currentValue = resultStylesGroups[targetElementGroupKey][styleAttributeKey];
|
|
60
|
+
if (propKeyWithOutDeviceType.includes('Horizontal')) {
|
|
61
|
+
const keyLeft = styleAttributeKey.replace('Horizontal', 'Left');
|
|
62
|
+
currentValue = resultStylesGroups[targetElementGroupKey][keyLeft];
|
|
63
|
+
} else if (propKeyWithOutDeviceType.includes('Vertical')) {
|
|
64
|
+
const keyTop = styleAttributeKey.replace('Vertical', 'Top');
|
|
65
|
+
currentValue = resultStylesGroups[targetElementGroupKey][keyTop];
|
|
66
|
+
}
|
|
67
|
+
if (!currentValue) {
|
|
68
|
+
value = defaultValue;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (value) {
|
|
72
|
+
// Check not digit symbols. Chars means some unit ("px", "em", "rem" or custom "m")
|
|
73
|
+
const isValueHasUnit = /\D/.test(value);
|
|
74
|
+
// If value has some unit
|
|
75
|
+
if (isValueHasUnit) {
|
|
76
|
+
// Check value on our custom "m"(module) unit
|
|
77
|
+
/** Pattern for:
|
|
78
|
+
* 1m
|
|
79
|
+
* 1.5m
|
|
80
|
+
* 1m 1m 1.5m
|
|
81
|
+
* 0 0 1m 1m
|
|
82
|
+
*/
|
|
83
|
+
const isValueHasModuleUnit = /\d+\.?\d*m\s?(?![a-zA-Z]+)/.test(value);
|
|
84
|
+
// If value has module unit
|
|
85
|
+
if (isValueHasModuleUnit) {
|
|
86
|
+
/** Order for shorthand properties:
|
|
87
|
+
* top
|
|
88
|
+
* right
|
|
89
|
+
* bottom
|
|
90
|
+
* left
|
|
91
|
+
* or:
|
|
92
|
+
* top
|
|
93
|
+
* right and left
|
|
94
|
+
* bottom
|
|
95
|
+
* or:
|
|
96
|
+
* top and bottom
|
|
97
|
+
* right and left
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
const valuePxPartsList = value.split(' ').map(valuePart => {
|
|
101
|
+
const valueModule = valuePart.replace(/[a-z]/gi, '');
|
|
102
|
+
const valuePx = parseFloat(valueModule) * 8;
|
|
103
|
+
return `${valuePx}px`;
|
|
104
|
+
}, []);
|
|
105
|
+
value = valuePxPartsList.join(' ');
|
|
106
|
+
}
|
|
107
|
+
} else {
|
|
108
|
+
// Some properties doesn't have any units
|
|
109
|
+
const ignorePX = ['zIndex', 'order', 'flexGrow'].includes(styleAttributeKey);
|
|
110
|
+
if (!ignorePX) {
|
|
111
|
+
// Add px to non-unit value
|
|
112
|
+
value = `${value}px`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
if (styleAttributeKey.includes('Horizontal')) {
|
|
116
|
+
const keyRight = styleAttributeKey.replace('Horizontal', 'Right');
|
|
117
|
+
const keyLeft = styleAttributeKey.replace('Horizontal', 'Left');
|
|
118
|
+
const valuePartsList = value.split(' ');
|
|
119
|
+
const valueRight = valuePartsList[0];
|
|
120
|
+
const valueLeft = valuePartsList[1] || valuePartsList[0];
|
|
121
|
+
resultStylesGroups[targetElementGroupKey][keyRight] = valueRight;
|
|
122
|
+
resultStylesGroups[targetElementGroupKey][keyLeft] = valueLeft;
|
|
123
|
+
} else if (styleAttributeKey.includes('Vertical')) {
|
|
124
|
+
const keyTop = styleAttributeKey.replace('Vertical', 'Top');
|
|
125
|
+
const keyBottom = styleAttributeKey.replace('Vertical', 'Bottom');
|
|
126
|
+
const valuePartsList = value.split(' ');
|
|
127
|
+
const valueTop = valuePartsList[0];
|
|
128
|
+
const valueBottom = valuePartsList[1] || valuePartsList[0];
|
|
129
|
+
resultStylesGroups[targetElementGroupKey][keyTop] = valueTop;
|
|
130
|
+
resultStylesGroups[targetElementGroupKey][keyBottom] = valueBottom;
|
|
131
|
+
} else {
|
|
132
|
+
resultStylesGroups[targetElementGroupKey][styleAttributeKey] = value;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return resultStylesGroups;
|
|
137
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
|
+
}, [deviceCurrentMainType, deviceCurrentType, ...Object.values(propsStyleAttributes)]);
|
|
139
|
+
return collectedStyles;
|
|
140
|
+
}
|
|
141
|
+
const removeDeviceType = (originalKey, deviceTypesList) => {
|
|
142
|
+
// Remove "mobile"/"tablet"/"desktop"
|
|
143
|
+
const withOutDeviceType = deviceTypesList.reduce((cleanKey, deviceType) => {
|
|
144
|
+
if (cleanKey.endsWith(upperFirst(deviceType))) {
|
|
145
|
+
return cleanKey.replace(upperFirst(deviceType), '');
|
|
146
|
+
}
|
|
147
|
+
return cleanKey;
|
|
148
|
+
}, originalKey);
|
|
149
|
+
return withOutDeviceType;
|
|
150
|
+
};
|
|
151
|
+
const getTargetStyleAttributeKey = (styleKey, styleValue = '') => {
|
|
152
|
+
// Collect list of possible styles for propKey. e.g:
|
|
153
|
+
// "borderLeftWidthWrapperInnerMobileNormal" to ["border", "borderLeftWidth"]
|
|
154
|
+
const possibleStyleAttributesList = styleAttributes.default.filter(styleAttribute => {
|
|
155
|
+
// Attribute can be array with key on first position and params on second
|
|
156
|
+
if (Array.isArray(styleAttribute)) {
|
|
157
|
+
// First item always attribute key (e.g. border, width, etc)
|
|
158
|
+
const styleAttributeKey = styleAttribute[0];
|
|
159
|
+
// Second item always params with some settings or methods
|
|
160
|
+
const styleAttributeParams = styleAttribute[1] || {};
|
|
161
|
+
// If is target attribute key
|
|
162
|
+
if (styleKey.startsWith(styleAttributeKey)) {
|
|
163
|
+
// If target attribute params has validate method
|
|
164
|
+
if (styleAttributeParams.validate) {
|
|
165
|
+
// Return validation result for target attribute
|
|
166
|
+
return styleAttributeParams.validate(styleValue);
|
|
167
|
+
} else {
|
|
168
|
+
// Or always add to list
|
|
169
|
+
return true;
|
|
170
|
+
}
|
|
171
|
+
} else {
|
|
172
|
+
// Else ignore
|
|
173
|
+
return false;
|
|
174
|
+
}
|
|
175
|
+
} else {
|
|
176
|
+
// If is target attribute
|
|
177
|
+
return styleKey.startsWith(styleAttribute);
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
// Get longest style key (e.g. "borderLeftWidth")
|
|
182
|
+
const targetStyleAttribute = maxBy(possibleStyleAttributesList, styleAttribute => {
|
|
183
|
+
const styleAttributeKey = Array.isArray(styleAttribute) ? styleAttribute[0] : styleAttribute;
|
|
184
|
+
return styleAttributeKey.length;
|
|
185
|
+
});
|
|
186
|
+
const styleAttributeKey = Array.isArray(targetStyleAttribute) ? targetStyleAttribute[0] : targetStyleAttribute;
|
|
187
|
+
return styleAttributeKey;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
exports.useStyles = useStyles;
|
|
@@ -1,182 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var useStyles = require('./useStyles/useStyles.js');
|
|
4
|
+
require('react');
|
|
5
|
+
require('lodash/camelCase');
|
|
6
|
+
require('lodash/maxBy');
|
|
7
|
+
require('lodash/upperFirst');
|
|
8
|
+
require('../context/UIContext.js');
|
|
9
|
+
require('../../tslib.es6-CCZ3TN_7.js');
|
|
9
10
|
require('react/jsx-runtime');
|
|
10
|
-
require('./useMediaQueries.js');
|
|
11
|
+
require('./useMediaQueries/useMediaQueries.js');
|
|
11
12
|
require('react-responsive');
|
|
12
13
|
require('../utils/setViewportProperty.js');
|
|
14
|
+
require('./useStyles/styleAttributes.js');
|
|
13
15
|
|
|
14
|
-
let DEVICE_TYPES = [];
|
|
15
|
-
const removeDeviceType = originalKey => {
|
|
16
|
-
// Remove "mobile"/"tablet"/"desktop"
|
|
17
|
-
const withOutDeviceType = DEVICE_TYPES.reduce((cleanKey, deviceType) => {
|
|
18
|
-
if (cleanKey.endsWith(upperFirst(deviceType))) {
|
|
19
|
-
return cleanKey.replace(upperFirst(deviceType), '');
|
|
20
|
-
}
|
|
21
|
-
return cleanKey;
|
|
22
|
-
}, originalKey);
|
|
23
|
-
return withOutDeviceType;
|
|
24
|
-
};
|
|
25
16
|
|
|
26
|
-
/*
|
|
27
|
-
* rule of prop key:
|
|
28
|
-
*
|
|
29
|
-
* first is style second is div target third is device
|
|
30
|
-
* paddingHorizontal GridInnerWrapper MobileNormal
|
|
31
|
-
*
|
|
32
|
-
* paddingHorizontalGridInnerWrapperMobileNormal: "10px"
|
|
33
|
-
*/
|
|
34
|
-
function useStyles(props) {
|
|
35
|
-
const allDevicesTypes = UIContext.useUserDeviceContext();
|
|
36
|
-
const {
|
|
37
|
-
isMobile,
|
|
38
|
-
isTablet,
|
|
39
|
-
isDesktop,
|
|
40
|
-
...fullNamedDeviceTypes
|
|
41
|
-
} = allDevicesTypes;
|
|
42
17
|
|
|
43
|
-
|
|
44
|
-
const deviceBasePart = React.useMemo(() => isMobile && 'Mobile' || isTablet && 'Tablet' || isDesktop && 'Desktop' || '', [isMobile, isTablet, isDesktop]);
|
|
45
|
-
const currentDevice = React.useMemo(() => {
|
|
46
|
-
const deviceTypes = Object.keys(allDevicesTypes).map(key => camelCase(key.replace('is', '')));
|
|
47
|
-
|
|
48
|
-
// if "fullNamedDeviceTypes.isMobileLarge": true - that our device
|
|
49
|
-
let currentDevice = Object.keys(fullNamedDeviceTypes).find(key => fullNamedDeviceTypes[key]);
|
|
50
|
-
if (!currentDevice) {
|
|
51
|
-
currentDevice = deviceBasePart;
|
|
52
|
-
}
|
|
53
|
-
currentDevice = upperFirst(camelCase(currentDevice.replace('is', '')));
|
|
54
|
-
DEVICE_TYPES = deviceTypes;
|
|
55
|
-
|
|
56
|
-
// Set non-existent "currentDevice" value, to collect default styles later
|
|
57
|
-
return currentDevice || '__DEVICE_IS_NOT_FOUND__';
|
|
58
|
-
}, [allDevicesTypes, deviceBasePart]);
|
|
59
|
-
const propsStyleAttributes = React.useMemo(() => {
|
|
60
|
-
const styles = Object.entries(props).reduce((result, [propKey, propValue]) => {
|
|
61
|
-
// Collect list of possible styles for propKey. e.g:
|
|
62
|
-
// "borderLeftWidthWrapperInnerMobileNormal" to ["border", "borderLeftWidth"]
|
|
63
|
-
const possibleStyleAttributesList = styleAttributes.default.filter(styleAttribute => {
|
|
64
|
-
return propKey.startsWith(styleAttribute);
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// Get longest style key (e.g. "borderLeftWidth")
|
|
68
|
-
const targetStyleAttribute = maxBy(possibleStyleAttributesList, 'length');
|
|
69
|
-
if (targetStyleAttribute) {
|
|
70
|
-
result[propKey] = propValue;
|
|
71
|
-
}
|
|
72
|
-
return result;
|
|
73
|
-
}, {});
|
|
74
|
-
return styles;
|
|
75
|
-
// "props" object maybe big and frequently changing
|
|
76
|
-
}, [props]);
|
|
77
|
-
const collectedStyles = React.useMemo(() => {
|
|
78
|
-
const resultStylesGroups = {};
|
|
79
|
-
for (const [propKey, propValue] of Object.entries(propsStyleAttributes)) {
|
|
80
|
-
let value = null;
|
|
81
|
-
const possibleStyleAttributesList = styleAttributes.default.filter(styleAttribute => {
|
|
82
|
-
return propKey.startsWith(styleAttribute);
|
|
83
|
-
});
|
|
84
|
-
const styleAttributeKey = maxBy(possibleStyleAttributesList, 'length');
|
|
85
|
-
const isStyleForCurrentDevice = propKey.toLowerCase().endsWith(currentDevice.toLowerCase());
|
|
86
|
-
|
|
87
|
-
// e.g. "GridWrapperInner"
|
|
88
|
-
const targetElementKey = removeDeviceType(propKey.replace(styleAttributeKey, ''));
|
|
89
|
-
const targetElementGroupKey = camelCase(targetElementKey) || 'styles';
|
|
90
|
-
if (!resultStylesGroups[targetElementGroupKey]) {
|
|
91
|
-
resultStylesGroups[targetElementGroupKey] = {};
|
|
92
|
-
}
|
|
93
|
-
if (isStyleForCurrentDevice) {
|
|
94
|
-
value = propValue;
|
|
95
|
-
} else {
|
|
96
|
-
const propKeyWithOutDeviceType = `${styleAttributeKey}${targetElementKey}`;
|
|
97
|
-
const propKeyWithBaseDeviceType = `${propKeyWithOutDeviceType}${deviceBasePart}`;
|
|
98
|
-
const defaultValue = props[propKeyWithBaseDeviceType] || props[propKeyWithOutDeviceType];
|
|
99
|
-
let currentValue = resultStylesGroups[targetElementGroupKey][styleAttributeKey];
|
|
100
|
-
if (propKeyWithOutDeviceType.includes('Horizontal')) {
|
|
101
|
-
const keyLeft = styleAttributeKey.replace('Horizontal', 'Left');
|
|
102
|
-
currentValue = resultStylesGroups[targetElementGroupKey][keyLeft];
|
|
103
|
-
} else if (propKeyWithOutDeviceType.includes('Vertical')) {
|
|
104
|
-
const keyTop = styleAttributeKey.replace('Vertical', 'Top');
|
|
105
|
-
currentValue = resultStylesGroups[targetElementGroupKey][keyTop];
|
|
106
|
-
}
|
|
107
|
-
if (!currentValue) {
|
|
108
|
-
value = defaultValue;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
if (value) {
|
|
112
|
-
// Check not digit symbols. Chars means some unit ("px", "em", "rem" or custom "m")
|
|
113
|
-
const isValueHasUnit = /\D/.test(value);
|
|
114
|
-
// If value has some unit
|
|
115
|
-
if (isValueHasUnit) {
|
|
116
|
-
// Check value on our custom "m"(module) unit
|
|
117
|
-
/** Pattern for:
|
|
118
|
-
* 1m
|
|
119
|
-
* 1.5m
|
|
120
|
-
* 1m 1m 1.5m
|
|
121
|
-
* 0 0 1m 1m
|
|
122
|
-
*/
|
|
123
|
-
const isValueHasModuleUnit = /\d+\.?\d*m\s?(?![a-zA-Z]+)/.test(value);
|
|
124
|
-
// If value has module unit
|
|
125
|
-
if (isValueHasModuleUnit) {
|
|
126
|
-
/** Order for shorthand properties:
|
|
127
|
-
* top
|
|
128
|
-
* right
|
|
129
|
-
* bottom
|
|
130
|
-
* left
|
|
131
|
-
* or:
|
|
132
|
-
* top
|
|
133
|
-
* right and left
|
|
134
|
-
* bottom
|
|
135
|
-
* or:
|
|
136
|
-
* top and bottom
|
|
137
|
-
* right and left
|
|
138
|
-
*/
|
|
139
|
-
|
|
140
|
-
const valuePxPartsList = value.split(' ').map(valuePart => {
|
|
141
|
-
const valueModule = valuePart.replace(/[a-z]/gi, '');
|
|
142
|
-
const valuePx = parseFloat(valueModule) * 8;
|
|
143
|
-
return `${valuePx}px`;
|
|
144
|
-
}, []);
|
|
145
|
-
value = valuePxPartsList.join(' ');
|
|
146
|
-
}
|
|
147
|
-
} else {
|
|
148
|
-
// Some properties doesn't have any units
|
|
149
|
-
const ignorePX = ['zIndex', 'order', 'flexGrow'].includes(styleAttributeKey);
|
|
150
|
-
if (!ignorePX) {
|
|
151
|
-
// Add px to non-unit value
|
|
152
|
-
value = `${value}px`;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
if (styleAttributeKey.includes('Horizontal')) {
|
|
156
|
-
const keyRight = styleAttributeKey.replace('Horizontal', 'Right');
|
|
157
|
-
const keyLeft = styleAttributeKey.replace('Horizontal', 'Left');
|
|
158
|
-
const valuePartsList = value.split(' ');
|
|
159
|
-
const valueRight = valuePartsList[0];
|
|
160
|
-
const valueLeft = valuePartsList[1] || valuePartsList[0];
|
|
161
|
-
resultStylesGroups[targetElementGroupKey][keyRight] = valueRight;
|
|
162
|
-
resultStylesGroups[targetElementGroupKey][keyLeft] = valueLeft;
|
|
163
|
-
} else if (styleAttributeKey.includes('Vertical')) {
|
|
164
|
-
const keyTop = styleAttributeKey.replace('Vertical', 'Top');
|
|
165
|
-
const keyBottom = styleAttributeKey.replace('Vertical', 'Bottom');
|
|
166
|
-
const valuePartsList = value.split(' ');
|
|
167
|
-
const valueTop = valuePartsList[0];
|
|
168
|
-
const valueBottom = valuePartsList[1] || valuePartsList[0];
|
|
169
|
-
resultStylesGroups[targetElementGroupKey][keyTop] = valueTop;
|
|
170
|
-
resultStylesGroups[targetElementGroupKey][keyBottom] = valueBottom;
|
|
171
|
-
} else {
|
|
172
|
-
resultStylesGroups[targetElementGroupKey][styleAttributeKey] = value;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
return resultStylesGroups;
|
|
177
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
178
|
-
}, [deviceBasePart, currentDevice, ...Object.values(propsStyleAttributes)]);
|
|
179
|
-
return collectedStyles;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
exports.useStyles = useStyles;
|
|
18
|
+
exports.useStyles = useStyles.useStyles;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as __spreadArray } from '../tslib.es6-5FtW-kfi.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React, { useCallback, useState, useMemo } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import castArray from 'lodash/castArray';
|
|
6
|
-
import {
|
|
7
|
-
import { useStyles } from '../hooks/useStyles.js';
|
|
6
|
+
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
|
+
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
8
|
import { icon16 } from '@itcase/icons/default';
|
|
9
|
-
import { D as Divider } from '../Divider-
|
|
10
|
-
import { I as Icon } from '../Icon-
|
|
11
|
-
import { T as Text } from '../Text-
|
|
9
|
+
import { D as Divider } from '../Divider-BQcBkzt1.js';
|
|
10
|
+
import { I as Icon } from '../Icon-htF_V35Y.js';
|
|
11
|
+
import { T as Text } from '../Text-C6NSmetx.js';
|
|
12
12
|
import 'lodash/camelCase';
|
|
13
|
+
import 'lodash/upperFirst';
|
|
13
14
|
import '../context/UIContext.js';
|
|
14
|
-
import '../hooks/useMediaQueries.js';
|
|
15
|
+
import '../hooks/useMediaQueries/useMediaQueries.js';
|
|
15
16
|
import 'react-responsive';
|
|
16
17
|
import '../utils/setViewportProperty.js';
|
|
17
18
|
import 'lodash/maxBy';
|
|
18
|
-
import '
|
|
19
|
-
import '../hooks/styleAttributes.js';
|
|
19
|
+
import '../hooks/useStyles/styleAttributes.js';
|
|
20
20
|
import 'react-inlinesvg';
|
|
21
|
-
import '../Link-
|
|
22
|
-
import '../Tooltip-
|
|
23
|
-
import '../Title-
|
|
21
|
+
import '../Link-BhJ5BdyS.js';
|
|
22
|
+
import '../Tooltip-BYgzNVYI.js';
|
|
23
|
+
import '../Title-Dck3eHNM.js';
|
|
24
24
|
|
|
25
25
|
var accordionAppearance = {
|
|
26
26
|
dev: {},
|
|
@@ -36,25 +36,27 @@ var accordionItemConfig = {
|
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
function AccordionItem(props) {
|
|
39
|
-
var id = props.id, children = props.children,
|
|
39
|
+
var id = props.id, className = props.className, appearance = props.appearance, children = props.children, title = props.title, titleTextColor = props.titleTextColor, titleTextSize = props.titleTextSize, titleTextWeight = props.titleTextWeight, afterContent = props.afterContent, beforeContent = props.beforeContent, content = props.content, contentTextColor = props.contentTextColor, contentTextSize = props.contentTextSize, contentTextWeight = props.contentTextWeight, dividerDirection = props.dividerDirection, dividerFill = props.dividerFill, dividerSize = props.dividerSize, icon = props.icon, _a = props.iconFill, iconFill = _a === void 0 ? 'surfaceItemAccent' : _a, showDivider = props.showDivider, size = props.size, isExpanded = props.isExpanded, onClick = props.onClick;
|
|
40
40
|
var onClickTitle = useCallback(function () {
|
|
41
41
|
// "!isExpanded" - is next state of expanded
|
|
42
42
|
var thisItemData = {
|
|
43
43
|
id: id,
|
|
44
|
-
isExpanded: !isExpanded,
|
|
45
|
-
content: content,
|
|
46
44
|
title: title,
|
|
45
|
+
content: content,
|
|
46
|
+
isExpanded: !isExpanded,
|
|
47
47
|
};
|
|
48
48
|
onClick && onClick(thisItemData);
|
|
49
49
|
}, [id, title, content, isExpanded, onClick]);
|
|
50
50
|
// @ts-expect-error
|
|
51
|
-
var appearanceConfig = accordionItemConfig.appearance &&
|
|
52
|
-
|
|
53
|
-
var
|
|
51
|
+
var appearanceConfig = accordionItemConfig.appearance &&
|
|
52
|
+
accordionItemConfig.appearance[appearance];
|
|
53
|
+
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
54
|
+
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, titleBorderColorClass = propsGenerator.titleBorderColorClass, titleFillClass = propsGenerator.titleFillClass, titleFillHoverClass = propsGenerator.titleFillHoverClass, contentBorderColorClass = propsGenerator.contentBorderColorClass, contentFillClass = propsGenerator.contentFillClass, contentFillHoverClass = propsGenerator.contentFillHoverClass, shapeClass = propsGenerator.shapeClass;
|
|
54
55
|
// @ts-expect-error
|
|
55
56
|
var styles = useStyles(props).styles;
|
|
56
|
-
return (jsxs("div", { className: clsx('accordion-item', className, borderColorClass && "border-color_".concat(borderColorClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "accordion-item_shape_".concat(shapeClass), size && "accordion-item_size_".concat(size), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsx(Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), 'cursor_type_pointer'),
|
|
57
|
-
(
|
|
57
|
+
return (jsxs("div", { className: clsx('accordion-item', className, borderColorClass && "border-color_".concat(borderColorClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "accordion-item_shape_".concat(shapeClass), size && "accordion-item_size_".concat(size), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsx(Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), 'cursor_type_pointer'), textColor: titleTextColor, textWeight: titleTextWeight, size: titleTextSize, onClick: onClickTitle, children: title }), jsx("div", { className: clsx('accordion-item__icon', 'cursor_type_pointer'), onClick: onClickTitle, children: icon || (jsx(Icon, { iconFill: iconFill, size: "16", SvgImage: icon16.ChevronDown })) }), beforeContent && beforeContent, showDivider && (jsx(Divider, { width: "fill", direction: dividerDirection, fill: dividerFill || 'surfaceTertiary', size: dividerSize })), isExpanded && (jsx("div", { className: clsx('accordion-item__content', contentBorderColorClass &&
|
|
58
|
+
"border-color_".concat(contentBorderColorClass), contentFillClass && "fill_".concat(contentFillClass), contentFillHoverClass && "fill_hover_".concat(contentFillHoverClass)), children: children ||
|
|
59
|
+
(content && (jsx(Text, { textColor: contentTextColor, textWeight: contentTextWeight, size: contentTextSize, children: content }))) })), afterContent && afterContent] }));
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
var accordionConfig = {
|
|
@@ -64,7 +66,7 @@ var accordionConfig = {
|
|
|
64
66
|
},
|
|
65
67
|
};
|
|
66
68
|
function Accordion(props) {
|
|
67
|
-
var
|
|
69
|
+
var className = props.className, appearance = props.appearance, _a = props.initial, initial = _a === void 0 ? [] : _a, children = props.children, items = props.items, isMultiple = props.isMultiple, onClickItem = props.onClickItem;
|
|
68
70
|
var _b = useState(function () { return castArray(initial); }), expandedItems = _b[0], setExpandedItems = _b[1];
|
|
69
71
|
var onClickAccordionItem = useCallback(function (targetItem) {
|
|
70
72
|
setExpandedItems(function (prevState) {
|
|
@@ -92,7 +94,7 @@ function Accordion(props) {
|
|
|
92
94
|
}, [isMultiple, onClickItem]);
|
|
93
95
|
var accordionItemsList = useMemo(function () {
|
|
94
96
|
if (items) {
|
|
95
|
-
return items.map(function (item, i) { return (jsx(AccordionItem, {
|
|
97
|
+
return items.map(function (item, i) { return (jsx(AccordionItem, { id: item.id, title: item.title, content: item.content, isExpanded: expandedItems.includes(item.id), onClick: onClickAccordionItem }, "accordionItem_".concat(item.id || i + 1))); });
|
|
96
98
|
}
|
|
97
99
|
if (children) {
|
|
98
100
|
// @ts-ignore
|
|
@@ -110,15 +112,9 @@ function Accordion(props) {
|
|
|
110
112
|
}
|
|
111
113
|
return [];
|
|
112
114
|
}, [children, items, expandedItems, onClickAccordionItem]);
|
|
113
|
-
// @ts-expect-error
|
|
114
115
|
var appearanceConfig = accordionConfig.appearance && accordionConfig.appearance[appearance];
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
/*
|
|
118
|
-
* paddingHorizontalWrapper="16px"
|
|
119
|
-
* paddingHorizontal - styles (horizontal will be parsed to left/right)
|
|
120
|
-
* wrapper - target
|
|
121
|
-
*/
|
|
116
|
+
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
117
|
+
var directionClass = propsGenerator.directionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, shapeClass = propsGenerator.shapeClass, widthClass = propsGenerator.widthClass;
|
|
122
118
|
// @ts-expect-error
|
|
123
119
|
var _c = useStyles(props), accordionStyles = _c.styles, accordionWrapperStyles = _c.wrapper;
|
|
124
120
|
return (jsx("div", { className: clsx(className, 'accordion', borderColorClass && "border-color_".concat(borderColorClass), directionClass && "accordion_direction_".concat(directionClass), fillClass && "fill_".concat(fillClass), shapeClass && "accordion_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass)), style: accordionStyles, children: jsx("div", { className: "accordion__wrapper", style: accordionWrapperStyles, children: accordionItemsList }) }));
|