diff --git a/src/dev/pages/chips/chips.ejs b/src/dev/pages/chips/chips.ejs
index c7e1a83af..2db8d07ff 100644
--- a/src/dev/pages/chips/chips.ejs
+++ b/src/dev/pages/chips/chips.ejs
@@ -1,158 +1,243 @@
-
+
+
Basic chips
-
+
Small
Medium
Large
-
+
+
+
+
+ Chips w/anchor links
+
+ Anchor chip
+
+
+ Alert
+
+ Console log
+
+ Google
+
+
+
+
-
+
+
Choice chips
Small
Medium
Large
-
+
-
+
+
Choice chips (vertical)
Small
Medium
Large
-
+
-
-
Filter chips
- No leading icon
+
+
+ Filter chips w/out icons
Tops
Bottoms
Shoes
Accessories
-
+
-
-
With leading icon
+
+
+ With start icon
-
+
Alice
-
+
Bob
-
+
Charlie
-
+
Danielle
-
+
-
-
Action chips
+
+
+ With end icon
+
+
+ Alice
+
+
+
+ Bob
+
+
+
+ Charlie
+
+
+
+ Danielle
+
+
+
+
+
+
+
+ With start avatar
-
+
Add to calendar
-
+
Bookmark
-
+
Set alarm
-
+
Get directions
-
+
-
-
With leading avatar
+
+
+ With end avatar
-
Add to calendar
+
-
Bookmark
+
-
Set alarm
+
-
Get directions
+
-
+
-
+
+
+ Action chips
+
+
+
+ Add to calendar
+
+
+
+ Bookmark
+
+
+
+ Set alarm
+
+
+
+ Get directions
+
+
+
+
+
+
+
-
+
+
Invalid chips
-
+
Falmouth
-
+
Yarmouth
-
+
Plano
-
+
Renton
-
+
+
+
+
diff --git a/src/dev/pages/chips/chips.html b/src/dev/pages/chips/chips.html
index f30bcd2df..ff46891d9 100644
--- a/src/dev/pages/chips/chips.html
+++ b/src/dev/pages/chips/chips.html
@@ -4,6 +4,21 @@
title: 'Chips',
includePath: './pages/chips/chips.ejs',
options: [
+ {
+ type: 'select',
+ label: 'Theme',
+ id: 'opt-theme',
+ defaultValue: 'primary',
+ options: [
+ { label: 'Primary (default)', value: 'primary' },
+ { label: 'Secondary', value: 'secondary' },
+ { label: 'Tertiary', value: 'tertiary' },
+ { label: 'Success', value: 'success' },
+ { label: 'Error', value: 'error' },
+ { label: 'Warning', value: 'warning' },
+ { label: 'Info', value: 'info' }
+ ]
+ },
{ type: 'switch', label: 'Dense', id: 'opt-dense' },
{ type: 'switch', label: 'Disabled', id: 'opt-disabled' }
]
diff --git a/src/dev/pages/chips/chips.ts b/src/dev/pages/chips/chips.ts
index f6a9af05e..29c032e6e 100644
--- a/src/dev/pages/chips/chips.ts
+++ b/src/dev/pages/chips/chips.ts
@@ -1,19 +1,22 @@
import '$src/shared';
import '@tylertech/forge/chips';
import '@tylertech/forge/icon-button';
-import { IChipSetComponent, IconRegistry, ISwitchComponent } from '@tylertech/forge';
+import { IChipSetComponent, IconRegistry, ISelectComponent, ISwitchComponent } from '@tylertech/forge';
import type { IChipComponent } from '@tylertech/forge';
-import { tylIconAlarm, tylIconBookmark, tylIconDirections, tylIconEvent, tylIconFace, tylIconPlace, tylIconRefresh } from '@tylertech/tyler-icons/standard';
+import { tylIconAlarm, tylIconBookmark, tylIconDirections, tylIconEvent, tylIconOpenInNew, tylIconPlace, tylIconRefresh } from '@tylertech/tyler-icons/standard';
+import { tylIconAccount, tylIconAlert } from '@tylertech/tyler-icons/extended';
import { showToast } from '$src/utils/utils';
IconRegistry.define([
tylIconRefresh,
- tylIconFace,
+ tylIconAccount,
tylIconEvent,
tylIconBookmark,
tylIconAlarm,
tylIconDirections,
- tylIconPlace
+ tylIconPlace,
+ tylIconOpenInNew,
+ tylIconAlert
]);
const chipsDenseToggle = document.querySelector('#opt-dense') as ISwitchComponent;
@@ -23,6 +26,7 @@ const chipsDisabledToggle = document.querySelector('#opt-disabled') as ISwitchCo
const actionExample = document.querySelector('#chips-action');
const actionChipSet = actionExample.querySelector('forge-chip-set');
actionChipSet.addEventListener('forge-chip-select', ({ detail: { value }}) => {
+ console.log('[forge-chip-select]', value);
showToast(`Action Chip Selected: ${value}`);
});
@@ -31,6 +35,7 @@ let deletedChips = [];
const inputExample = document.querySelector('#chips-input');
const inputChipSet = inputExample.querySelector('forge-chip-set[type=input]');
inputChipSet.addEventListener('forge-chip-delete', ({ target }) => {
+ console.log('[forge-chip-delete]', target);
deletedChips.push(target);
(target as IChipComponent).remove();
});
@@ -42,6 +47,15 @@ refreshButton.addEventListener('click', () => {
deletedChips = [];
});
+// Theme
+const themeSelect = document.querySelector('#opt-theme') as ISelectComponent;
+themeSelect.addEventListener('change', ({ detail }) => {
+ const chipSets = document.querySelectorAll('forge-chip-set') as NodeListOf