@pine-ds/icons 3.3.0-rc.0 → 3.3.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/package.json +1 -1
- package/components/pds-icon.js +33 -13
- package/components/pds-icon.js.map +1 -1
- package/components/utils.js +5 -1
- package/components/utils.js.map +1 -1
- package/dist/cheatsheet.html +4 -4
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/pds-icon.cjs.entry.js +32 -14
- package/dist/cjs/pds-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/pds-icons.cjs.js +1 -1
- package/dist/cjs/{utils-8c57ce6a.js → utils-66fa4942.js} +6 -2
- package/dist/cjs/utils-66fa4942.js.map +1 -0
- package/dist/collection/components/pds-icon/pds-icon.js +21 -0
- package/dist/collection/components/pds-icon/pds-icon.js.map +1 -1
- package/dist/collection/components/pds-icon/request.js +27 -13
- package/dist/collection/components/pds-icon/request.js.map +1 -1
- package/dist/collection/components/pds-icon/svg/blog-filled.svg +1 -1
- package/dist/collection/components/pds-icon/utils.js +5 -1
- package/dist/collection/components/pds-icon/utils.js.map +1 -1
- package/dist/collection/components/pds-icon/validate.js +3 -1
- package/dist/collection/components/pds-icon/validate.js.map +1 -1
- package/dist/docs.json +22 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/pds-icon.entry.js +32 -14
- package/dist/esm/pds-icon.entry.js.map +1 -1
- package/dist/esm/pds-icons.js +1 -1
- package/dist/esm/{utils-15462a67.js → utils-c7e6be67.js} +6 -2
- package/dist/esm/utils-c7e6be67.js.map +1 -0
- package/dist/pds-icons/index.esm.js +1 -1
- package/dist/pds-icons/p-7ef171e4.js +2 -0
- package/dist/pds-icons/p-7ef171e4.js.map +1 -0
- package/dist/pds-icons/p-c34805d3.entry.js +2 -0
- package/dist/pds-icons/p-c34805d3.entry.js.map +1 -0
- package/dist/pds-icons/pds-icons.esm.js +1 -1
- package/dist/pds-icons/pds-icons.esm.js.map +1 -1
- package/dist/pds-icons/svg/access-key.svg +1 -0
- package/dist/pds-icons/svg/add-circle.svg +1 -0
- package/dist/pds-icons/svg/add-image.svg +1 -0
- package/dist/pds-icons/svg/add-small.svg +1 -0
- package/dist/pds-icons/svg/add.svg +1 -0
- package/dist/pds-icons/svg/ai-sparkle.svg +1 -0
- package/dist/pds-icons/svg/ai-writer-filled.svg +1 -0
- package/dist/pds-icons/svg/ai-writer.svg +1 -0
- package/dist/pds-icons/svg/align-center.svg +1 -0
- package/dist/pds-icons/svg/align-justify.svg +1 -0
- package/dist/pds-icons/svg/align-left.svg +1 -0
- package/dist/pds-icons/svg/align-right.svg +1 -0
- package/dist/pds-icons/svg/analytics-filled.svg +1 -0
- package/dist/pds-icons/svg/analytics-outline.svg +1 -0
- package/dist/pds-icons/svg/app-store.svg +1 -0
- package/dist/pds-icons/svg/archive.svg +1 -0
- package/dist/pds-icons/svg/arrow-corner.svg +1 -0
- package/dist/pds-icons/svg/arrow-down.svg +1 -0
- package/dist/pds-icons/svg/arrow-left.svg +1 -0
- package/dist/pds-icons/svg/arrow-right.svg +1 -0
- package/dist/pds-icons/svg/arrow-up.svg +1 -0
- package/dist/pds-icons/svg/assessment.svg +1 -0
- package/dist/pds-icons/svg/at-sign.svg +1 -0
- package/dist/pds-icons/svg/attach.svg +1 -0
- package/dist/pds-icons/svg/automations.svg +1 -0
- package/dist/pds-icons/svg/ban.svg +1 -0
- package/dist/pds-icons/svg/bank.svg +1 -0
- package/dist/pds-icons/svg/bell.svg +1 -0
- package/dist/pds-icons/svg/blog-filled.svg +1 -0
- package/dist/pds-icons/svg/blog.svg +1 -0
- package/dist/pds-icons/svg/bold.svg +1 -0
- package/dist/pds-icons/svg/broadcast.svg +1 -0
- package/dist/pds-icons/svg/calendar-date.svg +1 -0
- package/dist/pds-icons/svg/calendar-schedule.svg +1 -0
- package/dist/pds-icons/svg/calendar-simple.svg +1 -0
- package/dist/pds-icons/svg/card-bw-amex.svg +1 -0
- package/dist/pds-icons/svg/card-bw-apple-card.svg +1 -0
- package/dist/pds-icons/svg/card-bw-diners-club.svg +1 -0
- package/dist/pds-icons/svg/card-bw-discover.svg +1 -0
- package/dist/pds-icons/svg/card-bw-gpay-card.svg +1 -0
- package/dist/pds-icons/svg/card-bw-mastercard.svg +1 -0
- package/dist/pds-icons/svg/card-bw-paypal.svg +1 -0
- package/dist/pds-icons/svg/card-bw-stripe.svg +1 -0
- package/dist/pds-icons/svg/card-bw-visa.svg +1 -0
- package/dist/pds-icons/svg/card-update.svg +1 -0
- package/dist/pds-icons/svg/caret-down.svg +1 -0
- package/dist/pds-icons/svg/caret-left.svg +1 -0
- package/dist/pds-icons/svg/caret-right.svg +1 -0
- package/dist/pds-icons/svg/caret-up.svg +1 -0
- package/dist/pds-icons/svg/cart-add.svg +1 -0
- package/dist/pds-icons/svg/cart.svg +1 -0
- package/dist/pds-icons/svg/certificate.svg +1 -0
- package/dist/pds-icons/svg/check-circle-filled.svg +1 -0
- package/dist/pds-icons/svg/check-circle.svg +1 -0
- package/dist/pds-icons/svg/check.svg +1 -0
- package/dist/pds-icons/svg/circle-1.svg +1 -0
- package/dist/pds-icons/svg/circle-2.svg +1 -0
- package/dist/pds-icons/svg/circle-3.svg +1 -0
- package/dist/pds-icons/svg/circle-4.svg +1 -0
- package/dist/pds-icons/svg/circle-5.svg +1 -0
- package/dist/pds-icons/svg/circle-6.svg +1 -0
- package/dist/pds-icons/svg/circle-7.svg +1 -0
- package/dist/pds-icons/svg/circle-8.svg +1 -0
- package/dist/pds-icons/svg/circle-9.svg +1 -0
- package/dist/pds-icons/svg/clock.svg +1 -0
- package/dist/pds-icons/svg/closed-captions.svg +1 -0
- package/dist/pds-icons/svg/cloud-upload.svg +1 -0
- package/dist/pds-icons/svg/code.svg +1 -0
- package/dist/pds-icons/svg/color.svg +1 -0
- package/dist/pds-icons/svg/columns.svg +1 -0
- package/dist/pds-icons/svg/comment.svg +1 -0
- package/dist/pds-icons/svg/connect.svg +1 -0
- package/dist/pds-icons/svg/contact.svg +1 -0
- package/dist/pds-icons/svg/contacts-filled.svg +1 -0
- package/dist/pds-icons/svg/contacts-outline.svg +1 -0
- package/dist/pds-icons/svg/conversation.svg +1 -0
- package/dist/pds-icons/svg/copy.svg +1 -0
- package/dist/pds-icons/svg/coupon.svg +1 -0
- package/dist/pds-icons/svg/course.svg +1 -0
- package/dist/pds-icons/svg/creator-studio-filled.svg +1 -0
- package/dist/pds-icons/svg/creator-studio.svg +1 -0
- package/dist/pds-icons/svg/credit-card.svg +1 -0
- package/dist/pds-icons/svg/custom-field.svg +1 -0
- package/dist/pds-icons/svg/customize.svg +1 -0
- package/dist/pds-icons/svg/danger-filled.svg +1 -0
- package/dist/pds-icons/svg/danger.svg +1 -0
- package/dist/pds-icons/svg/dashboard-filled.svg +1 -0
- package/dist/pds-icons/svg/dashboard-outline.svg +1 -0
- package/dist/pds-icons/svg/delete-circle.svg +1 -0
- package/dist/pds-icons/svg/delete-key.svg +1 -0
- package/dist/pds-icons/svg/delete-x.svg +1 -0
- package/dist/pds-icons/svg/dollar-sign.svg +1 -0
- package/dist/pds-icons/svg/dot-menu-horizontal.svg +1 -0
- package/dist/pds-icons/svg/down-small.svg +1 -0
- package/dist/pds-icons/svg/download.svg +1 -0
- package/dist/pds-icons/svg/downsell.svg +1 -0
- package/dist/pds-icons/svg/draft.svg +1 -0
- package/dist/pds-icons/svg/drop.svg +1 -0
- package/dist/pds-icons/svg/duplicate.svg +1 -0
- package/dist/pds-icons/svg/email-activity.svg +1 -0
- package/dist/pds-icons/svg/emoji.svg +1 -0
- package/dist/pds-icons/svg/enlarge-vertical.svg +1 -0
- package/dist/pds-icons/svg/enlarge.svg +1 -0
- package/dist/pds-icons/svg/expand.svg +1 -0
- package/dist/pds-icons/svg/facebook-2.svg +1 -0
- package/dist/pds-icons/svg/facebook.svg +1 -0
- package/dist/pds-icons/svg/favorite.svg +1 -0
- package/dist/pds-icons/svg/feedback.svg +1 -0
- package/dist/pds-icons/svg/file-money.svg +1 -0
- package/dist/pds-icons/svg/file.svg +1 -0
- package/dist/pds-icons/svg/filter.svg +1 -0
- package/dist/pds-icons/svg/flag.svg +1 -0
- package/dist/pds-icons/svg/flash-filled.svg +1 -0
- package/dist/pds-icons/svg/flash.svg +1 -0
- package/dist/pds-icons/svg/folder-group.svg +1 -0
- package/dist/pds-icons/svg/folder.svg +1 -0
- package/dist/pds-icons/svg/form-field.svg +1 -0
- package/dist/pds-icons/svg/form-filled.svg +1 -0
- package/dist/pds-icons/svg/form.svg +1 -0
- package/dist/pds-icons/svg/fullscreen.svg +1 -0
- package/dist/pds-icons/svg/funnel.svg +1 -0
- package/dist/pds-icons/svg/grant-offer.svg +1 -0
- package/dist/pds-icons/svg/handle-2-vertical.svg +1 -0
- package/dist/pds-icons/svg/handle-2.svg +1 -0
- package/dist/pds-icons/svg/handle.svg +1 -0
- package/dist/pds-icons/svg/hashtag.svg +1 -0
- package/dist/pds-icons/svg/hd-video.svg +1 -0
- package/dist/pds-icons/svg/heading-large.svg +1 -0
- package/dist/pds-icons/svg/heading-small.svg +1 -0
- package/dist/pds-icons/svg/headset.svg +1 -0
- package/dist/pds-icons/svg/help-filled.svg +1 -0
- package/dist/pds-icons/svg/help-outline.svg +1 -0
- package/dist/pds-icons/svg/home-alt.svg +1 -0
- package/dist/pds-icons/svg/horizontal-line.svg +1 -0
- package/dist/pds-icons/svg/image.svg +1 -0
- package/dist/pds-icons/svg/info-circle-filled.svg +1 -0
- package/dist/pds-icons/svg/info-circle.svg +1 -0
- package/dist/pds-icons/svg/instagram.svg +1 -0
- package/dist/pds-icons/svg/ios-battery.svg +1 -0
- package/dist/pds-icons/svg/ios-data.svg +1 -0
- package/dist/pds-icons/svg/ios-wifi.svg +1 -0
- package/dist/pds-icons/svg/italic.svg +1 -0
- package/dist/pds-icons/svg/kajabi-filled.svg +1 -0
- package/dist/pds-icons/svg/kajabi-outlined.svg +1 -0
- package/dist/pds-icons/svg/lab.svg +1 -0
- package/dist/pds-icons/svg/launch.svg +1 -0
- package/dist/pds-icons/svg/layout-grid.svg +1 -0
- package/dist/pds-icons/svg/layout-list.svg +1 -0
- package/dist/pds-icons/svg/left-small.svg +1 -0
- package/dist/pds-icons/svg/linkedin.svg +1 -0
- package/dist/pds-icons/svg/list-bullet.svg +1 -0
- package/dist/pds-icons/svg/list-numbers.svg +1 -0
- package/dist/pds-icons/svg/location.svg +1 -0
- package/dist/pds-icons/svg/lock-alt.svg +1 -0
- package/dist/pds-icons/svg/lock.svg +1 -0
- package/dist/pds-icons/svg/logo-afterpay.svg +1 -0
- package/dist/pds-icons/svg/loop.svg +1 -0
- package/dist/pds-icons/svg/mail-filled.svg +1 -0
- package/dist/pds-icons/svg/mail.svg +1 -0
- package/dist/pds-icons/svg/map.svg +1 -0
- package/dist/pds-icons/svg/mapped.svg +1 -0
- package/dist/pds-icons/svg/margin-left.svg +1 -0
- package/dist/pds-icons/svg/margin-right.svg +1 -0
- package/dist/pds-icons/svg/marker-filled.svg +1 -0
- package/dist/pds-icons/svg/marker.svg +1 -0
- package/dist/pds-icons/svg/marketing-filled.svg +1 -0
- package/dist/pds-icons/svg/marketing-outline.svg +1 -0
- package/dist/pds-icons/svg/menu-2.svg +1 -0
- package/dist/pds-icons/svg/menu-alt.svg +1 -0
- package/dist/pds-icons/svg/menu.svg +1 -0
- package/dist/pds-icons/svg/merge.svg +1 -0
- package/dist/pds-icons/svg/microphone-off.svg +1 -0
- package/dist/pds-icons/svg/microphone.svg +1 -0
- package/dist/pds-icons/svg/move-left.svg +1 -0
- package/dist/pds-icons/svg/move-right.svg +1 -0
- package/dist/pds-icons/svg/multi-pay.svg +1 -0
- package/dist/pds-icons/svg/newsletter.svg +1 -0
- package/dist/pds-icons/svg/one-off-session.svg +1 -0
- package/dist/pds-icons/svg/one-time.svg +1 -0
- package/dist/pds-icons/svg/partners-filled.svg +1 -0
- package/dist/pds-icons/svg/partners-outline.svg +1 -0
- package/dist/pds-icons/svg/pause-circle.svg +1 -0
- package/dist/pds-icons/svg/pause.svg +1 -0
- package/dist/pds-icons/svg/payout.svg +1 -0
- package/dist/pds-icons/svg/pen.svg +1 -0
- package/dist/pds-icons/svg/phone-portrait.svg +1 -0
- package/dist/pds-icons/svg/phone-toolbar.svg +1 -0
- package/dist/pds-icons/svg/play-circle.svg +1 -0
- package/dist/pds-icons/svg/play-outline.svg +1 -0
- package/dist/pds-icons/svg/play-store.svg +1 -0
- package/dist/pds-icons/svg/play.svg +1 -0
- package/dist/pds-icons/svg/plug.svg +1 -0
- package/dist/pds-icons/svg/premium.svg +1 -0
- package/dist/pds-icons/svg/present.svg +1 -0
- package/dist/pds-icons/svg/preview-off.svg +1 -0
- package/dist/pds-icons/svg/preview-on.svg +1 -0
- package/dist/pds-icons/svg/products-filled.svg +1 -0
- package/dist/pds-icons/svg/products-outline.svg +1 -0
- package/dist/pds-icons/svg/question-circle.svg +1 -0
- package/dist/pds-icons/svg/quote.svg +1 -0
- package/dist/pds-icons/svg/redo.svg +1 -0
- package/dist/pds-icons/svg/refresh.svg +1 -0
- package/dist/pds-icons/svg/remove-circle.svg +1 -0
- package/dist/pds-icons/svg/remove.svg +1 -0
- package/dist/pds-icons/svg/rename.svg +1 -0
- package/dist/pds-icons/svg/reset-password.svg +1 -0
- package/dist/pds-icons/svg/restore.svg +1 -0
- package/dist/pds-icons/svg/right-small.svg +1 -0
- package/dist/pds-icons/svg/round-dollar.svg +1 -0
- package/dist/pds-icons/svg/rows.svg +1 -0
- package/dist/pds-icons/svg/sales-filled.svg +1 -0
- package/dist/pds-icons/svg/sales-outline.svg +1 -0
- package/dist/pds-icons/svg/scissor.svg +1 -0
- package/dist/pds-icons/svg/screen-share-off.svg +1 -0
- package/dist/pds-icons/svg/screen-share-on.svg +1 -0
- package/dist/pds-icons/svg/search-small.svg +1 -0
- package/dist/pds-icons/svg/search.svg +1 -0
- package/dist/pds-icons/svg/send-message.svg +1 -0
- package/dist/pds-icons/svg/sequences.svg +1 -0
- package/dist/pds-icons/svg/series.svg +1 -0
- package/dist/pds-icons/svg/settings-filled.svg +1 -0
- package/dist/pds-icons/svg/settings-outline.svg +1 -0
- package/dist/pds-icons/svg/share.svg +1 -0
- package/dist/pds-icons/svg/skipped.svg +1 -0
- package/dist/pds-icons/svg/slash-divider.svg +1 -0
- package/dist/pds-icons/svg/sparkle-filled.svg +1 -0
- package/dist/pds-icons/svg/sparkle.svg +1 -0
- package/dist/pds-icons/svg/speaker.svg +1 -0
- package/dist/pds-icons/svg/stack.svg +1 -0
- package/dist/pds-icons/svg/star.svg +1 -0
- package/dist/pds-icons/svg/stop.svg +1 -0
- package/dist/pds-icons/svg/stopwatch.svg +1 -0
- package/dist/pds-icons/svg/strikethrough.svg +1 -0
- package/dist/pds-icons/svg/subscript.svg +1 -0
- package/dist/pds-icons/svg/subscriptions.svg +1 -0
- package/dist/pds-icons/svg/super-admin.svg +1 -0
- package/dist/pds-icons/svg/superscript.svg +1 -0
- package/dist/pds-icons/svg/sync.svg +1 -0
- package/dist/pds-icons/svg/tablet-landscape.svg +1 -0
- package/dist/pds-icons/svg/tablet-portrait.svg +1 -0
- package/dist/pds-icons/svg/text-styles.svg +1 -0
- package/dist/pds-icons/svg/theme-store-filled.svg +1 -0
- package/dist/pds-icons/svg/theme-store.svg +1 -0
- package/dist/pds-icons/svg/thumbs-down-filled.svg +1 -0
- package/dist/pds-icons/svg/thumbs-down.svg +1 -0
- package/dist/pds-icons/svg/thumbs-up-filled.svg +1 -0
- package/dist/pds-icons/svg/thumbs-up.svg +1 -0
- package/dist/pds-icons/svg/tiktok.svg +1 -0
- package/dist/pds-icons/svg/trash.svg +1 -0
- package/dist/pds-icons/svg/twitter.svg +1 -0
- package/dist/pds-icons/svg/underline.svg +1 -0
- package/dist/pds-icons/svg/undo.svg +1 -0
- package/dist/pds-icons/svg/unlock.svg +1 -0
- package/dist/pds-icons/svg/unmapped.svg +1 -0
- package/dist/pds-icons/svg/up-small.svg +1 -0
- package/dist/pds-icons/svg/upload.svg +1 -0
- package/dist/pds-icons/svg/url.svg +1 -0
- package/dist/pds-icons/svg/user-filled.svg +1 -0
- package/dist/pds-icons/svg/user.svg +1 -0
- package/dist/pds-icons/svg/users-wm.svg +1 -0
- package/dist/pds-icons/svg/users.svg +1 -0
- package/dist/pds-icons/svg/video-off.svg +1 -0
- package/dist/pds-icons/svg/video-on.svg +1 -0
- package/dist/pds-icons/svg/warning-filled.svg +1 -0
- package/dist/pds-icons/svg/warning.svg +1 -0
- package/dist/pds-icons/svg/website-filled.svg +1 -0
- package/dist/pds-icons/svg/website-outline.svg +1 -0
- package/dist/pds-icons/svg/window-paragraph.svg +1 -0
- package/dist/pds-icons/svg/world.svg +1 -0
- package/dist/pds-icons/svg/wrench.svg +1 -0
- package/dist/pds-icons/svg/youtube.svg +1 -0
- package/dist/pds-icons.json +1 -1
- package/dist/pds-icons.symbols.svg +2 -2
- package/dist/svg/blog-filled.svg +1 -1
- package/dist/types/components/pds-icon/pds-icon.d.ts +5 -0
- package/dist/types/components/pds-icon/validate.d.ts +2 -0
- package/dist/types/components.d.ts +8 -0
- package/icons/index.d.ts +1 -1
- package/icons/index.js +2 -2
- package/icons/index.mjs +2 -2
- package/icons/package.json +2 -2
- package/package.json +1 -1
- package/dist/cjs/utils-8c57ce6a.js.map +0 -1
- package/dist/esm/utils-15462a67.js.map +0 -1
- package/dist/pds-icons/p-229b8f4e.entry.js +0 -2
- package/dist/pds-icons/p-229b8f4e.entry.js.map +0 -1
- package/dist/pds-icons/p-f0b1dbd6.js +0 -2
- package/dist/pds-icons/p-f0b1dbd6.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/components/pds-icon/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/components/pds-icon/request.ts"],"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gCACpC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;6BAC1C;4BACD,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC;wBAC5C,CAAC,CAAC,CAAC;qBACJ;oBACD,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;gBAEH,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;aACxB;SACF;aAAM;YACL,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;SAC1B;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAA","sourcesContent":["import { isEncodedDataUrl, isSvgDataUrl, validateContent } from './validate';\n\nexport const pdsIconContent = new Map<string, string>();\nconst requests = new Map<string, Promise<any>>(); // eslint-disable-line @typescript-eslint/no-explicit-any\n\nlet parser: DOMParser;\n\nexport const getSvgContent = (url: string, sanitize = false) => {\n let req = requests.get(url);\n\n if(!req) {\n if (typeof fetch != 'undefined' && typeof document !== 'undefined') {\n if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\n // we don't have a request\n req = fetch(url).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n pdsIconContent.set(url, svgContent || '');\n });\n }\n pdsIconContent.set(url, '');\n });\n\n requests.set(url, req);\n }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n\n return req;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="M14 0H2a.667.667 0 0 0-.667.667v14.666c0 .368.299.667.667.667h12a.667.667 0 0 0 .667-.667V.667A.667.667 0 0 0 14 0Zm-2 13c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 13v-.667c0-.184.15-.333.333-.333h7.334c.184 0 .333.15.333.333V13Zm0-3.333c0 .184-.15.333-.333.333H4.333A.333.333 0 0 1 4 9.667V9c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333v.667Zm0-3.334c0 .184-.15.334-.333.334H4.333A.333.333 0 0 1 4 6.333V3c0-.184.15-.333.333-.333h7.334c.184 0 .333.149.333.333v3.333Z"/></svg>
|
|
@@ -50,7 +50,11 @@ export const getSrc = (src) => {
|
|
|
50
50
|
return null;
|
|
51
51
|
};
|
|
52
52
|
export const getUrl = (pdsIcon) => {
|
|
53
|
-
let url =
|
|
53
|
+
let url = getSrc(pdsIcon.src);
|
|
54
|
+
if (url) {
|
|
55
|
+
return url;
|
|
56
|
+
}
|
|
57
|
+
url = getName(pdsIcon.name, pdsIcon.icon);
|
|
54
58
|
if (url) {
|
|
55
59
|
return getNamedUrl(url);
|
|
56
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/pds-icon/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,IAAI,UAA+B,CAAC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC7D,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI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ACzB,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACpC,IAAI,KAAK,KAAK,IAAI,EAAE;gBAClB,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;aAC/C;YACD,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;SAC1B;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC,CAAA","sourcesContent":["import { getAssetPath } from '@stencil/core';\nimport { PdsIcon } from './pds-icon';\n\nlet CACHED_MAP: Map<string, string>;\n\nexport const addIcons = (icons: { [name: string]: string; }) => {\n const map = getIconMap();\n Object.keys(icons).forEach(name => map.set(name, icons[name]));\n}\n\nexport const getIconMap = (): Map<string, string> => {\n if (typeof window === 'undefined') {\n return new Map();\n } else {\n if (!CACHED_MAP) {\n const win = window as any; // eslint-disable-line @typescript-eslint/no-explicit-any\n win.PdsIcons = win.PdsIcons || {};\n CACHED_MAP = win.PdsIcons.map = win.PdsIcons.map || new Map();\n }\n\n return CACHED_MAP;\n }\n}\n\nexport const getName = (\n iconName: string | undefined,\n icon: string | undefined\n ) => {\n\n if(!iconName && icon && !isSrc(icon)) {\n iconName = icon;\n }\n\n if (isStr(iconName)) {\n iconName = toLower(iconName);\n }\n\n if (!isStr(iconName) || iconName.trim() === '') {\n return null;\n }\n\n const invalidChars = iconName.replace(/[a-z]|-|\\d/gi,'');\n if (invalidChars != '') { return null; }\n\n return iconName;\n}\n\nconst getNamedUrl = (iconName: string) => {\n const url = getIconMap().get(iconName);\n if (url) {\n return url;\n }\n\n return getAssetPath(`svg/${iconName}.svg`);\n};\n\nexport const getSrc = (src: string | undefined) => {\n if (isStr(src)) {\n src = src.trim();\n\n if (isSrc(src)) {\n return src;\n }\n }\n\n return null;\n}\n\nexport const getUrl = (pdsIcon: PdsIcon) => {\n let url = getSrc(pdsIcon.src);\n if (url) {\n return url;\n }\n\n url = getName(pdsIcon.name, pdsIcon.icon);\n if (url) {\n return getNamedUrl(url);\n }\n\n if (pdsIcon.icon) {\n url = getSrc(pdsIcon.icon);\n\n if(url) {\n return url;\n }\n }\n\n return null;\n};\n\n\nexport const isSrc = (str: string) => str.length > 0 && /(\\/|\\.)/.test(str);\nexport const isStr = (val: any): val is string => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any\nexport const toLower = (val: string) => val.toLowerCase();\n\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\n export const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {\n const attributeObject: { [k: string]: any } = {}; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n}\n"]}
|
|
@@ -12,7 +12,7 @@ export const validateContent = (svgContent) => {
|
|
|
12
12
|
const svgElm = div.firstElementChild;
|
|
13
13
|
if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {
|
|
14
14
|
const svgClass = svgElm.getAttribute('class') || '';
|
|
15
|
-
svgElm.setAttribute('class', (svgClass + ' s-
|
|
15
|
+
svgElm.setAttribute('class', (svgClass + ' s-pds-icon').trim());
|
|
16
16
|
// root element must be an svg
|
|
17
17
|
// lets double check we've got valid elements
|
|
18
18
|
// do not allow scripts
|
|
@@ -41,4 +41,6 @@ export const isValid = (elm) => {
|
|
|
41
41
|
}
|
|
42
42
|
return true;
|
|
43
43
|
};
|
|
44
|
+
export const isSvgDataUrl = (url) => url.startsWith('data:image/svg+xml');
|
|
45
|
+
export const isEncodedDataUrl = (url) => url.indexOf(';utf8,') !== -1;
|
|
44
46
|
//# sourceMappingURL=validate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/components/pds-icon/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,EAAE;IACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC;IAE3B,oDAAoD;IACpD,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACnD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACtD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SACpC;KACF;IAED,gCAAgC;IAChC,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACrC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,aAAa,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QAEhE,8BAA8B;QAC9B,6CAA6C;QAC7C,uBAAuB;QACvB,IAAI,OAAO,CAAC,MAAqB,CAAC,EAAE;YAClC,OAAO,GAAG,CAAC,SAAS,CAAC;SACtB;KACF;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAgB,EAAE,EAAE;IAC1C,IAAI,GAAG,CAAC,QAAQ,KAAK,CAAC,EAAE;QACtB,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,QAAQ,EAAE;YAC3C,OAAO,KAAK,CAAC;SACd;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC9C,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACpC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACzD,OAAO,KAAK,CAAC;aACd;SACF;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC9C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAgB,CAAC,EAAE;gBAC9C,OAAO,KAAK,CAAC;aACd;SACF;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["import { isStr } from './utils';\n\nexport const validateContent = (svgContent: string) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../../../src/components/pds-icon/validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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AAC;SACd;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC9C,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YACpC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;gBACzD,OAAO,KAAK,CAAC;aACd;SACF;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YAC9C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAgB,CAAC,EAAE;gBAC9C,OAAO,KAAK,CAAC;aACd;SACF;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAClF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC","sourcesContent":["import { isStr } from './utils';\n\nexport const validateContent = (svgContent: string) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-pds-icon').trim());\n\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm as HTMLElement)) {\n return div.innerHTML;\n }\n }\n return '';\n};\n\nexport const isValid = (elm: HTMLElement) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i] as HTMLElement)) {\n return false;\n }\n }\n }\n return true;\n};\n\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n"]}
|
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "
|
|
2
|
+
"timestamp": "2024-01-05T21:10:27",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.8.1",
|
|
@@ -99,6 +99,27 @@
|
|
|
99
99
|
],
|
|
100
100
|
"optional": true,
|
|
101
101
|
"required": false
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"name": "src",
|
|
105
|
+
"type": "string",
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "string",
|
|
108
|
+
"resolved": "string",
|
|
109
|
+
"references": {}
|
|
110
|
+
},
|
|
111
|
+
"mutable": false,
|
|
112
|
+
"attr": "src",
|
|
113
|
+
"reflectToAttr": false,
|
|
114
|
+
"docs": "\nSpecifies the exact `src` of an SVG file to use.",
|
|
115
|
+
"docsTags": [],
|
|
116
|
+
"values": [
|
|
117
|
+
{
|
|
118
|
+
"type": "string"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"optional": true,
|
|
122
|
+
"required": false
|
|
102
123
|
}
|
|
103
124
|
],
|
|
104
125
|
"methods": [],
|
package/dist/esm/index.js
CHANGED
package/dist/esm/loader.js
CHANGED
|
@@ -3,7 +3,7 @@ export { s as setNonce } from './index-d1a605fc.js';
|
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy([["pds-icon",[[1,"pds-icon",{"color":[1],"icon":[8],"name":[513],"size":[513],"ariaLabel":[32],"isVisible":[32],"svgContent":[32]},null,{"name":["loadIcon"],"icon":["loadIcon"]}]]]], options);
|
|
6
|
+
return bootstrapLazy([["pds-icon",[[1,"pds-icon",{"color":[1],"icon":[8],"name":[513],"size":[513],"src":[1],"ariaLabel":[32],"isVisible":[32],"svgContent":[32]},null,{"name":["loadIcon"],"src":["loadIcon"],"icon":["loadIcon"]}]]]], options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-d1a605fc.js';
|
|
2
|
-
import { i as isStr, b as inheritAttributes, g as getUrl, c as getName } from './utils-
|
|
2
|
+
import { i as isStr, b as inheritAttributes, g as getUrl, c as getName } from './utils-c7e6be67.js';
|
|
3
3
|
|
|
4
4
|
const validateContent = (svgContent) => {
|
|
5
5
|
const div = document.createElement('div');
|
|
@@ -14,7 +14,7 @@ const validateContent = (svgContent) => {
|
|
|
14
14
|
const svgElm = div.firstElementChild;
|
|
15
15
|
if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {
|
|
16
16
|
const svgClass = svgElm.getAttribute('class') || '';
|
|
17
|
-
svgElm.setAttribute('class', (svgClass + ' s-
|
|
17
|
+
svgElm.setAttribute('class', (svgClass + ' s-pds-icon').trim());
|
|
18
18
|
// root element must be an svg
|
|
19
19
|
// lets double check we've got valid elements
|
|
20
20
|
// do not allow scripts
|
|
@@ -43,26 +43,42 @@ const isValid = (elm) => {
|
|
|
43
43
|
}
|
|
44
44
|
return true;
|
|
45
45
|
};
|
|
46
|
+
const isSvgDataUrl = (url) => url.startsWith('data:image/svg+xml');
|
|
47
|
+
const isEncodedDataUrl = (url) => url.indexOf(';utf8,') !== -1;
|
|
46
48
|
|
|
47
49
|
const pdsIconContent = new Map();
|
|
48
50
|
const requests = new Map(); // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
51
|
+
let parser;
|
|
49
52
|
const getSvgContent = (url, sanitize = false) => {
|
|
50
53
|
let req = requests.get(url);
|
|
51
54
|
if (!req) {
|
|
52
55
|
if (typeof fetch != 'undefined' && typeof document !== 'undefined') {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
return rsp.text().then((svgContent) => {
|
|
57
|
-
if (svgContent && sanitize !== false) {
|
|
58
|
-
svgContent = validateContent(svgContent);
|
|
59
|
-
}
|
|
60
|
-
pdsIconContent.set(url, svgContent || '');
|
|
61
|
-
});
|
|
56
|
+
if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {
|
|
57
|
+
if (!parser) {
|
|
58
|
+
parser = new DOMParser();
|
|
62
59
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
const doc = parser.parseFromString(url, 'text/html');
|
|
61
|
+
const svg = doc.querySelector('svg');
|
|
62
|
+
if (svg) {
|
|
63
|
+
pdsIconContent.set(url, svg.outerHTML);
|
|
64
|
+
}
|
|
65
|
+
return Promise.resolve();
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
// we don't have a request
|
|
69
|
+
req = fetch(url).then((rsp) => {
|
|
70
|
+
if (rsp.ok) {
|
|
71
|
+
return rsp.text().then((svgContent) => {
|
|
72
|
+
if (svgContent && sanitize !== false) {
|
|
73
|
+
svgContent = validateContent(svgContent);
|
|
74
|
+
}
|
|
75
|
+
pdsIconContent.set(url, svgContent || '');
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
pdsIconContent.set(url, '');
|
|
79
|
+
});
|
|
80
|
+
requests.set(url, req);
|
|
81
|
+
}
|
|
66
82
|
}
|
|
67
83
|
else {
|
|
68
84
|
pdsIconContent.set(url, '');
|
|
@@ -89,6 +105,7 @@ const PdsIcon = class {
|
|
|
89
105
|
this.icon = undefined;
|
|
90
106
|
this.name = undefined;
|
|
91
107
|
this.size = 'regular';
|
|
108
|
+
this.src = undefined;
|
|
92
109
|
}
|
|
93
110
|
iconSize() {
|
|
94
111
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -170,6 +187,7 @@ const PdsIcon = class {
|
|
|
170
187
|
get el() { return getElement(this); }
|
|
171
188
|
static get watchers() { return {
|
|
172
189
|
"name": ["loadIcon"],
|
|
190
|
+
"src": ["loadIcon"],
|
|
173
191
|
"icon": ["loadIcon"]
|
|
174
192
|
}; }
|
|
175
193
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"pds-icon.entry.js","mappings":";;;AAEO,MAAM,eAAe,GAAG,CAAC,UAAkB;IAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC;;IAG3B,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACnD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACtD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SACpC;KACF;;IAGD,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACrC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpD,MAAM,CAAC,Y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B;IACnD,OAAO,KAAK;UACT;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,GAAG,IAAI;SAC7B;UACD,IAAI,CAAC;AACT,CAAC,CAAC;;;;;","names":[],"sources":["src/components/pds-icon/validate.ts","src/components/pds-icon/request.ts","src/components/pds-icon/pds-icon.scss?tag=pds-icon&encapsulation=shadow","src/components/pds-icon/pds-icon.tsx"],"sourcesContent":["import { isStr } from './utils';\n\nexport const validateContent = (svgContent: string) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());\n\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm as HTMLElement)) {\n return div.innerHTML;\n }\n }\n return '';\n};\n\nexport const isValid = (elm: HTMLElement) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i] as HTMLElement)) {\n return false;\n }\n }\n }\n return true;\n};\n","import { validateContent } from './validate';\n\nexport const pdsIconContent = new Map<string, string>();\nconst requests = new Map<string, Promise<any>>(); // eslint-disable-line @typescript-eslint/no-explicit-any\n\nexport const getSvgContent = (url: string, sanitize = false) => {\n let req = requests.get(url);\n\n if(!req) {\n if (typeof fetch != 'undefined' && typeof document !== 'undefined') {\n // we don't have a request\n req = fetch(url).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n pdsIconContent.set(url, svgContent || '');\n });\n }\n pdsIconContent.set(url, '');\n });\n\n requests.set(url, req);\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n return req;\n}\n",":host {\n contain: strict;\n display: inline-block;\n fill: currentColor;\n height: 1em;\n width: 1em;\n\n .pdsicon {\n fill: currentColor;\n }\n}\n\n.pds-icon-fill-none {\n fill: none;\n}\n\n.icon-inner,\n.pds-icon,\nsvg {\n display: block;\n height: 100%;\n width: 100%;\n}\n","import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { getSvgContent, pdsIconContent } from './request';\nimport { getName, getUrl, inheritAttributes } from './utils';\n\n@Component({\n tag: 'pds-icon',\n assetsDirs: ['svg'],\n styleUrl: 'pds-icon.scss',\n shadow: true,\n})\nexport class PdsIcon {\n private io?: IntersectionObserver;\n private inheritedAttributes: { [k: string]: any } = {}; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n @Element() el!: HTMLPdsIconElement;\n\n @State() private ariaLabel?: string;\n @State() private isVisible = false;\n @State() private svgContent?: string;\n\n /**\n *\n * The color of the icon\n *\n */\n @Prop() color?: string;\n\n /**\n * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\n\n /**\n * The name of the icon to use from\n * the built-in set.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The size of the icon. This can be\n * 'small', 'regular', 'medium', large, or a\n * custom value (40px, 1rem, etc)\n *\n */\n @Prop({ reflect: true }) size?:\n | 'small' // 12px\n | 'regular' // 16px\n | 'medium' // 20px\n | 'large' // 24px\n | 'auto'\n | string = 'regular'\n\n private iconSize() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sizes: { [key: string]: any } = {\n small: '12px',\n regular: '16px',\n medium: '20px',\n large: '24px',\n }\n\n if (sizes[this.size]) {\n return sizes[this.size];\n } else {\n return this.size;\n }\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n }\n\n connectedCallback() {\n this.waitUntilVisible(this.el, '50px', () => {\n this.isVisible = true;\n this.loadIcon();\n })\n }\n\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n\n @Watch('name')\n @Watch('icon')\n loadIcon() {\n if (Build.isBrowser && this.isVisible) {\n const url = getUrl(this);\n if (url) {\n if (pdsIconContent.has(url)) {\n this.svgContent = pdsIconContent.get(url);\n } else {\n getSvgContent(url).then(() => (this.svgContent = pdsIconContent.get(url)));\n }\n }\n }\n\n const label = getName(this.name, this.icon);\n\n if (label) {\n this.ariaLabel = label.replace(/\\-/g, ' ');\n }\n }\n\n render() {\n const { ariaLabel, inheritedAttributes } = this;\n\n const style = {\n height: this.iconSize(),\n width: this.iconSize(),\n color: this.color,\n }\n\n return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n role=\"img\"\n style={style}\n class={{\n ...createColorClasses(this.color),\n }}\n {...inheritedAttributes}\n >\n {Build.isBrowser && this.svgContent ? (\n <div class=\"icon-inner\" innerHTML={this.svgContent}></div>\n ) : (\n <div class=\"icon-inner\"></div>\n )}\n </Host>\n )\n }\n\n /*****\n * Private Methods\n ****/\n\n private waitUntilVisible(el: HTMLElement, rootMargin: string, cb: () => void) {\n if (Build.isBrowser && typeof window !== 'undefined' && (window).IntersectionObserver) {\n const io = (this.io = new (window).IntersectionObserver(\n (data: IntersectionObserverEntry[]) => {\n if (data[0].isIntersecting) {\n io.disconnect();\n this.io = undefined;\n cb();\n }\n },\n { rootMargin },\n ));\n\n io.observe(el);\n } else {\n // browser doesn't support IntersectionObserver\n // so just fallback to always show it\n cb();\n }\n }\n\n private hasAriaHidden = () => {\n const { el } = this;\n\n return el.hasAttribute('aria-hidden') && el.getAttribute('aria-hidden') === 'true';\n }\n}\n\nconst createColorClasses = (color: string | undefined) => {\n return color\n ? {\n 'pds-color': true,\n [`pds-color-${color}`]: true,\n }\n : null;\n };\n"],"version":3}
|
|
1
|
+
{"file":"pds-icon.entry.js","mappings":";;;AAEO,MAAM,eAAe,GAAG,CAAC,UAAkB;IAChD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC;;IAG3B,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;QACnD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;YACtD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;SACpC;KACF;;IAGD,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACrC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;QACrD,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QACpD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,QAAQ,GAAG,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;;;;QAKhE,IAAI,OAAO,CAAC,MAAqB,CAAC,EAAE;YAClC,OAAO,GAAG,CAAC,SAAS,CAAC;SACtB;KACF;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEK,MAAM,OAAO,GAAG,CAAC,GAAgB;IACtC,IAAI,GAAG,CAAC,QAAQ,KAAK,CAAC,EAAE;QACtB,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,QAAQ,EAAE;Y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AAC,CAAC,cAAc,EAAE;oBAC1B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;iBACN;aACF,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAChB;aAAM;;;YAGL,EAAE,EAAE,CAAC;SACN;KACF;;;;;;;;;AASH,MAAM,kBAAkB,GAAG,CAAC,KAAyB;IACnD,OAAO,KAAK;UACT;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,GAAG,IAAI;SAC7B;UACD,IAAI,CAAC;AACT,CAAC,CAAC;;;;;","names":[],"sources":["src/components/pds-icon/validate.ts","src/components/pds-icon/request.ts","src/components/pds-icon/pds-icon.scss?tag=pds-icon&encapsulation=shadow","src/components/pds-icon/pds-icon.tsx"],"sourcesContent":["import { isStr } from './utils';\n\nexport const validateContent = (svgContent: string) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-pds-icon').trim());\n\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm as HTMLElement)) {\n return div.innerHTML;\n }\n }\n return '';\n};\n\nexport const isValid = (elm: HTMLElement) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i] as HTMLElement)) {\n return false;\n }\n }\n }\n return true;\n};\n\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, validateContent } from './validate';\n\nexport const pdsIconContent = new Map<string, string>();\nconst requests = new Map<string, Promise<any>>(); // eslint-disable-line @typescript-eslint/no-explicit-any\n\nlet parser: DOMParser;\n\nexport const getSvgContent = (url: string, sanitize = false) => {\n let req = requests.get(url);\n\n if(!req) {\n if (typeof fetch != 'undefined' && typeof document !== 'undefined') {\n if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\n // we don't have a request\n req = fetch(url).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n pdsIconContent.set(url, svgContent || '');\n });\n }\n pdsIconContent.set(url, '');\n });\n\n requests.set(url, req);\n }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n\n return req;\n}\n",":host {\n contain: strict;\n display: inline-block;\n fill: currentColor;\n height: 1em;\n width: 1em;\n\n .pdsicon {\n fill: currentColor;\n }\n}\n\n.pds-icon-fill-none {\n fill: none;\n}\n\n.icon-inner,\n.pds-icon,\nsvg {\n display: block;\n height: 100%;\n width: 100%;\n}\n","import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { getSvgContent, pdsIconContent } from './request';\nimport { getName, getUrl, inheritAttributes } from './utils';\n\n@Component({\n tag: 'pds-icon',\n assetsDirs: ['svg'],\n styleUrl: 'pds-icon.scss',\n shadow: true,\n})\nexport class PdsIcon {\n private io?: IntersectionObserver;\n private inheritedAttributes: { [k: string]: any } = {}; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n @Element() el!: HTMLPdsIconElement;\n\n @State() private ariaLabel?: string;\n @State() private isVisible = false;\n @State() private svgContent?: string;\n\n /**\n *\n * The color of the icon\n *\n */\n @Prop() color?: string;\n\n /**\n * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\n\n /**\n * The name of the icon to use from\n * the built-in set.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The size of the icon. This can be\n * 'small', 'regular', 'medium', large, or a\n * custom value (40px, 1rem, etc)\n *\n */\n @Prop({ reflect: true }) size?:\n | 'small' // 12px\n | 'regular' // 16px\n | 'medium' // 20px\n | 'large' // 24px\n | 'auto'\n | string = 'regular'\n\n /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\n\n private iconSize() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sizes: { [key: string]: any } = {\n small: '12px',\n regular: '16px',\n medium: '20px',\n large: '24px',\n }\n\n if (sizes[this.size]) {\n return sizes[this.size];\n } else {\n return this.size;\n }\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n }\n\n connectedCallback() {\n this.waitUntilVisible(this.el, '50px', () => {\n this.isVisible = true;\n this.loadIcon();\n })\n }\n\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n\n @Watch('name')\n @Watch('src')\n @Watch('icon')\n loadIcon() {\n if (Build.isBrowser && this.isVisible) {\n const url = getUrl(this);\n if (url) {\n if (pdsIconContent.has(url)) {\n this.svgContent = pdsIconContent.get(url);\n } else {\n getSvgContent(url).then(() => (this.svgContent = pdsIconContent.get(url)));\n }\n }\n }\n\n const label = getName(this.name, this.icon);\n\n if (label) {\n this.ariaLabel = label.replace(/\\-/g, ' ');\n }\n }\n\n render() {\n const { ariaLabel, inheritedAttributes } = this;\n\n const style = {\n height: this.iconSize(),\n width: this.iconSize(),\n color: this.color,\n }\n\n return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n role=\"img\"\n style={style}\n class={{\n ...createColorClasses(this.color),\n }}\n {...inheritedAttributes}\n >\n {Build.isBrowser && this.svgContent ? (\n <div class=\"icon-inner\" innerHTML={this.svgContent}></div>\n ) : (\n <div class=\"icon-inner\"></div>\n )}\n </Host>\n )\n }\n\n /*****\n * Private Methods\n ****/\n\n private waitUntilVisible(el: HTMLElement, rootMargin: string, cb: () => void) {\n if (Build.isBrowser && typeof window !== 'undefined' && (window).IntersectionObserver) {\n const io = (this.io = new (window).IntersectionObserver(\n (data: IntersectionObserverEntry[]) => {\n if (data[0].isIntersecting) {\n io.disconnect();\n this.io = undefined;\n cb();\n }\n },\n { rootMargin },\n ));\n\n io.observe(el);\n } else {\n // browser doesn't support IntersectionObserver\n // so just fallback to always show it\n cb();\n }\n }\n\n private hasAriaHidden = () => {\n const { el } = this;\n\n return el.hasAttribute('aria-hidden') && el.getAttribute('aria-hidden') === 'true';\n }\n}\n\nconst createColorClasses = (color: string | undefined) => {\n return color\n ? {\n 'pds-color': true,\n [`pds-color-${color}`]: true,\n }\n : null;\n };\n"],"version":3}
|
package/dist/esm/pds-icons.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchBrowser = () => {
|
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
patchBrowser().then(options => {
|
|
17
|
-
return bootstrapLazy([["pds-icon",[[1,"pds-icon",{"color":[1],"icon":[8],"name":[513],"size":[513],"ariaLabel":[32],"isVisible":[32],"svgContent":[32]},null,{"name":["loadIcon"],"icon":["loadIcon"]}]]]], options);
|
|
17
|
+
return bootstrapLazy([["pds-icon",[[1,"pds-icon",{"color":[1],"icon":[8],"name":[513],"size":[513],"src":[1],"ariaLabel":[32],"isVisible":[32],"svgContent":[32]},null,{"name":["loadIcon"],"src":["loadIcon"],"icon":["loadIcon"]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
//# sourceMappingURL=pds-icons.js.map
|
|
@@ -51,7 +51,11 @@ const getSrc = (src) => {
|
|
|
51
51
|
return null;
|
|
52
52
|
};
|
|
53
53
|
const getUrl = (pdsIcon) => {
|
|
54
|
-
let url =
|
|
54
|
+
let url = getSrc(pdsIcon.src);
|
|
55
|
+
if (url) {
|
|
56
|
+
return url;
|
|
57
|
+
}
|
|
58
|
+
url = getName(pdsIcon.name, pdsIcon.icon);
|
|
55
59
|
if (url) {
|
|
56
60
|
return getNamedUrl(url);
|
|
57
61
|
}
|
|
@@ -92,4 +96,4 @@ const inheritAttributes = (el, attributes = []) => {
|
|
|
92
96
|
|
|
93
97
|
export { addIcons as a, inheritAttributes as b, getName as c, getUrl as g, isStr as i };
|
|
94
98
|
|
|
95
|
-
//# sourceMappingURL=utils-
|
|
99
|
+
//# sourceMappingURL=utils-c7e6be67.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"utils-c7e6be67.js","mappings":";;AAGA,IAAI,UAA+B,CAAC;MAEvB,QAAQ,GAAG,CAAC,KAAkC;IACzD,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjE,EAAC;AAEM,MAAM,UAAU,GAAG;IACxB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,OAAO,IAAI,GAAG,EAAE,CAAC;KAClB;SAAO;QACN,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,GAAG,GAAG,MAAa,CAAC;YAC1B,GAAG,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;YAClC,UAA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/components/pds-icon/utils.ts"],"sourcesContent":["import { getAssetPath } from '@stencil/core';\nimport { PdsIcon } from './pds-icon';\n\nlet CACHED_MAP: Map<string, string>;\n\nexport const addIcons = (icons: { [name: string]: string; }) => {\n const map = getIconMap();\n Object.keys(icons).forEach(name => map.set(name, icons[name]));\n}\n\nexport const getIconMap = (): Map<string, string> => {\n if (typeof window === 'undefined') {\n return new Map();\n } else {\n if (!CACHED_MAP) {\n const win = window as any; // eslint-disable-line @typescript-eslint/no-explicit-any\n win.PdsIcons = win.PdsIcons || {};\n CACHED_MAP = win.PdsIcons.map = win.PdsIcons.map || new Map();\n }\n\n return CACHED_MAP;\n }\n}\n\nexport const getName = (\n iconName: string | undefined,\n icon: string | undefined\n ) => {\n\n if(!iconName && icon && !isSrc(icon)) {\n iconName = icon;\n }\n\n if (isStr(iconName)) {\n iconName = toLower(iconName);\n }\n\n if (!isStr(iconName) || iconName.trim() === '') {\n return null;\n }\n\n const invalidChars = iconName.replace(/[a-z]|-|\\d/gi,'');\n if (invalidChars != '') { return null; }\n\n return iconName;\n}\n\nconst getNamedUrl = (iconName: string) => {\n const url = getIconMap().get(iconName);\n if (url) {\n return url;\n }\n\n return getAssetPath(`svg/${iconName}.svg`);\n};\n\nexport const getSrc = (src: string | undefined) => {\n if (isStr(src)) {\n src = src.trim();\n\n if (isSrc(src)) {\n return src;\n }\n }\n\n return null;\n}\n\nexport const getUrl = (pdsIcon: PdsIcon) => {\n let url = getSrc(pdsIcon.src);\n if (url) {\n return url;\n }\n\n url = getName(pdsIcon.name, pdsIcon.icon);\n if (url) {\n return getNamedUrl(url);\n }\n\n if (pdsIcon.icon) {\n url = getSrc(pdsIcon.icon);\n\n if(url) {\n return url;\n }\n }\n\n return null;\n};\n\n\nexport const isSrc = (str: string) => str.length > 0 && /(\\/|\\.)/.test(str);\nexport const isStr = (val: any): val is string => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any\nexport const toLower = (val: string) => val.toLowerCase();\n\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\n export const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {\n const attributeObject: { [k: string]: any } = {}; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n}\n"],"version":3}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{a as addIcons}from"./p-
|
|
1
|
+
export{a as addIcons}from"./p-7ef171e4.js";import"./p-19d7058a.js";
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{g as n}from"./p-19d7058a.js";let t;const r=n=>{const t=s();Object.keys(n).forEach((r=>t.set(r,n[r])))};const s=()=>{if(typeof window==="undefined"){return new Map}else{if(!t){const n=window;n.PdsIcons=n.PdsIcons||{};t=n.PdsIcons.map=n.PdsIcons.map||new Map}return t}};const e=(n,t)=>{if(!n&&t&&!f(t)){n=t}if(c(n)){n=l(n)}if(!c(n)||n.trim()===""){return null}const r=n.replace(/[a-z]|-|\d/gi,"");if(r!=""){return null}return n};const o=t=>{const r=s().get(t);if(r){return r}return n(`svg/${t}.svg`)};const i=n=>{if(c(n)){n=n.trim();if(f(n)){return n}}return null};const u=n=>{let t=i(n.src);if(t){return t}t=e(n.name,n.icon);if(t){return o(t)}if(n.icon){t=i(n.icon);if(t){return t}}return null};const f=n=>n.length>0&&/(\/|\.)/.test(n);const c=n=>typeof n==="string";const l=n=>n.toLowerCase();const a=(n,t=[])=>{const r={};t.forEach((t=>{if(n.hasAttribute(t)){const s=n.getAttribute(t);if(s!==null){r[t]=n.getAttribute(t)}n.removeAttribute(t)}}));return r};export{r as a,a as b,e as c,u as g,c as i};
|
|
2
|
+
//# sourceMappingURL=p-7ef171e4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CACHED_MAP","addIcons","icons","map","getIconMap","Object","keys","forEach","name","set","window","Map","win","PdsIcons","getName","iconName","icon","isSrc","isStr","toLower","trim","invalidChars","replace","getNamedUrl","url","get","getAssetPath","getSrc","src","getUrl","pdsIcon","str","length","test","val","toLowerCase","inheritAttributes","el","attributes","attributeObject","attr","hasAttribute","value","getAttribute","removeAttribute"],"sources":["src/components/pds-icon/utils.ts"],"sourcesContent":["import { getAssetPath } from '@stencil/core';\nimport { PdsIcon } from './pds-icon';\n\nlet CACHED_MAP: Map<string, string>;\n\nexport const addIcons = (icons: { [name: string]: string; }) => {\n const map = getIconMap();\n Object.keys(icons).forEach(name => map.set(name, icons[name]));\n}\n\nexport const getIconMap = (): Map<string, string> => {\n if (typeof window === 'undefined') {\n return new Map();\n } else {\n if (!CACHED_MAP) {\n const win = window as any; // eslint-disable-line @typescript-eslint/no-explicit-any\n win.PdsIcons = win.PdsIcons || {};\n CACHED_MAP = win.PdsIcons.map = win.PdsIcons.map || new Map();\n }\n\n return CACHED_MAP;\n }\n}\n\nexport const getName = (\n iconName: string | undefined,\n icon: string | undefined\n ) => {\n\n if(!iconName && icon && !isSrc(icon)) {\n iconName = icon;\n }\n\n if (isStr(iconName)) {\n iconName = toLower(iconName);\n }\n\n if (!isStr(iconName) || iconName.trim() === '') {\n return null;\n }\n\n const invalidChars = iconName.replace(/[a-z]|-|\\d/gi,'');\n if (invalidChars != '') { return null; }\n\n return iconName;\n}\n\nconst getNamedUrl = (iconName: string) => {\n const url = getIconMap().get(iconName);\n if (url) {\n return url;\n }\n\n return getAssetPath(`svg/${iconName}.svg`);\n};\n\nexport const getSrc = (src: string | undefined) => {\n if (isStr(src)) {\n src = src.trim();\n\n if (isSrc(src)) {\n return src;\n }\n }\n\n return null;\n}\n\nexport const getUrl = (pdsIcon: PdsIcon) => {\n let url = getSrc(pdsIcon.src);\n if (url) {\n return url;\n }\n\n url = getName(pdsIcon.name, pdsIcon.icon);\n if (url) {\n return getNamedUrl(url);\n }\n\n if (pdsIcon.icon) {\n url = getSrc(pdsIcon.icon);\n\n if(url) {\n return url;\n }\n }\n\n return null;\n};\n\n\nexport const isSrc = (str: string) => str.length > 0 && /(\\/|\\.)/.test(str);\nexport const isStr = (val: any): val is string => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any\nexport const toLower = (val: string) => val.toLowerCase();\n\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\n export const inheritAttributes = (el: HTMLElement, attributes: string[] = []) => {\n const attributeObject: { [k: string]: any } = {}; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n attributes.forEach(attr => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n\n return attributeObject;\n}\n"],"mappings":"oCAGA,IAAIA,E,MAESC,EAAYC,IACvB,MAAMC,EAAMC,IACZC,OAAOC,KAAKJ,GAAOK,SAAQC,GAAQL,EAAIM,IAAID,EAAMN,EAAMM,KAAO,EAGzD,MAAMJ,EAAa,KACxB,UAAWM,SAAW,YAAa,CACjC,OAAO,IAAIC,G,KACL,CACN,IAAKX,EAAY,CACf,MAAMY,EAAMF,OACZE,EAAIC,SAAWD,EAAIC,UAAY,GAC/Bb,EAAaY,EAAIC,SAASV,IAAMS,EAAIC,SAASV,KAAO,IAAIQ,G,CAG1D,OAAOX,C,SAIEc,EAAU,CACrBC,EACAC,KAGA,IAAID,GAAY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
|
+
import{r as t,h as i,H as s,a as e}from"./p-19d7058a.js";import{i as n,b as r,g as o,c}from"./p-7ef171e4.js";const l=t=>{const i=document.createElement("div");i.innerHTML=t;for(let t=i.childNodes.length-1;t>=0;t--){if(i.childNodes[t].nodeName.toLowerCase()!=="svg"){i.removeChild(i.childNodes[t])}}const s=i.firstElementChild;if(s&&s.nodeName.toLowerCase()==="svg"){const t=s.getAttribute("class")||"";s.setAttribute("class",(t+" s-pds-icon").trim());if(a(s)){return i.innerHTML}}return""};const a=t=>{if(t.nodeType===1){if(t.nodeName.toLowerCase()==="script"){return false}for(let i=0;i<t.attributes.length;i++){const s=t.attributes[i].name;if(n(s)&&s.toLowerCase().indexOf("on")===0){return false}}for(let i=0;i<t.childNodes.length;i++){if(!a(t.childNodes[i])){return false}}}return true};const d=t=>t.startsWith("data:image/svg+xml");const h=t=>t.indexOf(";utf8,")!==-1;const f=new Map;const u=new Map;let p;const g=(t,i=false)=>{let s=u.get(t);if(!s){if(typeof fetch!="undefined"&&typeof document!=="undefined"){if(d(t)&&h(t)){if(!p){p=new DOMParser}const i=p.parseFromString(t,"text/html");const s=i.querySelector("svg");if(s){f.set(t,s.outerHTML)}return Promise.resolve()}else{s=fetch(t).then((s=>{if(s.ok){return s.text().then((s=>{if(s&&i!==false){s=l(s)}f.set(t,s||"")}))}f.set(t,"")}));u.set(t,s)}}else{f.set(t,"");return Promise.resolve()}}return s};const m=":host{contain:strict;display:inline-block;fill:currentColor;height:1em;width:1em}:host .pdsicon{fill:currentColor}.pds-icon-fill-none{fill:none}.icon-inner,.pds-icon,svg{display:block;height:100%;width:100%}";const w=class{constructor(i){t(this,i);this.inheritedAttributes={};this.hasAriaHidden=()=>{const{el:t}=this;return t.hasAttribute("aria-hidden")&&t.getAttribute("aria-hidden")==="true"};this.ariaLabel=undefined;this.isVisible=false;this.svgContent=undefined;this.color=undefined;this.icon=undefined;this.name=undefined;this.size="regular";this.src=undefined}iconSize(){const t={small:"12px",regular:"16px",medium:"20px",large:"24px"};if(t[this.size]){return t[this.size]}else{return this.size}}componentWillLoad(){this.inheritedAttributes=r(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",(()=>{this.isVisible=true;this.loadIcon()}))}disconnectedCallback(){if(this.io){this.io.disconnect();this.io=undefined}}loadIcon(){if(this.isVisible){const t=o(this);if(t){if(f.has(t)){this.svgContent=f.get(t)}else{g(t).then((()=>this.svgContent=f.get(t)))}}}const t=c(this.name,this.icon);if(t){this.ariaLabel=t.replace(/\-/g," ")}}render(){const{ariaLabel:t,inheritedAttributes:e}=this;const n={height:this.iconSize(),width:this.iconSize(),color:this.color};return i(s,Object.assign({"aria-label":t!==undefined&&!this.hasAriaHidden()?t:null,role:"img",style:n,class:Object.assign({},b(this.color))},e),this.svgContent?i("div",{class:"icon-inner",innerHTML:this.svgContent}):i("div",{class:"icon-inner"}))}waitUntilVisible(t,i,s){if(typeof window!=="undefined"&&window.IntersectionObserver){const e=this.io=new window.IntersectionObserver((t=>{if(t[0].isIntersecting){e.disconnect();this.io=undefined;s()}}),{rootMargin:i});e.observe(t)}else{s()}}static get assetsDirs(){return["svg"]}get el(){return e(this)}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}}};const b=t=>t?{"pds-color":true,[`pds-color-${t}`]:true}:null;w.style=m;export{w as pds_icon};
|
|
2
|
+
//# sourceMappingURL=p-c34805d3.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["validateContent","svgContent","div","document","createElement","innerHTML","i","childNodes","length","nodeName","toLowerCase","removeChild","svgElm","firstElementChild","svgClass","getAttribute","setAttribute","trim","isValid","elm","nodeType","attributes","name","isStr","indexOf","isSvgDataUrl","url","startsWith","isEncodedDataUrl","pdsIconContent","Map","requests","parser","getSvgContent","sanitize","req","get","fetch","DOMParser","doc","parseFromString","svg","querySelector","set","outerHTML","Promise","resolve","then","rsp","ok","text","pdsIconCss","PdsIcon","this","inheritedAttributes","hasAriaHidden","el","hasAttribute","iconSize","sizes","small","regular","medium","large","size","componentWillLoad","inheritAttributes","connectedCallback","waitUntilVisible","isVisible","loadIcon","disconnectedCallback","io","disconnect","undefined","getUrl","has","label","getName","icon","ariaLabel","replace","render","style","height","width","color","h","Host","Object","assign","role","class","createColorClasses","rootMargin","cb","window","IntersectionObserver","data","isIntersecting","observe"],"sources":["src/components/pds-icon/validate.ts","src/components/pds-icon/request.ts","src/components/pds-icon/pds-icon.scss?tag=pds-icon&encapsulation=shadow","src/components/pds-icon/pds-icon.tsx"],"sourcesContent":["import { isStr } from './utils';\n\nexport const validateContent = (svgContent: string) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-pds-icon').trim());\n\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm as HTMLElement)) {\n return div.innerHTML;\n }\n }\n return '';\n};\n\nexport const isValid = (elm: HTMLElement) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i] as HTMLElement)) {\n return false;\n }\n }\n }\n return true;\n};\n\nexport const isSvgDataUrl = (url: string) => url.startsWith('data:image/svg+xml');\nexport const isEncodedDataUrl = (url: string) => url.indexOf(';utf8,') !== -1;\n","import { isEncodedDataUrl, isSvgDataUrl, validateContent } from './validate';\n\nexport const pdsIconContent = new Map<string, string>();\nconst requests = new Map<string, Promise<any>>(); // eslint-disable-line @typescript-eslint/no-explicit-any\n\nlet parser: DOMParser;\n\nexport const getSvgContent = (url: string, sanitize = false) => {\n let req = requests.get(url);\n\n if(!req) {\n if (typeof fetch != 'undefined' && typeof document !== 'undefined') {\n if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\n // we don't have a request\n req = fetch(url).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n pdsIconContent.set(url, svgContent || '');\n });\n }\n pdsIconContent.set(url, '');\n });\n\n requests.set(url, req);\n }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n\n return req;\n}\n",":host {\n contain: strict;\n display: inline-block;\n fill: currentColor;\n height: 1em;\n width: 1em;\n\n .pdsicon {\n fill: currentColor;\n }\n}\n\n.pds-icon-fill-none {\n fill: none;\n}\n\n.icon-inner,\n.pds-icon,\nsvg {\n display: block;\n height: 100%;\n width: 100%;\n}\n","import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { getSvgContent, pdsIconContent } from './request';\nimport { getName, getUrl, inheritAttributes } from './utils';\n\n@Component({\n tag: 'pds-icon',\n assetsDirs: ['svg'],\n styleUrl: 'pds-icon.scss',\n shadow: true,\n})\nexport class PdsIcon {\n private io?: IntersectionObserver;\n private inheritedAttributes: { [k: string]: any } = {}; // eslint-disable-line @typescript-eslint/no-explicit-any\n\n @Element() el!: HTMLPdsIconElement;\n\n @State() private ariaLabel?: string;\n @State() private isVisible = false;\n @State() private svgContent?: string;\n\n /**\n *\n * The color of the icon\n *\n */\n @Prop() color?: string;\n\n /**\n * This a combination of both `name` and `src`. If a `src` url is detected\n * it will set the `src` property. Otherwise it assumes it's a built-in named\n * SVG and set the `name` property.\n */\n @Prop() icon?: any;\n\n /**\n * The name of the icon to use from\n * the built-in set.\n */\n @Prop({ reflect: true }) name?: string;\n\n /**\n * The size of the icon. This can be\n * 'small', 'regular', 'medium', large, or a\n * custom value (40px, 1rem, etc)\n *\n */\n @Prop({ reflect: true }) size?:\n | 'small' // 12px\n | 'regular' // 16px\n | 'medium' // 20px\n | 'large' // 24px\n | 'auto'\n | string = 'regular'\n\n /**\n *\n * Specifies the exact `src` of an SVG file to use.\n */\n @Prop() src?: string;\n\n private iconSize() {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const sizes: { [key: string]: any } = {\n small: '12px',\n regular: '16px',\n medium: '20px',\n large: '24px',\n }\n\n if (sizes[this.size]) {\n return sizes[this.size];\n } else {\n return this.size;\n }\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n }\n\n connectedCallback() {\n this.waitUntilVisible(this.el, '50px', () => {\n this.isVisible = true;\n this.loadIcon();\n })\n }\n\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n\n @Watch('name')\n @Watch('src')\n @Watch('icon')\n loadIcon() {\n if (Build.isBrowser && this.isVisible) {\n const url = getUrl(this);\n if (url) {\n if (pdsIconContent.has(url)) {\n this.svgContent = pdsIconContent.get(url);\n } else {\n getSvgContent(url).then(() => (this.svgContent = pdsIconContent.get(url)));\n }\n }\n }\n\n const label = getName(this.name, this.icon);\n\n if (label) {\n this.ariaLabel = label.replace(/\\-/g, ' ');\n }\n }\n\n render() {\n const { ariaLabel, inheritedAttributes } = this;\n\n const style = {\n height: this.iconSize(),\n width: this.iconSize(),\n color: this.color,\n }\n\n return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n role=\"img\"\n style={style}\n class={{\n ...createColorClasses(this.color),\n }}\n {...inheritedAttributes}\n >\n {Build.isBrowser && this.svgContent ? (\n <div class=\"icon-inner\" innerHTML={this.svgContent}></div>\n ) : (\n <div class=\"icon-inner\"></div>\n )}\n </Host>\n )\n }\n\n /*****\n * Private Methods\n ****/\n\n private waitUntilVisible(el: HTMLElement, rootMargin: string, cb: () => void) {\n if (Build.isBrowser && typeof window !== 'undefined' && (window).IntersectionObserver) {\n const io = (this.io = new (window).IntersectionObserver(\n (data: IntersectionObserverEntry[]) => {\n if (data[0].isIntersecting) {\n io.disconnect();\n this.io = undefined;\n cb();\n }\n },\n { rootMargin },\n ));\n\n io.observe(el);\n } else {\n // browser doesn't support IntersectionObserver\n // so just fallback to always show it\n cb();\n }\n }\n\n private hasAriaHidden = () => {\n const { el } = this;\n\n return el.hasAttribute('aria-hidden') && el.getAttribute('aria-hidden') === 'true';\n }\n}\n\nconst createColorClasses = (color: string | undefined) => {\n return color\n ? {\n 'pds-color': true,\n [`pds-color-${color}`]: true,\n }\n : null;\n };\n"],"mappings":"6GAEO,MAAMA,EAAmBC,IAC9B,MAAMC,EAAMC,SAASC,cAAc,OACnCF,EAAIG,UAAYJ,EAGhB,IAAK,IAAIK,EAAIJ,EAAIK,WAAWC,OAAS,EAAGF,GAAK,EAAGA,IAAK,CACnD,GAAIJ,EAAIK,WAAWD,GAAGG,SAASC,gBAAkB,MAAO,CACtDR,EAAIS,YAAYT,EAAIK,WAAWD,G,EAKnC,MAAMM,EAASV,EAAIW,kBACnB,GAAID,GAAUA,EAAOH,SAASC,gBAAkB,MAAO,CACrD,MAAMI,EAAWF,EAAOG,aAAa,UAAY,GACjDH,EAAOI,aAAa,SAAUF,EAAW,eAAeG,QAKxD,GAAIC,EAAQN,GAAwB,CAClC,OAAOV,EAAIG,S,EAGf,MAAO,EAAE,EAGJ,MAAMa,EAAWC,IACtB,GAAIA,EAAIC,WAAa,EAAG,CACtB,GAAID,EAAIV,SAASC,gBAAkB,SAAU,CAC3C,OAAO,K,CAGT,IAAK,IAAIJ,EAAI,EAAGA,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KAC3EW,KAAK,MACLR,MAAOA,EACPS,MAAKH,OAAAC,OAAA,GACAG,EAAmBxC,KAAKiC,SAEzBhC,GAEgBD,KAAKpD,WACvBsF,EAAA,OAAKK,MAAM,aAAavF,UAAWgD,KAAKpD,aAExCsF,EAAA,OAAKK,MAAM,e,CAUX,gBAAAxB,CAAiBZ,EAAiBsC,EAAoBC,GAC5D,UAA8BC,SAAW,aAAe,OAASC,qBAAsB,CACrF,MAAMzB,EAAMnB,KAAKmB,GAAK,IAAI,OAASyB,sBAChCC,IACC,GAAIA,EAAK,GAAGC,eAAgB,CAC1B3B,EAAGC,aACHpB,KAAKmB,GAAKE,UACVqB,G,IAGJ,CAAED,eAGJtB,EAAG4B,QAAQ5C,E,KACN,CAGLuC,G,qJAWN,MAAMF,EAAsBP,GACnBA,EACJ,CACE,YAAa,KACb,CAAC,aAAaA,KAAU,MAE1B,K"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o,b as n}from"./p-19d7058a.js";export{s as setNonce}from"./p-19d7058a.js";const a=()=>{const n=import.meta.url;const s={};if(n!==""){s.resourcesUrl=new URL(".",n).href}return o(s)};a().then((o=>n([["p-
|
|
1
|
+
import{p as o,b as n}from"./p-19d7058a.js";export{s as setNonce}from"./p-19d7058a.js";const a=()=>{const n=import.meta.url;const s={};if(n!==""){s.resourcesUrl=new URL(".",n).href}return o(s)};a().then((o=>n([["p-c34805d3",[[1,"pds-icon",{color:[1],icon:[8],name:[513],size:[513],src:[1],ariaLabel:[32],isVisible:[32],svgContent:[32]},null,{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"]}]]]],o)));
|
|
2
2
|
//# sourceMappingURL=pds-icons.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","color","icon","name","size","ariaLabel","isVisible","svgContent"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.8.1 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAajB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,ECnB/BH,IAAeQ,MAAKC,GAEXC,EAAc,8BAA8B,CAAAC,MAAS,IAAAC,KAAA,IAAAC,KAAA,MAAAC,KAAA,MAAAC,UAAA,KAAAC,UAAA,KAAAC,WAAA,
|
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","options","bootstrapLazy","color","icon","name","size","src","ariaLabel","isVisible","svgContent"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.8.1 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"mappings":"sFAKA,MAAMA,EAAe,KAajB,MAAMC,cAAyBC,IAC/B,MAAMC,EAAqE,GAC3E,GAAIF,IAAe,GAAI,CACnBE,EAAKC,aAAe,IAAIC,IAAI,IAAKJ,GAAYK,IACrD,CACI,OAAOC,EAAeJ,EAAK,ECnB/BH,IAAeQ,MAAKC,GAEXC,EAAc,8BAA8B,CAAAC,MAAS,IAAAC,KAAA,IAAAC,KAAA,MAAAC,KAAA,MAAAC,IAAA,IAAAC,UAAA,KAAAC,UAAA,KAAAC,WAAA,YAAAL,KAAA,aAAAE,IAAA,aAAAH,KAAA,kBAAAH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="m14.193 2.75 1.571-1.572c.315-.314.315-.733 0-.942-.314-.315-.733-.315-.942 0L12.727 2.33l-2.095 2.095-2.933 2.828c-1.886-1.467-4.609-1.257-6.285.419-1.885 1.885-1.885 5.027 0 6.913 1.886 1.885 5.028 1.885 6.913 0a4.817 4.817 0 0 0 .42-6.39l2.409-2.409 1.57 1.571c.315.315.734.315.943 0l2.095-2.095c.315-.314.315-.733 0-.942l-1.57-1.571ZM7.28 13.643a3.477 3.477 0 0 1-4.923 0 3.477 3.477 0 0 1 0-4.923 3.477 3.477 0 0 1 4.923 0 3.477 3.477 0 0 1 0 4.923Zm5.97-7.646-1.152-1.152 1.152-1.153 1.153 1.153-1.153 1.152Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="M8 4c.368 0 .667.298.667.667v2.666h2.666a.667.667 0 1 1 0 1.334H8.667v2.666a.667.667 0 1 1-1.334 0V8.667H4.667a.667.667 0 0 1 0-1.334h2.666V4.667C7.333 4.298 7.632 4 8 4Z"/><path fill-rule="evenodd" d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0ZM1.333 8a6.667 6.667 0 1 1 13.334 0A6.667 6.667 0 0 1 1.333 8Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="M0 .667C0 .298.298 0 .667 0h14c.368 0 .666.298.666.667v8a.667.667 0 1 1-1.333 0V1.333H1.333V14h7.334a.667.667 0 0 1 0 1.333h-8A.667.667 0 0 1 0 14.667v-14Z"/><path d="M11.805 6.862c.26.26.26.682 0 .943L8.47 11.138a.667.667 0 0 1-.871.062L5.396 9.547l-1.591 1.591a.667.667 0 0 1-.943-.943l2-2a.667.667 0 0 1 .871-.062l2.204 1.653 2.925-2.924c.26-.26.682-.26.943 0Z"/><path fill-rule="evenodd" d="M6 2.667a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-.667 2a.667.667 0 1 1 1.334 0 .667.667 0 0 1-1.334 0Z"/><path d="M13.333 10.667c.368 0 .667.298.667.666v1.334h1.333a.667.667 0 1 1 0 1.333H14v1.333a.667.667 0 0 1-1.333 0V14h-1.334a.667.667 0 0 1 0-1.333h1.334v-1.334c0-.368.298-.666.666-.666Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="M12.375 7.375h-3.75v-3.75C8.625 3.25 8.375 3 8 3s-.625.25-.625.625v3.75h-3.75C3.25 7.375 3 7.625 3 8s.25.625.625.625h3.75v3.75c0 .375.25.625.625.625s.625-.25.625-.625v-3.75h3.75c.375 0 .625-.25.625-.625s-.25-.625-.625-.625Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M8 2a.628.628 0 0 0-.628.628v4.744H2.628a.628.628 0 0 0 0 1.256h4.744v4.744a.628.628 0 1 0 1.256 0V8.628h4.744a.628.628 0 1 0 0-1.256H8.628V2.628A.628.628 0 0 0 8 2Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M5.714 2.287a.571.571 0 0 1 .549.414l.62 2.168a2.857 2.857 0 0 0 1.962 1.963l2.168.62a.571.571 0 0 1 0 1.098l-2.168.62a2.857 2.857 0 0 0-1.963 1.962l-.62 2.168a.571.571 0 0 1-1.098 0l-.62-2.168a2.857 2.857 0 0 0-1.962-1.963L.414 8.55a.571.571 0 0 1 0-1.099l2.168-.619a2.857 2.857 0 0 0 1.963-1.963l.62-2.168a.571.571 0 0 1 .549-.414ZM12.57 0a.571.571 0 0 1 .555.433l.197.79c.18.715.739 1.274 1.455 1.454l.789.197a.572.572 0 0 1 0 1.11l-.79.196a2.003 2.003 0 0 0-1.454 1.455l-.197.79a.572.572 0 0 1-1.11 0l-.196-.79a2 2 0 0 0-1.455-1.455l-.79-.197a.571.571 0 0 1 0-1.11l.79-.196a2 2 0 0 0 1.455-1.455l.197-.79a.571.571 0 0 1 .554-.432Zm-1.143 10.285a.571.571 0 0 1 .543.391l.3.901c.114.34.381.61.722.723l.902.3a.571.571 0 0 1 0 1.084l-.902.3c-.34.115-.608.382-.722.723l-.3.901a.571.571 0 0 1-1.084 0l-.301-.9a1.144 1.144 0 0 0-.722-.723l-.902-.301a.571.571 0 0 1 0-1.083l.902-.301c.34-.115.608-.381.722-.723l.3-.9a.57.57 0 0 1 .543-.392Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M12 4c-.1 0-.3-.1-.4-.1-.1-.1-.1-.2-.1-.4 0-.3-.1-.5-.3-.7-.2-.2-.4-.3-.7-.3-.1 0-.3-.1-.4-.1 0-.1-.1-.3-.1-.4 0-.1.1-.3.1-.4.1-.1.2-.1.4-.1.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7 0-.1.1-.3.1-.4.1 0 .3-.1.4-.1.1 0 .3.1.4.1.1.1.1.2.1.4 0 .3.1.5.3.7.2.2.4.3.7.3.1 0 .3.1.4.1 0 .1.1.3.1.4 0 .1-.1.3-.1.4-.1.1-.2.1-.4.1-.3 0-.5.1-.7.3-.2.2-.3.4-.3.7 0 .1-.1.3-.1.4-.1 0-.3.1-.4.1Zm-6.8.4c.1.1.2.1.3.1.1 0 .2 0 .3-.1.1-.1.1-.2.1-.3 0-.2.1-.4.2-.5.1-.1.3-.2.5-.2.1 0 .2 0 .3-.1.1-.1.1-.2.1-.3 0-.1 0-.2-.1-.3-.1 0-.2-.1-.3-.1-.2 0-.4-.1-.5-.2-.1-.1-.2-.3-.2-.5 0-.1 0-.2-.1-.3-.1-.1-.2-.1-.3-.1-.1 0-.2 0-.3.1 0 .1-.1.2-.1.3 0 .2-.1.4-.2.5-.1.1-.3.2-.5.2-.1 0-.2 0-.3.1-.1.1-.1.2-.1.3 0 .1 0 .2.1.3.1.1.2.1.3.1.2 0 .4.1.5.2.1.1.2.3.2.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 0-.5-.1-.6-.3-.2-.2-.3-.4-.3-.6 0-.1 0-.2-.1-.3-.1-.2-.2-.2-.4-.2s-.2 0-.3.1c-.1.1-.1.2-.1.3 0 .2-.1.5-.3.6-.2.2-.4.3-.6.3-.1 0-.2 0-.3.1-.1.1-.1.2-.1.3 0 .1 0 .2.1.3.1.1.2.1.3.1.2 0 .5.1.6.3.1.2.3.4.3.6 0 .2.1.3.1.4Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 1.333a.667.667 0 0 0 0 1.334h14.666a.667.667 0 1 0 0-1.334H.667Zm3.333 4a.667.667 0 0 0 0 1.334h8a.667.667 0 1 0 0-1.334H4ZM0 10c0-.368.298-.667.667-.667h14.666a.667.667 0 1 1 0 1.334H.667A.667.667 0 0 1 0 10Zm4 3.333a.667.667 0 0 0 0 1.334h8a.667.667 0 1 0 0-1.334H4Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 2a.667.667 0 0 0 0 1.333h14.666a.667.667 0 1 0 0-1.333H.667Zm0 4a.667.667 0 0 0 0 1.333h14.666a.667.667 0 1 0 0-1.333H.667ZM0 10.667C0 10.299.298 10 .667 10h14.666a.667.667 0 0 1 0 1.333H.667A.667.667 0 0 1 0 10.667ZM.667 14a.667.667 0 0 0 0 1.333h14.666a.667.667 0 1 0 0-1.333H.667Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 1.333a.667.667 0 0 0 0 1.334h14.666a.667.667 0 1 0 0-1.334H.667Zm0 4a.667.667 0 0 0 0 1.334h8a.667.667 0 0 0 0-1.334h-8ZM0 10c0-.368.298-.667.667-.667h14.666a.667.667 0 1 1 0 1.334H.667A.667.667 0 0 1 0 10Zm.667 3.333a.667.667 0 0 0 0 1.334h8a.667.667 0 1 0 0-1.334h-8Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M.667 2a.667.667 0 0 0 0 1.333h14.666a.667.667 0 1 0 0-1.333H.667Zm6.666 4a.667.667 0 0 0 0 1.333h8a.667.667 0 1 0 0-1.333h-8ZM0 10.667C0 10.299.298 10 .667 10h14.666a.667.667 0 0 1 0 1.333H.667A.667.667 0 0 1 0 10.667ZM7.333 14a.667.667 0 0 0 0 1.333h8a.667.667 0 1 0 0-1.333h-8Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M9.333 1.333H6.667A.667.667 0 0 0 6 2v12c0 .368.299.667.667.667h2.666A.667.667 0 0 0 10 14V2a.667.667 0 0 0-.667-.667Zm-6 7.334H.667A.667.667 0 0 0 0 9.333V14c0 .368.299.667.667.667h2.666A.667.667 0 0 0 4 14V9.333a.667.667 0 0 0-.667-.666Zm9.334-3.334h2.666c.368 0 .667.299.667.667v8a.667.667 0 0 1-.667.667h-2.666A.667.667 0 0 1 12 14V6c0-.368.299-.667.667-.667Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M6 2c0-.368.298-.667.667-.667h2.666c.369 0 .667.299.667.667v12a.667.667 0 0 1-.667.667H6.667A.667.667 0 0 1 6 14V2Zm1.333.667v10.666h1.334V2.667H7.333ZM0 9.333c0-.368.298-.666.667-.666h2.666c.369 0 .667.298.667.666V14a.667.667 0 0 1-.667.667H.667A.667.667 0 0 1 0 14V9.333ZM1.333 10v3.333h1.334V10H1.333ZM12 6c0-.368.299-.667.667-.667h2.666c.368 0 .667.299.667.667v8a.667.667 0 0 1-.667.667h-2.666A.667.667 0 0 1 12 14V6Zm1.333.667v6.666h1.334V6.667h-1.334Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M10.585 0c.2.8-.2 1.6-.6 2.2-.5.6-1.3 1-2.1 1-.1-.8.2-1.6.7-2.1.5-.6 1.3-1.1 2-1.1Zm-7.9 13.8c.7 1 1.6 2.2 3 2.2.435 0 .765-.105 1.066-.201.114-.037.224-.072.334-.099.3-.2.6-.3 1.1-.3.37 0 .63.11.862.207.082.034.16.067.238.093.056.019.115.04.178.064.278.104.634.236 1.122.236 1.3 0 2.2-1.1 3-2.3.5-.7.7-1 1-1.8l.3-.7-.7-.3c-.9-.3-1.5-1.1-1.6-2.1-.1-.9.4-1.8 1.2-2.3l.7-.4-.5-.6c-.8-1.1-2-1.7-3.2-1.7-.8 0-1.3.2-1.8.4a7.477 7.477 0 0 0-.327.091c-.209.062-.367.109-.573.109-.238 0-.475-.063-.762-.138L7.085 4.2c-.5-.2-1-.4-1.7-.4-1.3 0-2.7.8-3.5 2.1-1.3 2-.9 5.2.8 7.9Zm.3-7.1c.6-.9 1.5-1.5 2.4-1.5.5 0 .9.1 1.3.3.11.027.22.063.334.099.3.096.63.201 1.066.201.6 0 1-.1 1.2-.3.4-.2.8-.3 1.4-.3.6 0 1.2.3 1.7.7-.8.7-1.3 1.8-1.2 3 .1 1.3.8 2.4 1.8 3a4.215 4.215 0 0 0-.214.371c-.1.188-.208.391-.386.629a9.05 9.05 0 0 0-.14.195c-.366.518-1.063 1.505-1.76 1.505-.206 0-.318-.047-.464-.109-.068-.028-.142-.06-.236-.091-.4-.2-.9-.4-1.7-.4-.8 0-1.3.2-1.7.4-.2.1-.4.2-.7.2-.7 0-1.4-.8-1.9-1.6-1.6-2.4-1.6-5.1-.8-6.3Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.593 1.448a.312.312 0 0 0-.085.22V11.69h12.984V1.67a.312.312 0 0 0-.086-.221.177.177 0 0 0-.126-.06h-1.932c-.417 0-.754-.31-.754-.694 0-.383.337-.694.754-.694h1.932C15.293 0 16 .808 16 1.668v12.664c0 .86-.707 1.668-1.72 1.668H1.72A1.693 1.693 0 0 1 0 14.332V1.668C0 .808.707 0 1.72 0h1.932c.417 0 .754.31.754.694 0 .383-.337.694-.754.694H1.72a.177.177 0 0 0-.127.06Zm12.9 11.63H1.507v1.254c0 .097.038.173.085.22.047.047.092.06.127.06h12.56c.035 0 .08-.013.127-.06a.312.312 0 0 0 .085-.22v-1.254ZM5.796.694c0-.383.337-.694.754-.694h2.898c.417 0 .754.31.754.694v4.177h1.179c.29 0 .553.152.679.393a.65.65 0 0 1-.09.734L8.588 9.894a.78.78 0 0 1-.589.261.78.78 0 0 1-.589-.26L4.03 5.997a.65.65 0 0 1-.09-.734.762.762 0 0 1 .678-.393h1.179V.694Zm1.508.694v4.177c0 .383-.338.694-.754.694h-.365L8 8.349l1.814-2.09H9.45c-.416 0-.754-.311-.754-.694V1.388h-1.39Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M3.846.216A.735.735 0 0 1 4.366 0a.725.725 0 0 1 .512.213l3.636 3.636a.727.727 0 0 1-1.028 1.029L5.09 2.483v8.426h8.426l-2.395-2.395a.727.727 0 0 1 1.029-1.028l3.636 3.636a.725.725 0 0 1 0 1.029l-3.636 3.636a.727.727 0 0 1-1.029-1.029l2.395-2.394H4.364a.727.727 0 0 1-.728-.728V2.483L1.242 4.878A.727.727 0 1 1 .213 3.849L3.846.216Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="m2.867 10.467 4.666 4.666c.067.067.134.134.2.134.2.066.334.066.534 0 .066 0 .133-.067.2-.134l4.666-4.666a.644.644 0 0 0 0-.934.644.644 0 0 0-.933 0l-3.533 3.534V1.333c0-.4-.267-.666-.667-.666s-.667.266-.667.666v11.734L3.8 9.533a.605.605 0 0 0-.467-.2c-.2 0-.333.067-.466.2a.644.644 0 0 0 0 .934Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="M5.517 2.867.85 7.533c-.067.067-.133.134-.133.2a.736.736 0 0 0 0 .534c0 .066.066.133.133.2l4.667 4.666a.644.644 0 0 0 .933 0 .644.644 0 0 0 0-.933L2.917 8.667H14.65c.4 0 .667-.267.667-.667s-.267-.667-.667-.667H2.917L6.45 3.8a.605.605 0 0 0 .2-.467c0-.2-.067-.333-.2-.466a.644.644 0 0 0-.933 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="m10.475 13.125 4.667-4.667c.066-.066.133-.133.133-.2a.736.736 0 0 0 0-.533c0-.067-.067-.133-.133-.2l-4.667-4.667a.644.644 0 0 0-.933 0 .644.644 0 0 0 0 .934l3.533 3.533H1.342c-.4 0-.667.267-.667.667s.267.666.667.666h11.733l-3.533 3.534a.605.605 0 0 0-.2.466c0 .2.066.334.2.467a.644.644 0 0 0 .933 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path d="M13.133 5.517 8.467.85C8.4.783 8.333.717 8.267.717a.736.736 0 0 0-.534 0c-.066 0-.133.066-.2.133L2.867 5.517a.644.644 0 0 0 0 .933.644.644 0 0 0 .933 0l3.533-3.533V14.65c0 .4.267.667.667.667s.667-.267.667-.667V2.917L12.2 6.45c.133.133.267.2.467.2s.333-.067.466-.2a.645.645 0 0 0 0-.933Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M12.52 2.416a.667.667 0 1 0-1.04-.832l-7.535 9.418-2.14-2.14a.667.667 0 0 0-.943.943l2.667 2.666a.667.667 0 0 0 .992-.055l8-10Zm.813 2.25a.667.667 0 1 0 0 1.334h2a.667.667 0 0 0 0-1.333h-2Zm-3.333 4c0-.368.299-.666.667-.666h4.666a.667.667 0 0 1 0 1.333h-4.666A.667.667 0 0 1 10 8.667Zm-2 2.667a.667.667 0 0 0 0 1.334h7.333a.667.667 0 0 0 0-1.334H8Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M5.938 2.367A6 6 0 0 1 14 8v.667a1.333 1.333 0 0 1-2.667 0v-4H10v.666a3.333 3.333 0 1 0 .494 4.879 2.665 2.665 0 0 0 4.058.34c.5-.5.781-1.178.781-1.885V8a7.334 7.334 0 1 0-4.4 6.723l.611-.267-.533-1.222-.611.267A6 6 0 1 1 5.938 2.367ZM6 8a2 2 0 1 1 4 0 2 2 0 0 1-4 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M11.662 2.605c-.94-.94-2.384-.94-3.324 0l-5.2 5.2c-1.406 1.406-1.406 3.784 0 5.19 1.406 1.407 3.784 1.407 5.19 0l5.867-5.866a.667.667 0 1 1 .943.942l-5.867 5.867c-1.927 1.927-5.149 1.927-7.076 0-1.927-1.927-1.927-5.15 0-7.076l5.2-5.2a3.645 3.645 0 0 1 5.21 0 3.645 3.645 0 0 1 0 5.21l-.004.003-4.796 4.73-.002.002c-.909.906-2.408.947-3.287-.015-.896-.909-.933-2.399.024-3.275L8.529 4.33a.667.667 0 1 1 .942.942l-4 4a.665.665 0 0 1-.025.025c-.358.322-.395.945.025 1.366a.683.683 0 0 1 .025.025c.322.358.945.396 1.366-.025l.003-.003 4.799-4.732c.938-.94.937-2.383-.002-3.322Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M8 .667c.368 0 .667.298.667.666v14a.667.667 0 1 1-1.334 0v-14c0-.368.299-.666.667-.666Z"/><path fill-rule="evenodd" d="M3.333 6c.369 0 .667.298.667.667v4a2 2 0 0 0 2 2h2A.667.667 0 1 1 8 14H6a3.333 3.333 0 0 1-3.333-3.333v-4c0-.369.298-.667.666-.667Z"/><path fill-rule="evenodd" d="M12.667 4c.368 0 .666.298.666.667V8A3.333 3.333 0 0 1 10 11.333H8A.667.667 0 1 1 8 10h2a2 2 0 0 0 2-2V4.667c0-.369.299-.667.667-.667ZM7.529.862c.26-.26.682-.26.942 0l2 2a.667.667 0 0 1-.942.943L8 2.276 6.471 3.805a.667.667 0 0 1-.942-.943l2-2ZM2.862 6.195c.26-.26.682-.26.943 0l2 2a.667.667 0 1 1-.943.943L3.333 7.61 1.805 9.14a.667.667 0 0 1-.943-.944l2-2Z"/><path fill-rule="evenodd" d="M12.195 4.195c.26-.26.683-.26.943 0l2 2a.667.667 0 0 1-.943.943L12.667 5.61l-1.529 1.53a.667.667 0 1 1-.943-.944l2-2Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M1.333 8A6.667 6.667 0 0 1 12.22 2.838L2.84 12.22A6.64 6.64 0 0 1 1.332 8Zm.89 5.534a.667.667 0 0 0 .243.243A8 8 0 0 0 13.777 2.466a.668.668 0 0 0-.243-.243A8 8 0 0 0 2.223 13.534Zm10.94-9.753a6.667 6.667 0 0 1-9.381 9.381l9.38-9.38Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" class="pdsicon"><path fill-rule="evenodd" d="M15.602 4.41 8.348.435a.634.634 0 0 0-.596 0L.497 4.41c-.398.1-.497.397-.497.596v1.988a.68.68 0 0 0 .696.695h14.608c.298 0 .597-.298.597-.695V5.006c0-.199-.1-.497-.299-.596ZM1.292 6.298v-.894L7.95 1.826l6.659 3.578v.894H1.292Zm1.391 6.659V8.98a.68.68 0 0 0-.695-.695.68.68 0 0 0-.696.695v3.976a.68.68 0 0 0 .696.695.68.68 0 0 0 .695-.695ZM6.658 8.98v3.976a.68.68 0 0 1-.695.695.68.68 0 0 1-.696-.695V8.98a.68.68 0 0 1 .696-.695.68.68 0 0 1 .695.695Zm3.975 3.976V8.98a.68.68 0 0 0-.695-.695.68.68 0 0 0-.696.695v3.976a.68.68 0 0 0 .696.695.68.68 0 0 0 .695-.695ZM14.61 8.98v3.976a.68.68 0 0 1-.696.695.68.68 0 0 1-.696-.695V8.98a.68.68 0 0 1 .696-.695.68.68 0 0 1 .696.695ZM.696 14.248a.68.68 0 0 0-.696.696.68.68 0 0 0 .696.696h14.608a.68.68 0 0 0 .696-.696c0-.397-.398-.696-.795-.696H.695Zm7.95-9.937a.696.696 0 1 1-1.391 0 .696.696 0 0 1 1.39 0Z"/></svg>
|