Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c222ece
chore: add deps
Dec 15, 2025
a1b7e67
chore: update copyright
Dec 15, 2025
9c4ec9e
feat: convert docTrackEvent modifier to ts
Dec 15, 2025
7b4c04c
feat: convert event tracking service to ts
Dec 15, 2025
f824d9c
feat: convert DocBadge to gts
Dec 15, 2025
750c8fa
feat: convert DocBanner to gts
Dec 15, 2025
9438826
feat: convert DocCards components to gts
Dec 15, 2025
4decc4c
feat: convert DocColorCard component to gts
Dec 15, 2025
53a858b
feat: convert DocColorSwatch to gts
Dec 15, 2025
a203c9e
feat: convert DocContentHdsPrinciples to gts
Dec 15, 2025
d0a4ac1
feat: convert DocDoDont to gts
Dec 15, 2025
2e27262
feat: convert DocWcagList to gts
Dec 15, 2025
4e3fc1c
feat: convert DynamicTemplateError to gts
Dec 15, 2025
d0f5b35
feat: convert DocLayout to gts
Dec 15, 2025
c435177
feat: convert DocLinkWithIcon to gts
Dec 15, 2025
44851dd
feat: convert DocFormSelectGroupType to gts
Dec 15, 2025
c7e5c11
feat: convert DocPageBanner to gts
Dec 15, 2025
bbcb322
feat: convert DocPageCover to gts
Dec 15, 2025
d4aaedf
feat: convert DocPageSidecar to gts
Dec 15, 2025
9265b25
feat: convert DocPageTabs to gts
Dec 15, 2025
d367d28
feat: convert DocPageHeader to gts
Dec 15, 2025
7ff2f7a
feat: convert DocPageHeaderNavItem to gts
Dec 15, 2025
e678141
feat: convert DocPlaceholder to gts
Dec 15, 2025
38518dc
feat: convert DocScrollToTop to gts
Dec 15, 2025
a1f6d82
feat: convert DocTokenPreview to gts
Dec 15, 2025
4a2c0a6
feat: convert DocTokensList components to gts
Dec 15, 2025
10c71f9
feat: convert PowerSelect components to gts
Dec 15, 2025
37b81c3
fix: few straggler issues
Dec 15, 2025
08cfa75
fix: issue where task wasnt properly registered
Dec 15, 2025
bec9289
fix: lint errors
Dec 16, 2025
966bcc2
fix: more lint fixes
Dec 16, 2025
c5c249c
fix: simplify card logic
Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,49 @@ export const TYPES = [
'outlined-inverted',
];

