diff --git a/CHANGELOG.md b/CHANGELOG.md index d5b2d4a7..c584b0c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog ========= +## v9.2.4 *(2023-12-12)* +- New icons (`print`). +- Icon optimisations. + ## v9.2.3 *(2023-11-10)* - Fix `InputTag`. diff --git a/docs-src/components/icon/Icon.svelte b/docs-src/components/icon/Icon.svelte index 90397886..583169ee 100644 --- a/docs-src/components/icon/Icon.svelte +++ b/docs-src/components/icon/Icon.svelte @@ -6,6 +6,12 @@
{icon}
{/each} + {#each Object.keys(customIcons) as icon} +
+
+
{icon}
+
+ {/each}

Custom Icon

@@ -13,11 +19,12 @@ - + + diff --git a/src/icon/icons.js b/src/icon/icons.js index 670b91e3..dde84139 100644 --- a/src/icon/icons.js +++ b/src/icon/icons.js @@ -1,80 +1,100 @@ // from: https://tablericons.com -const svgns = '', - alert: svgns + 'class="icon icon-tabler icon-tabler-alert-triangle">', - apps: svgns + 'class="icon icon-tabler icon-tabler-apps">', - archive: svgns + 'class="icon icon-tabler icon-tabler-archive">', - arrowLeft: svgns + 'class="icon icon-tabler icon-tabler-arrow-left">', - arrowNarrowDown: svgns + 'class="icon icon-tabler icon-tabler-arrow-narrow-down">', - arrowNarrowUp: svgns + 'class="icon icon-tabler icon-tabler-arrow-narrow-up">', - arrowRight: svgns + 'class="icon icon-tabler icon-tabler-arrow-right">', - bank: svgns + 'class="icon icon-tabler icon-tabler-building-bank">', - basket: svgns + 'class="icon icon-tabler icon-tabler-basket">', - bell: svgns + 'class="icon icon-tabler icon-tabler-bell">', - book: svgns + 'class="icon icon-tabler icon-tabler-book">', - bookmark: svgns + 'class="icon icon-tabler icon-tabler-bookmark">', - calculator: svgns + 'class="icon icon-tabler icon-tabler-calculator">', - calendar: svgns + 'class="icon icon-tabler icon-tabler-calendar">', - cart: svgns + 'class="icon icon-tabler icon-tabler-shopping-cart">', - cash: svgns + 'class="icon icon-tabler icon-tabler-cash">', - chartLine: svgns + 'class="icon icon-tabler icon-tabler-line-chart">', - chartPie: svgns + 'class="icon icon-tabler icon-tabler-chart-pie">', - check: svgns + 'class="icon icon-tabler icon-tabler-check">', - checkbox: svgns + 'class="icon icon-tabler icon-tabler-square">', - checkboxChecked: svgns + 'class="icon icon-tabler icon-tabler-square-check">', - checkCircle: svgns + 'class="icon icon-tabler icon-tabler-circle-check">', - checklist: svgns + 'class="icon icon-tabler icon-tabler-list-check">', - chevronLeft: svgns + 'class="icon icon-tabler icon-tabler-chevron-left">', - chevronRight: svgns + 'class="icon icon-tabler icon-tabler-chevron-right">', - circle: svgns + 'class="icon icon-tabler icon-tabler-circle">', - clock: svgns + 'class="icon icon-tabler icon-tabler-clock-hour-3">', - close: svgns + 'class="icon icon-tabler icon-tabler-x">', - cog: svgns + 'class="icon icon-tabler icon-tabler-settings">', - coin: svgns + 'class="icon icon-tabler icon-tabler-coin">', - copy: svgns + 'class="icon icon-tabler icon-tabler-copy">', - dots: svgns + 'class="icon icon-tabler icon-tabler-dots">', - edit: svgns + 'class="icon icon-tabler icon-tabler-edit">', - envelope: svgns + 'class="icon icon-tabler icon-tabler-mail">', - error: svgns + 'class="icon icon-tabler icon-tabler-alert-circle">', - eye: svgns + 'class="icon icon-tabler icon-tabler-eye">', - eyeOff: svgns + 'class="icon icon-tabler icon-tabler-eye-off">', - filter: svgns + 'class="icon icon-tabler icon-tabler-filter">', - folder: svgns + 'class="icon icon-tabler icon-tabler-folder">', - help: svgns + 'class="icon icon-tabler icon-tabler-help">', - home: svgns + 'class="icon icon-tabler icon-tabler-home">', - info: svgns + 'class="icon icon-tabler icon-tabler-info-circle">', - link: svgns + 'class="icon icon-tabler icon-tabler-link">', - list: svgns + 'class="icon icon-tabler icon-tabler-list">', - logout: svgns + 'class="icon icon-tabler icon-tabler-logout">', - math: svgns + 'class="icon icon-tabler icon-tabler-math-symbols">', - meatballs: svgns + 'class="icon icon-tabler icon-tabler-dots-vertical">', - minuscircle: svgns + 'class="icon icon-tabler icon-tabler-circle-minus">', - moon: svgns + 'class="icon icon-tabler icon-tabler-moon">', - plus: svgns + 'class="icon icon-tabler icon-tabler-plus">', - pluscircle: svgns + 'class="icon icon-tabler icon-tabler-circle-plus">', - receipt: svgns + 'class="icon icon-tabler icon-tabler-receipt">', - redo: svgns + 'class="icon icon-tabler icon-tabler-corner-up-right">', - refresh: svgns + 'class="icon icon-tabler icon-tabler-refresh">', - repeat: svgns + 'class="icon icon-tabler icon-tabler-repeat">', - reportAnalytics: svgns + 'class="icon icon-tabler icon-tabler-file-analytics">', - reportMoney: svgns + 'class="icon icon-tabler icon-tabler-report-money">', - search: svgns + 'class="icon icon-tabler icon-tabler-search">', - shared: svgns + 'class="icon icon-tabler icon-tabler-share">', - sidebarLeft: svgns + 'class="icon icon-tabler icon-tabler-layout-sidebar">', - sidebarRight: svgns + 'class="icon icon-tabler icon-tabler-layout-sidebar-right">', - sortAsc: svgns + 'class="icon icon-tabler icon-tabler-sort-ascending">', - sortDesc: svgns + 'class="icon icon-tabler icon-tabler-sort-descending">', - split: svgns + 'class="icon icon-tabler icon-tabler-arrows-split-2">', - star: svgns + 'class="icon icon-tabler icon-tabler-star">', - sun: svgns + ' class="icon icon-tabler icon-tabler-brightness-up">', - tag: svgns + 'class="icon icon-tabler icon-tabler-tag">', - trash: svgns + 'class="icon icon-tabler icon-tabler-trash">', - undo: svgns + 'class="icon icon-tabler icon-tabler-corner-up-left">', - user: svgns + 'class="icon icon-tabler icon-tabler-user">', - users: svgns + 'class="icon icon-tabler icon-tabler-users">', + adjustments: 'adjustments-horizontal">', + chartPie: 'chart-pie">`; +} + export function addIcon (name, svg) { - if (!icons[name]) icons[name] = svg; + if (!customIcons[name]) customIcons[name] = svg; }