Skip to content

Commit

Permalink
[@next] refactor typography system (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
DRiFTy17 authored Oct 27, 2023
1 parent 9ec9e11 commit 8d70fde
Show file tree
Hide file tree
Showing 66 changed files with 641 additions and 449 deletions.
12 changes: 6 additions & 6 deletions src/dev/pages/avatar/avatar.ejs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<div class="vert">
<div>
<h3 class="forge-typography--subtitle1-secondary">w/Image URL</h3>
<h3 class="forge-typography--heading2">w/Image URL</h3>
<div>
<forge-avatar image-url="https://en.gravatar.com/userimage/27084046/aa996f464ca8f1ea69769cef1b76fbf9.jpg"></forge-avatar>
</div>
</div>

<div>
<h3 class="forge-typography--subtitle1-secondary">w/Text</h3>
<h3 class="forge-typography--heading2">w/Text</h3>
<div>
<forge-avatar text="Tyler Forge"></forge-avatar>
</div>
</div>

<div>
<h3 class="forge-typography--subtitle1-secondary">w/Custom Radius (10px)</h3>
<h3 class="forge-typography--heading2">w/Custom Radius (10px)</h3>
<div>
<forge-avatar text="Tyler Forge" style="--forge-avatar-radius: 10px;"></forge-avatar>
</div>
</div>

<div>
<h3 class="forge-typography--subtitle1-secondary">w/Icon</h3>
<h3 class="forge-typography--heading2">w/Icon</h3>
<div>
<forge-avatar style="--forge-avatar-theme-background: black;">
<forge-icon name="face" external></forge-icon>
Expand All @@ -30,14 +30,14 @@
</div>

<div>
<h3 class="forge-typography--subtitle1-secondary">w/Custom Slotted Content and CSS Variable</h3>
<h3 class="forge-typography--heading2">w/Custom Slotted Content and CSS Variable</h3>
<div>
<forge-avatar style="--forge-avatar-theme-background: #ff0000; --forge-avatar-size: 24px; --forge-avatar-font-size: 16px;">A</forge-avatar>
</div>
</div>

<div>
<h3 class="forge-typography--subtitle1-secondary">w/Invalid url</h3>
<h3 class="forge-typography--heading2">w/Invalid url</h3>
<div>
<forge-avatar image-url="https://httpstat.us/500" text="Invalid Url"></forge-avatar>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/badge/badge.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

<div class="flex">
<div class="vert">
<h3 class="forge-typography--subtitle1-secondary">Theme</h3>
<h3 class="forge-typography--heading2">Theme</h3>
<forge-badge>Default</forge-badge>
<forge-badge theme="danger">Danger</forge-badge>
<forge-badge theme="warning">Warning</forge-badge>
Expand All @@ -40,7 +40,7 @@
<forge-badge theme="info-secondary">Info (secondary)</forge-badge>
</div>
<div class="vert">
<h3 class="forge-typography--subtitle1-secondary">Strong theme</h3>
<h3 class="forge-typography--heading2">Strong theme</h3>
<forge-badge strong>Default</forge-badge>
<forge-badge theme="danger" strong>Danger</forge-badge>
<forge-badge theme="warning" strong>Warning</forge-badge>
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/button-area/button-area.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<button slot="button" aria-labelledby="button-area-heading"></button>
<div class="flex-wrapper">
<div>
<div class="forge-typography--headline5" id="button-area-heading">Heading</div>
<div class="forge-typography--heading4" id="button-area-heading">Heading</div>
<div>Content</div>
</div>
<forge-icon-button data-forge-ignore>
Expand All @@ -25,7 +25,7 @@
<button slot="button" id="expansion-panel-button" aria-labelledby="expansion-panel-heading" aria-controls="expansion-panel-content" aria-expanded="false"></button>
<div class="flex-wrapper">
<div>
<div class="forge-typography--headline5" id="expansion-panel-heading">Expansion panel</div>
<div class="forge-typography--heading4" id="expansion-panel-heading">Expansion panel</div>
<div>Subheading</div>
</div>
<forge-icon-button data-forge-ignore>
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/button-toggle/button-toggle.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h3 class="forge-typography--subtitle1-secondary">Static</h3>
<h3 class="forge-typography--heading2">Static</h3>
<forge-button-toggle-group id="button-toggle-group">
<forge-button-toggle value="email" aria-label="By email">
<forge-icon name="email" slot="leading"></forge-icon>
Expand All @@ -11,7 +11,7 @@
</forge-button-toggle>
</forge-button-toggle-group>

<h3 class="forge-typography--subtitle1-secondary">Dynamic</h3>
<h3 class="forge-typography--heading2">Dynamic</h3>
<forge-button-toggle-group id="button-toggle-group-dynamic"></forge-button-toggle-group>

<script type="module" src="button-toggle.ts"></script>
4 changes: 2 additions & 2 deletions src/dev/pages/card/card.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<forge-card class="demo-card">
<forge-toolbar no-border>
<h3 class="forge-typography--headline5" slot="start">
<h3 class="forge-typography--heading4" slot="start">
This is the card title
</h3>
<forge-icon-button slot="end">
Expand All @@ -10,7 +10,7 @@
</forge-icon-button>
</forge-toolbar>

<p class="card-body forge-typography--body2">
<p class="card-body forge-typography--body1">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Molestias
exercitationem doloremque dolorem ullam, nesciunt quia velit
necessitatibus numquam quasi voluptates impedit earum dolores
Expand Down
16 changes: 8 additions & 8 deletions src/dev/pages/checkbox/checkbox.ejs
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
<div class="vert">
<div>
<h3 class="forge-typography--subtitle1">Default</h3>
<h3 class="forge-typography--heading2">Default</h3>
<forge-checkbox>
<input type="checkbox" id="default-checkbox" checked>
<label for="default-checkbox">Checkbox label</label>
<label for="default-checkbox" class="forge-typography--label">Checkbox label</label>
</forge-checkbox>
</div>

<div>
<h3 class="forge-typography--subtitle1">Dense</h3>
<h3 class="forge-typography--heading2">Dense</h3>
<forge-checkbox dense>
<input type="checkbox" id="dense-checkbox" checked>
<label for="dense-checkbox">Dense checkbox</label>
<label for="dense-checkbox" class="forge-typography--label">Dense checkbox</label>
</forge-checkbox>
</div>

<div>
<h3 class="forge-typography--subtitle1">Indeterminate</h3>
<h3 class="forge-typography--heading2">Indeterminate</h3>
<forge-checkbox >
<input type="checkbox" id="indeterminate-checkbox" checked>
<label for="indeterminate-checkbox">Indeterminate checkbox</label>
<label for="indeterminate-checkbox" class="forge-typography--label">Indeterminate checkbox</label>
</forge-checkbox>
</div>

<div>
<h3 class="forge-typography--subtitle1">Disabled</h3>
<h3 class="forge-typography--heading2">Disabled</h3>
<forge-checkbox>
<input type="checkbox" id="disabled-checkbox" checked disabled>
<label for="disabled-checkbox">Disabled checkbox</label>
<label for="disabled-checkbox" class="forge-typography--label">Disabled checkbox</label>
</forge-checkbox>
</div>
</div>
Expand Down
20 changes: 10 additions & 10 deletions src/dev/pages/chips/chips.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="vert">
<div id="chips-basic">
<h3>Basic chips</h3>
<h3 class="forge-typography--heading2">Basic chips</h3>
<forge-chip-set style="width: 600px; display: flex; flex: auto; flex-direction: row; flex-wrap: wrap;">
<forge-chip>Small</forge-chip>
<forge-chip>Medium</forge-chip>
Expand All @@ -9,7 +9,7 @@
</div>

<div id="chips-choice">
<h3>Choice chips</h3>
<h3 class="forge-typography--heading2">Choice chips</h3>
<forge-chip-set type="choice">
<forge-chip>Small</forge-chip>
<forge-chip selected>Medium</forge-chip>
Expand All @@ -18,7 +18,7 @@
</div>

<div id="chips-choice-vertical">
<h3>Choice chips (vertical)</h3>
<h3 class="forge-typography--heading2">Choice chips (vertical)</h3>
<forge-chip-set type="choice" vertical>
<forge-chip>Small</forge-chip>
<forge-chip selected>Medium</forge-chip>
Expand All @@ -27,8 +27,8 @@
</div>

<div id="chips-filter">
<h3>Filter chips</h3>
<h5>No leading icon</h5>
<h3 class="forge-typography--heading2">Filter chips</h3>
<h4 class="forge-typography--subheading1">No leading icon</h4>
<forge-chip-set type="filter">
<forge-chip value="tops" selected>Tops</forge-chip>
<forge-chip value="bottoms" selected>Bottoms</forge-chip>
Expand All @@ -38,7 +38,7 @@
</div>

<div id="chips-filter-leading">
<h5>With leading icon</h5>
<h3 class="forge-typography--heading2">With leading icon</h3>
<forge-chip-set type="filter">
<forge-chip selected>
<forge-icon slot="leading" name="face"></forge-icon>
Expand All @@ -60,7 +60,7 @@
</div>

<div id="chips-action">
<h3>Action chips</h3>
<h3 class="forge-typography--heading2">Action chips</h3>
<forge-chip-set>
<forge-chip value="calendar">
<forge-icon slot="leading" name="event"></forge-icon>
Expand All @@ -82,7 +82,7 @@
</div>

<div id="chips-avatar">
<h3>With leading avatar</h3>
<h3 class="forge-typography--heading2">With leading avatar</h3>
<forge-chip-set>
<forge-chip value="calendar">
<forge-avatar slot="leading" image-url="https://en.gravatar.com/userimage/27084046/aa996f464ca8f1ea69769cef1b76fbf9.jpg"></forge-avatar>
Expand All @@ -104,7 +104,7 @@
</div>

<div id="chips-input">
<h3 class="flex">
<h3 class="flex forge-typography--heading2">
Input chips
<span>
<forge-icon-button>
Expand Down Expand Up @@ -135,7 +135,7 @@
</div>

<div id="chips-input">
<h3>Invalid chips</h3>
<h3 class="forge-typography--heading2">Invalid chips</h3>
<forge-chip-set type="input">
<forge-chip invalid>
<forge-icon slot="leading" name="place"></forge-icon>
Expand Down
8 changes: 4 additions & 4 deletions src/dev/pages/dialog/dialog-template-basic.ejs
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<div class="dialog-container">
<forge-scaffold>
<forge-toolbar slot="header" class="header-toolbar" no-border forge-dialog-move-target>
<h1 slot="start" class="forge-typography--headline5">Dialog title</h1>
<h1 slot="start" class="forge-typography--heading4">Dialog title</h1>
<forge-icon-button slot="end">
<button type="button" id="close-button">
<forge-icon name="close"></forge-icon>
</button>
</forge-icon-button>
</forge-toolbar>
<div slot="body" class="dialog-body">
<p class="forge-typography--body1">
<p class="forge-typography--body2">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia eaque illum itaque.
Quas, libero eaque veniam et voluptatem quod natus fugit! Nihil consequatur quo
corrupti beatae ad, ratione velit aut!
</p>

<p class="forge-typography--body1">
<p class="forge-typography--body2">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia eaque illum itaque.
Quas, libero eaque veniam et voluptatem quod natus fugit! Nihil consequatur quo
corrupti beatae ad, ratione velit aut!
</p>

<p class="forge-typography--body1">
<p class="forge-typography--body2">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quia eaque illum itaque.
Quas, libero eaque veniam et voluptatem quod natus fugit! Nihil consequatur quo
corrupti beatae ad, ratione velit aut!
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/divider/divider.ejs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<h3 class="forge-typography--subtitle2">Horizontal</h3>
<h3 class="forge-typography--heading2">Horizontal</h3>
<div>
<forge-divider></forge-divider>
</div>

<h3 class="forge-typography--subtitle2">Vertical</h3>
<h3 class="forge-typography--heading2">Vertical</h3>
<div style="margin-left: 50px; height: 200px;">
<forge-divider vertical></forge-divider>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/drawer/drawer-dismissible-right.ejs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h3 class="forge-typography--subtitle1">Dismissible (right)</h3>
<h3 class="forge-typography--heading2">Dismissible (right)</h3>
<div class="drawer-demo">
<forge-scaffold stretch>
<forge-app-bar id="drawer-dismissible-right-app-bar" title-text="Dismissible Drawer - Right" slot="header">
<forge-icon slot="logo" name="forge_logo"></forge-icon>
<forge-app-bar-menu-button id="drawer-dismissible-right-app-bar-menu-button" slot="start"></forge-app-bar-menu-button>
</forge-app-bar>
<forge-toolbar slot="body-header">
<div slot="start" class="forge-typography--title">Toolbar</div>
<div slot="start" class="forge-typography--heading2">Toolbar</div>
</forge-toolbar>
<div slot="body" style="padding: 16px;">
<forge-card>
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/drawer/drawer-dismissible.ejs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<h3 class="forge-typography--subtitle1">Dismissible</h3>
<h3 class="forge-typography--heading2">Dismissible</h3>
<div class="drawer-demo">
<forge-scaffold stretch>
<forge-app-bar id="drawer-dismissible-app-bar" title-text="Dismissible Drawer" slot="header">
<forge-icon slot="logo" name="forge_logo"></forge-icon>
<forge-app-bar-menu-button id="drawer-dismissible-app-bar-menu-button" slot="start"></forge-app-bar-menu-button>
</forge-app-bar>
<forge-toolbar slot="body-header">
<div slot="start" class="forge-typography--title">Toolbar</div>
<div slot="start" class="forge-typography--heading2">Toolbar</div>
</forge-toolbar>
<div slot="body" style="padding: 16px;">
<forge-card>
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/drawer/drawer-mini-hover-right.ejs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h3 class="forge-typography--subtitle1">Mini Hover (right)</h3>
<h3 class="forge-typography--heading2">Mini Hover (right)</h3>
<div class="drawer-demo" style="position: relative;">
<forge-scaffold stretch>
<forge-app-bar id="drawer-mini-hover-app-bar" title-text="Mini Hover Drawer" slot="header">
<forge-icon slot="logo" external external-type="custom" name="forge_logo"></forge-icon>
</forge-app-bar>
<forge-toolbar slot="body-header">
<h2 slot="start" class="forge-typography--title">Toolbar</h2>
<h2 slot="start" class="forge-typography--heading2">Toolbar</h2>
</forge-toolbar>
<forge-mini-drawer hover slot="body-right" direction="right">
<forge-list>
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/drawer/drawer-mini-hover.ejs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h3 class="forge-typography--subtitle1">Mini Hover</h3>
<h3 class="forge-typography--heading2">Mini Hover</h3>
<div class="drawer-demo" style="position: relative;">
<forge-scaffold stretch>
<forge-app-bar id="drawer-mini-hover-app-bar" title-text="Mini Hover Drawer" slot="header">
<forge-icon slot="logo" external external-type="custom" name="forge_logo"></forge-icon>
</forge-app-bar>
<forge-toolbar slot="body-header">
<h2 slot="start" class="forge-typography--title">Toolbar</h2>
<h2 slot="start" class="forge-typography--heading2">Toolbar</h2>
</forge-toolbar>
<forge-mini-drawer hover slot="body-left">
<forge-list>
Expand Down
2 changes: 1 addition & 1 deletion src/dev/pages/drawer/drawer-mini.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h3 class="forge-typography--subtitle1">Mini</h3>
<h3 class="forge-typography--heading2">Mini</h3>
<div class="drawer-demo" style="position: relative;">
<forge-scaffold stretch>
<forge-app-bar id="drawer-mini-app-bar" title-text="Mini Drawer" slot="header">
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/drawer/drawer-modal.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h3 class="forge-typography--subtitle1">Modal</h3>
<h3 class="forge-typography--heading2">Modal</h3>
<div class="drawer-demo" style="position: relative;">
<forge-scaffold stretch>
<forge-app-bar id="drawer-modal-app-bar" title-text="Modal Drawer" slot="header">
Expand Down Expand Up @@ -26,7 +26,7 @@
</forge-list>
</forge-modal-drawer>
<forge-toolbar slot="body-header">
<div slot="start" class="forge-typography--title">Toolbar</div>
<div slot="start" class="forge-typography--heading2">Toolbar</div>
</forge-toolbar>
<div slot="body" style="padding: 16px;">
<forge-card>
Expand Down
4 changes: 2 additions & 2 deletions src/dev/pages/drawer/drawer-permanent.ejs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h3 class="forge-typography--subtitle1">Permanent</h3>
<h3 class="forge-typography--heading2">Permanent</h3>
<div class="drawer-demo">
<forge-scaffold stretch>
<forge-app-bar title-text="Permanent Drawer" menu="false" slot="header">
<forge-icon slot="logo" name="forge_logo"></forge-icon>
</forge-app-bar>
<forge-toolbar slot="body-header">
<div slot="start" class="forge-typography--title">Toolbar</div>
<div slot="start" class="forge-typography--heading2">Toolbar</div>
</forge-toolbar>
<div slot="body" style="padding: 16px;">
<forge-card>
Expand Down
8 changes: 4 additions & 4 deletions src/dev/pages/expansion-panel/expansion-panel.ejs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<h3 class="forge-typography--subtitle1">Basic (unstyled)</h3>
<h3 class="forge-typography--heading2">Basic (unstyled)</h3>
<forge-expansion-panel id="expansion-panel-basic">
<div slot="header">Click me</div>
<div>Expandable content</div>
</forge-expansion-panel>

<h3 class="forge-typography--subtitle1">Card</h3>
<h3 class="forge-typography--heading2">Card</h3>
<forge-card class="expandable-card">
<forge-expansion-panel id="expansion-panel-card">
<div slot="header" role="button" class="flex expansion-panel-header">
<div class="forge-typography--body1">Click me too</div>
<div>Click me too</div>
<forge-open-icon></forge-open-icon>
</div>
<div class="forge-typography--body1">
<div>
Expandable card content
</div>
</forge-expansion-panel>
Expand Down
Loading

0 comments on commit 8d70fde

Please sign in to comment.