-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plasma-web, plasma-b2c): ModalBase, PopupBase on new-hope
- Loading branch information
Showing
25 changed files
with
168 additions
and
223 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
packages/plasma-b2c/src/components/ModalBase/Modal.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { css } from '@salutejs/plasma-new-hope/styled-components'; | ||
|
||
export const config = { | ||
defaults: { | ||
view: 'default', | ||
}, | ||
variations: { | ||
view: { | ||
default: css` | ||
--plasma-modal-overlay-with-blur-color: rgba(35, 35, 35, 0.2); | ||
--plasma-modal-overlay-color: rgba(8, 8, 8, 0.56); | ||
`, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/plasma-b2c/src/components/ModalBase/ModalBase.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { modalConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components'; | ||
import type { ModalProps } from '@salutejs/plasma-new-hope/styled-components'; | ||
|
||
import { config } from './Modal.config'; | ||
|
||
const mergedConfig = mergeConfig(modalConfig, config); | ||
const ModalBaseComponent = component(mergedConfig) as React.ForwardRefExoticComponent< | ||
ModalProps & React.RefAttributes<HTMLDivElement> | ||
>; | ||
|
||
/** | ||
* Модальное окно. | ||
*/ | ||
export const ModalBase = ModalBaseComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
export { ModalBase, ModalOverlay, modalBaseOverlayClass } from '@salutejs/plasma-hope'; | ||
export type { ModalBaseProps, ModalBaseRootProps, ModalOverlayProps } from '@salutejs/plasma-hope'; | ||
export { ModalBase } from './ModalBase'; | ||
export { modalClasses as modalBaseClasses } from '@salutejs/plasma-new-hope/styled-components'; | ||
|
||
export type { ModalProps as ModalBaseProps } from '@salutejs/plasma-new-hope/styled-components'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { popupConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components'; | ||
|
||
const mergedConfig = mergeConfig(popupConfig); | ||
|
||
/** | ||
* Базовый компонент PopupBase. | ||
*/ | ||
export const PopupBase = component(mergedConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
export { | ||
PopupBaseProvider, | ||
usePopupBaseContext, | ||
PopupBase, | ||
popupBaseRootClass, | ||
endAnimationClass, | ||
endTransitionClass, | ||
} from '@salutejs/plasma-hope'; | ||
usePopupContext as usePopupBaseContext, | ||
PopupProvider as PopupBaseProvider, | ||
popupClasses as popupBaseClasses, | ||
} from '@salutejs/plasma-new-hope/styled-components'; | ||
|
||
export { PopupBase } from './PopupBase'; | ||
|
||
export type { | ||
PopupBasePlacement, | ||
PopupPlacement as PopupBasePlacement, | ||
PopupInfo, | ||
PopupContextType, | ||
PopupBaseProps, | ||
PopupRootProps, | ||
} from '@salutejs/plasma-hope'; | ||
PopupProps as PopupBaseProps, | ||
} from '@salutejs/plasma-new-hope/styled-components'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
export { modalConfig, modalRoot } from './Modal'; | ||
export { classes as modalClasses } from './Modal.tokens' | ||
|
||
export type { ModalProps } from './Modal.types'; | ||
export { classes as modalClasses } from './Modal.tokens'; |
2 changes: 1 addition & 1 deletion
2
packages/plasma-new-hope/src/examples/plasma_b2c/components/Modal/Modal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/plasma-new-hope/src/examples/plasma_web/components/Modal/Modal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/plasma-new-hope/src/examples/sds_engineer/components/Modal/Modal.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.