Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,16 @@ The `default` value of the `fill` property is deprecated. It logs a warning and
- `--color` is replaced by `IonChip.hue.subtle.outline.default` for global styles and `--ion-chip-hue-subtle-outline-default-color` for component-specific styles if the chip has a subtle hue and outline fill.
- The `outline` property has been deprecated. To achieve an outlined chip, set the `fill` property to `"outline"`. The class `.chip-outline` has also been updated to `.chip-fill-outline` for clarity.
- Specific mode classes (e.g., `ion-chip.md`) are no longer supported. Style modifications based on the active theme must be implemented using theme tokens rather than direct class targeting.
- The `border-radius` of the `ios` and `md` chip now defaults to `10px` and `8px`, respectively, instead of `16px` in accordance with the iOS and Material Design 3 guidelines. To revert to the previous appearance, set the `shape` to `"round"`, or override the `IonChip.shape.round.border.radius` to specify a different value for global styles and `--ion-chip-shape-round-border-radius` for component-specific styles.
- The `border-radius` of the `ios` chip now defaults to `10px` instead of `16px` in accordance with the iOS guidelines. The `md` chip keeps its pill shape, in accordance with the Material Design 2 guidelines. To revert the `ios` chip to the previous appearance, set the `shape` to `"round"`, or override the `IonChip.shape.round.border.radius` to specify a different value for global styles and `--ion-chip-shape-round-border-radius` for component-specific styles.
- In the `md` theme, the chip now has a letter spacing of `0.0179em` (`0.25px` at `14px`), and the `large` chip a line height of `20px`, instead of inherited, in accordance with the Material Design 2 guidelines. To revert to the previous appearance, set `IonChip.size.large.letterSpacing` and `IonChip.size.large.line.height` to `inherit` for global styles, or `--ion-chip-size-large-letter-spacing` and `--ion-chip-size-large-line-height` for component-specific styles.
- In the `md` theme, a slotted `ion-icon` now has `4px` of space between it and the label instead of `8px`, in accordance with the Material Design 2 guidelines. To revert to the previous appearance, set `IonChip.icon.leading.margin.end` and `IonChip.icon.trailing.margin.start` to `8px` for global styles, or `--ion-chip-icon-leading-margin-end` and `--ion-chip-icon-trailing-margin-start` for component-specific styles.
- In the `md` theme, the border of an outline chip without a `color` is now `12%` of the text color instead of `32%`, in accordance with the Material Design 2 guidelines. To revert to the previous appearance, set `IonChip.hue.bold.outline.default.border.color` to `rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.32)` for global styles, or `--ion-chip-hue-bold-outline-default-border-color` for component-specific styles.
- In the `md` theme, a focused chip without a `color` now has a background of `21%` of the text color instead of `16%`, or `10%` instead of `4%` with an outline fill, in accordance with the Material Design 2 guidelines. To revert to the previous appearance, set `IonChip.hue.bold.solid.focus.background` to `rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.16)` and `IonChip.hue.bold.outline.focus.background` to `rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.04)` for global styles, or `--ion-chip-hue-bold-solid-focus-background` and `--ion-chip-hue-bold-outline-focus-background` for component-specific styles.
- In the `md` theme, a pressed chip, with or without a `color`, now keeps its resting background under the ripple instead of darkening, or its hover background while hovered, in accordance with the Material Design 2 guidelines. To revert to the previous appearance, set these tokens for global styles, or the matching `--ion-chip-hue-*-activated-background` variables for component-specific styles:
- `IonChip.hue.bold.solid.activated.background` to `rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.2)`
- `IonChip.hue.bold.outline.activated.background` to `rgba(var(--ion-text-color-rgb, 0, 0, 0), 0.08)`
- `IonChip.hue.bold.solid.semantic.activated.background` and `IonChip.hue.bold.outline.semantic.activated.background` to `rgba(var(--ion-color-base-rgb), 0.16)`
- In the `md` theme, a disabled chip now has an opacity of `0.38` instead of `0.4`, in accordance with the Material Design 2 guidelines. To revert to the previous appearance, set `IonChip.state.disabled.opacity` to `0.4` for global styles, or `--ion-chip-state-disabled-opacity` for component-specific styles.

<h4 id="version-10x-col">Col</h4>

