diff --git a/packages/angular/src/lib/stencil-generated/components.ts b/packages/angular/src/lib/stencil-generated/components.ts index b4e9f2ee3..9f847a525 100644 --- a/packages/angular/src/lib/stencil-generated/components.ts +++ b/packages/angular/src/lib/stencil-generated/components.ts @@ -637,14 +637,14 @@ export declare interface GcdsHint extends Components.GcdsHint {} @ProxyCmp({ - inputs: ['fixedWidth', 'iconStyle', 'label', 'marginLeft', 'marginRight', 'name', 'size'] + inputs: ['label', 'marginLeft', 'marginRight', 'name', 'size'] }) @Component({ selector: 'gcds-icon', changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['fixedWidth', 'iconStyle', 'label', 'marginLeft', 'marginRight', 'name', 'size'], + inputs: ['label', 'marginLeft', 'marginRight', 'name', 'size'], standalone: false, }) export class GcdsIcon { diff --git a/packages/vue/lib/components.ts b/packages/vue/lib/components.ts index 415b94e56..6d06b3d82 100644 --- a/packages/vue/lib/components.ts +++ b/packages/vue/lib/components.ts @@ -238,12 +238,10 @@ export const GcdsHint = /*@__PURE__*/ defineContainer('gcds-hint', export const GcdsIcon = /*@__PURE__*/ defineContainer('gcds-icon', undefined, [ - 'iconStyle', 'label', 'marginLeft', 'marginRight', 'name', - 'fixedWidth', 'size' ]); diff --git a/packages/web/src/components.d.ts b/packages/web/src/components.d.ts index ed8aa13d8..3985fb3d3 100644 --- a/packages/web/src/components.d.ts +++ b/packages/web/src/components.d.ts @@ -567,14 +567,6 @@ export namespace Components { "hintId": string; } interface GcdsIcon { - /** - * If the icon should render as a fixed-width square, or their natural width. - */ - "fixedWidth": boolean; - /** - * Style of the icon. 'regular' icons are outlined. Some icons have 'solid' variation. - */ - "iconStyle"?: 'regular' | 'solid'; /** * Add icon description. */ @@ -2403,14 +2395,6 @@ declare namespace LocalJSX { "hintId"?: string; } interface GcdsIcon { - /** - * If the icon should render as a fixed-width square, or their natural width. - */ - "fixedWidth"?: boolean; - /** - * Style of the icon. 'regular' icons are outlined. Some icons have 'solid' variation. - */ - "iconStyle"?: 'regular' | 'solid'; /** * Add icon description. */ diff --git a/packages/web/src/components/gcds-icon/gcds-icon.scss b/packages/web/src/components/gcds-icon/gcds-icon.scss index 7fe3ec9ec..94ad249b6 100644 --- a/packages/web/src/components/gcds-icon/gcds-icon.scss +++ b/packages/web/src/components/gcds-icon/gcds-icon.scss @@ -1,4 +1,4 @@ -@layer reset, default, names, fixedWidth, margin, size; +@layer reset, default, names, margin, size; @layer reset { :host { @@ -86,47 +86,6 @@ } } -// TODO: Will be removed in separate pull request -@layer fixedWidth { - :host .gcds-icon { - &.fixed-width { - text-align: center; - } - - &.size-text-small.fixed-width { - width: calc(var(--gcds-icon-fixed-width-text-small) * 1em); - } - - &.size-text.fixed-width { - width: calc(var(--gcds-icon-fixed-width-text) * 1em); - } - - &.size-h6.fixed-width { - width: calc(var(--gcds-icon-fixed-width-h6) * 1em); - } - - &.size-h5.fixed-width { - width: calc(var(--gcds-icon-fixed-width-h5) * 1em); - } - - &.size-h4.fixed-width { - width: calc(var(--gcds-icon-fixed-width-h4) * 1em); - } - - &.size-h3.fixed-width { - width: calc(var(--gcds-icon-fixed-width-h3) * 1em); - } - - &.size-h2.fixed-width { - width: calc(var(--gcds-icon-fixed-width-h2) * 1em); - } - - &.size-h1.fixed-width { - width: calc(var(--gcds-icon-fixed-width-h1) * 1em); - } - } -} - @layer margin { :host .gcds-icon { /* Margin left */ diff --git a/packages/web/src/components/gcds-icon/gcds-icon.tsx b/packages/web/src/components/gcds-icon/gcds-icon.tsx index 0e216f9c3..19aecf771 100644 --- a/packages/web/src/components/gcds-icon/gcds-icon.tsx +++ b/packages/web/src/components/gcds-icon/gcds-icon.tsx @@ -14,12 +14,6 @@ export class GcdsIcon { * Props */ - // TODO: Will be removed in separate pull request - /** - * Style of the icon. 'regular' icons are outlined. Some icons have 'solid' variation. - */ - @Prop() iconStyle?: 'regular' | 'solid' = 'solid'; - /** * Add icon description. */ @@ -78,12 +72,6 @@ export class GcdsIcon { } } - // TODO: Will be removed in separate pull request - /** - * If the icon should render as a fixed-width square, or their natural width. - */ - @Prop() fixedWidth: boolean = false; - /** * Defines the size of the icon. */ @@ -124,25 +112,16 @@ export class GcdsIcon { } render() { - const { - iconStyle, - label, - marginLeft, - marginRight, - name, - fixedWidth, - size, - } = this; + const { label, marginLeft, marginRight, name, size } = this; return ( ` + } ${args.size != 'text' ? `size="${args.size}"` : null}> + } ${args.size != 'text' ? `size="${args.size}"` : null}> `.replace(/ null/g, ''); @@ -564,30 +540,6 @@ const TemplateMultiple = args => }> `.replace(/ null/g, ''); -// TODO: Will be removed in separate pull request -const TemplateTwo = args => - ` - - - - - - - -`.replace(/ null/g, ''); - const TemplatePlayground = args => ` ` ${args.marginLeft ? `margin-left="${args.marginLeft}"` : null} ${args.marginRight ? `margin-right="${args.marginRight}"` : null} ${args.size != 'text' ? `size="${args.size}"` : null} - ${args.fixedWidth ? `fixed-width="${args.fixedWidth}"` : null} - ${args.iconStyle != 'solid' ? `iconStyle="${args.iconStyle}"` : null} > `; @@ -607,7 +557,6 @@ export const Default = Template.bind({}); Default.args = { name: 'close', size: 'text', - iconStyle: 'solid', }; // ------ Icon name ------ @@ -734,23 +683,12 @@ MarginRight.args = { size: 'text-small', }; -// TODO: Will be removed in separate pull request -// ------ Icon width ------ -export const Width = TemplateTwo.bind({}); -Width.args = { - name: 'close', - size: 'text', - fixedWidth1: true, - fixedWidth2: false, -}; - // ------ Icon label ------ export const Label = Template.bind({}); Label.args = { name: 'close', size: 'text', - iconStyle: 'solid', label: 'Clicking this icon will close the element.', }; @@ -758,8 +696,6 @@ Label.args = { export const Props = Template.bind({}); Props.args = { - fixedWidth: false, - iconStyle: 'solid', label: '', name: 'close', size: 'text', @@ -769,8 +705,6 @@ Props.args = { export const Playground = TemplatePlayground.bind({}); Playground.args = { - fixedWidth: false, - iconStyle: 'solid', label: '', marginLeft: '0', marginRight: '0', diff --git a/packages/web/src/components/gcds-icon/stories/overview.mdx b/packages/web/src/components/gcds-icon/stories/overview.mdx index 606362d86..d650eb27c 100644 --- a/packages/web/src/components/gcds-icon/stories/overview.mdx +++ b/packages/web/src/components/gcds-icon/stories/overview.mdx @@ -33,10 +33,6 @@ An icon is a symbol that helps understand context through a visual cue. -### Fixed width vs variable width - - - ### Label If you are using an icon by itself, use the `label` to ensure that it has the proper screen reader text attached to it in these cases. diff --git a/packages/web/src/components/gcds-icon/test/gcds-icon.spec.ts b/packages/web/src/components/gcds-icon/test/gcds-icon.spec.ts index afe34a47a..3c7cbac5c 100644 --- a/packages/web/src/components/gcds-icon/test/gcds-icon.spec.ts +++ b/packages/web/src/components/gcds-icon/test/gcds-icon.spec.ts @@ -10,7 +10,7 @@ describe('gcds-icon', () => { expect(root).toEqualHtml(` - + `); @@ -24,7 +24,7 @@ describe('gcds-icon', () => { expect(root).toEqualHtml(` - + `); @@ -38,7 +38,7 @@ describe('gcds-icon', () => { expect(root).toEqualHtml(` - + `); @@ -52,7 +52,7 @@ describe('gcds-icon', () => { expect(root).toEqualHtml(` - + `); @@ -66,7 +66,7 @@ describe('gcds-icon', () => { expect(root).toEqualHtml(` - + `); @@ -80,37 +80,7 @@ describe('gcds-icon', () => { expect(root).toEqualHtml(` - - - - `); - }); - - // TODO: Will be removed in separate pull request - it('renders icon style', async () => { - const { root } = await newSpecPage({ - components: [GcdsIcon], - html: '', - }); - expect(root).toEqualHtml(` - - - - - - `); - }); - - // TODO: Will be removed in separate pull request - it('renders fixed width icons', async () => { - const { root } = await newSpecPage({ - components: [GcdsIcon], - html: '', - }); - expect(root).toEqualHtml(` - - - + `); diff --git a/packages/web/src/components/gcds-link/gcds-link.tsx b/packages/web/src/components/gcds-link/gcds-link.tsx index 4e6a24ba0..b1fefff8b 100644 --- a/packages/web/src/components/gcds-link/gcds-link.tsx +++ b/packages/web/src/components/gcds-link/gcds-link.tsx @@ -211,12 +211,7 @@ export class GcdsLink { margin-left="75" /> ) : href && href.toLowerCase().startsWith('mailto:') ? ( - + ) : ( href && href.toLowerCase().startsWith('tel:') && ( diff --git a/packages/web/src/components/gcds-link/test/gcds-link.spec.ts b/packages/web/src/components/gcds-link/test/gcds-link.spec.ts index 7d366af0d..23e484e58 100644 --- a/packages/web/src/components/gcds-link/test/gcds-link.spec.ts +++ b/packages/web/src/components/gcds-link/test/gcds-link.spec.ts @@ -178,7 +178,7 @@ describe('gcds-link', () => { - + test@test.com @@ -196,7 +196,7 @@ describe('gcds-link', () => { - + test@test.com diff --git a/packages/web/src/components/gcds-search/gcds-search.tsx b/packages/web/src/components/gcds-search/gcds-search.tsx index de2caed23..c5694deec 100644 --- a/packages/web/src/components/gcds-search/gcds-search.tsx +++ b/packages/web/src/components/gcds-search/gcds-search.tsx @@ -181,10 +181,9 @@ export class GcdsSearch { exportparts="button" > diff --git a/packages/web/src/components/gcds-search/test/gcds-search.spec.tsx b/packages/web/src/components/gcds-search/test/gcds-search.spec.tsx index 2c0017a70..90cab3fd1 100644 --- a/packages/web/src/components/gcds-search/test/gcds-search.spec.tsx +++ b/packages/web/src/components/gcds-search/test/gcds-search.spec.tsx @@ -18,7 +18,7 @@ describe('gcds-search', () => { - + @@ -42,7 +42,7 @@ describe('gcds-search', () => { - + @@ -72,7 +72,7 @@ describe('gcds-search', () => { - +