@pine-ds/icons 3.3.0 → 3.3.1-rc.1

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.
Files changed (325) hide show
  1. package/components/index.d.ts +5 -0
  2. package/components/index.js +1 -1
  3. package/components/package.json +1 -1
  4. package/components/pds-icon.js +129 -16
  5. package/components/pds-icon.js.map +1 -1
  6. package/dist/cheatsheet.html +3 -3
  7. package/dist/cjs/index.cjs.js +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/pds-icon.cjs.entry.js +32 -14
  10. package/dist/cjs/pds-icon.cjs.entry.js.map +1 -1
  11. package/dist/cjs/pds-icons.cjs.js +1 -1
  12. package/dist/cjs/{utils-8c57ce6a.js → utils-66fa4942.js} +6 -2
  13. package/dist/cjs/utils-66fa4942.js.map +1 -0
  14. package/dist/collection/components/pds-icon/pds-icon.js +21 -0
  15. package/dist/collection/components/pds-icon/pds-icon.js.map +1 -1
  16. package/dist/collection/components/pds-icon/request.js +27 -13
  17. package/dist/collection/components/pds-icon/request.js.map +1 -1
  18. package/dist/collection/components/pds-icon/utils.js +5 -1
  19. package/dist/collection/components/pds-icon/utils.js.map +1 -1
  20. package/dist/collection/components/pds-icon/validate.js +3 -1
  21. package/dist/collection/components/pds-icon/validate.js.map +1 -1
  22. package/dist/docs.json +22 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/esm/loader.js +1 -1
  25. package/dist/esm/pds-icon.entry.js +32 -14
  26. package/dist/esm/pds-icon.entry.js.map +1 -1
  27. package/dist/esm/pds-icons.js +1 -1
  28. package/dist/esm/{utils-15462a67.js → utils-c7e6be67.js} +6 -2
  29. package/dist/esm/utils-c7e6be67.js.map +1 -0
  30. package/dist/pds-icons/index.esm.js +1 -1
  31. package/dist/pds-icons/p-7ef171e4.js +2 -0
  32. package/dist/pds-icons/p-7ef171e4.js.map +1 -0
  33. package/dist/pds-icons/p-c34805d3.entry.js +2 -0
  34. package/dist/pds-icons/p-c34805d3.entry.js.map +1 -0
  35. package/dist/pds-icons/pds-icons.esm.js +1 -1
  36. package/dist/pds-icons/pds-icons.esm.js.map +1 -1
  37. package/dist/pds-icons/svg/access-key.svg +1 -0
  38. package/dist/pds-icons/svg/add-circle.svg +1 -0
  39. package/dist/pds-icons/svg/add-image.svg +1 -0
  40. package/dist/pds-icons/svg/add-small.svg +1 -0
  41. package/dist/pds-icons/svg/add.svg +1 -0
  42. package/dist/pds-icons/svg/ai-sparkle.svg +1 -0
  43. package/dist/pds-icons/svg/ai-writer-filled.svg +1 -0
  44. package/dist/pds-icons/svg/ai-writer.svg +1 -0
  45. package/dist/pds-icons/svg/align-center.svg +1 -0
  46. package/dist/pds-icons/svg/align-justify.svg +1 -0
  47. package/dist/pds-icons/svg/align-left.svg +1 -0
  48. package/dist/pds-icons/svg/align-right.svg +1 -0
  49. package/dist/pds-icons/svg/analytics-filled.svg +1 -0
  50. package/dist/pds-icons/svg/analytics-outline.svg +1 -0
  51. package/dist/pds-icons/svg/app-store.svg +1 -0
  52. package/dist/pds-icons/svg/archive.svg +1 -0
  53. package/dist/pds-icons/svg/arrow-corner.svg +1 -0
  54. package/dist/pds-icons/svg/arrow-down.svg +1 -0
  55. package/dist/pds-icons/svg/arrow-left.svg +1 -0
  56. package/dist/pds-icons/svg/arrow-right.svg +1 -0
  57. package/dist/pds-icons/svg/arrow-up.svg +1 -0
  58. package/dist/pds-icons/svg/assessment.svg +1 -0
  59. package/dist/pds-icons/svg/at-sign.svg +1 -0
  60. package/dist/pds-icons/svg/attach.svg +1 -0
  61. package/dist/pds-icons/svg/automations.svg +1 -0
  62. package/dist/pds-icons/svg/ban.svg +1 -0
  63. package/dist/pds-icons/svg/bank.svg +1 -0
  64. package/dist/pds-icons/svg/bell.svg +1 -0
  65. package/dist/pds-icons/svg/blog-filled.svg +1 -0
  66. package/dist/pds-icons/svg/blog.svg +1 -0
  67. package/dist/pds-icons/svg/bold.svg +1 -0
  68. package/dist/pds-icons/svg/broadcast.svg +1 -0
  69. package/dist/pds-icons/svg/calendar-date.svg +1 -0
  70. package/dist/pds-icons/svg/calendar-schedule.svg +1 -0
  71. package/dist/pds-icons/svg/calendar-simple.svg +1 -0
  72. package/dist/pds-icons/svg/card-bw-amex.svg +1 -0
  73. package/dist/pds-icons/svg/card-bw-apple-card.svg +1 -0
  74. package/dist/pds-icons/svg/card-bw-diners-club.svg +1 -0
  75. package/dist/pds-icons/svg/card-bw-discover.svg +1 -0
  76. package/dist/pds-icons/svg/card-bw-gpay-card.svg +1 -0
  77. package/dist/pds-icons/svg/card-bw-mastercard.svg +1 -0
  78. package/dist/pds-icons/svg/card-bw-paypal.svg +1 -0
  79. package/dist/pds-icons/svg/card-bw-stripe.svg +1 -0
  80. package/dist/pds-icons/svg/card-bw-visa.svg +1 -0
  81. package/dist/pds-icons/svg/card-update.svg +1 -0
  82. package/dist/pds-icons/svg/caret-down.svg +1 -0
  83. package/dist/pds-icons/svg/caret-left.svg +1 -0
  84. package/dist/pds-icons/svg/caret-right.svg +1 -0
  85. package/dist/pds-icons/svg/caret-up.svg +1 -0
  86. package/dist/pds-icons/svg/cart-add.svg +1 -0
  87. package/dist/pds-icons/svg/cart.svg +1 -0
  88. package/dist/pds-icons/svg/certificate.svg +1 -0
  89. package/dist/pds-icons/svg/check-circle-filled.svg +1 -0
  90. package/dist/pds-icons/svg/check-circle.svg +1 -0
  91. package/dist/pds-icons/svg/check.svg +1 -0
  92. package/dist/pds-icons/svg/circle-1.svg +1 -0
  93. package/dist/pds-icons/svg/circle-2.svg +1 -0
  94. package/dist/pds-icons/svg/circle-3.svg +1 -0
  95. package/dist/pds-icons/svg/circle-4.svg +1 -0
  96. package/dist/pds-icons/svg/circle-5.svg +1 -0
  97. package/dist/pds-icons/svg/circle-6.svg +1 -0
  98. package/dist/pds-icons/svg/circle-7.svg +1 -0
  99. package/dist/pds-icons/svg/circle-8.svg +1 -0
  100. package/dist/pds-icons/svg/circle-9.svg +1 -0
  101. package/dist/pds-icons/svg/clock.svg +1 -0
  102. package/dist/pds-icons/svg/closed-captions.svg +1 -0
  103. package/dist/pds-icons/svg/cloud-upload.svg +1 -0
  104. package/dist/pds-icons/svg/code.svg +1 -0
  105. package/dist/pds-icons/svg/color.svg +1 -0
  106. package/dist/pds-icons/svg/columns.svg +1 -0
  107. package/dist/pds-icons/svg/comment.svg +1 -0
  108. package/dist/pds-icons/svg/connect.svg +1 -0
  109. package/dist/pds-icons/svg/contact.svg +1 -0
  110. package/dist/pds-icons/svg/contacts-filled.svg +1 -0
  111. package/dist/pds-icons/svg/contacts-outline.svg +1 -0
  112. package/dist/pds-icons/svg/conversation.svg +1 -0
  113. package/dist/pds-icons/svg/copy.svg +1 -0
  114. package/dist/pds-icons/svg/coupon.svg +1 -0
  115. package/dist/pds-icons/svg/course.svg +1 -0
  116. package/dist/pds-icons/svg/creator-studio-filled.svg +1 -0
  117. package/dist/pds-icons/svg/creator-studio.svg +1 -0
  118. package/dist/pds-icons/svg/credit-card.svg +1 -0
  119. package/dist/pds-icons/svg/custom-field.svg +1 -0
  120. package/dist/pds-icons/svg/customize.svg +1 -0
  121. package/dist/pds-icons/svg/danger-filled.svg +1 -0
  122. package/dist/pds-icons/svg/danger.svg +1 -0
  123. package/dist/pds-icons/svg/dashboard-filled.svg +1 -0
  124. package/dist/pds-icons/svg/dashboard-outline.svg +1 -0
  125. package/dist/pds-icons/svg/delete-circle.svg +1 -0
  126. package/dist/pds-icons/svg/delete-key.svg +1 -0
  127. package/dist/pds-icons/svg/delete-x.svg +1 -0
  128. package/dist/pds-icons/svg/dollar-sign.svg +1 -0
  129. package/dist/pds-icons/svg/dot-menu-horizontal.svg +1 -0
  130. package/dist/pds-icons/svg/down-small.svg +1 -0
  131. package/dist/pds-icons/svg/download.svg +1 -0
  132. package/dist/pds-icons/svg/downsell.svg +1 -0
  133. package/dist/pds-icons/svg/draft.svg +1 -0
  134. package/dist/pds-icons/svg/drop.svg +1 -0
  135. package/dist/pds-icons/svg/duplicate.svg +1 -0
  136. package/dist/pds-icons/svg/email-activity.svg +1 -0
  137. package/dist/pds-icons/svg/emoji.svg +1 -0
  138. package/dist/pds-icons/svg/enlarge-vertical.svg +1 -0
  139. package/dist/pds-icons/svg/enlarge.svg +1 -0
  140. package/dist/pds-icons/svg/expand.svg +1 -0
  141. package/dist/pds-icons/svg/facebook-2.svg +1 -0
  142. package/dist/pds-icons/svg/facebook.svg +1 -0
  143. package/dist/pds-icons/svg/favorite.svg +1 -0
  144. package/dist/pds-icons/svg/feedback.svg +1 -0
  145. package/dist/pds-icons/svg/file-money.svg +1 -0
  146. package/dist/pds-icons/svg/file.svg +1 -0
  147. package/dist/pds-icons/svg/filter.svg +1 -0
  148. package/dist/pds-icons/svg/flag.svg +1 -0
  149. package/dist/pds-icons/svg/flash-filled.svg +1 -0
  150. package/dist/pds-icons/svg/flash.svg +1 -0
  151. package/dist/pds-icons/svg/folder-group.svg +1 -0
  152. package/dist/pds-icons/svg/folder.svg +1 -0
  153. package/dist/pds-icons/svg/form-field.svg +1 -0
  154. package/dist/pds-icons/svg/form-filled.svg +1 -0
  155. package/dist/pds-icons/svg/form.svg +1 -0
  156. package/dist/pds-icons/svg/fullscreen.svg +1 -0
  157. package/dist/pds-icons/svg/funnel.svg +1 -0
  158. package/dist/pds-icons/svg/grant-offer.svg +1 -0
  159. package/dist/pds-icons/svg/handle-2-vertical.svg +1 -0
  160. package/dist/pds-icons/svg/handle-2.svg +1 -0
  161. package/dist/pds-icons/svg/handle.svg +1 -0
  162. package/dist/pds-icons/svg/hashtag.svg +1 -0
  163. package/dist/pds-icons/svg/hd-video.svg +1 -0
  164. package/dist/pds-icons/svg/heading-large.svg +1 -0
  165. package/dist/pds-icons/svg/heading-small.svg +1 -0
  166. package/dist/pds-icons/svg/headset.svg +1 -0
  167. package/dist/pds-icons/svg/help-filled.svg +1 -0
  168. package/dist/pds-icons/svg/help-outline.svg +1 -0
  169. package/dist/pds-icons/svg/home-alt.svg +1 -0
  170. package/dist/pds-icons/svg/horizontal-line.svg +1 -0
  171. package/dist/pds-icons/svg/image.svg +1 -0
  172. package/dist/pds-icons/svg/info-circle-filled.svg +1 -0
  173. package/dist/pds-icons/svg/info-circle.svg +1 -0
  174. package/dist/pds-icons/svg/instagram.svg +1 -0
  175. package/dist/pds-icons/svg/ios-battery.svg +1 -0
  176. package/dist/pds-icons/svg/ios-data.svg +1 -0
  177. package/dist/pds-icons/svg/ios-wifi.svg +1 -0
  178. package/dist/pds-icons/svg/italic.svg +1 -0
  179. package/dist/pds-icons/svg/kajabi-filled.svg +1 -0
  180. package/dist/pds-icons/svg/kajabi-outlined.svg +1 -0
  181. package/dist/pds-icons/svg/lab.svg +1 -0
  182. package/dist/pds-icons/svg/launch.svg +1 -0
  183. package/dist/pds-icons/svg/layout-grid.svg +1 -0
  184. package/dist/pds-icons/svg/layout-list.svg +1 -0
  185. package/dist/pds-icons/svg/left-small.svg +1 -0
  186. package/dist/pds-icons/svg/linkedin.svg +1 -0
  187. package/dist/pds-icons/svg/list-bullet.svg +1 -0
  188. package/dist/pds-icons/svg/list-numbers.svg +1 -0
  189. package/dist/pds-icons/svg/location.svg +1 -0
  190. package/dist/pds-icons/svg/lock-alt.svg +1 -0
  191. package/dist/pds-icons/svg/lock.svg +1 -0
  192. package/dist/pds-icons/svg/logo-afterpay.svg +1 -0
  193. package/dist/pds-icons/svg/loop.svg +1 -0
  194. package/dist/pds-icons/svg/mail-filled.svg +1 -0
  195. package/dist/pds-icons/svg/mail.svg +1 -0
  196. package/dist/pds-icons/svg/map.svg +1 -0
  197. package/dist/pds-icons/svg/mapped.svg +1 -0
  198. package/dist/pds-icons/svg/margin-left.svg +1 -0
  199. package/dist/pds-icons/svg/margin-right.svg +1 -0
  200. package/dist/pds-icons/svg/marker-filled.svg +1 -0
  201. package/dist/pds-icons/svg/marker.svg +1 -0
  202. package/dist/pds-icons/svg/marketing-filled.svg +1 -0
  203. package/dist/pds-icons/svg/marketing-outline.svg +1 -0
  204. package/dist/pds-icons/svg/menu-2.svg +1 -0
  205. package/dist/pds-icons/svg/menu-alt.svg +1 -0
  206. package/dist/pds-icons/svg/menu.svg +1 -0
  207. package/dist/pds-icons/svg/merge.svg +1 -0
  208. package/dist/pds-icons/svg/microphone-off.svg +1 -0
  209. package/dist/pds-icons/svg/microphone.svg +1 -0
  210. package/dist/pds-icons/svg/move-left.svg +1 -0
  211. package/dist/pds-icons/svg/move-right.svg +1 -0
  212. package/dist/pds-icons/svg/multi-pay.svg +1 -0
  213. package/dist/pds-icons/svg/newsletter.svg +1 -0
  214. package/dist/pds-icons/svg/one-off-session.svg +1 -0
  215. package/dist/pds-icons/svg/one-time.svg +1 -0
  216. package/dist/pds-icons/svg/partners-filled.svg +1 -0
  217. package/dist/pds-icons/svg/partners-outline.svg +1 -0
  218. package/dist/pds-icons/svg/pause-circle.svg +1 -0
  219. package/dist/pds-icons/svg/pause.svg +1 -0
  220. package/dist/pds-icons/svg/payout.svg +1 -0
  221. package/dist/pds-icons/svg/pen.svg +1 -0
  222. package/dist/pds-icons/svg/phone-portrait.svg +1 -0
  223. package/dist/pds-icons/svg/phone-toolbar.svg +1 -0
  224. package/dist/pds-icons/svg/play-circle.svg +1 -0
  225. package/dist/pds-icons/svg/play-outline.svg +1 -0
  226. package/dist/pds-icons/svg/play-store.svg +1 -0
  227. package/dist/pds-icons/svg/play.svg +1 -0
  228. package/dist/pds-icons/svg/plug.svg +1 -0
  229. package/dist/pds-icons/svg/premium.svg +1 -0
  230. package/dist/pds-icons/svg/present.svg +1 -0
  231. package/dist/pds-icons/svg/preview-off.svg +1 -0
  232. package/dist/pds-icons/svg/preview-on.svg +1 -0
  233. package/dist/pds-icons/svg/products-filled.svg +1 -0
  234. package/dist/pds-icons/svg/products-outline.svg +1 -0
  235. package/dist/pds-icons/svg/question-circle.svg +1 -0
  236. package/dist/pds-icons/svg/quote.svg +1 -0
  237. package/dist/pds-icons/svg/redo.svg +1 -0
  238. package/dist/pds-icons/svg/refresh.svg +1 -0
  239. package/dist/pds-icons/svg/remove-circle.svg +1 -0
  240. package/dist/pds-icons/svg/remove.svg +1 -0
  241. package/dist/pds-icons/svg/rename.svg +1 -0
  242. package/dist/pds-icons/svg/reset-password.svg +1 -0
  243. package/dist/pds-icons/svg/restore.svg +1 -0
  244. package/dist/pds-icons/svg/right-small.svg +1 -0
  245. package/dist/pds-icons/svg/round-dollar.svg +1 -0
  246. package/dist/pds-icons/svg/rows.svg +1 -0
  247. package/dist/pds-icons/svg/sales-filled.svg +1 -0
  248. package/dist/pds-icons/svg/sales-outline.svg +1 -0
  249. package/dist/pds-icons/svg/scissor.svg +1 -0
  250. package/dist/pds-icons/svg/screen-share-off.svg +1 -0
  251. package/dist/pds-icons/svg/screen-share-on.svg +1 -0
  252. package/dist/pds-icons/svg/search-small.svg +1 -0
  253. package/dist/pds-icons/svg/search.svg +1 -0
  254. package/dist/pds-icons/svg/send-message.svg +1 -0
  255. package/dist/pds-icons/svg/sequences.svg +1 -0
  256. package/dist/pds-icons/svg/series.svg +1 -0
  257. package/dist/pds-icons/svg/settings-filled.svg +1 -0
  258. package/dist/pds-icons/svg/settings-outline.svg +1 -0
  259. package/dist/pds-icons/svg/share.svg +1 -0
  260. package/dist/pds-icons/svg/skipped.svg +1 -0
  261. package/dist/pds-icons/svg/slash-divider.svg +1 -0
  262. package/dist/pds-icons/svg/sparkle-filled.svg +1 -0
  263. package/dist/pds-icons/svg/sparkle.svg +1 -0
  264. package/dist/pds-icons/svg/speaker.svg +1 -0
  265. package/dist/pds-icons/svg/stack.svg +1 -0
  266. package/dist/pds-icons/svg/star.svg +1 -0
  267. package/dist/pds-icons/svg/stop.svg +1 -0
  268. package/dist/pds-icons/svg/stopwatch.svg +1 -0
  269. package/dist/pds-icons/svg/strikethrough.svg +1 -0
  270. package/dist/pds-icons/svg/subscript.svg +1 -0
  271. package/dist/pds-icons/svg/subscriptions.svg +1 -0
  272. package/dist/pds-icons/svg/super-admin.svg +1 -0
  273. package/dist/pds-icons/svg/superscript.svg +1 -0
  274. package/dist/pds-icons/svg/sync.svg +1 -0
  275. package/dist/pds-icons/svg/tablet-landscape.svg +1 -0
  276. package/dist/pds-icons/svg/tablet-portrait.svg +1 -0
  277. package/dist/pds-icons/svg/text-styles.svg +1 -0
  278. package/dist/pds-icons/svg/theme-store-filled.svg +1 -0
  279. package/dist/pds-icons/svg/theme-store.svg +1 -0
  280. package/dist/pds-icons/svg/thumbs-down-filled.svg +1 -0
  281. package/dist/pds-icons/svg/thumbs-down.svg +1 -0
  282. package/dist/pds-icons/svg/thumbs-up-filled.svg +1 -0
  283. package/dist/pds-icons/svg/thumbs-up.svg +1 -0
  284. package/dist/pds-icons/svg/tiktok.svg +1 -0
  285. package/dist/pds-icons/svg/trash.svg +1 -0
  286. package/dist/pds-icons/svg/twitter.svg +1 -0
  287. package/dist/pds-icons/svg/underline.svg +1 -0
  288. package/dist/pds-icons/svg/undo.svg +1 -0
  289. package/dist/pds-icons/svg/unlock.svg +1 -0
  290. package/dist/pds-icons/svg/unmapped.svg +1 -0
  291. package/dist/pds-icons/svg/up-small.svg +1 -0
  292. package/dist/pds-icons/svg/upload.svg +1 -0
  293. package/dist/pds-icons/svg/url.svg +1 -0
  294. package/dist/pds-icons/svg/user-filled.svg +1 -0
  295. package/dist/pds-icons/svg/user.svg +1 -0
  296. package/dist/pds-icons/svg/users-wm.svg +1 -0
  297. package/dist/pds-icons/svg/users.svg +1 -0
  298. package/dist/pds-icons/svg/video-off.svg +1 -0
  299. package/dist/pds-icons/svg/video-on.svg +1 -0
  300. package/dist/pds-icons/svg/warning-filled.svg +1 -0
  301. package/dist/pds-icons/svg/warning.svg +1 -0
  302. package/dist/pds-icons/svg/website-filled.svg +1 -0
  303. package/dist/pds-icons/svg/website-outline.svg +1 -0
  304. package/dist/pds-icons/svg/window-paragraph.svg +1 -0
  305. package/dist/pds-icons/svg/world.svg +1 -0
  306. package/dist/pds-icons/svg/wrench.svg +1 -0
  307. package/dist/pds-icons/svg/youtube.svg +1 -0
  308. package/dist/pds-icons.json +1 -1
  309. package/dist/pds-icons.symbols.svg +1 -1
  310. package/dist/types/components/pds-icon/pds-icon.d.ts +5 -0
  311. package/dist/types/components/pds-icon/validate.d.ts +2 -0
  312. package/dist/types/components.d.ts +8 -0
  313. package/icons/index.d.ts +1 -1
  314. package/icons/index.js +1 -1
  315. package/icons/index.mjs +1 -1
  316. package/icons/package.json +2 -2
  317. package/package.json +1 -1
  318. package/components/utils.js +0 -95
  319. package/components/utils.js.map +0 -1
  320. package/dist/cjs/utils-8c57ce6a.js.map +0 -1
  321. package/dist/esm/utils-15462a67.js.map +0 -1
  322. package/dist/pds-icons/p-229b8f4e.entry.js +0 -2
  323. package/dist/pds-icons/p-229b8f4e.entry.js.map +0 -1
  324. package/dist/pds-icons/p-f0b1dbd6.js +0 -2
  325. package/dist/pds-icons/p-f0b1dbd6.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"pds-icon.js","sourceRoot":"","sources":["../../../src/components/pds-icon/pds-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQ7D,MAAM,OAAO,OAAO;;QAEV,wBAAmB,GAAyB,EAAE,CAAC,CAAC,yDAAyD;QAsJzG,kBAAa,GAAG,GAAG,EAAE;YAC3B,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC;YAEpB,OAAO,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC;QACrF,CAAC,CAAA;;yBArJ4B,KAAK;;;;;oBAmCrB,SAAS;;I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C,CAAC,oBAAoB,CACrD,CAAC,IAAiC,EAAE,EAAE;gBACpC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE;oBAC1B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;iBACN;YACH,CAAC,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAChB;aAAM;YACL,+CAA+C;YAC/C,qCAAqC;YACrC,EAAE,EAAE,CAAC;SACN;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOF;AAED,MAAM,kBAAkB,GAAG,CAAC,KAAyB,EAAE,EAAE;IACvD,OAAO,KAAK;QACX,CAAC,CAAC;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,CAAC,EAAE,IAAI;SAC7B;QACH,CAAC,CAAC,IAAI,CAAC;AACT,CAAC,CAAC","sourcesContent":["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"]}
