Files
Amanda Johnston ca59d6c297 chore(): sync with next branch (#29299)
Issue number: resolves #

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

-
-
-

## Does this introduce a breaking change?

- [ ] Yes
- [ ] No

<!--
  If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
  2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-authored-by: Marcelino <brunoapmarcelino@gmail.com>
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Brandy Carney <brandy@ionic.io>
Co-authored-by: Bernardo Cardoso <32780808+BenOsodrac@users.noreply.github.com>
2024-04-08 12:57:23 -05:00

90 lines
2.2 KiB
SCSS

@use "../../themes/ionic.mixins" as mixins;
@use "../../foundations/ionic.vars.scss" as tokens;
// Chip
// --------------------------------------------------
// TODO(ROU-4870): there is no token yet for these ones, but it should be created in the future, once UX team has figma tokens done
$ionic-states-focus-primary: #9ec4fd;
$ionic-states-hover: #{rgba(#05080f, 0.16)}; // We should review how to make this in the future, as we are setting scss variables with a var() and fallback, and it doesn't work inside a rgba().
:host {
--background: #{tokens.$ionic-color-neutral-10};
--border-color: transparent;
--color: #{tokens.$ionic-color-neutral-900};
--focus-ring-color: #{$ionic-states-focus-primary};
--focus-ring-width: #{tokens.$ionic-border-size-medium};
@include mixins.font-smoothing;
@include mixins.padding(tokens.$ionic-space-xs, tokens.$ionic-space-xxs);
@include mixins.border-radius(tokens.$ionic-border-radius-rounded-large);
display: inline-flex;
position: relative;
align-items: center;
gap: tokens.$ionic-space-xxxs;
min-height: 32px;
border-width: tokens.$ionic-border-size-small;
border-style: solid;
border-color: var(--border-color);
background: var(--background);
color: var(--color);
font-family: tokens.$ionic-font-family;
font-size: tokens.$ionic-font-size-m;
cursor: pointer;
overflow: hidden;
box-sizing: border-box;
vertical-align: middle;
}
// Outline Chip
// ---------------------------------------------
:host(.chip-outline) {
--background: transparent;
border-color: tokens.$ionic-color-neutral-100;
}
// Chip: Focus
// ---------------------------------------------
:host(.ion-focused) {
outline: var(--focus-ring-width) solid var(--focus-ring-color);
outline-offset: var(--focus-ring-width);
}
// Chip: Hover
// ---------------------------------------------
@media (any-hover: hover) {
:host(:hover) {
--background: #{$ionic-states-hover};
}
}
// Chip: Disabled
// ---------------------------------------------
:host(.chip-disabled) {
opacity: 0.6;
pointer-events: none;
}
// Chip Icon
// ---------------------------------------------
::slotted(ion-icon) {
font-size: tokens.$ionic-font-size-l;
}