Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7057225
refactor(many): remove phosphor icon usage
brandyscarney Sep 2, 2026
69200e8
chore(deps): remove @phosphor-icons/core
brandyscarney Sep 2, 2026
4023d2a
chore: remove old svgTransform for Jest
brandyscarney Sep 2, 2026
d5c3159
style: add consistent comments to the icon getters
brandyscarney Sep 14, 2026
662509c
feat(config): add option to override selectModalCancelIcon
brandyscarney Sep 14, 2026
ccf41e1
feat(config): add option to override refresherArrowIcon
brandyscarney Sep 14, 2026
9882ad6
chore(): add updated snapshots
Ionitron Sep 14, 2026
a675914
feat(config): add option to override checkboxCheckedIcon and checkbox…
brandyscarney Sep 15, 2026
55b217c
chore(): add updated snapshots
Ionitron Sep 15, 2026
403df5d
docs(component-guide): add a section on icon global config
brandyscarney Sep 15, 2026
c591b44
Merge branch 'FW-6998' of https://github.com/ionic-team/ionic-framewo…
brandyscarney Sep 15, 2026
57cadbf
style(checkbox): update docs, styles, destructure props
brandyscarney Sep 16, 2026
550e889
test(checkbox): set config properly to not override mode
brandyscarney Sep 16, 2026
861c01c
style: rename select-modal getter and remove return comments
brandyscarney Sep 16, 2026
fddf4eb
style: update refresher comments
brandyscarney Sep 16, 2026
393a0bc
refactor(alert): remove inline Phosphor icon in ionic theme
brandyscarney Sep 16, 2026
8b271d6
test(checkbox): add ionic theme to the indeterminate test
brandyscarney Sep 16, 2026
73ce038
refactor(checkbox): don't require calculations on icon
brandyscarney Sep 16, 2026
badfb51
fix(checkbox): only render the svg if markIcon is not set
brandyscarney Sep 17, 2026
d513494
test(checkbox): add additional coverage for ionic theme
brandyscarney Sep 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ ion-checkbox,css-prop,--border-style,md
ion-checkbox,css-prop,--border-width,ionic
ion-checkbox,css-prop,--border-width,ios
ion-checkbox,css-prop,--border-width,md
ion-checkbox,css-prop,--checkbox-background,ionic
ion-checkbox,css-prop,--checkbox-background,ios
ion-checkbox,css-prop,--checkbox-background,md
ion-checkbox,css-prop,--checkbox-background-checked,ionic
Expand All @@ -573,7 +574,6 @@ ion-checkbox,css-prop,--checkbox-background-checked,md
ion-checkbox,css-prop,--checkmark-color,ionic
ion-checkbox,css-prop,--checkmark-color,ios
ion-checkbox,css-prop,--checkmark-color,md
ion-checkbox,css-prop,--checkmark-height,ionic
ion-checkbox,css-prop,--checkmark-width,ionic
ion-checkbox,css-prop,--checkmark-width,ios
ion-checkbox,css-prop,--checkmark-width,md
Expand All @@ -589,6 +589,7 @@ ion-checkbox,css-prop,--transition,md
ion-checkbox,part,container
ion-checkbox,part,error-text
ion-checkbox,part,helper-text
ion-checkbox,part,icon

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @prop doc for --checkbox-background probably wants to move into the common stylesheet alongside it, otherwise this file keeps listing it for ios and md only. The split predates the PR, but you already moved --checkmark-width's doc across as part of the same consolidation. Up to you!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ion-checkbox,part,label
ion-checkbox,part,mark
ion-checkbox,part,supporting-text
Expand Down
7 changes: 0 additions & 7 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"loader/"
],
"dependencies": {
"@phosphor-icons/core": "^2.1.1",
"@stencil/core": "4.43.5",
"ionicons": "^8.1.0",
"tslib": "^2.1.0"
Expand Down

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default icons have changed for the ionic theme, so all of these screenshot diffs are expected.

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.
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.
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.
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.
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.
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.
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.
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.
21 changes: 7 additions & 14 deletions core/src/components/accordion/accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import caretDownRegular from '@phosphor-icons/core/assets/regular/caret-down.svg';
import type { ComponentInterface } from '@stencil/core';
import { Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';
import { addEventListener, getElementRoot, raf, removeEventListener, transitionEndAsync } from '@utils/helpers';
Expand Down Expand Up @@ -242,25 +241,19 @@ export class Accordion implements ComponentInterface {
button.setAttribute('aria-expanded', `${expanded}`);
};

/**
* Get the icon to use for the toggle icon.
* If an icon is set on the component, use that.
* Otherwise, use the icon set in the config.
* If no icon is set in the config, use the default icon.
*/
get accordionToggleIcon() {
// Return the icon if it is explicitly set
if (this.toggleIcon != null) {
return this.toggleIcon;
}

// Determine the theme and map to default icons
const theme = getIonTheme(this);
const defaultIcons = {
ios: chevronDown,
ionic: caretDownRegular,
md: chevronDown,
};

// Get the default icon based on the theme, falling back to 'md' icon if necessary
const defaultIcon = defaultIcons[theme] || defaultIcons.md;

// Return the configured accordion toggle icon or the default icon
return config.get('accordionToggleIcon', defaultIcon);
return config.get('accordionToggleIcon', chevronDown);
}

private slotToggleIcon = () => {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 13 additions & 9 deletions core/src/components/alert/alert.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,6 @@
@include globals.position-horizontal(null, globals.$ion-space-400);
}

.alert-checkbox-inner {
width: globals.$ion-scale-400;
height: globals.$ion-scale-400;
}

.alert-checkbox-inner path {
fill: globals.$ion-bg-surface-default;
}

// Ionic Alert Checkbox Checkmark: Checked
// --------------------------------------------------

Expand All @@ -334,6 +325,19 @@
background-color: globals.$ion-bg-primary-base-default;
}

// The checkmark is a box clipped to the outline of the mark ion-checkbox
// draws. It represents a two-segment polyline with a 3-unit stroke in a
// 24-unit box. The polygon points trace the outer and inner edges of that
// stroke and are derived from the checkmark's geometry.
[aria-checked="true"] .alert-checkbox-inner {
width: globals.$ion-scale-400;
height: globals.$ion-scale-400;

background-color: globals.$ion-bg-surface-default;

clip-path: polygon(2.79% 58.21%, 33.75% 89.17%, 99.38% 23.54%, 90.54% 14.71%, 33.75% 71.49%, 11.63% 49.37%);
}

// Ionic Alert Button
// --------------------------------------------------

Expand Down
8 changes: 1 addition & 7 deletions core/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -634,13 +634,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
}}
>
<div class="alert-checkbox-icon">
{theme === 'ionic' ? (
<svg class="alert-checkbox-inner" viewBox="0 0 256 256" aria-hidden="true">
<path d="M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z" />
</svg>
) : (
<div class="alert-checkbox-inner"></div>
)}
<div class="alert-checkbox-inner"></div>
</div>
{renderOptionLabel(optionLabelOptions, 'alert-checkbox-label')}
</div>
Expand Down
19 changes: 8 additions & 11 deletions core/src/components/back-button/back-button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import caretLeftRegular from '@phosphor-icons/core/assets/regular/caret-left.svg';
import type { ComponentInterface } from '@stencil/core';
import { Component, Element, Host, Prop, h } from '@stencil/core';
import type { ButtonInterface } from '@utils/element-interface';
Expand Down Expand Up @@ -80,24 +79,22 @@ export class BackButton implements ComponentInterface, ButtonInterface {
}
}

