From 56069b1a839fae78bccaf29d50a6f9a71b1f3fcf Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 13 Mar 2024 16:31:16 +0100 Subject: [PATCH] Update users of AuIcon to explicitly accept inline icon components --- addon/components/au-alert.gts | 4 ++-- addon/components/au-badge.gts | 4 ++-- addon/components/au-button.gts | 4 ++-- addon/components/au-card.gts | 4 ++-- addon/components/au-input.gts | 4 ++-- addon/components/au-link.gts | 4 ++-- addon/components/au-pill.gts | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/addon/components/au-alert.gts b/addon/components/au-alert.gts index 1392181d5..483940c5a 100644 --- a/addon/components/au-alert.gts +++ b/addon/components/au-alert.gts @@ -2,12 +2,12 @@ import { on } from '@ember/modifier'; import { action } from '@ember/object'; import Component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; -import AuIcon from './au-icon'; +import AuIcon, { type AuIconSignature } from './au-icon'; export interface AuAlertSignature { Args: { closable?: boolean; - icon?: string; + icon?: AuIconSignature['Args']['icon']; iconVisible?: boolean; onClose?: () => void; size?: 'tiny' | 'small'; diff --git a/addon/components/au-badge.gts b/addon/components/au-badge.gts index 2e729adbf..9a5babe5e 100644 --- a/addon/components/au-badge.gts +++ b/addon/components/au-badge.gts @@ -1,9 +1,9 @@ import Component from '@glimmer/component'; -import AuIcon from './au-icon'; +import AuIcon, { type AuIconSignature } from './au-icon'; export interface AuBadgeSignature { Args: { - icon?: string; + icon?: AuIconSignature['Args']['icon']; iconVisible?: boolean; number?: number; size?: 'small'; diff --git a/addon/components/au-button.gts b/addon/components/au-button.gts index fa39a331a..b59f03c82 100644 --- a/addon/components/au-button.gts +++ b/addon/components/au-button.gts @@ -1,5 +1,5 @@ import Component from '@glimmer/component'; -import AuIcon from './au-icon'; +import AuIcon, { type AuIconSignature } from './au-icon'; import { LoadingAnimation } from '../private/components/loading-animation'; const SKINS = [ @@ -15,7 +15,7 @@ export interface AuButtonSignature { alert?: boolean; disabled?: boolean; hideText?: boolean; - icon?: string; + icon?: AuIconSignature['Args']['icon']; iconAlignment?: 'left' | 'right'; loading?: boolean; loadingMessage?: string; diff --git a/addon/components/au-card.gts b/addon/components/au-card.gts index 2107fca10..960afdd94 100644 --- a/addon/components/au-card.gts +++ b/addon/components/au-card.gts @@ -6,7 +6,7 @@ import { tracked } from '@glimmer/tracking'; import AuBadge from './au-badge'; import AuButton from './au-button'; import AuContent, { type AuContentSignature } from './au-content'; -import AuIcon from './au-icon'; +import AuIcon, { type AuIconSignature } from './au-icon'; export interface AuCardSignature { Args: { @@ -188,7 +188,7 @@ export default class AuCard extends Component { interface HeaderSignature { Args: { - badgeIcon?: string; + badgeIcon?: AuIconSignature['Args']['icon']; badgeNumber?: number; badgeSize?: 'small'; badgeSkin?: 'border' | 'action' | 'brand' | 'success' | 'warning' | 'error'; diff --git a/addon/components/au-input.gts b/addon/components/au-input.gts index 4768f04f5..937acafb3 100644 --- a/addon/components/au-input.gts +++ b/addon/components/au-input.gts @@ -1,11 +1,11 @@ import Component from '@glimmer/component'; -import AuIcon from './au-icon'; +import AuIcon, { type AuIconSignature } from './au-icon'; export interface AuInputSignature { Args: { disabled?: boolean; error?: boolean; - icon?: string; + icon?: AuIconSignature['Args']['icon']; iconAlignment?: 'left' | 'right'; warning?: boolean; width?: 'block'; diff --git a/addon/components/au-link.gts b/addon/components/au-link.gts index 7a7dbe3c0..903efe80e 100644 --- a/addon/components/au-link.gts +++ b/addon/components/au-link.gts @@ -1,6 +1,6 @@ import { LinkTo } from '@ember/routing'; import Component from '@glimmer/component'; -import AuIcon from './au-icon'; +import AuIcon, { type AuIconSignature } from './au-icon'; import linkToModels from '../private/helpers/link-to-models'; const SKIN_CLASSES = { @@ -22,7 +22,7 @@ export interface AuLinkSignature { | 'button-naked'; width?: 'block'; query?: Record; - icon?: string; + icon?: AuIconSignature['Args']['icon']; route: string; hideText?: boolean; model?: unknown; diff --git a/addon/components/au-pill.gts b/addon/components/au-pill.gts index 02dabec5a..5a34a2074 100644 --- a/addon/components/au-pill.gts +++ b/addon/components/au-pill.gts @@ -1,14 +1,14 @@ import { on } from '@ember/modifier'; import { LinkTo } from '@ember/routing'; import Component from '@glimmer/component'; -import AuIcon from './au-icon'; +import AuIcon, { type AuIconSignature } from './au-icon'; import linkToModels from '../private/helpers/link-to-models'; const PILL_SIZES = ['small']; export interface AuPillSignature { Args: { - actionIcon?: string; + actionIcon?: AuIconSignature['Args']['icon']; actionText?: string; draft?: boolean; href?: string; @@ -144,7 +144,7 @@ export default class AuPill extends Component { interface InnerSignature { Args: { - icon?: string; + icon?: AuIconSignature['Args']['icon']; iconAlignment?: 'left' | 'right'; hideText?: boolean; };