Expand Down
42 changes: 28 additions & 14 deletions core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1016,14 +1016,6 @@ ion-chip,prop,outline,boolean,false,false,false
ion-chip,prop,shape,"rectangular" | "round" | "soft" | undefined,undefined,false,false
ion-chip,prop,size,"large" | "small" | undefined,undefined,false,false
ion-chip,css-prop,--ion-chip-avatar-height
ion-chip,css-prop,--ion-chip-avatar-leading-margin-bottom
ion-chip,css-prop,--ion-chip-avatar-leading-margin-end
ion-chip,css-prop,--ion-chip-avatar-leading-margin-start
ion-chip,css-prop,--ion-chip-avatar-leading-margin-top
ion-chip,css-prop,--ion-chip-avatar-trailing-margin-bottom
ion-chip,css-prop,--ion-chip-avatar-trailing-margin-end
ion-chip,css-prop,--ion-chip-avatar-trailing-margin-start
ion-chip,css-prop,--ion-chip-avatar-trailing-margin-top
ion-chip,css-prop,--ion-chip-avatar-width
ion-chip,css-prop,--ion-chip-font-weight
ion-chip,css-prop,--ion-chip-gap
Expand Down Expand Up @@ -1089,23 +1081,45 @@ ion-chip,css-prop,--ion-chip-icon-trailing-margin-bottom
ion-chip,css-prop,--ion-chip-icon-trailing-margin-end
ion-chip,css-prop,--ion-chip-icon-trailing-margin-start
ion-chip,css-prop,--ion-chip-icon-trailing-margin-top
ion-chip,css-prop,--ion-chip-letter-spacing
ion-chip,css-prop,--ion-chip-line-height
ion-chip,css-prop,--ion-chip-margin-bottom
ion-chip,css-prop,--ion-chip-margin-end
ion-chip,css-prop,--ion-chip-margin-start
ion-chip,css-prop,--ion-chip-margin-top
ion-chip,css-prop,--ion-chip-padding-bottom
ion-chip,css-prop,--ion-chip-padding-end
ion-chip,css-prop,--ion-chip-padding-start
ion-chip,css-prop,--ion-chip-padding-top
ion-chip,css-prop,--ion-chip-shape-rectangular-border-radius
ion-chip,css-prop,--ion-chip-shape-round-border-radius
ion-chip,css-prop,--ion-chip-shape-soft-border-radius
ion-chip,css-prop,--ion-chip-size-large-avatar-leading-margin-bottom
ion-chip,css-prop,--ion-chip-size-large-avatar-leading-margin-end
ion-chip,css-prop,--ion-chip-size-large-avatar-leading-margin-start
ion-chip,css-prop,--ion-chip-size-large-avatar-leading-margin-top
ion-chip,css-prop,--ion-chip-size-large-avatar-trailing-margin-bottom
ion-chip,css-prop,--ion-chip-size-large-avatar-trailing-margin-end
ion-chip,css-prop,--ion-chip-size-large-avatar-trailing-margin-start
ion-chip,css-prop,--ion-chip-size-large-avatar-trailing-margin-top
ion-chip,css-prop,--ion-chip-size-large-font-size
ion-chip,css-prop,--ion-chip-size-large-letter-spacing
ion-chip,css-prop,--ion-chip-size-large-line-height
ion-chip,css-prop,--ion-chip-size-large-min-height
ion-chip,css-prop,--ion-chip-size-large-padding-bottom
ion-chip,css-prop,--ion-chip-size-large-padding-end
ion-chip,css-prop,--ion-chip-size-large-padding-start
ion-chip,css-prop,--ion-chip-size-large-padding-top
ion-chip,css-prop,--ion-chip-size-small-avatar-leading-margin-bottom
ion-chip,css-prop,--ion-chip-size-small-avatar-leading-margin-end
ion-chip,css-prop,--ion-chip-size-small-avatar-leading-margin-start
ion-chip,css-prop,--ion-chip-size-small-avatar-leading-margin-top
ion-chip,css-prop,--ion-chip-size-small-avatar-trailing-margin-bottom
ion-chip,css-prop,--ion-chip-size-small-avatar-trailing-margin-end
ion-chip,css-prop,--ion-chip-size-small-avatar-trailing-margin-start
ion-chip,css-prop,--ion-chip-size-small-avatar-trailing-margin-top
ion-chip,css-prop,--ion-chip-size-small-font-size
ion-chip,css-prop,--ion-chip-size-small-letter-spacing
ion-chip,css-prop,--ion-chip-size-small-line-height
ion-chip,css-prop,--ion-chip-size-small-min-height
ion-chip,css-prop,--ion-chip-size-small-padding-bottom
ion-chip,css-prop,--ion-chip-size-small-padding-end
ion-chip,css-prop,--ion-chip-size-small-padding-start
ion-chip,css-prop,--ion-chip-size-small-padding-top
ion-chip,css-prop,--ion-chip-state-disabled-opacity
ion-chip,css-prop,--ion-chip-state-focus-ring-color
ion-chip,css-prop,--ion-chip-state-focus-ring-style
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 10 additions & 6 deletions core/src/components/chip/chip.interface.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import type { IonPadding, IonMargin, Hue } from '../../themes/themes.interfaces';

export type IonChipRecipe = {
letterSpacing?: string | number;
line?: {
height?: string | number;
};
margin?: IonMargin;
padding?: IonPadding;
gap?: string | number;

font?: {
Expand Down Expand Up @@ -73,13 +68,22 @@ type IonChipColorDefinition = {
};

type IonChipSizeDefinition = {
padding?: IonPadding;
letterSpacing?: string | number;

min?: {
height?: string | number;
};

font?: {
size?: string | number;
};

line?: {
height?: string | number;
};

avatar?: IonChipMediaDefinition;
};

type IonChipShapeDefinition = {
Expand Down Expand Up @@ -108,7 +112,7 @@ type IonChipIconDefinition = IonChipMediaDefinition & {
};
};

type IonChipAvatarDefinition = IonChipMediaDefinition & {
type IonChipAvatarDefinition = {
height?: string | number;
width?: string | number;
};
Expand Down
Loading
Loading