feat(dees-icon): Add full icon list and improve dees-icon demo with copy-all functionality and UI tweaks
This commit is contained in:
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-09-05 - 1.11.0 - feat(dees-icon)
|
||||||
|
Add full icon list and improve dees-icon demo with copy-all functionality and UI tweaks
|
||||||
|
|
||||||
|
- Added readme.icons.md containing 1900+ icon identifiers (FontAwesome + Lucide) for easy reference and tooling
|
||||||
|
- Enhanced ts_web/elements/dees-icon.demo.ts: added a 'Copy All Icon Names' button that copies prefixed icon names (fa:..., lucide:...) to the clipboard and shows temporary feedback
|
||||||
|
- Updated demo presentation: prefixed displayed icon names (fa: / lucide:), improved search-container spacing and added button styling for better UX
|
||||||
|
- Changes are documentation/demo only — no production runtime component logic changed
|
||||||
|
|
||||||
## 2025-09-05 - 1.10.12 - fix(dees-simple-appdash)
|
## 2025-09-05 - 1.10.12 - fix(dees-simple-appdash)
|
||||||
Fix icon rendering in dees-simple-appdash to respect provided icon strings
|
Fix icon rendering in dees-simple-appdash to respect provided icon strings
|
||||||
|
|
||||||
|
1906
readme.icons.md
Normal file
1906
readme.icons.md
Normal file
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '1.10.12',
|
version: '1.11.0',
|
||||||
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
||||||
}
|
}
|
||||||
|
@@ -40,6 +40,26 @@ export const demoFunc = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define the functions in TS scope instead of script tags
|
// Define the functions in TS scope instead of script tags
|
||||||
|
const copyAllIconNames = () => {
|
||||||
|
// Generate complete list of all icon names with prefixes
|
||||||
|
const faIconsList = faIcons.map(name => `fa:${name}`);
|
||||||
|
const lucideIconsListPrefixed = lucideIconsList.map(name => `lucide:${name}`);
|
||||||
|
const allIcons = [...faIconsList, ...lucideIconsListPrefixed];
|
||||||
|
const textToCopy = allIcons.join('\n');
|
||||||
|
|
||||||
|
navigator.clipboard.writeText(textToCopy).then(() => {
|
||||||
|
// Show feedback
|
||||||
|
const currentEvent = window.event as MouseEvent;
|
||||||
|
const button = currentEvent.currentTarget as HTMLElement;
|
||||||
|
const originalText = button.textContent;
|
||||||
|
button.textContent = `✓ Copied ${allIcons.length} icon names!`;
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
button.textContent = originalText;
|
||||||
|
}, 2000);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const searchIcons = (event: InputEvent) => {
|
const searchIcons = (event: InputEvent) => {
|
||||||
const searchTerm = (event.target as HTMLInputElement).value.toLowerCase().trim();
|
const searchTerm = (event.target as HTMLInputElement).value.toLowerCase().trim();
|
||||||
// Get the demo container first, then search within it
|
// Get the demo container first, then search within it
|
||||||
@@ -111,6 +131,7 @@ export const demoFunc = () => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#iconSearch {
|
#iconSearch {
|
||||||
@@ -129,6 +150,27 @@ export const demoFunc = () => {
|
|||||||
border-color: #e4002b;
|
border-color: #e4002b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.copy-all-button {
|
||||||
|
padding: 12px 20px;
|
||||||
|
font-size: 16px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #e4002b;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-all-button:hover {
|
||||||
|
background: #c4001b;
|
||||||
|
transform: translateY(-1px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.copy-all-button:active {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
|
||||||
dees-icon {
|
dees-icon {
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
@@ -239,6 +281,7 @@ export const demoFunc = () => {
|
|||||||
<div class="demoContainer">
|
<div class="demoContainer">
|
||||||
<div class="search-container">
|
<div class="search-container">
|
||||||
<input type="text" id="iconSearch" placeholder="Search icons..." @input=${searchIcons}>
|
<input type="text" id="iconSearch" placeholder="Search icons..." @input=${searchIcons}>
|
||||||
|
<button class="copy-all-button" @click=${copyAllIconNames}>📋 Copy All Icon Names</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="api-note">
|
<div class="api-note">
|
||||||
@@ -258,7 +301,7 @@ export const demoFunc = () => {
|
|||||||
return html`
|
return html`
|
||||||
<div class="iconContainer fa-icon" data-name=${iconName.toLowerCase()} @click=${() => copyIconName(iconName, 'fa')}>
|
<div class="iconContainer fa-icon" data-name=${iconName.toLowerCase()} @click=${() => copyIconName(iconName, 'fa')}>
|
||||||
<dees-icon .icon=${prefixedName as IconWithPrefix} iconSize="24"></dees-icon>
|
<dees-icon .icon=${prefixedName as IconWithPrefix} iconSize="24"></dees-icon>
|
||||||
<div class="iconName">${iconName}</div>
|
<div class="iconName">fa:${iconName}</div>
|
||||||
<span class="copy-tooltip">Click to copy</span>
|
<span class="copy-tooltip">Click to copy</span>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
@@ -279,7 +322,7 @@ export const demoFunc = () => {
|
|||||||
return html`
|
return html`
|
||||||
<div class="iconContainer lucide-icon" data-name=${iconName.toLowerCase()} @click=${() => copyIconName(iconName, 'lucide')}>
|
<div class="iconContainer lucide-icon" data-name=${iconName.toLowerCase()} @click=${() => copyIconName(iconName, 'lucide')}>
|
||||||
<dees-icon .icon=${prefixedName as IconWithPrefix} iconSize="24"></dees-icon>
|
<dees-icon .icon=${prefixedName as IconWithPrefix} iconSize="24"></dees-icon>
|
||||||
<div class="iconName">${iconName}</div>
|
<div class="iconName">lucide:${iconName}</div>
|
||||||
<span class="copy-tooltip">Click to copy</span>
|
<span class="copy-tooltip">Click to copy</span>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
Reference in New Issue
Block a user