- 
                Notifications
    
You must be signed in to change notification settings  - Fork 51
 
[WIP-05] [Project Solar / Phase 1 / Showcase] Scaffolding of the showcase pages for the carbonization of the HDS components #3241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            didoo
  wants to merge
  39
  commits into
  project-solar/phase-1/HDS-5242_showcase/add-themes-support
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
project-solar/phase-1/HDS-5242_showcase/carbonization-pages-scaffolding
  
      
      
   
  
    
  
  
  
 
  
      
    base: project-solar/phase-1/HDS-5242_showcase/add-themes-support
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            39 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      2c3ab05
              
                added `foundations/theming` showcase page (and a frameless demo)
              
              
                didoo 72e9042
              
                basic implementation of `<ShwCarbonizationComparisonGrid>`
              
              
                didoo c5ddaec
              
                refactored implementation of `<ShwCarbonizationComparisonGrid>`
              
              
                didoo 5888f32
              
                implemented βCarbonizationβ section for `Badge` page
              
              
                didoo 2f7f51f
              
                implemented βCarbonizationβ section for `BadgeCount` page
              
              
                didoo 07840af
              
                implemented βCarbonizationβ section for `Button` page
              
              
                didoo e24221d
              
                implemented βCarbonizationβ section for `Focus Ring` page
              
              
                didoo e75ee63
              
                implemented βCarbonizationβ section for `Typography` page
              
              
                didoo 823606e
              
                implemented βCarbonizationβ section for (new) `Color` page
              
              
                didoo d153e09
              
                added `@carbon/web-components` as devDependency to Showcase app
              
              
                didoo 78bc720
              
                added `@carbon/[themes|layout|grid|type]` + `@ibm/plex` as devDependeβ¦
              
              
                didoo c280361
              
                refactored `ComparisonGrid` component to add themed background color β¦
              
              
                didoo 253863b
              
                added temporary support for IBM Plex font-family
              
              
                didoo edec8d4
              
                refactored code to support theming for reference web components, baseβ¦
              
              
                didoo 1b93452
              
                small refactoring
              
              
                didoo 4057005
              
                small refactorings
              
              
                didoo e8b5905
              
                refactored content organization to have the carbonization pages as stβ¦
              
              
                didoo ad537ec
              
                added carbon web components for comparison on `BadgeCount` page
              
              
                didoo 6ea4001
              
                added carbon web components for comparison on `Button` page
              
              
                didoo 30104ef
              
                more small fixes for cleanup and linting
              
              
                didoo f7eac34
              
                implemented βCarbonizationβ section for `Form::TextInput` page
              
              
                didoo bc1c657
              
                implemented βCarbonizationβ section for `SegmentedGroup` page
              
              
                didoo 89ab372
              
                removed link to βFoundations > Colorβ page
              
              
                didoo 923e054
              
                Small update to an `rgba` color
              
              
                didoo f614955
              
                moved theming class in ComparisonGrid from item to item content per cβ¦
              
              
                didoo 506eeb6
              
                improved how to apply themed foreground/background colors to content β¦
              
              
                didoo 3ee134c
              
                installed `@carbon/styles` as devDependency to import CSS variables fβ¦
              
              
                didoo 2ec4b8d
              
                fixed issue with text color in typography page
              
              
                didoo 70650fe
              
                reorganized carbonized pages so they all live under the `carbonized` β¦
              
              
                didoo 4c6eebe
              
                prepared the ground for controlling the ShwThemeSwitcher on carbonizeβ¦
              
              
                didoo 8fd2fc9
              
                fixed CSS for carbonization pages
              
              
                didoo 8fd339d
              
                updated carbonized typography page to show equivalent/mapped Carbon tβ¦
              
              
                didoo 608daeb
              
                updated `ShwComparisonGrid` to expose an alternative side-by-side layout
              
              
                didoo 132337e
              
                updated some components to take into account the new `hideCarbonLabelβ¦
              
              
                didoo 7bf0818
              
                fixed typescript/glint issue
              
              
                didoo 1ab815e
              
                updated a couple of typographic mappings
              
              
                didoo 1bf181f
              
                added yielding of `theme` value in the named blocks of the `Comparisoβ¦
              
              
                didoo 7f25b88
              
                introduced `ShwCarbonizationStylePreviewTypography` to facilitate comβ¦
              
              
                didoo 2a16e1d
              
                refactored `carbonization/foundations/color` page and `ShwCarbonizatiβ¦
              
              
                didoo File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
      
      Oops, something went wrong.
      
    
  
        
          
  
    
      
          
            139 changes: 139 additions & 0 deletions
          
          139 
        
  showcase/app/components/page-carbonization/components/badge-count.gts
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | 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; | ||
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.