From d77fea8a08ddf7bcbfe1160d2490aa6e79f36e39 Mon Sep 17 00:00:00 2001 From: Brandy Smith <6577830+brandyscarney@users.noreply.github.com> Date: Mon, 19 Oct 2026 17:47:45 -0400 Subject: [PATCH] refactor(gallery-item): migrate to modular theming --- core/api.txt | 1 - core/src/components.d.ts | 8 -------- core/src/components/gallery-item/gallery-item.tsx | 5 ----- packages/angular/src/lazy/directives/proxies.ts | 4 ++-- .../angular/src/standalone/directives/ion-gallery-item.ts | 4 ++-- 5 files changed, 4 insertions(+), 18 deletions(-) diff --git a/core/api.txt b/core/api.txt index f70e4bb3493..83677057335 100644 --- a/core/api.txt +++ b/core/api.txt @@ -1064,7 +1064,6 @@ ion-gallery,prop,theme,"ios" | "md" | "ionic",undefined,false,false ion-gallery-item,shadow ion-gallery-item,prop,mode,"ios" | "md",undefined,false,false -ion-gallery-item,prop,theme,"ios" | "md" | "ionic",undefined,false,false ion-grid,shadow ion-grid,prop,fixed,boolean,false,false,false diff --git a/core/src/components.d.ts b/core/src/components.d.ts index b82f2e79119..c82becfa0cd 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -1539,10 +1539,6 @@ export namespace Components { * Resolve the layout from the parent `ion-gallery`. Called internally on load and connect, and by the gallery when its layout changes. */ "syncGalleryLayout": () => Promise; - /** - * The theme determines the visual appearance of the component. - */ - "theme"?: "ios" | "md" | "ionic"; } interface IonGrid { /** @@ -7411,10 +7407,6 @@ declare namespace LocalJSX { * The mode determines the platform behaviors of the component. */ "mode"?: "ios" | "md"; - /** - * The theme determines the visual appearance of the component. - */ - "theme"?: "ios" | "md" | "ionic"; } interface IonGrid { /** diff --git a/core/src/components/gallery-item/gallery-item.tsx b/core/src/components/gallery-item/gallery-item.tsx index abe25fc8f2e..e337a604485 100644 --- a/core/src/components/gallery-item/gallery-item.tsx +++ b/core/src/components/gallery-item/gallery-item.tsx @@ -2,11 +2,8 @@ import type { ComponentInterface } from '@stencil/core'; import { Component, Element, Host, Method, State, h } from '@stencil/core'; import { printIonWarning } from '@utils/logging'; -import { getIonTheme } from '../../global/ionic-global'; - /** * @virtualProp {"ios" | "md"} mode - The mode determines the platform behaviors of the component. - * @virtualProp {"ios" | "md" | "ionic"} theme - The theme determines the visual appearance of the component. * * @slot - The content placed inside of the gallery item. This is typically an * `img`, but can be any element (e.g. a `figure` wrapping an image and caption). @@ -71,12 +68,10 @@ export class GalleryItem implements ComponentInterface { render() { const { galleryLayout } = this; - const theme = getIonTheme(this); return ( diff --git a/packages/angular/src/lazy/directives/proxies.ts b/packages/angular/src/lazy/directives/proxies.ts index f3c4bee2c74..3614f4e88f4 100644 --- a/packages/angular/src/lazy/directives/proxies.ts +++ b/packages/angular/src/lazy/directives/proxies.ts @@ -927,14 +927,14 @@ export declare interface IonGallery extends Components.IonGallery {} @ProxyCmp({ - inputs: ['mode', 'theme'] + inputs: ['mode'] }) @Component({ selector: 'ion-gallery-item', changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['mode', 'theme'], + inputs: ['mode'], standalone: false }) export class IonGalleryItem { diff --git a/packages/angular/src/standalone/directives/ion-gallery-item.ts b/packages/angular/src/standalone/directives/ion-gallery-item.ts index 9e51be4c23a..f8979a118e2 100644 --- a/packages/angular/src/standalone/directives/ion-gallery-item.ts +++ b/packages/angular/src/standalone/directives/ion-gallery-item.ts @@ -10,14 +10,14 @@ import { defineCustomElement as defineIonGalleryItem } from '@ionic/core/compone @ProxyCmp({ defineCustomElementFn: defineIonGalleryItem, - inputs: ['mode', 'theme'] + inputs: ['mode'] }) @Component({ selector: 'ion-gallery-item', changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['mode', 'theme'], + inputs: ['mode'], }) export class IonGalleryItem { protected el: HTMLIonGalleryItemElement;