@ozen-ui/kit 0.64.0 → 0.66.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/BaseBottomSheet/package.json +5 -0
- package/ChipGroup/package.json +5 -0
- package/DialogNext/package.json +5 -0
- package/DrawerNext/package.json +5 -0
- package/Title/package.json +5 -0
- package/__inner__/cjs/components/AutocompleteNext/Autocomplete.css +1 -0
- package/__inner__/cjs/components/AutocompleteNext/Autocomplete.js +11 -11
- package/__inner__/cjs/components/AutocompleteNext/components/AutocompleteInput/AutocompleteInput.js +2 -2
- package/__inner__/cjs/components/AutocompleteNext/components/AutocompleteInput/types.d.ts +2 -1
- package/__inner__/cjs/components/AutocompleteNext/components/AutocompleteRenderRight/AutocompleteRenderRight.d.ts +2 -1
- package/__inner__/cjs/components/AutocompleteNext/components/AutocompleteRenderRight/AutocompleteRenderRight.js +14 -9
- package/__inner__/cjs/components/AutocompleteNext/constants.d.ts +1 -0
- package/__inner__/cjs/components/AutocompleteNext/constants.js +2 -1
- package/__inner__/cjs/components/AutocompleteNext/helpers.d.ts +1 -0
- package/__inner__/cjs/components/AutocompleteNext/types.d.ts +4 -0
- package/__inner__/cjs/components/AutocompleteNext/types.js +6 -0
- package/__inner__/cjs/components/ButtonNext/types.d.ts +4 -1
- package/__inner__/cjs/components/ChipGroup/ChipGroup.css +16 -0
- package/__inner__/cjs/components/ChipGroup/ChipGroup.d.ts +4 -0
- package/__inner__/cjs/components/ChipGroup/ChipGroup.js +52 -0
- package/__inner__/cjs/components/ChipGroup/ChipGroupContext.d.ts +10 -0
- package/__inner__/cjs/components/ChipGroup/ChipGroupContext.js +5 -0
- package/__inner__/cjs/components/ChipGroup/constants.d.ts +5 -0
- package/__inner__/cjs/components/ChipGroup/constants.js +6 -0
- package/__inner__/cjs/components/ChipGroup/index.d.ts +2 -0
- package/__inner__/cjs/components/ChipGroup/index.js +5 -0
- package/__inner__/cjs/components/ChipGroup/types.d.ts +33 -0
- package/__inner__/cjs/components/ChipGroup/types.js +2 -0
- package/__inner__/cjs/components/ChipNext/Chip.css +50 -17
- package/__inner__/cjs/components/ChipNext/Chip.js +32 -5
- package/__inner__/cjs/components/ChipNext/types.d.ts +9 -5
- package/__inner__/cjs/components/ChipNext/types.js +9 -2
- package/__inner__/cjs/components/Dialog/Dialog.d.ts +1 -3
- package/__inner__/cjs/components/Drawer/Drawer.d.ts +4 -3
- package/__inner__/cjs/components/Drawer/Drawer.js +3 -0
- package/__inner__/cjs/components/DrawerNext/Drawer.css +117 -0
- package/__inner__/cjs/components/DrawerNext/Drawer.d.ts +11 -0
- package/__inner__/cjs/components/DrawerNext/Drawer.js +55 -0
- package/__inner__/cjs/components/DrawerNext/DrawerContext.d.ts +10 -0
- package/__inner__/cjs/components/DrawerNext/DrawerContext.js +21 -0
- package/__inner__/cjs/components/DrawerNext/constants.d.ts +8 -0
- package/__inner__/cjs/components/DrawerNext/constants.js +11 -0
- package/__inner__/cjs/components/DrawerNext/entities/device.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/entities/device.js +4 -0
- package/__inner__/cjs/components/DrawerNext/entities/index.d.ts +4 -0
- package/__inner__/cjs/components/DrawerNext/entities/index.js +7 -0
- package/__inner__/cjs/components/DrawerNext/entities/placement.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/entities/placement.js +4 -0
- package/__inner__/cjs/components/DrawerNext/entities/size.d.ts +11 -0
- package/__inner__/cjs/components/DrawerNext/entities/size.js +7 -0
- package/__inner__/cjs/components/DrawerNext/entities/variant.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/entities/variant.js +4 -0
- package/__inner__/cjs/components/DrawerNext/hooks/index.d.ts +1 -0
- package/__inner__/cjs/components/DrawerNext/hooks/index.js +4 -0
- package/__inner__/cjs/components/DrawerNext/hooks/useDrawerWidth.d.ts +7 -0
- package/__inner__/cjs/components/DrawerNext/hooks/useDrawerWidth.js +36 -0
- package/__inner__/cjs/components/DrawerNext/index.d.ts +5 -0
- package/__inner__/cjs/components/DrawerNext/index.js +8 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerBody/DrawerBody.css +20 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerBody/DrawerBody.d.ts +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerBody/DrawerBody.js +17 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerBody/index.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerBody/index.js +5 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerBody/types.d.ts +11 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerBody/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerCloseButton/DrawerCloseButton.d.ts +3 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerCloseButton/DrawerCloseButton.js +21 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerCloseButton/constants.d.ts +1 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerCloseButton/constants.js +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerCloseButton/index.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerCloseButton/index.js +5 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerCloseButton/types.d.ts +7 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerCloseButton/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/DrawerFooter.css +21 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/DrawerFooter.d.ts +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/DrawerFooter.js +18 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/constants.d.ts +1 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/constants.js +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/entities/index.d.ts +1 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/entities/index.js +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/entities/mode.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/entities/mode.js +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/index.d.ts +3 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/index.js +6 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/types.d.ts +14 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooter/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButton/DrawerFooterButton.d.ts +3 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButton/DrawerFooterButton.js +15 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButton/constants.d.ts +1 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButton/constants.js +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButton/index.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButton/index.js +5 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButton/types.d.ts +6 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButton/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButtonsGroup/DrawerFooterButtonsGroup.css +13 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButtonsGroup/DrawerFooterButtonsGroup.d.ts +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButtonsGroup/DrawerFooterButtonsGroup.js +17 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButtonsGroup/index.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButtonsGroup/index.js +5 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButtonsGroup/types.d.ts +11 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerFooterButtonsGroup/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerHeader/DrawerHeader.css +14 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerHeader/DrawerHeader.d.ts +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerHeader/DrawerHeader.js +17 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerHeader/index.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerHeader/index.js +5 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerHeader/types.d.ts +11 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerHeader/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerSubtitle/DrawerSubtitle.css +22 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerSubtitle/DrawerSubtitle.d.ts +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerSubtitle/DrawerSubtitle.js +17 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerSubtitle/index.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerSubtitle/index.js +5 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerSubtitle/types.d.ts +11 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerSubtitle/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerTitle/DrawerTitle.css +14 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerTitle/DrawerTitle.d.ts +4 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerTitle/DrawerTitle.js +17 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerTitle/index.d.ts +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerTitle/index.js +5 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerTitle/types.d.ts +11 -0
- package/__inner__/cjs/components/DrawerNext/modules/DrawerTitle/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/modules/index.d.ts +8 -0
- package/__inner__/cjs/components/DrawerNext/modules/index.js +11 -0
- package/__inner__/cjs/components/DrawerNext/types.d.ts +30 -0
- package/__inner__/cjs/components/DrawerNext/types.js +2 -0
- package/__inner__/cjs/components/DrawerNext/utils.d.ts +8 -0
- package/__inner__/cjs/components/DrawerNext/utils.js +17 -0
- package/__inner__/cjs/components/FormGroup/types.d.ts +2 -0
- package/__inner__/cjs/components/FormTitle/FormTitle.d.ts +1 -0
- package/__inner__/cjs/components/IconButtonNext/types.d.ts +4 -1
- package/__inner__/cjs/components/IconButtonNext/utils.d.ts +2 -2
- package/__inner__/cjs/components/InputOTP/constants.d.ts +1 -1
- package/__inner__/cjs/components/Modal/Modal.d.ts +1 -3
- package/__inner__/cjs/components/Modal/types.d.ts +1 -3
- package/__inner__/cjs/components/Paper/types.d.ts +2 -0
- package/__inner__/cjs/components/TagNext/types.d.ts +1 -1
- package/__inner__/cjs/components/TagNext/types.js +1 -0
- package/__inner__/cjs/components/ThemeProvider/types.d.ts +8 -2
- package/__inner__/cjs/components/Title/Title.d.ts +4 -0
- package/__inner__/cjs/components/Title/Title.js +27 -0
- package/__inner__/cjs/components/Title/TitleContext.d.ts +8 -0
- package/__inner__/cjs/components/Title/TitleContext.js +17 -0
- package/__inner__/cjs/components/Title/components/index.d.ts +1 -0
- package/__inner__/cjs/components/Title/components/index.js +4 -0
- package/__inner__/cjs/components/Title/components/variant/TitleVariant.d.ts +2 -0
- package/__inner__/cjs/components/Title/components/variant/TitleVariant.js +24 -0
- package/__inner__/cjs/components/Title/components/variant/index.d.ts +4 -0
- package/__inner__/cjs/components/Title/components/variant/index.js +7 -0
- package/__inner__/cjs/components/Title/components/variant/main/TitleMain.css +38 -0
- package/__inner__/cjs/components/Title/components/variant/main/TitleMain.d.ts +4 -0
- package/__inner__/cjs/components/Title/components/variant/main/TitleMain.js +35 -0
- package/__inner__/cjs/components/Title/components/variant/main/config.d.ts +3 -0
- package/__inner__/cjs/components/Title/components/variant/main/config.js +7 -0
- package/__inner__/cjs/components/Title/components/variant/main/index.d.ts +2 -0
- package/__inner__/cjs/components/Title/components/variant/main/index.js +5 -0
- package/__inner__/cjs/components/Title/components/variant/main/types.d.ts +19 -0
- package/__inner__/cjs/components/Title/components/variant/main/types.js +2 -0
- package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.css +26 -0
- package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.d.ts +4 -0
- package/__inner__/cjs/components/Title/components/variant/secondary/TitleSecondary.js +15 -0
- package/__inner__/cjs/components/Title/components/variant/secondary/index.d.ts +2 -0
- package/__inner__/cjs/components/Title/components/variant/secondary/index.js +5 -0
- package/__inner__/cjs/components/Title/components/variant/secondary/types.d.ts +13 -0
- package/__inner__/cjs/components/Title/components/variant/secondary/types.js +2 -0
- package/__inner__/cjs/components/Title/components/variant/types.d.ts +8 -0
- package/__inner__/cjs/components/Title/components/variant/types.js +2 -0
- package/__inner__/cjs/components/Title/constants.d.ts +4 -0
- package/__inner__/cjs/components/Title/constants.js +6 -0
- package/__inner__/cjs/components/Title/entities/icon.d.ts +3 -0
- package/__inner__/cjs/components/Title/entities/icon.js +2 -0
- package/__inner__/cjs/components/Title/entities/index.d.ts +3 -0
- package/__inner__/cjs/components/Title/entities/index.js +6 -0
- package/__inner__/cjs/components/Title/entities/size.d.ts +2 -0
- package/__inner__/cjs/components/Title/entities/size.js +4 -0
- package/__inner__/cjs/components/Title/entities/variant.d.ts +7 -0
- package/__inner__/cjs/components/Title/entities/variant.js +4 -0
- package/__inner__/cjs/components/Title/index.d.ts +4 -0
- package/__inner__/cjs/components/Title/index.js +7 -0
- package/__inner__/cjs/components/Title/modules/icon-button/TitleIconButton.d.ts +3 -0
- package/__inner__/cjs/components/Title/modules/icon-button/TitleIconButton.js +16 -0
- package/__inner__/cjs/components/Title/modules/icon-button/constants.d.ts +1 -0
- package/__inner__/cjs/components/Title/modules/icon-button/constants.js +4 -0
- package/__inner__/cjs/components/Title/modules/icon-button/index.d.ts +2 -0
- package/__inner__/cjs/components/Title/modules/icon-button/index.js +5 -0
- package/__inner__/cjs/components/Title/modules/icon-button/types.d.ts +6 -0
- package/__inner__/cjs/components/Title/modules/icon-button/types.js +2 -0
- package/__inner__/cjs/components/Title/modules/index.d.ts +2 -0
- package/__inner__/cjs/components/Title/modules/index.js +5 -0
- package/__inner__/cjs/components/Title/modules/tag/TitleTag.css +4 -0
- package/__inner__/cjs/components/Title/modules/tag/TitleTag.d.ts +3 -0
- package/__inner__/cjs/components/Title/modules/tag/TitleTag.js +11 -0
- package/__inner__/cjs/components/Title/modules/tag/constants.d.ts +1 -0
- package/__inner__/cjs/components/Title/modules/tag/constants.js +4 -0
- package/__inner__/cjs/components/Title/modules/tag/index.d.ts +2 -0
- package/__inner__/cjs/components/Title/modules/tag/index.js +5 -0
- package/__inner__/cjs/components/Title/modules/tag/types.d.ts +6 -0
- package/__inner__/cjs/components/Title/modules/tag/types.js +2 -0
- package/__inner__/cjs/components/Title/types.d.ts +10 -0
- package/__inner__/cjs/components/Title/types.js +2 -0
- package/__inner__/cjs/constants/environment/index.d.ts +4 -0
- package/__inner__/cjs/constants/environment/index.js +7 -0
- package/__inner__/cjs/constants/environment/isClient.d.ts +1 -0
- package/__inner__/cjs/constants/environment/isClient.js +5 -0
- package/__inner__/cjs/constants/environment/isDev.d.ts +1 -0
- package/__inner__/cjs/constants/environment/isDev.js +5 -0
- package/__inner__/cjs/constants/environment/isProduction.d.ts +1 -0
- package/__inner__/cjs/constants/environment/isProduction.js +4 -0
- package/__inner__/cjs/constants/environment/isServer.d.ts +1 -0
- package/__inner__/cjs/constants/environment/isServer.js +4 -0
- package/__inner__/cjs/types/object/index.d.ts +1 -0
- package/__inner__/cjs/types/object/index.js +4 -0
- package/__inner__/cjs/types/object/withPartial.d.ts +3 -0
- package/__inner__/cjs/types/object/withPartial.js +2 -0
- package/__inner__/cjs/utils/css/generate-variable-name/generateCSSVariableName.d.ts +1 -0
- package/__inner__/cjs/utils/css/generate-variable-name/generateCSSVariableName.js +11 -0
- package/__inner__/cjs/utils/css/generate-variable-name/index.d.ts +1 -0
- package/__inner__/cjs/utils/css/generate-variable-name/index.js +4 -0
- package/__inner__/cjs/utils/css/generate-variables/generateCSSVariables.d.ts +2 -0
- package/__inner__/cjs/utils/css/generate-variables/generateCSSVariables.js +14 -0
- package/__inner__/cjs/utils/css/generate-variables/index.d.ts +1 -0
- package/__inner__/cjs/utils/css/generate-variables/index.js +4 -0
- package/__inner__/cjs/utils/css/index.d.ts +3 -0
- package/__inner__/cjs/utils/css/index.js +6 -0
- package/__inner__/cjs/utils/css/is-variable-name/index.d.ts +1 -0
- package/__inner__/cjs/utils/css/is-variable-name/index.js +4 -0
- package/__inner__/cjs/utils/css/is-variable-name/isCSSVariableName.d.ts +1 -0
- package/__inner__/cjs/utils/css/is-variable-name/isCSSVariableName.js +5 -0
- package/__inner__/esm/components/AutocompleteNext/Autocomplete.css +1 -0
- package/__inner__/esm/components/AutocompleteNext/Autocomplete.js +12 -12
- package/__inner__/esm/components/AutocompleteNext/components/AutocompleteInput/AutocompleteInput.js +2 -2
- package/__inner__/esm/components/AutocompleteNext/components/AutocompleteInput/types.d.ts +2 -1
- package/__inner__/esm/components/AutocompleteNext/components/AutocompleteRenderRight/AutocompleteRenderRight.d.ts +2 -1
- package/__inner__/esm/components/AutocompleteNext/components/AutocompleteRenderRight/AutocompleteRenderRight.js +14 -9
- package/__inner__/esm/components/AutocompleteNext/constants.d.ts +1 -0
- package/__inner__/esm/components/AutocompleteNext/constants.js +1 -0
- package/__inner__/esm/components/AutocompleteNext/helpers.d.ts +1 -0
- package/__inner__/esm/components/AutocompleteNext/types.d.ts +4 -0
- package/__inner__/esm/components/AutocompleteNext/types.js +5 -1
- package/__inner__/esm/components/ButtonNext/types.d.ts +4 -1
- package/__inner__/esm/components/ChipGroup/ChipGroup.css +16 -0
- package/__inner__/esm/components/ChipGroup/ChipGroup.d.ts +4 -0
- package/__inner__/esm/components/ChipGroup/ChipGroup.js +49 -0
- package/__inner__/esm/components/ChipGroup/ChipGroupContext.d.ts +10 -0
- package/__inner__/esm/components/ChipGroup/ChipGroupContext.js +2 -0
- package/__inner__/esm/components/ChipGroup/constants.d.ts +5 -0
- package/__inner__/esm/components/ChipGroup/constants.js +3 -0
- package/__inner__/esm/components/ChipGroup/index.d.ts +2 -0
- package/__inner__/esm/components/ChipGroup/index.js +2 -0
- package/__inner__/esm/components/ChipGroup/types.d.ts +33 -0
- package/__inner__/esm/components/ChipGroup/types.js +1 -0
- package/__inner__/esm/components/ChipNext/Chip.css +50 -17
- package/__inner__/esm/components/ChipNext/Chip.js +32 -5
- package/__inner__/esm/components/ChipNext/types.d.ts +9 -5
- package/__inner__/esm/components/ChipNext/types.js +8 -1
- package/__inner__/esm/components/Dialog/Dialog.d.ts +1 -3
- package/__inner__/esm/components/Drawer/Drawer.d.ts +4 -3
- package/__inner__/esm/components/Drawer/Drawer.js +3 -0
- package/__inner__/esm/components/DrawerNext/Drawer.css +117 -0
- package/__inner__/esm/components/DrawerNext/Drawer.d.ts +11 -0
- package/__inner__/esm/components/DrawerNext/Drawer.js +52 -0
- package/__inner__/esm/components/DrawerNext/DrawerContext.d.ts +10 -0
- package/__inner__/esm/components/DrawerNext/DrawerContext.js +17 -0
- package/__inner__/esm/components/DrawerNext/constants.d.ts +8 -0
- package/__inner__/esm/components/DrawerNext/constants.js +8 -0
- package/__inner__/esm/components/DrawerNext/entities/device.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/entities/device.js +1 -0
- package/__inner__/esm/components/DrawerNext/entities/index.d.ts +4 -0
- package/__inner__/esm/components/DrawerNext/entities/index.js +4 -0
- package/__inner__/esm/components/DrawerNext/entities/placement.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/entities/placement.js +1 -0
- package/__inner__/esm/components/DrawerNext/entities/size.d.ts +11 -0
- package/__inner__/esm/components/DrawerNext/entities/size.js +4 -0
- package/__inner__/esm/components/DrawerNext/entities/variant.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/entities/variant.js +1 -0
- package/__inner__/esm/components/DrawerNext/hooks/index.d.ts +1 -0
- package/__inner__/esm/components/DrawerNext/hooks/index.js +1 -0
- package/__inner__/esm/components/DrawerNext/hooks/useDrawerWidth.d.ts +7 -0
- package/__inner__/esm/components/DrawerNext/hooks/useDrawerWidth.js +32 -0
- package/__inner__/esm/components/DrawerNext/index.d.ts +5 -0
- package/__inner__/esm/components/DrawerNext/index.js +5 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerBody/DrawerBody.css +20 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerBody/DrawerBody.d.ts +4 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerBody/DrawerBody.js +14 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerBody/index.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerBody/index.js +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerBody/types.d.ts +11 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerBody/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerCloseButton/DrawerCloseButton.d.ts +3 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerCloseButton/DrawerCloseButton.js +18 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerCloseButton/constants.d.ts +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerCloseButton/constants.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerCloseButton/index.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerCloseButton/index.js +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerCloseButton/types.d.ts +7 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerCloseButton/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/DrawerFooter.css +21 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/DrawerFooter.d.ts +4 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/DrawerFooter.js +15 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/constants.d.ts +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/constants.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/entities/index.d.ts +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/entities/index.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/entities/mode.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/entities/mode.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/index.d.ts +3 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/index.js +3 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/types.d.ts +14 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooter/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButton/DrawerFooterButton.d.ts +3 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButton/DrawerFooterButton.js +12 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButton/constants.d.ts +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButton/constants.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButton/index.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButton/index.js +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButton/types.d.ts +6 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButton/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButtonsGroup/DrawerFooterButtonsGroup.css +13 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButtonsGroup/DrawerFooterButtonsGroup.d.ts +4 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButtonsGroup/DrawerFooterButtonsGroup.js +14 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButtonsGroup/index.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButtonsGroup/index.js +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButtonsGroup/types.d.ts +11 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerFooterButtonsGroup/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerHeader/DrawerHeader.css +14 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerHeader/DrawerHeader.d.ts +4 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerHeader/DrawerHeader.js +14 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerHeader/index.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerHeader/index.js +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerHeader/types.d.ts +11 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerHeader/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerSubtitle/DrawerSubtitle.css +22 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerSubtitle/DrawerSubtitle.d.ts +4 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerSubtitle/DrawerSubtitle.js +14 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerSubtitle/index.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerSubtitle/index.js +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerSubtitle/types.d.ts +11 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerSubtitle/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerTitle/DrawerTitle.css +14 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerTitle/DrawerTitle.d.ts +4 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerTitle/DrawerTitle.js +14 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerTitle/index.d.ts +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerTitle/index.js +2 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerTitle/types.d.ts +11 -0
- package/__inner__/esm/components/DrawerNext/modules/DrawerTitle/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/modules/index.d.ts +8 -0
- package/__inner__/esm/components/DrawerNext/modules/index.js +8 -0
- package/__inner__/esm/components/DrawerNext/types.d.ts +30 -0
- package/__inner__/esm/components/DrawerNext/types.js +1 -0
- package/__inner__/esm/components/DrawerNext/utils.d.ts +8 -0
- package/__inner__/esm/components/DrawerNext/utils.js +14 -0
- package/__inner__/esm/components/FormGroup/types.d.ts +2 -0
- package/__inner__/esm/components/FormTitle/FormTitle.d.ts +1 -0
- package/__inner__/esm/components/IconButtonNext/types.d.ts +4 -1
- package/__inner__/esm/components/IconButtonNext/utils.d.ts +2 -2
- package/__inner__/esm/components/InputOTP/constants.d.ts +1 -1
- package/__inner__/esm/components/Modal/Modal.d.ts +1 -3
- package/__inner__/esm/components/Modal/types.d.ts +1 -3
- package/__inner__/esm/components/Paper/types.d.ts +2 -0
- package/__inner__/esm/components/TagNext/types.d.ts +1 -1
- package/__inner__/esm/components/TagNext/types.js +1 -0
- package/__inner__/esm/components/ThemeProvider/types.d.ts +8 -2
- package/__inner__/esm/components/Title/Title.d.ts +4 -0
- package/__inner__/esm/components/Title/Title.js +24 -0
- package/__inner__/esm/components/Title/TitleContext.d.ts +8 -0
- package/__inner__/esm/components/Title/TitleContext.js +12 -0
- package/__inner__/esm/components/Title/components/index.d.ts +1 -0
- package/__inner__/esm/components/Title/components/index.js +1 -0
- package/__inner__/esm/components/Title/components/variant/TitleVariant.d.ts +2 -0
- package/__inner__/esm/components/Title/components/variant/TitleVariant.js +21 -0
- package/__inner__/esm/components/Title/components/variant/index.d.ts +4 -0
- package/__inner__/esm/components/Title/components/variant/index.js +4 -0
- package/__inner__/esm/components/Title/components/variant/main/TitleMain.css +38 -0
- package/__inner__/esm/components/Title/components/variant/main/TitleMain.d.ts +4 -0
- package/__inner__/esm/components/Title/components/variant/main/TitleMain.js +32 -0
- package/__inner__/esm/components/Title/components/variant/main/config.d.ts +3 -0
- package/__inner__/esm/components/Title/components/variant/main/config.js +4 -0
- package/__inner__/esm/components/Title/components/variant/main/index.d.ts +2 -0
- package/__inner__/esm/components/Title/components/variant/main/index.js +2 -0
- package/__inner__/esm/components/Title/components/variant/main/types.d.ts +19 -0
- package/__inner__/esm/components/Title/components/variant/main/types.js +1 -0
- package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.css +26 -0
- package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.d.ts +4 -0
- package/__inner__/esm/components/Title/components/variant/secondary/TitleSecondary.js +12 -0
- package/__inner__/esm/components/Title/components/variant/secondary/index.d.ts +2 -0
- package/__inner__/esm/components/Title/components/variant/secondary/index.js +2 -0
- package/__inner__/esm/components/Title/components/variant/secondary/types.d.ts +13 -0
- package/__inner__/esm/components/Title/components/variant/secondary/types.js +1 -0
- package/__inner__/esm/components/Title/components/variant/types.d.ts +8 -0
- package/__inner__/esm/components/Title/components/variant/types.js +1 -0
- package/__inner__/esm/components/Title/constants.d.ts +4 -0
- package/__inner__/esm/components/Title/constants.js +3 -0
- package/__inner__/esm/components/Title/entities/icon.d.ts +3 -0
- package/__inner__/esm/components/Title/entities/icon.js +1 -0
- package/__inner__/esm/components/Title/entities/index.d.ts +3 -0
- package/__inner__/esm/components/Title/entities/index.js +3 -0
- package/__inner__/esm/components/Title/entities/size.d.ts +2 -0
- package/__inner__/esm/components/Title/entities/size.js +1 -0
- package/__inner__/esm/components/Title/entities/variant.d.ts +7 -0
- package/__inner__/esm/components/Title/entities/variant.js +1 -0
- package/__inner__/esm/components/Title/index.d.ts +4 -0
- package/__inner__/esm/components/Title/index.js +4 -0
- package/__inner__/esm/components/Title/modules/icon-button/TitleIconButton.d.ts +3 -0
- package/__inner__/esm/components/Title/modules/icon-button/TitleIconButton.js +13 -0
- package/__inner__/esm/components/Title/modules/icon-button/constants.d.ts +1 -0
- package/__inner__/esm/components/Title/modules/icon-button/constants.js +1 -0
- package/__inner__/esm/components/Title/modules/icon-button/index.d.ts +2 -0
- package/__inner__/esm/components/Title/modules/icon-button/index.js +2 -0
- package/__inner__/esm/components/Title/modules/icon-button/types.d.ts +6 -0
- package/__inner__/esm/components/Title/modules/icon-button/types.js +1 -0
- package/__inner__/esm/components/Title/modules/index.d.ts +2 -0
- package/__inner__/esm/components/Title/modules/index.js +2 -0
- package/__inner__/esm/components/Title/modules/tag/TitleTag.css +4 -0
- package/__inner__/esm/components/Title/modules/tag/TitleTag.d.ts +3 -0
- package/__inner__/esm/components/Title/modules/tag/TitleTag.js +8 -0
- package/__inner__/esm/components/Title/modules/tag/constants.d.ts +1 -0
- package/__inner__/esm/components/Title/modules/tag/constants.js +1 -0
- package/__inner__/esm/components/Title/modules/tag/index.d.ts +2 -0
- package/__inner__/esm/components/Title/modules/tag/index.js +2 -0
- package/__inner__/esm/components/Title/modules/tag/types.d.ts +6 -0
- package/__inner__/esm/components/Title/modules/tag/types.js +1 -0
- package/__inner__/esm/components/Title/types.d.ts +10 -0
- package/__inner__/esm/components/Title/types.js +1 -0
- package/__inner__/esm/constants/environment/index.d.ts +4 -0
- package/__inner__/esm/constants/environment/index.js +4 -0
- package/__inner__/esm/constants/environment/isClient.d.ts +1 -0
- package/__inner__/esm/constants/environment/isClient.js +2 -0
- package/__inner__/esm/constants/environment/isDev.d.ts +1 -0
- package/__inner__/esm/constants/environment/isDev.js +2 -0
- package/__inner__/esm/constants/environment/isProduction.d.ts +1 -0
- package/__inner__/esm/constants/environment/isProduction.js +1 -0
- package/__inner__/esm/constants/environment/isServer.d.ts +1 -0
- package/__inner__/esm/constants/environment/isServer.js +1 -0
- package/__inner__/esm/types/object/index.d.ts +1 -0
- package/__inner__/esm/types/object/index.js +1 -0
- package/__inner__/esm/types/object/withPartial.d.ts +3 -0
- package/__inner__/esm/types/object/withPartial.js +1 -0
- package/__inner__/esm/utils/css/generate-variable-name/generateCSSVariableName.d.ts +1 -0
- package/__inner__/esm/utils/css/generate-variable-name/generateCSSVariableName.js +7 -0
- package/__inner__/esm/utils/css/generate-variable-name/index.d.ts +1 -0
- package/__inner__/esm/utils/css/generate-variable-name/index.js +1 -0
- package/__inner__/esm/utils/css/generate-variables/generateCSSVariables.d.ts +2 -0
- package/__inner__/esm/utils/css/generate-variables/generateCSSVariables.js +10 -0
- package/__inner__/esm/utils/css/generate-variables/index.d.ts +1 -0
- package/__inner__/esm/utils/css/generate-variables/index.js +1 -0
- package/__inner__/esm/utils/css/index.d.ts +3 -0
- package/__inner__/esm/utils/css/index.js +3 -0
- package/__inner__/esm/utils/css/is-variable-name/index.d.ts +1 -0
- package/__inner__/esm/utils/css/is-variable-name/index.js +1 -0
- package/__inner__/esm/utils/css/is-variable-name/isCSSVariableName.d.ts +1 -0
- package/__inner__/esm/utils/css/is-variable-name/isCSSVariableName.js +1 -0
- package/package.json +4 -4
- package/useResizeObserverExternal/package.json +5 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* stylelint-disable */
|
|
2
2
|
.ChipNext {
|
|
3
|
+
--chip-outline: var(--shadow-outline-focused);
|
|
3
4
|
--chip-border-radius: 24px;
|
|
4
5
|
--chip-text-wrap: nowrap;
|
|
5
6
|
background-color: var(--chip-bg-color);
|
|
@@ -72,17 +73,53 @@
|
|
|
72
73
|
--chip-padding-x: var(--spacing-m);
|
|
73
74
|
}
|
|
74
75
|
.ChipNext_color_primary {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
--chip-bg-color: var(--color-background-action-light);
|
|
77
|
+
--chip-bg-color-hover: var(--color-background-action-light-hover);
|
|
78
|
+
--chip-bg-color-active: var(--color-background-action-light-pressed);
|
|
79
|
+
--chip-text-color: var(--color-content-action-dark);
|
|
80
|
+
}
|
|
80
81
|
.ChipNext_color_secondary {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
--chip-bg-color: var(--color-background-secondary);
|
|
83
|
+
--chip-bg-color-hover: var(--color-background-secondary-hover);
|
|
84
|
+
--chip-bg-color-active: var(--color-background-secondary-pressed);
|
|
85
|
+
--chip-text-color: var(--color-content-primary);
|
|
86
|
+
}
|
|
87
|
+
.ChipNext_color_main {
|
|
88
|
+
--chip-bg-color: var(--color-background-main);
|
|
89
|
+
--chip-bg-color-hover: var(--color-background-main-hover);
|
|
90
|
+
--chip-bg-color-active: var(--color-background-main-pressed);
|
|
91
|
+
--chip-text-color: var(--color-content-primary);
|
|
92
|
+
}
|
|
93
|
+
.ChipNext_color_overlay {
|
|
94
|
+
--chip-bg-color: var(--color-background-overlay);
|
|
95
|
+
--chip-bg-color-hover: var(--color-background-overlay);
|
|
96
|
+
--chip-bg-color-active: var(--color-background-overlay);
|
|
97
|
+
--chip-text-color: var(--color-content-action-on);
|
|
98
|
+
}
|
|
99
|
+
.ChipNext_color_primary.ChipNext_checked {
|
|
100
|
+
--chip-bg-color: var(--color-background-action);
|
|
101
|
+
--chip-bg-color-hover: var(--color-background-action);
|
|
102
|
+
--chip-bg-color-active: var(--color-background-action);
|
|
103
|
+
--chip-text-color: var(--color-content-action-on);
|
|
104
|
+
}
|
|
105
|
+
.ChipNext_color_primary.ChipNext_checked.ChipNext_disabled {
|
|
106
|
+
--chip-bg-color: var(--color-background-action-active-disabled);
|
|
107
|
+
--chip-bg-color-hover: var(--color-background-action-active-disabled);
|
|
108
|
+
--chip-bg-color-active: var(--color-background-action-active-disabled);
|
|
109
|
+
--chip-text-color: var(--color-content-primary-inverse);
|
|
110
|
+
}
|
|
111
|
+
.ChipNext_color_secondary.ChipNext_checked, .ChipNext_color_main.ChipNext_checked, .ChipNext_color_overlay.ChipNext_checked {
|
|
112
|
+
--chip-bg-color: var(--color-background-action-secondary);
|
|
113
|
+
--chip-bg-color-hover: var(--color-background-action-secondary);
|
|
114
|
+
--chip-bg-color-active: var(--color-background-action-secondary);
|
|
115
|
+
--chip-text-color: var(--color-content-action-on);
|
|
116
|
+
}
|
|
117
|
+
.ChipNext_color_secondary.ChipNext_checked.ChipNext_disabled, .ChipNext_color_main.ChipNext_checked.ChipNext_disabled, .ChipNext_color_overlay.ChipNext_checked.ChipNext_disabled {
|
|
118
|
+
--chip-bg-color: var(--color-background-action-secondary-active-disabled);
|
|
119
|
+
--chip-bg-color-hover: var(--color-background-action-secondary-active-disabled);
|
|
120
|
+
--chip-bg-color-active: var(--color-background-action-secondary-active-disabled);
|
|
121
|
+
--chip-text-color: var(--color-content-primary-inverse);
|
|
122
|
+
}
|
|
86
123
|
.ChipNext:hover {
|
|
87
124
|
--chip-bg-color: var(--chip-bg-color-hover);
|
|
88
125
|
}
|
|
@@ -90,19 +127,15 @@
|
|
|
90
127
|
--chip-bg-color: var(--chip-bg-color-active);
|
|
91
128
|
}
|
|
92
129
|
.ChipNext:focus {
|
|
93
|
-
box-shadow: var(--
|
|
130
|
+
box-shadow: var(--chip-outline);
|
|
94
131
|
}
|
|
95
132
|
.ChipNext:focus:not(:focus-visible) {
|
|
96
133
|
box-shadow: none;
|
|
97
134
|
}
|
|
98
|
-
.ChipNext_checked,
|
|
99
|
-
.ChipNext_checked:hover,
|
|
100
|
-
.ChipNext_checked:active {
|
|
101
|
-
--chip-bg-color: var(--color-background-action);
|
|
102
|
-
--chip-text-color: var(--color-content-action-on);
|
|
103
|
-
}
|
|
104
135
|
.ChipNext_disabled {
|
|
105
136
|
--chip-bg-color: var(--color-background-disabled);
|
|
137
|
+
--chip-bg-color-hover: var(--color-background-disabled);
|
|
138
|
+
--chip-bg-color-active: var(--color-background-disabled);
|
|
106
139
|
--chip-text-color: var(--color-content-disabled);
|
|
107
140
|
pointer-events: none;
|
|
108
141
|
}
|
|
@@ -1,18 +1,43 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
2
|
import './Chip.css';
|
|
3
|
-
import React from 'react';
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import { logger } from '@ozen-ui/logger';
|
|
5
|
+
import { IS_DEV } from '../../constants/environment';
|
|
4
6
|
import { useControlled } from '../../hooks/useControlled';
|
|
5
7
|
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
6
8
|
import { cn } from '../../utils/classname';
|
|
7
9
|
import { getIconSizeToFormElement } from '../../utils/getIconSizeToFormElement';
|
|
8
10
|
import { polymorphicComponentWithRef } from '../../utils/polymorphicComponentWithRef';
|
|
9
11
|
import { renderContent } from '../../utils/renderContent';
|
|
12
|
+
import { ChipGroupContext } from '../ChipGroup/ChipGroupContext';
|
|
10
13
|
import { CHIP_DEFAULT_TAG, CHIP_DEFAULT_SIZE, CHIP_DEFAULT_VARIANT, CHIP_DEFAULT_DISABLED, } from './constants';
|
|
11
14
|
export var cnChip = cn('ChipNext');
|
|
12
15
|
export var Chip = polymorphicComponentWithRef(function (inProps, ref) {
|
|
13
|
-
var _a = useThemeProps({ name: 'ChipNext', props: inProps }), _b = _a.size,
|
|
16
|
+
var _a = useThemeProps({ name: 'ChipNext', props: inProps }), _b = _a.size, sizeProp = _b === void 0 ? CHIP_DEFAULT_SIZE : _b, _c = _a.color, colorProp = _c === void 0 ? CHIP_DEFAULT_VARIANT : _c, _d = _a.disabled, disabledProp = _d === void 0 ? CHIP_DEFAULT_DISABLED : _d, iconLeft = _a.iconLeft, iconRight = _a.iconRight, multiline = _a.multiline, className = _a.className, children = _a.children, onClick = _a.onClick, checkedProp = _a.checked, _e = _a.as, Tag = _e === void 0 ? CHIP_DEFAULT_TAG : _e, value = _a.value, dataTestId = _a["data-testid"], other = __rest(_a, ["size", "color", "disabled", "iconLeft", "iconRight", "multiline", "className", "children", "onClick", "checked", "as", "value", 'data-testid']);
|
|
17
|
+
var checked = checkedProp;
|
|
18
|
+
var size = sizeProp;
|
|
19
|
+
var disabled = disabledProp;
|
|
20
|
+
var color = colorProp;
|
|
21
|
+
var chipGroup = useContext(ChipGroupContext);
|
|
22
|
+
if (chipGroup) {
|
|
23
|
+
if (IS_DEV && value === undefined) {
|
|
24
|
+
logger.error('Отсутствует параметр "value" для Chip, находящегося в ChipGroup.');
|
|
25
|
+
}
|
|
26
|
+
if (checked === undefined && chipGroup.value) {
|
|
27
|
+
checked = chipGroup === null || chipGroup === void 0 ? void 0 : chipGroup.value.includes(value);
|
|
28
|
+
}
|
|
29
|
+
if (inProps.size === undefined && chipGroup.size) {
|
|
30
|
+
size = chipGroup.size;
|
|
31
|
+
}
|
|
32
|
+
if (inProps.disabled === undefined && chipGroup.disabled !== undefined) {
|
|
33
|
+
disabled = chipGroup.disabled;
|
|
34
|
+
}
|
|
35
|
+
if (inProps.color === undefined && chipGroup.color) {
|
|
36
|
+
color = chipGroup.color;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
14
39
|
var _f = __read(useControlled({
|
|
15
|
-
value:
|
|
40
|
+
value: checked,
|
|
16
41
|
defaultValue: false,
|
|
17
42
|
name: 'ChipNext',
|
|
18
43
|
state: 'open',
|
|
@@ -21,8 +46,10 @@ export var Chip = polymorphicComponentWithRef(function (inProps, ref) {
|
|
|
21
46
|
if (disabled) {
|
|
22
47
|
return;
|
|
23
48
|
}
|
|
24
|
-
|
|
25
|
-
|
|
49
|
+
var newCheckedState = !checkedState;
|
|
50
|
+
setCheckedState(newCheckedState);
|
|
51
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(event, { checked: newCheckedState, value: value });
|
|
52
|
+
chipGroup === null || chipGroup === void 0 ? void 0 : chipGroup.onClick(event, { checked: newCheckedState, value: value });
|
|
26
53
|
};
|
|
27
54
|
var renderIcon = function (content) {
|
|
28
55
|
return renderContent({
|
|
@@ -3,11 +3,15 @@ import type { IconProps } from '@ozen-ui/icons';
|
|
|
3
3
|
import type { PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
|
|
4
4
|
import type { RenderContentType } from '../../utils/renderContent';
|
|
5
5
|
import type { CHIP_DEFAULT_TAG } from './constants';
|
|
6
|
+
export declare const chipColorVariant: readonly ["primary", "secondary", "main", "overlay"];
|
|
7
|
+
export type ChipColorVariant = (typeof chipColorVariant)[number];
|
|
6
8
|
export declare const chipSizeVariant: readonly ["xs", "s", "m", "l"];
|
|
7
|
-
export declare const chipColorVariant: readonly ["primary", "secondary"];
|
|
8
9
|
export type ChipSizeVariant = (typeof chipSizeVariant)[number];
|
|
9
|
-
export type ChipColorVariant = (typeof chipColorVariant)[number];
|
|
10
10
|
export type ChipIcon = RenderContentType<IconProps>['content'];
|
|
11
|
+
export type ChipOnClick = (event: MouseEvent<HTMLElement>, payload: {
|
|
12
|
+
checked: boolean;
|
|
13
|
+
value: string | undefined;
|
|
14
|
+
}) => void;
|
|
11
15
|
export type ChipBaseProps = {
|
|
12
16
|
/** Размер компонента */
|
|
13
17
|
size?: ChipSizeVariant;
|
|
@@ -18,9 +22,9 @@ export type ChipBaseProps = {
|
|
|
18
22
|
/** Если `true` делает элемент выбранным */
|
|
19
23
|
checked?: boolean;
|
|
20
24
|
/** Обработчик нажатия */
|
|
21
|
-
onClick?:
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
onClick?: ChipOnClick;
|
|
26
|
+
/** Значение chip */
|
|
27
|
+
value?: string;
|
|
24
28
|
/** Иконка слева */
|
|
25
29
|
iconLeft?: ChipIcon;
|
|
26
30
|
/** Иконка справа */
|
|
@@ -27,9 +27,7 @@ export declare const Dialog: React.ForwardRefExoticComponent<{
|
|
|
27
27
|
transitionProps?: Partial<import("react-transition-group/CSSTransition").CSSTransitionProps> & {
|
|
28
28
|
"data-testid"?: string;
|
|
29
29
|
};
|
|
30
|
-
windowProps?: import("../Paper").PaperProps
|
|
31
|
-
"data-testid"?: string;
|
|
32
|
-
};
|
|
30
|
+
windowProps?: import("../Paper").PaperProps;
|
|
33
31
|
className?: string;
|
|
34
32
|
'data-testid'?: string;
|
|
35
33
|
ignoreClickOutsideRefs?: React.RefObject<HTMLElement>[];
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import './Drawer.css';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const cnDrawer: import("@bem-react/classname").ClassNameFormatter;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Компонент устарел. Для замены используйте компонент DrawerNext
|
|
6
|
+
*/
|
|
4
7
|
export declare const Drawer: React.ForwardRefExoticComponent<{
|
|
5
8
|
variant?: import("./types").DrawerVariant;
|
|
6
9
|
size?: import("./types").DrawerSizeVariant;
|
|
@@ -28,9 +31,7 @@ export declare const Drawer: React.ForwardRefExoticComponent<{
|
|
|
28
31
|
transitionProps?: Partial<import("react-transition-group/CSSTransition").CSSTransitionProps> & {
|
|
29
32
|
"data-testid"?: string;
|
|
30
33
|
};
|
|
31
|
-
windowProps?: import("../Paper").PaperProps
|
|
32
|
-
"data-testid"?: string;
|
|
33
|
-
};
|
|
34
|
+
windowProps?: import("../Paper").PaperProps;
|
|
34
35
|
className?: string;
|
|
35
36
|
'data-testid'?: string;
|
|
36
37
|
ignoreClickOutsideRefs?: React.RefObject<HTMLElement>[];
|
|
@@ -9,6 +9,9 @@ import { Modal } from '../Modal';
|
|
|
9
9
|
import { DRAWER_DEFAULT_HIDE_CLOSE_BUTTON, DRAWER_DEFAULT_PLACEMENT, DRAWER_DEFAULT_SIZE, DRAWER_DEFAULT_VARIANT, } from './constants';
|
|
10
10
|
import { iconButtonSizeMapper } from './utils';
|
|
11
11
|
export var cnDrawer = cn('Drawer');
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Компонент устарел. Для замены используйте компонент DrawerNext
|
|
14
|
+
*/
|
|
12
15
|
export var Drawer = forwardRef(function (inProps, ref) {
|
|
13
16
|
var props = useThemeProps({
|
|
14
17
|
props: inProps,
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
.DrawerNext {
|
|
2
|
+
--drawer-inline-padding: var(--spacing-s);
|
|
3
|
+
--drawer-block-padding: var(--spacing-l);
|
|
4
|
+
--drawer-blocks-gap: var(--spacing-m);
|
|
5
|
+
display: flex;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.DrawerNext .Modal-Window {
|
|
9
|
+
position: relative;
|
|
10
|
+
inline-size: 100%;
|
|
11
|
+
max-inline-size: var(--drawer-next-max-width);
|
|
12
|
+
block-size: 100%;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
border: none;
|
|
17
|
+
inset-block-start: auto;
|
|
18
|
+
inset-inline-start: auto;
|
|
19
|
+
transform: none;
|
|
20
|
+
padding: 0;
|
|
21
|
+
outline: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* ---- INNER CONTAINER ---- */
|
|
25
|
+
|
|
26
|
+
.DrawerNext-InnerContainer {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
flex-grow: 1;
|
|
30
|
+
max-block-size: 100%;
|
|
31
|
+
overflow: auto;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ---- FULL SCREEN ---- */
|
|
35
|
+
|
|
36
|
+
.DrawerNext_fullScreen .Modal-Window {
|
|
37
|
+
border-radius: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ---- DEVICE TYPE ---- */
|
|
41
|
+
|
|
42
|
+
/* --- DESKTOP --- */
|
|
43
|
+
|
|
44
|
+
.DrawerNext_deviceType_desktop.DrawerNext_size_s {
|
|
45
|
+
--drawer-inline-padding: var(--spacing-m);
|
|
46
|
+
--drawer-block-padding: var(--spacing-m);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.DrawerNext_deviceType_desktop.DrawerNext_size_m {
|
|
50
|
+
--drawer-inline-padding: var(--spacing-l);
|
|
51
|
+
--drawer-blocks-gap: var(--spacing-l);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* ---- CLOSE BUTTON ---- */
|
|
55
|
+
|
|
56
|
+
.DrawerNext-CloseButtonContainer {
|
|
57
|
+
position: absolute;
|
|
58
|
+
inset-block-start: 8px;
|
|
59
|
+
inset-inline-end: 8px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.DrawerNext_hasCloseButton {
|
|
63
|
+
--drawer-header-item-padding-right: var(--spacing-m);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ---- PLACEMENT ---- */
|
|
67
|
+
|
|
68
|
+
.DrawerNext_placement_right {
|
|
69
|
+
--drawer-start-position: 100%;
|
|
70
|
+
justify-content: flex-end;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.DrawerNext_placement_right .Modal-Window {
|
|
74
|
+
border-start-end-radius: 0;
|
|
75
|
+
border-end-end-radius: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.DrawerNext_placement_left {
|
|
79
|
+
--drawer-start-position: -100%;
|
|
80
|
+
justify-content: flex-start;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.DrawerNext_placement_left .Modal-Window {
|
|
84
|
+
border-start-start-radius: 0;
|
|
85
|
+
border-end-start-radius: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* ---- ANIMATION ---- */
|
|
89
|
+
|
|
90
|
+
.DrawerNext_animation-appear .Modal-Window, .DrawerNext_animation-enter .Modal-Window {
|
|
91
|
+
transform: translate(var(--drawer-start-position), 0);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.DrawerNext_animation-appear-active .Modal-Window, .DrawerNext_animation-enter-active .Modal-Window {
|
|
95
|
+
transition: transform var(--transition-slow);
|
|
96
|
+
transform: translate(0, 0);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.DrawerNext_animation-enter-done .Modal-Window {
|
|
100
|
+
transform: translate(0, 0);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.DrawerNext_animation-exit .Modal-Window {
|
|
104
|
+
visibility: visible;
|
|
105
|
+
transform: translate(0, 0);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.DrawerNext_animation-exit-active .Modal-Window {
|
|
109
|
+
visibility: visible;
|
|
110
|
+
transition: transform var(--transition-slow);
|
|
111
|
+
transform: translate(var(--drawer-start-position), 0);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.DrawerNext_animation-exit-done .Modal-Window {
|
|
115
|
+
visibility: hidden;
|
|
116
|
+
transform: translate(var(--drawer-start-position), 0);
|
|
117
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './Drawer.css';
|
|
2
|
+
import './modules/DrawerBody/DrawerBody.css';
|
|
3
|
+
import './modules/DrawerFooter/DrawerFooter.css';
|
|
4
|
+
import './modules/DrawerFooterButtonsGroup/DrawerFooterButtonsGroup.css';
|
|
5
|
+
import './modules/DrawerHeader/DrawerHeader.css';
|
|
6
|
+
import './modules/DrawerSubtitle/DrawerSubtitle.css';
|
|
7
|
+
import './modules/DrawerTitle/DrawerTitle.css';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import type { DrawerProps } from './types';
|
|
10
|
+
export declare const cnDrawer: import("@bem-react/classname").ClassNameFormatter;
|
|
11
|
+
export declare const Drawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import './Drawer.css';
|
|
3
|
+
import './modules/DrawerBody/DrawerBody.css';
|
|
4
|
+
import './modules/DrawerFooter/DrawerFooter.css';
|
|
5
|
+
import './modules/DrawerFooterButtonsGroup/DrawerFooterButtonsGroup.css';
|
|
6
|
+
import './modules/DrawerHeader/DrawerHeader.css';
|
|
7
|
+
import './modules/DrawerSubtitle/DrawerSubtitle.css';
|
|
8
|
+
import './modules/DrawerTitle/DrawerTitle.css';
|
|
9
|
+
import React, { forwardRef } from 'react';
|
|
10
|
+
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
11
|
+
import { cn } from '../../utils/classname';
|
|
12
|
+
import { generateCSSVariables } from '../../utils/css';
|
|
13
|
+
import { renderContent } from '../../utils/renderContent';
|
|
14
|
+
import { Modal } from '../Modal';
|
|
15
|
+
import { DRAWER_DEFAULT_SIZE, DRAWER_DEFAULT_HIDE_CLOSE_BUTTON, DRAWER_DEFAULT_PLACEMENT, DRAWER_DEFAULT_VARIANT, DRAWER_CSS_VARIABLE, DRAWER_DEFAULT_DEVICE_TYPE, } from './constants';
|
|
16
|
+
import { DrawerContext } from './DrawerContext';
|
|
17
|
+
import { useDrawerWidth } from './hooks';
|
|
18
|
+
import { DrawerCloseButton } from './modules';
|
|
19
|
+
import { paperRadiusBySize } from './utils';
|
|
20
|
+
export var cnDrawer = cn('DrawerNext');
|
|
21
|
+
export var Drawer = forwardRef(function (inProps, ref) {
|
|
22
|
+
var _a;
|
|
23
|
+
var props = useThemeProps({
|
|
24
|
+
props: inProps,
|
|
25
|
+
name: 'DrawerNext',
|
|
26
|
+
});
|
|
27
|
+
var _b = props.variant, variant = _b === void 0 ? DRAWER_DEFAULT_VARIANT : _b, _c = props.size, size = _c === void 0 ? DRAWER_DEFAULT_SIZE : _c, _d = props.placement, placement = _d === void 0 ? DRAWER_DEFAULT_PLACEMENT : _d, _e = props.hideCloseButton, hideCloseButton = _e === void 0 ? DRAWER_DEFAULT_HIDE_CLOSE_BUTTON : _e, _f = props.deviceType, deviceType = _f === void 0 ? DRAWER_DEFAULT_DEVICE_TYPE : _f, open = props.open, _g = props.onClose, onClose = _g === void 0 ? function () { } : _g, children = props.children, className = props.className, windowProps = props.windowProps, transitionProps = props.transitionProps, _h = props.renderCloseButton, renderCloseButton = _h === void 0 ? React.createElement(DrawerCloseButton, null) : _h, style = props.style, other = __rest(props, ["variant", "size", "placement", "hideCloseButton", "deviceType", "open", "onClose", "children", "className", "windowProps", "transitionProps", "renderCloseButton", "style"]);
|
|
28
|
+
var _j = useDrawerWidth({ variant: variant }), isFullWidth = _j.isFullWidth, maxWidth = _j.maxWidth;
|
|
29
|
+
var radius = paperRadiusBySize[deviceType][size];
|
|
30
|
+
return (React.createElement(DrawerContext.Provider, { value: {
|
|
31
|
+
size: size,
|
|
32
|
+
variant: variant,
|
|
33
|
+
onClose: onClose,
|
|
34
|
+
deviceType: deviceType,
|
|
35
|
+
} },
|
|
36
|
+
React.createElement(Modal, __assign({}, other, { open: open, style: __assign(__assign({}, style), generateCSSVariables((_a = {},
|
|
37
|
+
_a[DRAWER_CSS_VARIABLE.MAX_WIDTH] = "".concat(maxWidth, "px"),
|
|
38
|
+
_a))), onClose: onClose, windowProps: __assign({ radius: radius, shadow: 'l' }, windowProps), className: cnDrawer({
|
|
39
|
+
variant: variant,
|
|
40
|
+
size: size,
|
|
41
|
+
placement: placement,
|
|
42
|
+
deviceType: deviceType,
|
|
43
|
+
hasCloseButton: !hideCloseButton,
|
|
44
|
+
fullScreen: isFullWidth,
|
|
45
|
+
}, [className]), transitionProps: __assign({ classNames: cnDrawer({ animation: true }) }, transitionProps), ref: ref }),
|
|
46
|
+
!hideCloseButton && (React.createElement("div", { className: cnDrawer('CloseButtonContainer') }, renderContent({
|
|
47
|
+
content: renderCloseButton,
|
|
48
|
+
props: {},
|
|
49
|
+
}))),
|
|
50
|
+
React.createElement("div", { className: cnDrawer('InnerContainer') }, children))));
|
|
51
|
+
});
|
|
52
|
+
Drawer.displayName = 'Drawer';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DrawerDeviceType, DrawerSizeVariantByDeviceType, DrawerVariant } from './entities';
|
|
2
|
+
export type DrawerContextValue<DeviceType extends DrawerDeviceType> = {
|
|
3
|
+
size: DrawerSizeVariantByDeviceType[DeviceType];
|
|
4
|
+
variant: DrawerVariant;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
deviceType: DeviceType;
|
|
7
|
+
};
|
|
8
|
+
export declare const DrawerContextDefaultValue: DrawerContextValue<DrawerDeviceType>;
|
|
9
|
+
export declare const DrawerContext: import("react").Context<DrawerContextValue<"mobile" | "desktop">>;
|
|
10
|
+
export declare const useDrawerContext: <DeviceType extends DrawerDeviceType>() => DrawerContextValue<DeviceType>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useContext, createContext } from 'react';
|
|
2
|
+
import { IS_DEV } from '../../constants/environment';
|
|
3
|
+
import { DRAWER_DEFAULT_DEVICE_TYPE, DRAWER_DEFAULT_SIZE, DRAWER_DEFAULT_VARIANT, } from './constants';
|
|
4
|
+
export var DrawerContextDefaultValue = {
|
|
5
|
+
size: DRAWER_DEFAULT_SIZE,
|
|
6
|
+
variant: DRAWER_DEFAULT_VARIANT,
|
|
7
|
+
onClose: function () { },
|
|
8
|
+
deviceType: DRAWER_DEFAULT_DEVICE_TYPE,
|
|
9
|
+
};
|
|
10
|
+
export var DrawerContext = createContext(DrawerContextDefaultValue);
|
|
11
|
+
export var useDrawerContext = function () {
|
|
12
|
+
return useContext(DrawerContext);
|
|
13
|
+
};
|
|
14
|
+
// Именованный провайдер
|
|
15
|
+
if (IS_DEV) {
|
|
16
|
+
DrawerContext.displayName = 'DrawerContext';
|
|
17
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const DRAWER_DEFAULT_VARIANT = "medium";
|
|
2
|
+
export declare const DRAWER_DEFAULT_SIZE = "m";
|
|
3
|
+
export declare const DRAWER_DEFAULT_PLACEMENT = "right";
|
|
4
|
+
export declare const DRAWER_DEFAULT_HIDE_CLOSE_BUTTON = false;
|
|
5
|
+
export declare const DRAWER_DEFAULT_DEVICE_TYPE = "desktop";
|
|
6
|
+
export declare const DRAWER_CSS_VARIABLE: {
|
|
7
|
+
readonly MAX_WIDTH: "drawer-next-max-width";
|
|
8
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var DRAWER_DEFAULT_VARIANT = 'medium';
|
|
2
|
+
export var DRAWER_DEFAULT_SIZE = 'm';
|
|
3
|
+
export var DRAWER_DEFAULT_PLACEMENT = 'right';
|
|
4
|
+
export var DRAWER_DEFAULT_HIDE_CLOSE_BUTTON = false;
|
|
5
|
+
export var DRAWER_DEFAULT_DEVICE_TYPE = 'desktop';
|
|
6
|
+
export var DRAWER_CSS_VARIABLE = {
|
|
7
|
+
MAX_WIDTH: 'drawer-next-max-width',
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var drawerDeviceType = ['mobile', 'desktop'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var drawerPlacementVariant = ['left', 'right'];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DrawerDeviceType } from './device';
|
|
2
|
+
export declare const drawerSizeVariantByDeviceType: {
|
|
3
|
+
readonly desktop: readonly ["s", "m"];
|
|
4
|
+
readonly mobile: readonly ["m"];
|
|
5
|
+
};
|
|
6
|
+
export type DrawerSizeVariantByDeviceType = {
|
|
7
|
+
[key in DrawerDeviceType]: (typeof drawerSizeVariantByDeviceType)[key][number];
|
|
8
|
+
};
|
|
9
|
+
export type DrawerValueBySize<DeviceType extends DrawerDeviceType, Value> = {
|
|
10
|
+
[key in DrawerSizeVariantByDeviceType[DeviceType]]: Value;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var drawerVariant = ['little', 'medium', 'large'];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useDrawerWidth';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useDrawerWidth';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { __read } from "tslib";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { isServer } from '../../../constants/environment';
|
|
4
|
+
import { useEventListener } from '../../../hooks/useEventListener';
|
|
5
|
+
import { maxWidthByVariant } from '../utils';
|
|
6
|
+
export var useDrawerWidth = function (_a) {
|
|
7
|
+
var variant = _a.variant;
|
|
8
|
+
var currentMaxWidth = maxWidthByVariant[variant];
|
|
9
|
+
var checkIsFullWidth = function () {
|
|
10
|
+
if (isServer) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
return currentMaxWidth >= window.innerWidth;
|
|
14
|
+
};
|
|
15
|
+
var _b = __read(useState(function () { return checkIsFullWidth(); }), 2), isFullWidth = _b[0], setIsFullWidth = _b[1];
|
|
16
|
+
var recalculateIsFullWidth = function () {
|
|
17
|
+
setIsFullWidth(checkIsFullWidth());
|
|
18
|
+
};
|
|
19
|
+
useEventListener({
|
|
20
|
+
eventName: 'resize',
|
|
21
|
+
handler: function () {
|
|
22
|
+
recalculateIsFullWidth();
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
useEffect(function () {
|
|
26
|
+
recalculateIsFullWidth();
|
|
27
|
+
}, []);
|
|
28
|
+
return {
|
|
29
|
+
isFullWidth: isFullWidth,
|
|
30
|
+
maxWidth: currentMaxWidth,
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.DrawerNextBody {
|
|
2
|
+
--drawer-body-first-child-margin-top: var(--spacing-3xl);
|
|
3
|
+
padding-inline: var(--drawer-inline-padding);
|
|
4
|
+
flex-grow: 1;
|
|
5
|
+
overflow: auto;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.DrawerNextBody:first-child {
|
|
9
|
+
margin-block-start: var(--drawer-body-first-child-margin-top);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.DrawerNextBody:last-child {
|
|
13
|
+
margin-block-end: var(--drawer-block-padding);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* ---- DEVICE TYPE ---- */
|
|
17
|
+
|
|
18
|
+
.DrawerNextBody_deviceType_desktop.DrawerNextBody_size_s {
|
|
19
|
+
--drawer-body-first-child-margin-top: var(--spacing-xl);
|
|
20
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DrawerBodyProps } from './types';
|
|
3
|
+
export declare const cnDrawerBody: import("@bem-react/classname").ClassNameFormatter;
|
|
4
|
+
export declare const DrawerBody: React.ForwardRefExoticComponent<Omit<DrawerBodyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
3
|
+
import { cn } from '../../../../utils/classname';
|
|
4
|
+
import { useDrawerContext } from '../../DrawerContext';
|
|
5
|
+
export var cnDrawerBody = cn('DrawerNextBody');
|
|
6
|
+
export var DrawerBody = forwardRef(function (_a, ref) {
|
|
7
|
+
var children = _a.children, className = _a.className, other = __rest(_a, ["children", "className"]);
|
|
8
|
+
var _b = useDrawerContext(), size = _b.size, deviceType = _b.deviceType;
|
|
9
|
+
return (React.createElement("div", __assign({ ref: ref, className: cnDrawerBody({
|
|
10
|
+
size: size,
|
|
11
|
+
deviceType: deviceType,
|
|
12
|
+
}, [className]) }, other), children));
|
|
13
|
+
});
|
|
14
|
+
DrawerBody.displayName = 'DrawerBody';
|