/**
* Get the icon to use for the back button icon.
* If an icon is set on the component, use that.
* Otherwise, use the icon set in the config.
* If no icon is set in the config, use the default icon.
*/
get backButtonIcon() {
// Return the icon if it is explicitly set
if (this.icon != null) {
return this.icon;
}

// Determine the theme and map to default icons
// Determine the theme and map to the default icon
const theme = getIonTheme(this);
const defaultIcons = {
ios: chevronBack,
ionic: caretLeftRegular,
md: arrowBackSharp,
};

// Get the default icon based on the theme, falling back to 'md' icon if necessary
const defaultIcon = defaultIcons[theme] || defaultIcons.md;
const defaultIcon = theme === 'ios' ? chevronBack : arrowBackSharp;

// Return the configured back button icon or the default icon
return config.get('backButtonIcon', defaultIcon);
}

Expand Down
40 changes: 12 additions & 28 deletions core/src/components/breadcrumb/breadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import caretRightRegular from '@phosphor-icons/core/assets/regular/caret-right.svg';
import dotsThreeRegular from '@phosphor-icons/core/assets/regular/dots-three.svg';
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Prop, h } from '@stencil/core';
import type { Attributes } from '@utils/helpers';
Expand Down Expand Up @@ -135,36 +133,22 @@ export class Breadcrumb implements ComponentInterface {
this.inheritedAttributes = inheritAriaAttributes(this.el);
}

