Chips Choice
Installation
yarn add @chewy/kib-chips-styles
Import
@use '~@chewy/kib-chips-styles/src/kib-chip-choice/styles' as kib-chip-choice;
Mixins
chip-choice-base-container-styles
@mixin chip-choice-base-container-styles() { ... }
@mixin chip-choice-base-container-styles() { position: relative; display: inline-flex; align-items: center; justify-content: center; }
Description
Chip choice container base styles
Parameters
None.
Author
CDS
chip-choice-base-styles
@mixin chip-choice-base-styles($type) { ... }
@mixin chip-choice-base-styles($type) { @include common.chip-base-styles($type); border: unit.rem(1px) solid map.get(variants.$styles, $type, '$chip-border-color'); }
chip-choice-control-styles
@mixin chip-choice-control-styles() { ... }
@mixin chip-choice-control-styles() { opacity: 0; position: absolute; z-index: 2; width: 100%; height: 100%; cursor: pointer; margin: 0; }
Description
Styles for chip choice input control removes native radio styling
Parameters
None.
Author
CDS
chip-choice-selected-styles
@mixin chip-choice-selected-styles($type) { ... }
@mixin chip-choice-selected-styles($type) { background: map.get(variants.$styles, $type, '$chip-selected-background'); border: unit.rem(2px) solid map.get(variants.$styles, $type, '$chip-selected-border-color'); &::after { $distance: unit.rem(-3px); top: $distance; left: $distance; right: $distance; bottom: $distance; } }
chip-choice-active-styles
@mixin chip-choice-active-styles($type) { ... }
@mixin chip-choice-active-styles($type) { background: map.get(variants.$styles, $type, '$pressed-background'); }
Description
Styles for chip choice when active
Parameters
parameter Name | parameter Description | parameter Type | parameter Default value |
---|---|---|---|
$type | Variant type for common chip styles | String | — none |
Requires
- [function]
get
- [variable]
pressed-background
Author
CDS
chip-choice-hover-styles
@mixin chip-choice-hover-styles($type) { ... }
@mixin chip-choice-hover-styles($type) { box-shadow: 0 unit.rem(1px 1px) rgba(0, 0, 0, 0.14), 0 unit.rem(2px 1px -1px) rgba(0, 0, 0, 0.12), 0 unit.rem(1px 3px) rgba(0, 0, 0, 0.2); background: map.get(variants.$styles, $type, '$hover-background'); }
chip-choice-disabled-styles
@mixin chip-choice-disabled-styles() { ... }
@mixin chip-choice-disabled-styles() { @include common.chip-disabled-styles; box-shadow: none; cursor: default; opacity: settings.$chip-choice-deselected-disabled-opacity; }
Description
Styles for disabled chip choice
Parameters
None.
Requires
- [variable]
chip-choice-deselected-disabled-opacity
Author
CDS
chip-choice-selected-disabled-styles
@mixin chip-choice-selected-disabled-styles() { ... }
@mixin chip-choice-selected-disabled-styles() { opacity: settings.$chip-choice-selected-disabled-opacity; }
Description
Styles for selected disabled chip choice
Parameters
None.
Requires
- [variable]
chip-choice-selected-disabled-opacity
Author
CDS
Variables
chip-choice-icon-spacing
$chip-choice-icon-spacing: spacing.get('s1') !default;
Description
Chip choice spacing between icon and label
Type
Number
Author
CDS
chip-choice-selected-disabled-opacity
$chip-choice-selected-disabled-opacity: 0.3;
Description
Chip choice selected disabled opacity
Type
Number
Used by
Author
CDS
chip-choice-deselected-disabled-opacity
$chip-choice-deselected-disabled-opacity: 0.5;
Description
Chip choice deselected disabled opacity
Type
Number
Used by
- [mixin]
chip-choice-disabled-styles
Author
CDS