1
+ {"version":3,"file":"pds-icon.js","sourceRoot":"","sources":["../../../src/components/pds-icon/pds-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAQ7D,MAAM,OAAO,OAAO;;QAEV,wBAAmB,GAAyB,EAAE,CAAC,CAAC,yDAAyD;QA6JzG,kBAAa,GAAG,GAAG,EAAE;YAC3B,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC;YAEpB,OAAO,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,MAAM,CAAC;QACrF,CAAC,CAAA;;yBA5J4B,KAAK;;;;;oBAmCrB,SAAS;;;IAQd,QAAQ;QACd,8DAA8D;QAC9D,MAAM,KAAK,GAA2B;YACpC,KAAK,EAAE,MAAM;YACb,OAAO,EAA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C,cAAc,EAAE;oBAC1B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;iBACN;YACH,CAAC,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;SAChB;aAAM;YACL,+CAA+C;YAC/C,qCAAqC;YACrC,EAAE,EAAE,CAAC;SACN;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOF;AAED,MAAM,kBAAkB,GAAG,CAAC,KAAyB,EAAE,EAAE;IACvD,OAAO,KAAK;QACX,CAAC,CAAC;YACE,WAAW,EAAE,IAAI;YACjB,CAAC,aAAa,KAAK,EAAE,CAAC,EAAE,IAAI;SAC7B;QACH,CAAC,CAAC,IAAI,CAAC;AACT,CAAC,CAAC","sourcesContent":["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"]}
@@ -1,23 +1,37 @@
1
- import { validateContent } from "./validate";
1
+ import { isEncodedDataUrl, isSvgDataUrl, validateContent } from "./validate";
2
2
  export const pdsIconContent = new Map();
3
3
  const requests = new Map(); // eslint-disable-line @typescript-eslint/no-explicit-any
4
+ let parser;
4
5
  export const getSvgContent = (url, sanitize = false) => {
5
6
  let req = requests.get(url);
6
7
  if (!req) {
7
8
  if (typeof fetch != 'undefined' && typeof document !== 'undefined') {
8
- // we don't have a request
9
- req = fetch(url).then((rsp) => {
10
- if (rsp.ok) {
11
- return rsp.text().then((svgContent) => {
12
- if (svgContent && sanitize !== false) {
13
- svgContent = validateContent(svgContent);
14
- }
15
- pdsIconContent.set(url, svgContent || '');
16
- });
9
+ if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {
10
+ if (!parser) {
11
+ parser = new DOMParser();
17
12
  }
18
- pdsIconContent.set(url, '');
19
- });
20
- requests.set(url, req);
13
+ const doc = parser.parseFromString(url, 'text/html');
14
+ const svg = doc.querySelector('svg');
15
+ if (svg) {
16
+ pdsIconContent.set(url, svg.outerHTML);
17
+ }
18
+ return Promise.resolve();
19
+ }
20
+ else {
21
+ // we don't have a request
22
+ req = fetch(url).then((rsp) => {
23
+ if (rsp.ok) {
24
+ return rsp.text().then((svgContent) => {
25
+ if (svgContent && sanitize !== false) {
26
+ svgContent = validateContent(svgContent);
27
+ }
28
+ pdsIconContent.set(url, svgContent || '');
29
+ });
30
+ }
31
+ pdsIconContent.set(url, '');
32
+ });
33
+ requests.set(url, req);
34
+ }
21
35
  }
22
36
  else {
23
37
  pdsIconContent.set(url, '');
@@ -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;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;AACxD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAwB,CAAC,CAAC,yDAAyD;AAE3G,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,QAAQ,GAAG,KAAK,EAAE,EAAE;IAC7D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAE5B,IAAG,CAAC,GAAG,EAAE;QACP,IAAI,OAAO,KAAK,IAAI,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YAClE,0BAA0B;YAC1B,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC5B,IAAI,GAAG,CAAC,EAAE,EAAE;oBACV,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;wBACpC,IAAI,UAAU,IAAI,QAAQ,KAAK,KAAK,EAAE;4BACpC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;yBAC1C;wBACD,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC;oBAC5C,CAAC,CAAC,CAAC;iBACJ;gBACD,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC9B,CAAC,CAAC,CAAC;YAEH,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;SACxB;aAAM;YACL,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;SAC1B;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC,CAAA","sourcesContent":["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"]}
1
+ {"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/components/pds-icon/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7E,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAC;AACxD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAwB,CAAC,CAAC,yDAAyD;AAE3G,IAAI,MAAiB,CAAC;AAEtB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,QAAQ,GAAG,KAAK,EAAE,EAAE;IAC7D,IAAI,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAE5B,IAAG,CAAC,GAAG,EAAE;QACP,IAAI,OAAO,KAAK,IAAI,WAAW,IA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C;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"]}
@@ -50,7 +50,11 @@ export const getSrc = (src) => {
50
50
  return null;
51
51
  };
52
52
  export const getUrl = (pdsIcon) => {
53
- let url = getName(pdsIcon.name, pdsIcon.icon);
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,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GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;AAE1D;;;;;;;;;GASG;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAe,EAAE,aAAuB,EAAE,EAAE,EAAE;IAC/E,MAAM,eAAe,GAAyB,EAAE,CAAC,CAAC,yDAAyD;IAE3G,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;YACzB,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 = 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"]}
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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KAAK,GAAG,CAAC,GAAQ,EAAiB,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,yDAAyD;AACpI,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;AAE1D;;;;;;;;;GASG;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAe,EAAE,aAAuB,EAAE,EAAE,EAAE;IAC/E,MAAM,eAAe,GAAyB,EAAE,CAAC,CAAC,yDAAyD;IAE3G,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;YACzB,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-ion-icon').trim());
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-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"]}
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,C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U,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": "2023-12-14T11:05:02",
2
+ "timestamp": "2024-01-09T20:55:15",
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
@@ -1,4 +1,4 @@
1
- export { a as addIcons } from './utils-15462a67.js';
1
+ export { a as addIcons } from './utils-c7e6be67.js';
2
2
  import './index-d1a605fc.js';
3
3
 
4
4
  //# sourceMappingURL=index.js.map
@@ -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-15462a67.js';
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-ion-icon').trim());
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
- // we don't have a request
54
- req = fetch(url).then((rsp) => {
55
- if (rsp.ok) {
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
- pdsIconContent.set(url, '');
64
- });
65
- requests.set(url, req);
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,O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ACF;;;;;;;;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-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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,IAAiC;gBAChC,IAAI,IAAI,CAAC,CAAC,CAAC,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}
@@ -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 = getName(pdsIcon.name, pdsIcon.icon);
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-15462a67.js.map
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,UAAU,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,GAAG,IAAI,IAAI,GAAG,EAAE,CAAC;SAC/D;QAED,OAAO,UAAU,CAAC;KACnB;AACH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O,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,GAAG,EAAE;QACP,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;KACzB;IAED,IAAI,OAAO,CAAC,IAAI,EAAE;QAChB,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAE3B,IAAG,GAAG,EAAE;YACN,OAAO,GAAG,CAAC;SACZ;KACF;IAED,OAAO,IAAI,CAAC;AACd,EAAE;AAGK,MAAM,KAAK,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;MAC/D,KAAK,GAAG,CAAC,GAAQ,KAAoB,OAAO,GAAG,KAAK,SAAS;AACnE,MAAM,OAAO,GAAG,CAAC,GAAW,KAAK,GAAG,CAAC,WAAW,EAAE,CAAC;AAE1D;;;;;;;;;;MAUc,iBAAiB,GAAG,CAAC,EAAe,EAAE,aAAuB,EAAE;IAC3E,MAAM,eAAe,GAAyB,EAAE,CAAC;IAEjD,UAAU,CAAC,OAAO,CAAC,IAAI;QACrB,IAAI,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE;YACzB,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;KACF,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB;;;;","names":[],"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"],"version":3}
@@ -1,2 +1,2 @@
1
- export{a as addIcons}from"./p-f0b1dbd6.js";import"./p-19d7058a.js";
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,GAAYC,IAASC,EAAMD,GAAO,CACpCD,EAAWC,C,CAGb,GAAIE,EAAMH,GAAW,CACnBA,EAAWI,EAAQJ,E,CAGrB,IAAKG,EAAMH,IAAaA,EAASK,SAAW,GAAI,CAC9C,OAAO,I,CAGT,MAAMC,EAAeN,EAASO,QAAQ,eAAe,IACrD,GAAID,GAAgB,GAAI,CAAE,OAAO,I,CAEjC,OAAON,CAAQ,EAGjB,MAAMQ,EAAeR,IACnB,MAAMS,EAAMpB,IAAaqB,IAAIV,GAC7B,GAAIS,EAAK,CACP,OAAOA,C,CAGT,OAAOE,EAAa,OAAOX,QAAe,EAGrC,MAAMY,EAAUC,IACrB,GAAIV,EAAMU,GAAM,CACdA,EAAMA,EAAIR,OAEV,GAAIH,EAAMW,GAAM,CACd,OAAOA,C,EAIX,OAAO,IAAI,E,MAGAC,EAAUC,IACrB,IAAIN,EAAMG,EAAOG,EAAQF,KACzB,GAAIJ,EAAK,CACP,OAAOA,C,CAGTA,EAAMV,EAAQgB,EAAQtB,KAAMsB,EAAQd,MACpC,GAAIQ,EAAK,CACP,OAAOD,EAAYC,E,CAGrB,GAAIM,EAAQd,KAAM,CAChBQ,EAAMG,EAAOG,EAAQd,MAErB,GAAGQ,EAAK,CACN,OAAOA,C,EAIX,OAAO,IAAI,EAIN,MAAMP,EAASc,GAAgBA,EAAIC,OAAS,GAAK,UAAUC,KAAKF,G,MAC1Db,EAASgB,UAAmCA,IAAQ,SAC1D,MAAMf,EAAWe,GAAgBA,EAAIC,c,MAY9BC,EAAoB,CAACC,EAAiBC,EAAuB,MACzE,MAAMC,EAAwC,GAE9CD,EAAW/B,SAAQiC,IACjB,GAAIH,EAAGI,aAAaD,GAAO,CACzB,MAAME,EAAQL,EAAGM,aAAaH,GAC9B,GAAIE,IAAU,KAAM,CAClBH,EAAgBC,GAAQH,EAAGM,aAAaH,E,CAE1CH,EAAGO,gBAAgBJ,E,KAIvB,OAAOD,CAAe,S"}
@@ -0,0 +1,2 @@
1
+ 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,EAAIa,EAAIE,WAAWb,OAAQF,IAAK,CAC9C,MAAMgB,EAAOH,EAAIE,WAAWf,GAAGgB,KAC/B,GAAIC,EAAMD,IAASA,EAAKZ,cAAcc,QAAQ,QAAU,EAAG,CACzD,OAAO,K,EAIX,IAAK,IAAIlB,EAAI,EAAGA,EAAIa,EAAIZ,WAAWC,OAAQ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C,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-229b8f4e",[[1,"pds-icon",{color:[1],icon:[8],name:[513],size:[513],ariaLabel:[32],isVisible:[32],svgContent:[32]},null,{name:["loadIcon"],icon:["loadIcon"]}]]]],o)));
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,YAAAJ,KAAA,aAAAD,KAAA,kBAAAH"}
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-.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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>