export default class DocBadgeComponent extends Component {
constructor() {
super(...arguments);
type BadgeType = (typeof TYPES)[number];

interface DocBadgeSignature {
Args: {
type?: BadgeType;
size?: 'large' | 'medium';
};
Blocks: {
default: [];
};
Element: HTMLDivElement;
}

export default class DocBadge extends Component<DocBadgeSignature> {
get type() {
const type = this.args.type ?? 'neutral';

assert(
`@type for "Doc::Badge" must be one of the following: ${TYPES.join(
', ',
)}; received: ${this.args.type}`,
TYPES.includes(this.args.type),
TYPES.includes(type),
);
}

get type() {
return this.args.type ?? 'neutral';
return type;
}

get size() {
return this.args.size ?? 'large';
}

get classNames() {
let classes = ['doc-badge'];
const classes = ['doc-badge'];

// add a class based on the @type argument
classes.push(`doc-badge--type-${this.type}`);

// add a class based on the @size argument
classes.push(`doc-badge--size-${this.size}`);

return classes.join(' ');
}

<template>
<div class={{this.classNames}} ...attributes>
{{yield}}
</div>
</template>
}
8 changes: 0 additions & 8 deletions website/app/components/doc/badge/index.hbs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

import Component from '@glimmer/component';
import { assert } from '@ember/debug';
import type Owner from '@ember/owner';

import { HdsIcon } from '@hashicorp/design-system-components/components';
import type { HdsIconSignature } from '@hashicorp/design-system-components/components/hds/icon/index';

export const TYPES = [
'info',
Expand All @@ -16,9 +20,21 @@ export const TYPES = [
'callout',
];

export default class DocBannerComponent extends Component {
constructor() {
super(...arguments);
type BannerTypes = (typeof TYPES)[number];

interface DocBannerComponentSignature {
Args: {
type: BannerTypes;
};
Blocks: {
default: [];
};
Element: HTMLDivElement;
}

export default class DocBanner extends Component<DocBannerComponentSignature> {
constructor(owner: Owner, args: DocBannerComponentSignature['Args']) {
super(owner, args);
assert(
`@type for "Doc::Banner" must be one of the following: ${TYPES.join(
', ',
Expand All @@ -28,7 +44,7 @@ export default class DocBannerComponent extends Component {
}

get icon() {
let icon;
let icon: HdsIconSignature['Args']['name'] | undefined;
switch (this.args.type) {
case 'info':
case 'information':
Expand All @@ -53,11 +69,22 @@ export default class DocBannerComponent extends Component {
}

get classNames() {
let classes = ['doc-banner'];
const classes = ['doc-banner'];

// add a class based on the @type argument
classes.push(`doc-banner--type-${this.args.type}`);

return classes.join(' ');
}

<template>
<div class={{this.classNames}} ...attributes>
{{#if this.icon}}
<HdsIcon class="doc-banner__icon" @name={{this.icon}} @size="24" />
{{/if}}
<div class="doc-banner__content">
{{yield}}
</div>
</div>
</template>
}
11 changes: 0 additions & 11 deletions website/app/components/doc/banner/index.hbs

This file was deleted.

117 changes: 117 additions & 0 deletions website/app/components/doc/cards/card.gts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/**
* Copyright IBM Corp. 2021, 2025
* SPDX-License-Identifier: MPL-2.0
*/

import Component from '@glimmer/component';
import { LinkTo } from '@ember/routing';

import DocBadge from 'website/components/doc/badge';

interface Status {
deprecated?: boolean;
updated?: boolean;
added?: boolean;
}

export interface DocCardsCardSignature {
Args: {
image?: string;
title: string;
caption?: string;
status?: Status;
route?: string;
model?: unknown;
href?: string;
layout?: 'vertical' | 'horizontal';
};
Blocks: {
default: [];
};
Element: HTMLLIElement;
}

export default class DocCardsCard extends Component<DocCardsCardSignature> {
get classNames() {
const classes = ['doc-cards-card'];
const layout = this.args.layout ?? 'vertical';

// add a class based on the @layout argument, default = 'vertical'
classes.push(`doc-cards-card--layout-${layout}`);

return classes.join(' ');
}

get badgeType() {
if (this.args.status?.deprecated) {
return 'warning-inverted';
} else if (this.args.status?.updated) {
return 'neutral-inverted';
} else if (this.args.status?.added) {
return 'information-inverted';
}
return undefined;
}

get badgeLabel() {
if (this.args.status?.deprecated) {
return 'Deprecated';
} else if (this.args.status?.updated) {
return 'Updated';
} else if (this.args.status?.added) {
return 'Added';
}
return undefined;
}

<template>
<li class={{this.classNames}} ...attributes>
{{#if @route}}
<LinkTo
class="doc-cards-card__link"
@route={{@route}}
@model={{@model}}
>
<img
class="doc-cards-card__image"
src={{@image}}
alt=""
role="presentation"
/>
<div class="doc-cards-card__details">
<p class="doc-cards-card__title">{{@title}}</p>
{{#if this.badgeLabel}}
<DocBadge
class="doc-cards-card__badge"
@type={{this.badgeType}}
@size="medium"
>{{this.badgeLabel}}</DocBadge>
{{/if}}
<p class="doc-cards-card_description">{{@caption}}</p>
</div>
</LinkTo>
{{/if}}
{{#if @href}}
<a class="doc-cards-card__link" href={{@href}}>
<img
class="doc-cards-card__image"
src={{@image}}
alt=""
role="presentation"
/>
<div class="doc-cards-card__details">
<p class="doc-cards-card__title">{{@title}}</p>
{{#if this.badgeLabel}}
<DocBadge
class="doc-cards-card__badge"
@type={{this.badgeType}}
@size="medium"
>{{this.badgeLabel}}</DocBadge>
{{/if}}
<p class="doc-cards-card_description">{{@caption}}</p>
</div>
</a>
{{/if}}
</li>
</template>
}
39 changes: 0 additions & 39 deletions website/app/components/doc/cards/card.hbs

This file was deleted.

18 changes: 0 additions & 18 deletions website/app/components/doc/cards/card.js

This file was deleted.

Loading