-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(plasma-web/b2c/new-hope): Add Radiobox
component with new design and core
#775
Merged
+1,011
−540
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a0753f8
feat(plasma-new-hope): Add core `Radiobox` component
neretin-trike ee5c7c3
feat(plasma-new-hope): Add `Radiobox` component with new design and t…
neretin-trike 7e62926
feat(plasma-new-hope): Add `Radiobox` component with new design and t…
neretin-trike c3bbc6f
feat(plasma-b2c): Replace `Radiobox` from plasma-new-hope and update …
neretin-trike ad5a938
feat(plasma-web): Replace `Radiobox` from plasma-new-hope and update …
neretin-trike 3344961
feat(plasma-hope): Remove `Radiobox` component
neretin-trike File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file modified
BIN
+121 Bytes
(100%)
...obox/Radiobox.component-test.tsx/plasma-web Radiobox -- default size m.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+158 Bytes
(100%)
...obox/Radiobox.component-test.tsx/plasma-web Radiobox -- default size s.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+60 Bytes
(100%)
...diobox/RadioboxBase.component-test.tsx/plasma-core Radiobox -- __label.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+26 Bytes
(100%)
...box/RadioboxBase.component-test.tsx/plasma-core Radiobox -- with focus.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-91 Bytes
(100%)
...obox/Radiobox.component-test.tsx/plasma-web Radiobox -- default size m.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-16 Bytes
(100%)
...obox/Radiobox.component-test.tsx/plasma-web Radiobox -- default size s.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-114 Bytes
(99%)
...iobox/RadioboxBase.component-test.tsx/plasma-core RadioGroup -- simple.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+23 Bytes
(100%)
...diobox/RadioboxBase.component-test.tsx/plasma-core Radiobox -- __label.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-112 Bytes
(99%)
...iobox/RadioboxBase.component-test.tsx/plasma-core Radiobox -- _checked.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-81 Bytes
(99%)
...obox/RadioboxBase.component-test.tsx/plasma-core Radiobox -- _disabled.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-113 Bytes
(99%)
...iobox/RadioboxBase.component-test.tsx/plasma-core Radiobox -- _focused.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-128 Bytes
(99%)
...iobox/RadioboxBase.component-test.tsx/plasma-core Radiobox -- squeezes.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+45 Bytes
(100%)
...box/RadioboxBase.component-test.tsx/plasma-core Radiobox -- with focus.snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
75 changes: 75 additions & 0 deletions
75
packages/plasma-b2c/src/components/Radiobox/Radiobox.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,75 @@ | ||
import { css } from '@salutejs/plasma-new-hope/styled-components'; | ||
|
||
export const config = { | ||
defaults: { | ||
view: 'accent', | ||
size: 'm', | ||
focused: 'true', | ||
}, | ||
variations: { | ||
/** | ||
* Размер контрола. | ||
*/ | ||
size: { | ||
s: css` | ||
--plasma-radiobox-trigger-size: 1rem; | ||
--plasma-radiobox-trigger-border-radius 1.125rem; | ||
--plasma-radiobox-ellipse-size 0.5rem; | ||
--plasma-radiobox-content-top-offset: 0.1rem; | ||
--plasma-radiobox-content-left-offset 0.5rem; | ||
--plasma-radiobox-label-font-family: var(--plasma-typo-footnote1-font-family); | ||
--plasma-radiobox-label-font-size: var(--plasma-typo-footnote1-font-size); | ||
--plasma-radiobox-label-font-style: var(--plasma-typo-footnote1-font-style); | ||
--plasma-radiobox-label-font-weight: var(--plasma-typo-footnote1-font-weight); | ||
--plasma-radiobox-label-letter-spacing: var(--plasma-typo-footnote1-letter-spacing); | ||
--plasma-radiobox-label-line-height: var(--plasma-typo-footnote1-line-height); | ||
--plasma-radiobox-description-font-family: var(--plasma-typo-caption-font-family); | ||
--plasma-radiobox-description-font-size: var(--plasma-typo-caption-font-size); | ||
--plasma-radiobox-description-font-style: var(--plasma-typo-caption-font-style); | ||
--plasma-radiobox-description-font-weight: var(--plasma-typo-caption-font-weight); | ||
--plasma-radiobox-description-letter-spacing: var(--plasma-typo-caption-letter-spacing); | ||
--plasma-radiobox-description-line-height: var(--plasma-typo-caption-line-height); | ||
`, | ||
m: css` | ||
--plasma-radiobox-trigger-size: 1.375rem; | ||
--plasma-radiobox-trigger-border-radius 1.125rem; | ||
--plasma-radiobox-ellipse-size 0.625rem; | ||
--plasma-radiobox-content-top-offset: 0.25rem; | ||
--plasma-radiobox-content-left-offset 0.6875rem; | ||
--plasma-radiobox-label-font-family: var(--plasma-typo-body1-font-family); | ||
--plasma-radiobox-label-font-size: var(--plasma-typo-body1-font-size); | ||
--plasma-radiobox-label-font-style: var(--plasma-typo-body1-font-style); | ||
--plasma-radiobox-label-font-weight: var(--plasma-typo-body1-font-weight); | ||
--plasma-radiobox-label-letter-spacing: var(--plasma-typo-body1-letter-spacing); | ||
--plasma-radiobox-label-line-height: var(--plasma-typo-body1-line-height); | ||
--plasma-radiobox-description-font-family: var(--plasma-typo-footnote1-font-family); | ||
--plasma-radiobox-description-font-size: var(--plasma-typo-footnote1-font-size); | ||
--plasma-radiobox-description-font-style: var(--plasma-typo-footnote1-font-style); | ||
--plasma-radiobox-description-font-weight: var(--plasma-typo-footnote1-font-weight); | ||
--plasma-radiobox-description-letter-spacing: var(--plasma-typo-footnote1-letter-spacing); | ||
--plasma-radiobox-description-line-height: var(--plasma-typo-footnote1-line-height); | ||
`, | ||
}, | ||
/** | ||
* Вид контрола. | ||
*/ | ||
view: { | ||
accent: css` | ||
--plasma-radiobox-fill-color: var(--plasma-colors-accent); | ||
--plasma-radiobox-ellipse-color: var(--plasma-colors-white); | ||
--plasma-radiobox-description-color: var(--plasma-colors-secondary); | ||
--plasma-radiobox-trigger-border-color: var(--plasma-colors-secondary); | ||
`, | ||
}, | ||
disabled: { | ||
true: css` | ||
--plasma-radiobox-disabled-opacity: 0.4; | ||
`, | ||
}, | ||
focused: { | ||
true: css` | ||
--plasma-radiobox-focus-color: var(--plasma-colors-accent); | ||
`, | ||
}, | ||
}, | ||
}; |
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,15 @@ | ||
import { radioboxConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components'; | ||
|
||
import { config } from './Radiobox.config'; | ||
|
||
const mergedConfig = mergeConfig(radioboxConfig, config); | ||
const RadioboxComponent = component(mergedConfig); | ||
|
||
export type RadioboxProps = typeof RadioboxComponent; | ||
|
||
/** | ||
* Переключатель, или *радиокнопка*. | ||
*/ | ||
export const Radiobox = RadioboxComponent; | ||
|
||
export { RadioGroup } 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { Radiobox, RadioGroup } from '@salutejs/plasma-hope'; | ||
export type { RadioboxProps } from '@salutejs/plasma-hope'; | ||
export { Radiobox, RadioGroup } from './Radiobox'; | ||
export type { RadioboxProps } from './Radiobox'; |
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
16 changes: 0 additions & 16 deletions
16
packages/plasma-hope/src/components/Checkbox/Checkbox.props.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
=)
#779
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а с ним что-то ещё нужно будет сделать? Просто сейчас я его сделал таким же, как в plasma-hope