-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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(radio): Eva style #1344
feat(radio): Eva style #1344
Conversation
BREAKING CHANGES: Following theme variables were renamed: radio-bg -> radio-border-color, radio-inner-circle-color, radio-[status]-border-color, radio-[status]-inner-circle-color radio-fg -> radio-text-color radio-size -> radio-width, radio-height radio-border-size -> radio-border-width radio-checkmark -> radio-inner-circle-color radio-disabled-checkmark -> radio-disabled-inner-circle Following theme variables were removed: radio-checked-bg radio-checked-size radio-checked-border-size radio-checked-border-color radio-checked-checkmark radio-disabled-bg radio-disabled-size radio-disabled-border-size
BREAKING CHANGES: Following classes were renamed: radio-indicator -> radio-circle radio-description -> text
BREAKING CHANGES: 'radio-bg', 'radio-checkmark' theme variables were removed. Use radio-[status]-border-color and radio-[status]-inner-circle-color instead.
Set inner circle dimensions to be multiple of radio circle dimensions
BREAKING CHANGE: NbRadioGroupComponent setters 'setValue', 'setName', 'setDisabled', 'setStatus' were removed. Use 'value', 'name', 'disabled', 'status'. NbRadioComponent setter 'setDisabled' removed. Use 'disabled' instead.
Codecov Report
@@ Coverage Diff @@
## next #1344 +/- ##
==========================================
+ Coverage 81.44% 81.63% +0.19%
==========================================
Files 237 237
Lines 7222 7275 +53
Branches 617 626 +9
==========================================
+ Hits 5882 5939 +57
+ Misses 1154 1150 -4
Partials 186 186
|
} | ||
|
||
@each $status in nb-get-statuses() { | ||
.native-input:enabled + .radio-circle.status-#{$status} { |
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.
don't we need the same empty check as for checkbox?
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.
No need, nb-get-status
has no empty statuses only 'primary'
, 'success'
, 'warning'
, 'danger'
, 'info'
.
[name]="name" | ||
[value]="value" | ||
[checked]="checked" | ||
[disabled]="disabled" | ||
(change)="onChange($event)" | ||
(click)="onClick($event)"> | ||
<span class="radio-indicator"></span> | ||
<span class="radio-description"> | ||
<span class="radio-circle" |
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.
why we don't just put a class on top as we usually do?
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.
Changed in d09570e
Fixes 'ExpressionHasBeenChanged'. NbRadioComponent has host bindings which could change after view initialized since NbRadioGroupComponent updates radio status in AfterContentInit.
Prevents unnecessary mark for check when option property changed from 'undefined' to 'false'.
@@ -0,0 +1,33 @@ | |||
import { Component } from '@angular/core'; | |||
|
|||
interface Option { |
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.
I would prefer to skip this from docs as it complicates the case
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.
Ok, removed in 8533560
BREAKING CHANGES: Following theme variables were renamed: radio-bg -> radio-border-color, radio-inner-circle-color, radio-[status]-border-color, radio-[status]-inner-circle-color radio-fg -> radio-text-color radio-size -> radio-width, radio-height radio-border-size -> radio-border-width radio-checkmark -> radio-inner-circle-color radio-disabled-checkmark -> radio-disabled-inner-circle radio-indicator -> radio-circle radio-description -> text Following theme variables were removed: radio-checked-bg radio-checked-size radio-checked-border-size radio-checked-border-color radio-checked-checkmark radio-disabled-bg radio-disabled-size radio-disabled-border-size 'radio-bg', 'radio-checkmark' theme variables were removed. Use radio-[status]-border-color and radio-[status]-inner-circle-color instead. NbRadioGroupComponent setters 'setValue', 'setName', 'setDisabled', 'setStatus' were removed. Use 'value', 'name', 'disabled', 'status'. NbRadioComponent setter 'setDisabled' removed. Use 'disabled' instead. BREAKING CHANGES: Following map keys were removed: - border-color - color-gray - color-neutral - color-disabled Mapping for borders, disabled and similar styles would controlled by design system and configured for each component individually. Properties 'checkbox-bg', 'checkbox-checked-bg' and 'checkbox-disabled-bg' replaced with: - checkbox-disabled-background-color - checkbox-[status]-background-color - checkbox-[status]-checked-background-color - checkbox-[status]-indeterminate-background-color - checkbox-[status]-focus-background-color - checkbox-[status]-hover-background-color - checkbox-[status]-active-background-color Property 'checkbox-size' splited into 'checkbox-height', 'checkbox-width'. Following properties were removed (along with ability to change appearance of checkbox based on checked or disabled state): - checkbox-checked-size - checkbox-checked-border-size - checkbox-disabled-size - checkbox-disabled-border-size Property 'checkbox-border-size' replaced with 'checkbox-border-width'. Properties 'checkbox-border-color', 'checkbox-checked-border-color', 'checkbox-disabled-border-color' replaced with: - checkbox-disabled-border-color - checkbox-[status]-border-color - checkbox-[status]-checked-border-color - checkbox-[status]-indeterminate-border-color - checkbox-[status]-hover-border-color - checkbox-[status]-active-border-color Properties 'checkbox-checkmark', 'checkbox-checked-checkmark', 'checkbox-disabled-checkmark' replaced with: - checkbox-disabled-checkmark-color - checkbox-[status]-checked-checkmark-color - checkbox-[status]-indeterminate-checkmark-color Check mark pseudo element replaced with nb-icon. Checkbox classes were changed. Class 'customised-control' replaced with 'label'. Class 'customised-control-input' replaced with 'native-input'. Class 'customised-control-indicator' replaced with 'custom-checkbox'. Class 'customised-control-description' replaced with 'text'. NbCheckboxComponent's '_value' property now private. Use 'value' instead. Following theme properties were renamed: form-control-border-width -> input-border-width form-control-border-radius -> input-rectangle-border-radius form-control-semi-round-border-radius -> input-semi-round-border-radius form-control-round-border-radius -> input-round-border-radius form-control-text-primary-color -> input-text-color form-control-border-color -> input-border-color form-control-selected-border-color -> input-focus-border-color, input-[status]-focus-color form-control-bg -> input-background-color form-control-focus-bg -> input-focus-border-color form-control-placeholder-color -> input-placeholder-text-color form-control-placeholder-font-size -> input-placeholder-font-size form-control-font-size -> input-medium-text-font-size form-control-font-size-sm -> input-small-text-font-size form-control-font-size-lg -> input-large-text-font-size form-control-padding -> input-medium-padding form-control-padding-sm -> input-small-padding form-control-padding-lg -> input-large-padding form-control-info-border-color -> input-info-border-color form-control-success-border-color -> input-success-border-color form-control-danger-border-color -> input-danger-border-color form-control-warning-border-color -> input-warning-border-color form-control-border-type -> input-border-style Removed: form-control-label-font-weight form-control-feedback-font-size form-control-feedback-font-weight Input status classes were renamed from input-[status-name] to status-[status-name]. Input size classes were renamed from input-[size-name] to size-[size-name]. Input shape classes were renamed from input-[shape-name] to shape-[shape-name]. All NbInputDirective static fields removed. Removed fields: SIZE_SMALL, SIZE_MEDIUM, SIZE_LARGE, STATUS_PRIMARY, STATUS_INFO, STATUS_SUCCESS, STATUS_WARNING, STATUS_DANGER, SHAPE_SEMI_ROUND, SHAPE_RECTANGLE, SHAPE_ROUND. Use NbComponentStatus, NbComponentShape, NbComponentSize instead. NbInputDirective 'size' property and 'setSize' getter removed. Use unified 'fieldSize' property instead. NbInputDirective 'setFullWidth' replaced with read/write 'fullWidth' property. Remove bootstrap theme support until it's refactored to use updated theme properties
BREAKING CHANGES: Following theme variables were renamed: radio-bg -> radio-border-color, radio-inner-circle-color, radio-[status]-border-color, radio-[status]-inner-circle-color radio-fg -> radio-text-color radio-size -> radio-width, radio-height radio-border-size -> radio-border-width radio-checkmark -> radio-inner-circle-color radio-disabled-checkmark -> radio-disabled-inner-circle radio-indicator -> radio-circle radio-description -> text Following theme variables were removed: radio-checked-bg radio-checked-size radio-checked-border-size radio-checked-border-color radio-checked-checkmark radio-disabled-bg radio-disabled-size radio-disabled-border-size 'radio-bg', 'radio-checkmark' theme variables were removed. Use radio-[status]-border-color and radio-[status]-inner-circle-color instead. NbRadioGroupComponent setters 'setValue', 'setName', 'setDisabled', 'setStatus' were removed. Use 'value', 'name', 'disabled', 'status'. NbRadioComponent setter 'setDisabled' removed. Use 'disabled' instead. BREAKING CHANGES: Following map keys were removed: - border-color - color-gray - color-neutral - color-disabled Mapping for borders, disabled and similar styles would controlled by design system and configured for each component individually. Properties 'checkbox-bg', 'checkbox-checked-bg' and 'checkbox-disabled-bg' replaced with: - checkbox-disabled-background-color - checkbox-[status]-background-color - checkbox-[status]-checked-background-color - checkbox-[status]-indeterminate-background-color - checkbox-[status]-focus-background-color - checkbox-[status]-hover-background-color - checkbox-[status]-active-background-color Property 'checkbox-size' splited into 'checkbox-height', 'checkbox-width'. Following properties were removed (along with ability to change appearance of checkbox based on checked or disabled state): - checkbox-checked-size - checkbox-checked-border-size - checkbox-disabled-size - checkbox-disabled-border-size Property 'checkbox-border-size' replaced with 'checkbox-border-width'. Properties 'checkbox-border-color', 'checkbox-checked-border-color', 'checkbox-disabled-border-color' replaced with: - checkbox-disabled-border-color - checkbox-[status]-border-color - checkbox-[status]-checked-border-color - checkbox-[status]-indeterminate-border-color - checkbox-[status]-hover-border-color - checkbox-[status]-active-border-color Properties 'checkbox-checkmark', 'checkbox-checked-checkmark', 'checkbox-disabled-checkmark' replaced with: - checkbox-disabled-checkmark-color - checkbox-[status]-checked-checkmark-color - checkbox-[status]-indeterminate-checkmark-color Check mark pseudo element replaced with nb-icon. Checkbox classes were changed. Class 'customised-control' replaced with 'label'. Class 'customised-control-input' replaced with 'native-input'. Class 'customised-control-indicator' replaced with 'custom-checkbox'. Class 'customised-control-description' replaced with 'text'. NbCheckboxComponent's '_value' property now private. Use 'value' instead. Following theme properties were renamed: form-control-border-width -> input-border-width form-control-border-radius -> input-rectangle-border-radius form-control-semi-round-border-radius -> input-semi-round-border-radius form-control-round-border-radius -> input-round-border-radius form-control-text-primary-color -> input-text-color form-control-border-color -> input-border-color form-control-selected-border-color -> input-focus-border-color, input-[status]-focus-color form-control-bg -> input-background-color form-control-focus-bg -> input-focus-border-color form-control-placeholder-color -> input-placeholder-text-color form-control-placeholder-font-size -> input-placeholder-font-size form-control-font-size -> input-medium-text-font-size form-control-font-size-sm -> input-small-text-font-size form-control-font-size-lg -> input-large-text-font-size form-control-padding -> input-medium-padding form-control-padding-sm -> input-small-padding form-control-padding-lg -> input-large-padding form-control-info-border-color -> input-info-border-color form-control-success-border-color -> input-success-border-color form-control-danger-border-color -> input-danger-border-color form-control-warning-border-color -> input-warning-border-color form-control-border-type -> input-border-style Removed: form-control-label-font-weight form-control-feedback-font-size form-control-feedback-font-weight Input status classes were renamed from input-[status-name] to status-[status-name]. Input size classes were renamed from input-[size-name] to size-[size-name]. Input shape classes were renamed from input-[shape-name] to shape-[shape-name]. All NbInputDirective static fields removed. Removed fields: SIZE_SMALL, SIZE_MEDIUM, SIZE_LARGE, STATUS_PRIMARY, STATUS_INFO, STATUS_SUCCESS, STATUS_WARNING, STATUS_DANGER, SHAPE_SEMI_ROUND, SHAPE_RECTANGLE, SHAPE_ROUND. Use NbComponentStatus, NbComponentShape, NbComponentSize instead. NbInputDirective 'size' property and 'setSize' getter removed. Use unified 'fieldSize' property instead. NbInputDirective 'setFullWidth' replaced with read/write 'fullWidth' property. Remove bootstrap theme support until it's refactored to use updated theme properties
Please read and mark the following check list before creating a pull request:
Short description of what this resolves:
BREAKING CHANGES:
Following theme variables were renamed:
radio-bg -> radio-border-color, radio-inner-circle-color, radio-[status]-border-color, radio-[status]-inner-circle-color
radio-fg -> radio-text-color
radio-size -> radio-width, radio-height
radio-border-size -> radio-border-width
radio-checkmark -> radio-inner-circle-color
radio-disabled-checkmark -> radio-disabled-inner-circle
radio-indicator -> radio-circle
radio-description -> text
Following theme variables were removed:
radio-checked-bg
radio-checked-size
radio-checked-border-size
radio-checked-border-color
radio-checked-checkmark
radio-disabled-bg
radio-disabled-size
radio-disabled-border-size
'radio-bg', 'radio-checkmark' theme variables were removed.
Use radio-[status]-border-color and radio-[status]-inner-circle-color
instead.
NbRadioGroupComponent setters 'setValue', 'setName', 'setDisabled',
'setStatus' were removed. Use 'value', 'name', 'disabled', 'status'.
NbRadioComponent setter 'setDisabled' removed. Use 'disabled' instead.