/**
* Get the icon to use for the collapsed icon.
* Use the icon set in the config.
* If no icon is set in the config, use the default icon.
*/
get breadcrumbCollapsedIcon() {
// Determine the theme and map to default icons
const theme = getIonTheme(this);
const defaultIcons = {
ios: ellipsisHorizontal,
ionic: dotsThreeRegular,
md: ellipsisHorizontal,
};

// Get the default icon based on the theme, falling back to 'md' icon if necessary
const defaultIcon = defaultIcons[theme] || defaultIcons.md;

// Return the configured breadcrumb collapsed icon or the default icon
return config.get('breadcrumbCollapsedIcon', defaultIcon);
return config.get('breadcrumbCollapsedIcon', ellipsisHorizontal);
}

/**
* Get the icon to use for the separator icon.
* Use the icon set in the config.
* If no icon is set in the config, use the default icon.
*/
get breadcrumbSeparatorIcon() {
// Determine the theme and map to default icons
const theme = getIonTheme(this);
const defaultIcons = {
ios: chevronForwardOutline,
ionic: caretRightRegular,
md: chevronForwardOutline,
};

// Get the default icon based on the theme, falling back to 'md' icon if necessary
const defaultIcon = defaultIcons[theme] || defaultIcons.md;

// Return the configured breadcrumb separator icon or the default icon
return config.get('breadcrumbSeparatorIcon', defaultIcon);
return config.get('breadcrumbSeparatorIcon', chevronForwardOutline);
}

private isClickable(): boolean {
Expand Down
48 changes: 42 additions & 6 deletions core/src/components/checkbox/checkbox.common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/**
* @prop --size: Size of the checkbox icon
*
* @prop --checkbox-background: Background of the checkbox icon
* @prop --checkbox-background-checked: Background of the checkbox icon when checked
*
* @prop --border-color: Border color of the checkbox icon
Expand Down Expand Up @@ -97,17 +98,52 @@ input {
}

.native-wrapper {
@include mixins.border-radius(var(--border-radius));

display: flex;

position: relative;

flex-shrink: 0;

align-items: center;

width: var(--size);
height: var(--size);

transition: var(--transition);

border-width: var(--border-width);
border-style: var(--border-style);
border-color: var(--border-color);

background: var(--checkbox-background);

box-sizing: border-box;
}
Comment on lines 100 to 123

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These styles were the same in the ionic and native files so I moved them to common.


// Checkbox Icon
// ----------------------------------------------------------------

/**
* Apply the color to the ion-icon container so that the default
* checkmark icon and any configured icon apply color consistently.
*/
.checkbox-icon {
position: relative;
color: var(--checkmark-color);

opacity: 0;
}

.checkbox-icon svg {
width: 100%;
height: 100%;
}

.checkbox-icon path {
opacity: 0;
fill: none;
stroke: currentColor;
stroke-width: var(--checkmark-width);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fill to stroke change is what makes the ionic indeterminate mark render at all, but nothing screenshots it. The indeterminate test doesn't opt into ionic-md, and the basic test page has no indeterminate checkbox in it. Adding the mode to that spec produces a good snapshot.

Probably a follow-up rather than something for this PR, but back-button, breadcrumb, fab-button and a few of the other components whose ionic default changed here have no ionic snapshots at all, so those swaps aren't verified either.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added: 8b271d6

I think getting all of the themes tested properly should be part of the modular ionic work, personally. Ideally it should be done at the time of migrating each component.

}

// Checkbox Bottom Content
Expand Down Expand Up @@ -247,15 +283,15 @@ input {
// Checked / Indeterminate Checkbox
// ---------------------------------------------

:host(.checkbox-checked) .checkbox-icon,
:host(.checkbox-indeterminate) .checkbox-icon {
:host(.checkbox-checked) .native-wrapper,
:host(.checkbox-indeterminate) .native-wrapper {
border-color: var(--border-color-checked);

background: var(--checkbox-background-checked);
}

:host(.checkbox-checked) .checkbox-icon path,
:host(.checkbox-indeterminate) .checkbox-icon path {
:host(.checkbox-checked) .checkbox-icon,
:host(.checkbox-indeterminate) .checkbox-icon {
opacity: 1;
}

Expand Down
Loading
Loading