Skip to content

Commit 057bb0e

Browse files
committed
Merge branch 'ionic-modular' of github.com:ionic-team/ionic-framework into FW-6841
2 parents ed648e0 + 863c21f commit 057bb0e

50 files changed

Lines changed: 628 additions & 877 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BREAKING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This is a comprehensive list of the breaking changes introduced in the major ver
1414

1515
## Version 9.x
1616

17+
- [Global Styles](#version-9x-global-styles)
1718
- [Components](#version-9x-components)
1819
- [Button](#version-9x-button)
1920
- [Card](#version-9x-card)
@@ -22,6 +23,12 @@ This is a comprehensive list of the breaking changes introduced in the major ver
2223
- [Item Divider](#version-9x-item-divider)
2324
- [Spinner](#version-9x-spinner)
2425

26+
<h2 id="version-9x-global-styles">Global Styles</h2>
27+
28+
<h4 id="version-9x-color-steps">Color Steps</h4>
29+
30+
- The deprecated color step CSS variables, `--ion-color-step-[number]`, have been removed and should be replaced with either `--ion-background-color-step-[number]` or `--ion-text-color-step-[number]` depending on the specific use case, as outlined in the [migration guide](https://ionicframework.com/docs/updating/8-0#step-color-tokens).
31+
2532
<h2 id="version-9x-components">Components</h2>
2633

2734
<h4 id="version-9x-button">Button</h4>

core/src/components.d.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { AlertButton, AlertInput } from "./components/alert/alert-interface";
1414
import { RouteID, RouterDirection, RouterEventDetail, RouteWrite } from "./components/router/utils/interface";
1515
import { BreadcrumbCollapsedClickEventDetail } from "./components/breadcrumb/breadcrumb-interface";
1616
import { CheckboxChangeEventDetail } from "./components/checkbox/checkbox-interface";
17+
import { IonChipFill, IonChipHue, IonChipShape, IonChipSize } from "./components/chip/chip.interfaces";
1718
import { ScrollBaseDetail, ScrollDetail } from "./components/content/content-interface";
1819
import { DatetimeChangeEventDetail, DatetimeHighlight, DatetimeHighlightCallback, DatetimeHourCycle, DatetimePresentation, FormatOptions, TitleSelectedDatesFormatter } from "./components/datetime/datetime-interface";
1920
import { SpinnerTypes } from "./components/spinner/spinner-configs";
@@ -53,6 +54,7 @@ export { AlertButton, AlertInput } from "./components/alert/alert-interface";
5354
export { RouteID, RouterDirection, RouterEventDetail, RouteWrite } from "./components/router/utils/interface";
5455
export { BreadcrumbCollapsedClickEventDetail } from "./components/breadcrumb/breadcrumb-interface";
5556
export { CheckboxChangeEventDetail } from "./components/checkbox/checkbox-interface";
57+
export { IonChipFill, IonChipHue, IonChipShape, IonChipSize } from "./components/chip/chip.interfaces";
5658
export { ScrollBaseDetail, ScrollDetail } from "./components/content/content-interface";
5759
export { DatetimeChangeEventDetail, DatetimeHighlight, DatetimeHighlightCallback, DatetimeHourCycle, DatetimePresentation, FormatOptions, TitleSelectedDatesFormatter } from "./components/datetime/datetime-interface";
5860
export { SpinnerTypes } from "./components/spinner/spinner-configs";
@@ -876,11 +878,11 @@ export namespace Components {
876878
/**
877879
* The fill for the chip. Set to `"outline"` for a chip with a border and background. Set to `"solid"` for a chip with a background. Defaults to `"solid"` if both the fill property and theme config are unset.
878880
*/
879-
"fill"?: 'outline' | 'solid';
881+
"fill"?: IonChipFill;
880882
/**
881883
* Set to `"bold"` for a chip with vibrant, bold colors or to `"subtle"` for a chip with muted, subtle colors. Defaults to `"subtle"` if both the hue property and theme config are unset.
882884
*/
883-
"hue"?: 'bold' | 'subtle';
885+
"hue"?: IonChipHue;
884886
/**
885887
* The mode determines the platform behaviors of the component.
886888
*/
@@ -894,11 +896,11 @@ export namespace Components {
894896
/**
895897
* Set to `"soft"` for a chip with slightly rounded corners, `"round"` for a chip with fully rounded corners, or `"rectangular"` for a chip without rounded corners. Defaults to `"round"` if both the shape property and theme config are unset.
896898
*/
897-
"shape"?: 'soft' | 'round' | 'rectangular';
899+
"shape"?: IonChipShape;
898900
/**
899901
* Set to `"small"` for a chip with less height and padding. Defaults to `"large"` if both the size property and theme config are unset.
900902
*/
901-
"size"?: 'small' | 'large';
903+
"size"?: IonChipSize;
902904
}
903905
interface IonCol {
904906
/**
@@ -6842,11 +6844,11 @@ declare namespace LocalJSX {
68426844
/**
68436845
* The fill for the chip. Set to `"outline"` for a chip with a border and background. Set to `"solid"` for a chip with a background. Defaults to `"solid"` if both the fill property and theme config are unset.
68446846
*/
6845-
"fill"?: 'outline' | 'solid';
6847+
"fill"?: IonChipFill;
68466848
/**
68476849
* Set to `"bold"` for a chip with vibrant, bold colors or to `"subtle"` for a chip with muted, subtle colors. Defaults to `"subtle"` if both the hue property and theme config are unset.
68486850
*/
6849-
"hue"?: 'bold' | 'subtle';
6851+
"hue"?: IonChipHue;
68506852
/**
68516853
* The mode determines the platform behaviors of the component.
68526854
*/
@@ -6860,11 +6862,11 @@ declare namespace LocalJSX {
68606862
/**
68616863
* Set to `"soft"` for a chip with slightly rounded corners, `"round"` for a chip with fully rounded corners, or `"rectangular"` for a chip without rounded corners. Defaults to `"round"` if both the shape property and theme config are unset.
68626864
*/
6863-
"shape"?: 'soft' | 'round' | 'rectangular';
6865+
"shape"?: IonChipShape;
68646866
/**
68656867
* Set to `"small"` for a chip with less height and padding. Defaults to `"large"` if both the size property and theme config are unset.
68666868
*/
6867-
"size"?: 'small' | 'large';
6869+
"size"?: IonChipSize;
68686870
}
68696871
interface IonCol {
68706872
/**

core/src/components/action-sheet/action-sheet.ios.vars.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,7 @@ $action-sheet-ios-button-background: linear-gradient(
115115
$action-sheet-ios-button-background-activated: $text-color;
116116

117117
/// @prop - Background color of the selected action sheet button
118-
$action-sheet-ios-button-background-selected: var(
119-
--ion-color-step-150,
120-
var(--ion-background-color-step-150, $background-color)
121-
);
118+
$action-sheet-ios-button-background-selected: var(--ion-background-color-step-150, $background-color);
122119

123120
/// @prop - Destructive text color of the action sheet button
124121
$action-sheet-ios-button-destructive-text-color: ion-color(danger, base);

core/src/components/breadcrumb/breadcrumb.ios.vars.scss

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,22 @@
44
// --------------------------------------------------
55

66
/// @prop - Color of the breadcrumb
7-
$breadcrumb-ios-color: var(--ion-color-step-850, var(--ion-text-color-step-150, #2d4665));
7+
$breadcrumb-ios-color: var(--ion-text-color-step-150, #2d4665);
88

99
/// @prop - Color of the active breadcrumb
1010
$breadcrumb-ios-color-active: var(--ion-text-color, #03060b);
1111

1212
/// @prop - Background color of the focused breadcrumb
13-
$breadcrumb-ios-background-focused: var(
14-
--ion-color-step-50,
15-
var(--ion-background-color-step-50, rgba(233, 237, 243, 0.7))
16-
);
13+
$breadcrumb-ios-background-focused: var(--ion-background-color-step-50, rgba(233, 237, 243, 0.7));
1714

1815
/// @prop - Color of the breadcrumb icon
19-
$breadcrumb-ios-icon-color: var(--ion-color-step-400, var(--ion-text-color-step-600, #92a0b3));
16+
$breadcrumb-ios-icon-color: var(--ion-text-color-step-600, #92a0b3);
2017

2118
/// @prop - Color of the breadcrumb icon when active
22-
$breadcrumb-ios-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #242d39));
19+
$breadcrumb-ios-icon-color-active: var(--ion-text-color-step-150, #242d39);
2320

2421
/// @prop - Color of the breadcrumb icon when focused
25-
$breadcrumb-ios-icon-color-focused: var(--ion-color-step-750, var(--ion-text-color-step-250, #445b78));
22+
$breadcrumb-ios-icon-color-focused: var(--ion-text-color-step-250, #445b78);
2623

2724
/// @prop - Color of the breadcrumb separator
2825
$breadcrumb-ios-separator-color: $breadcrumb-separator-color;
@@ -31,7 +28,7 @@ $breadcrumb-ios-separator-color: $breadcrumb-separator-color;
3128
$breadcrumb-ios-indicator-color: $breadcrumb-ios-separator-color;
3229

3330
/// @prop - Background color of the breadcrumb indicator
34-
$breadcrumb-ios-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #e9edf3));
31+
$breadcrumb-ios-indicator-background: var(--ion-background-color-step-100, #e9edf3);
3532

3633
/// @prop - Background color of the breadcrumb indicator when focused
37-
$breadcrumb-ios-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #d9e0ea));
34+
$breadcrumb-ios-indicator-background-focused: var(--ion-background-color-step-150, #d9e0ea);

core/src/components/breadcrumb/breadcrumb.md.vars.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
// --------------------------------------------------
55

66
/// @prop - Color of the breadcrumb
7-
$breadcrumb-md-color: var(--ion-color-step-600, var(--ion-text-color-step-400, #677483));
7+
$breadcrumb-md-color: var(--ion-text-color-step-400, #677483);
88

99
/// @prop - Color of the active breadcrumb
1010
$breadcrumb-md-color-active: var(--ion-text-color, #03060b);
1111

1212
/// @prop - Color of the focused breadcrumb
13-
$breadcrumb-md-color-focused: var(--ion-color-step-800, var(--ion-text-color-step-200, #35404e));
13+
$breadcrumb-md-color-focused: var(--ion-text-color-step-200, #35404e);
1414

1515
/// @prop - Background color of the focused breadcrumb
16-
$breadcrumb-md-background-focused: var(--ion-color-step-50, var(--ion-background-color-step-50, #fff));
16+
$breadcrumb-md-background-focused: var(--ion-background-color-step-50, #fff);
1717

1818
/// @prop - Color of the breadcrumb icon
19-
$breadcrumb-md-icon-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #7d8894));
19+
$breadcrumb-md-icon-color: var(--ion-text-color-step-450, #7d8894);
2020

2121
/// @prop - Color of the breadcrumb icon when active
22-
$breadcrumb-md-icon-color-active: var(--ion-color-step-850, var(--ion-text-color-step-150, #222d3a));
22+
$breadcrumb-md-icon-color-active: var(--ion-text-color-step-150, #222d3a);
2323

2424
/// @prop - Margin top of the breadcrumb separator
2525
$breadcrumb-md-separator-margin-top: -1px;
@@ -40,7 +40,7 @@ $breadcrumb-md-separator-color: $breadcrumb-separator-color;
4040
$breadcrumb-md-indicator-color: $breadcrumb-md-separator-color;
4141

4242
/// @prop - Background color of the breadcrumb indicator
43-
$breadcrumb-md-indicator-background: var(--ion-color-step-100, var(--ion-background-color-step-100, #eef1f3));
43+
$breadcrumb-md-indicator-background: var(--ion-background-color-step-100, #eef1f3);
4444

4545
/// @prop - Background color of the breadcrumb indicator when focused
46-
$breadcrumb-md-indicator-background-focused: var(--ion-color-step-150, var(--ion-background-color-step-150, #dfe5e8));
46+
$breadcrumb-md-indicator-background-focused: var(--ion-background-color-step-150, #dfe5e8);

core/src/components/breadcrumb/breadcrumb.vars.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ $breadcrumb-baseline-font-size: 16px;
1212
$breadcrumb-font-size: dynamic-font($breadcrumb-baseline-font-size);
1313

1414
/// @prop - Color of the breadcrumb separator
15-
$breadcrumb-separator-color: var(--ion-color-step-550, var(--ion-text-color-step-450, #73849a));
15+
$breadcrumb-separator-color: var(--ion-text-color-step-450, #73849a);

core/src/components/checkbox/test/validation/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
font-size: 12px;
2525
font-weight: normal;
2626

27-
color: var(--ion-color-step-600);
27+
color: var(--ion-text-color-step-400);
2828

2929
margin-top: 10px;
3030
margin-bottom: 5px;

core/src/components/chip/chip.interfaces.ts

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,17 @@ export type IonChipRecipe = {
1313

1414
// Hues with fills
1515
hue?: {
16-
bold?: IonChipFillDefinition;
17-
subtle?: IonChipFillDefinition;
16+
[K in IonChipHue]?: IonChipFillDefinition;
1817
};
1918

2019
// Sizes
2120
size?: {
22-
small?: IonChipSizeDefinition;
23-
large?: IonChipSizeDefinition;
21+
[K in IonChipSize]?: IonChipSizeDefinition;
2422
};
2523

2624
// Shapes
2725
shape?: {
28-
soft?: IonChipShapeDefinition;
29-
round?: IonChipShapeDefinition;
30-
rectangular?: IonChipShapeDefinition;
26+
[K in IonChipShape]?: IonChipShapeDefinition;
3127
};
3228

3329
// Shared States
@@ -50,11 +46,7 @@ export type IonChipRecipe = {
5046
};
5147

5248
type IonChipFillDefinition = {
53-
solid?: IonChipStateDefinition & {
54-
semantic?: IonChipStateDefinition;
55-
};
56-
57-
outline?: IonChipStateDefinition & {
49+
[K in IonChipFill]?: IonChipStateDefinition & {
5850
semantic?: IonChipStateDefinition;
5951
};
6052
};
@@ -118,8 +110,13 @@ type IonChipAvatarDefinition = IonChipMediaDefinition & {
118110
};
119111

120112
export type IonChipConfig = {
121-
fill?: 'outline' | 'solid';
122-
hue?: 'bold' | 'subtle';
123-
size?: 'small' | 'large';
124-
shape?: 'soft' | 'round' | 'rectangular';
113+
fill?: IonChipFill;
114+
hue?: IonChipHue;
115+
size?: IonChipSize;
116+
shape?: IonChipShape;
125117
};
118+
119+
export type IonChipFill = 'outline' | 'solid';
120+
export type IonChipHue = 'bold' | 'subtle';
121+
export type IonChipSize = 'small' | 'large';
122+
export type IonChipShape = 'soft' | 'round' | 'rectangular';

core/src/components/chip/chip.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { createColorClasses } from '@utils/theme';
66
import { config } from '../../global/config';
77
import type { Color } from '../../interface';
88

9+
import type { IonChipFill, IonChipHue, IonChipSize, IonChipShape } from './chip.interfaces';
10+
911
/**
1012
* @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component.
1113
*/
@@ -39,7 +41,7 @@ export class Chip implements ComponentInterface {
3941
*
4042
* Defaults to `"solid"` if both the fill property and theme config are unset.
4143
*/
42-
@Prop() fill?: 'outline' | 'solid';
44+
@Prop() fill?: IonChipFill;
4345

4446
/**
4547
* If `true`, the user cannot interact with the chip.
@@ -52,7 +54,7 @@ export class Chip implements ComponentInterface {
5254
*
5355
* Defaults to `"subtle"` if both the hue property and theme config are unset.
5456
*/
55-
@Prop() hue?: 'bold' | 'subtle';
57+
@Prop() hue?: IonChipHue;
5658

5759
/**
5860
* Set to `"soft"` for a chip with slightly rounded corners,
@@ -61,15 +63,15 @@ export class Chip implements ComponentInterface {
6163
*
6264
* Defaults to `"round"` if both the shape property and theme config are unset.
6365
*/
64-
@Prop() shape?: 'soft' | 'round' | 'rectangular';
66+
@Prop() shape?: IonChipShape;
6567

6668
// TODO(FW-6266): Determine if `medium` size is needed.
6769
/**
6870
* Set to `"small"` for a chip with less height and padding.
6971
*
7072
* Defaults to `"large"` if both the size property and theme config are unset.
7173
*/
72-
@Prop() size?: 'small' | 'large';
74+
@Prop() size?: IonChipSize;
7375

7476
componentDidLoad() {
7577
if (this.outline) {
@@ -84,8 +86,8 @@ export class Chip implements ComponentInterface {
8486
* Gets the chip fill. Uses the `fill` property if set, otherwise
8587
* checks the theme config and falls back to 'solid' if neither is provided.
8688
*/
87-
get fillValue(): string {
88-
const fillConfig = config.getObjectValue('IonChip.fill', 'solid') as string;
89+
get fillValue(): IonChipFill {
90+
const fillConfig = config.getObjectValue('IonChip.fill', 'solid') as IonChipFill;
8991
const fill = this.fill || (this.outline ? 'outline' : undefined) || fillConfig;
9092

9193
return fill;
@@ -95,8 +97,8 @@ export class Chip implements ComponentInterface {
9597
* Gets the chip hue. Uses the `hue` property if set, otherwise
9698
* checks the theme config and falls back to 'subtle' if neither is provided.
9799
*/
98-
get hueValue(): string {
99-
const hueConfig = config.getObjectValue('IonChip.hue', 'subtle') as string;
100+
get hueValue(): IonChipHue {
101+
const hueConfig = config.getObjectValue('IonChip.hue', 'subtle') as IonChipHue;
100102
const hue = this.hue || hueConfig;
101103

102104
return hue;
@@ -106,8 +108,8 @@ export class Chip implements ComponentInterface {
106108
* Gets the chip shape. Uses the `shape` property if set, otherwise
107109
* checks the theme config and falls back to 'round' if neither is provided.
108110
*/
109-
get shapeValue(): string {
110-
const shapeConfig = config.getObjectValue('IonChip.shape', 'round') as string;
111+
get shapeValue(): IonChipShape {
112+
const shapeConfig = config.getObjectValue('IonChip.shape', 'round') as IonChipShape;
111113
const shape = this.shape || shapeConfig;
112114

113115
return shape;
@@ -117,8 +119,8 @@ export class Chip implements ComponentInterface {
117119
* Gets the chip size. Uses the `size` property if set, otherwise
118120
* checks the theme config and falls back to 'large' if neither is provided.
119121
*/
120-
get sizeValue(): string {
121-
const sizeConfig = config.getObjectValue('IonChip.size', 'large') as string;
122+
get sizeValue(): IonChipSize {
123+
const sizeConfig = config.getObjectValue('IonChip.size', 'large') as IonChipSize;
122124
const size = this.size || sizeConfig;
123125

124126
return size;

core/src/components/datetime-button/datetime-button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
border: none;
2525

26-
background: var(--ion-color-step-300, var(--ion-background-color-step-300, #edeef0));
26+
background: var(--ion-background-color-step-300, #edeef0);
2727

2828
color: $text-color;
2929

0 commit comments

Comments
 (0)