Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
954e916
basic implementation of `<ShwCarbonizationComparisonGrid>`
didoo Sep 23, 2025
e3f0463
refactored implementation of `<ShwCarbonizationComparisonGrid>`
didoo Sep 23, 2025
863e0a5
implemented β€œCarbonization” section for `Badge` page
didoo Sep 23, 2025
89378e1
implemented β€œCarbonization” section for `BadgeCount` page
didoo Sep 23, 2025
788b3bd
implemented β€œCarbonization” section for `Button` page
didoo Sep 23, 2025
99eac5a
implemented β€œCarbonization” section for `Focus Ring` page
didoo Sep 24, 2025
d97f2aa
implemented β€œCarbonization” section for `Typography` page
didoo Sep 24, 2025
e7ebfa2
implemented β€œCarbonization” section for (new) `Color` page
didoo Sep 24, 2025
745c41f
added `@carbon/web-components` as devDependency to Showcase app
didoo Sep 24, 2025
bdbfd82
added `@carbon/[themes|layout|grid|type]` + `@ibm/plex` as devDepende…
didoo Sep 25, 2025
4c6616e
refactored `ComparisonGrid` component to add themed background color …
didoo Sep 25, 2025
824f9b2
added temporary support for IBM Plex font-family
didoo Sep 25, 2025
77409b8
refactored code to support theming for reference web components, base…
didoo Sep 25, 2025
6a30e14
small refactoring
didoo Sep 25, 2025
1ac78eb
small refactorings
didoo Sep 25, 2025
0eb81ed
refactored content organization to have the carbonization pages as st…
didoo Sep 25, 2025
a292b3c
added carbon web components for comparison on `BadgeCount` page
didoo Oct 7, 2025
383748c
added carbon web components for comparison on `Button` page
didoo Oct 7, 2025
bba228c
more small fixes for cleanup and linting
didoo Oct 10, 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
299 changes: 269 additions & 30 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
import type { TemplateOnlyComponent } from '@ember/component/template-only';
import { pageTitle } from 'ember-page-title';
import { array } from '@ember/helper';

import ShwTextH1 from 'showcase/components/shw/text/h1';
import ShwTextH2 from 'showcase/components/shw/text/h2';
import ShwFlex from 'showcase/components/shw/flex';
import ShwDivider from 'showcase/components/shw/divider';
import ShwCarbonizationComparisonGrid from 'showcase/components/shw/carbonization/comparison-grid';

import { HdsBadgeCount } from '@hashicorp/design-system-components/components';
import {
SIZES,
TYPES,
} from '@hashicorp/design-system-components/components/hds/badge-count/index';

const BadgeCountIndex: TemplateOnlyComponent = <template>
{{pageTitle "BadgeCount - Carbonization"}}

<ShwTextH1>BadgeCount - Carbonization</ShwTextH1>

<section>

<ShwTextH2>Size</ShwTextH2>

<ShwCarbonizationComparisonGrid>
<:theming>
<ShwFlex @direction="column" as |SF|>
{{#each SIZES as |size|}}
<SF.Item>
<HdsBadgeCount @text="3" @size={{size}} />
<HdsBadgeCount @text="99+" @size={{size}} />
</SF.Item>
{{/each}}
</ShwFlex>
</:theming>
<:reference>
<ShwFlex @direction="column" as |SF|>
{{#let (array "sm" "md" "lg") as |SIZES|}}
{{#each SIZES as |size|}}
<SF.Item>
<cds-tag size={{size}}>3</cds-tag>
<cds-tag size={{size}}>99+</cds-tag>
</SF.Item>
{{/each}}
{{/let}}
</ShwFlex>
</:reference>
</ShwCarbonizationComparisonGrid>

<ShwDivider @level={{2}} />

<ShwTextH2>Type</ShwTextH2>

<ShwCarbonizationComparisonGrid>
<:theming>
<ShwFlex @direction="column" as |SF|>
{{#each TYPES as |type|}}
<SF.Item>
<HdsBadgeCount @text="3" @type={{type}} />
<HdsBadgeCount @text="99+" @type={{type}} />
</SF.Item>
{{/each}}
</ShwFlex>
</:theming>
<:reference>
<ShwFlex @direction="column" as |SF|>
{{#let (array "gray" "high-contrast" "outline") as |TYPES|}}
{{#each TYPES as |type|}}
<SF.Item>
<cds-tag type={{type}}>3</cds-tag>
<cds-tag type={{type}}>99+</cds-tag>
</SF.Item>
{{/each}}
{{/let}}
</ShwFlex>
</:reference>
</ShwCarbonizationComparisonGrid>

<ShwDivider @level={{2}} />

<ShwTextH2>Color</ShwTextH2>

<ShwCarbonizationComparisonGrid @label="neutral">
<:theming>
<ShwFlex @direction="column" @gap="0.5rem" as |SF|>
{{#each TYPES as |type|}}
<SF.Item class="shw-component-badge-sample-color--neutral">
<HdsBadgeCount @text="3" @type={{type}} @color="neutral" />
<HdsBadgeCount @text="99+" @type={{type}} @color="neutral" />
</SF.Item>
{{/each}}
</ShwFlex>
</:theming>
<:reference>
<ShwFlex @direction="column" @gap="0.5rem" as |SF|>
<SF.Item>
<cds-tag type="gray">3</cds-tag>
<cds-tag type="gray">99+</cds-tag>
</SF.Item>
<SF.Item>
<cds-tag type="outline">3</cds-tag>
<cds-tag type="outline">99+</cds-tag>
</SF.Item>
</ShwFlex>
</:reference>
</ShwCarbonizationComparisonGrid>

<ShwCarbonizationComparisonGrid @label="neutral-dark-mode">
<:theming>
<ShwFlex @direction="column" @gap="0.5rem" as |SF|>
{{#each TYPES as |type|}}
<SF.Item
class="shw-component-badge-sample-color--neutral-dark-mode"
>
<HdsBadgeCount
@text="3"
@type={{type}}
@color="neutral-dark-mode"
/>
<HdsBadgeCount
@text="99+"
@type={{type}}
@color="neutral-dark-mode"
/>
</SF.Item>
{{/each}}
</ShwFlex>
</:theming>
<:reference>
<cds-tag type="high-contrast">3</cds-tag>
<cds-tag type="high-contrast">99+</cds-tag>
</:reference>
</ShwCarbonizationComparisonGrid>

</section>
</template>;

export default BadgeCountIndex;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

import type { TemplateOnlyComponent } from '@ember/component/template-only';

import { pageTitle } from 'ember-page-title';

import ShwTextH1 from 'showcase/components/shw/text/h1';
Expand Down
Loading
Loading