@pine-ds/icons 9.1.0 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/LICENSE +17 -18
  2. package/dist/cheatsheet.html +9 -7
  3. package/dist/collection/components/pds-icon/assetPath.js.map +1 -1
  4. package/dist/collection/components/pds-icon/pds-icon.js.map +1 -1
  5. package/dist/collection/components/pds-icon/request.js.map +1 -1
  6. package/dist/collection/components/pds-icon/utils.js.map +1 -1
  7. package/dist/collection/components/pds-icon/validate.js.map +1 -1
  8. package/dist/collection/index.js.map +1 -1
  9. package/dist/docs.json +1 -1
  10. package/dist/pds-icons.json +16 -2
  11. package/dist/pds-icons.symbols.svg +3 -2
  12. package/dist/scripts/collection-copy.js +33 -0
  13. package/dist/scripts/collection-copy.js.map +1 -0
  14. package/dist/scripts/figma_icons/figma-icon-export.js +437 -0
  15. package/dist/scripts/figma_icons/figma-icon-export.js.map +1 -0
  16. package/dist/scripts/figma_icons/finalize-export.js +303 -0
  17. package/dist/scripts/figma_icons/finalize-export.js.map +1 -0
  18. package/dist/scripts/figma_icons/types.js +2 -0
  19. package/dist/scripts/figma_icons/types.js.map +1 -0
  20. package/dist/scripts/helpers.js +52 -0
  21. package/dist/scripts/helpers.js.map +1 -0
  22. package/dist/scripts/optimize-svgs.js +354 -0
  23. package/dist/scripts/optimize-svgs.js.map +1 -0
  24. package/dist/svg/link-broken.svg +1 -0
  25. package/dist/types/home/runner/work/pine-icons/pine-icons/.stencil/scripts/collection-copy.d.ts +1 -0
  26. package/dist/types/home/runner/work/pine-icons/pine-icons/.stencil/scripts/figma_icons/figma-icon-export.d.ts +1 -0
  27. package/dist/types/home/runner/work/pine-icons/pine-icons/.stencil/scripts/figma_icons/finalize-export.d.ts +1 -0
  28. package/dist/types/home/runner/work/pine-icons/pine-icons/.stencil/scripts/figma_icons/types.d.ts +117 -0
  29. package/dist/types/home/runner/work/pine-icons/pine-icons/.stencil/scripts/helpers.d.ts +62 -0
  30. package/dist/types/home/runner/work/pine-icons/pine-icons/.stencil/scripts/optimize-svgs.d.ts +7 -0
  31. package/icons/index.d.ts +3 -2
  32. package/icons/index.js +3 -2
  33. package/icons/index.mjs +3 -2
  34. package/icons/package.json +1 -1
  35. package/package.json +1 -1
  36. /package/dist/svg/{package.svg → packages.svg} +0 -0
package/LICENSE CHANGED
@@ -1,21 +1,20 @@
1
- MIT License
1
+ Copyright 2025
2
2
 
3
- Copyright (c) 2018
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
4
10
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
11
13
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -2,7 +2,7 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Pine icons Library - 9.0.0</title>
5
+ <title>Pine icons Library - 9.2.0</title>
6
6
  <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🌲</text></svg>"/>
7
7
 
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
@@ -173,11 +173,11 @@
173
173
  </head>
174
174
  <body>
175
175
  <div class="icon-count-container">
176
- <p class="icon-count">356 icons</p>
176
+ <p class="icon-count">357 icons</p>
177
177
  </div>
178
- <h1>Pine Icons - 9.0.0</h1>
178
+ <h1>Pine Icons - 9.2.0</h1>
179
179
  <div class="search-container">
180
- <label for="search" class="visually-hidden">Search all 356 icons</label>
180
+ <label for="search" class="visually-hidden">Search all 357 icons</label>
181
181
  <input type="text" id="search" class="search-input" placeholder="Search icons by name or tag..." oninput="filterIcons(this.value)">
182
182
  </div>
183
183
 
@@ -385,6 +385,7 @@
385
385
  <button class="icon-button" title="Copy layout-list code snippet" data-tags="checklist,dot points,dotpoints,list" data-icon-name="layout-list"><svg><use href="#layout-list" xlink:href="#layout-list"/></svg><span class="visually-hidden">Copy layout-list icon code</span></button>
386
386
  <button class="icon-button" title="Copy layout-top code snippet" data-tags="browser,flexbox,grid,layout,table,top,web" data-icon-name="layout-top"><svg><use href="#layout-top" xlink:href="#layout-top"/></svg><span class="visually-hidden">Copy layout-top icon code</span></button>
387
387
  <button class="icon-button" title="Copy left-small code snippet" data-tags="chevron,left" data-icon-name="left-small"><svg><use href="#left-small" xlink:href="#left-small"/></svg><span class="visually-hidden">Copy left-small icon code</span></button>
388
+ <button class="icon-button" title="Copy link-broken code snippet" data-tags="break,broken,chain,connection,hyperlink,link,unlink,website" data-icon-name="link-broken"><svg><use href="#link-broken" xlink:href="#link-broken"/></svg><span class="visually-hidden">Copy link-broken icon code</span></button>
388
389
  <button class="icon-button" title="Copy list-bullet code snippet" data-tags="checklist,dot points,dotpoints,list" data-icon-name="list-bullet"><svg><use href="#list-bullet" xlink:href="#list-bullet"/></svg><span class="visually-hidden">Copy list-bullet icon code</span></button>
389
390
  <button class="icon-button" title="Copy list-details code snippet" data-tags="columns,divider,grid,horizontal,table" data-icon-name="list-details"><svg><use href="#list-details" xlink:href="#list-details"/></svg><span class="visually-hidden">Copy list-details icon code</span></button>
390
391
  <button class="icon-button" title="Copy list-numbers code snippet" data-tags="checklist,dot points,dotpoints,list" data-icon-name="list-numbers"><svg><use href="#list-numbers" xlink:href="#list-numbers"/></svg><span class="visually-hidden">Copy list-numbers icon code</span></button>
@@ -434,7 +435,7 @@
434
435
  <button class="icon-button" title="Copy newsletter-2 code snippet" data-tags="attachment,favorite,favourite,file,heart,paper,pdf,report,text" data-icon-name="newsletter-2"><svg><use href="#newsletter-2" xlink:href="#newsletter-2"/></svg><span class="visually-hidden">Copy newsletter-2 icon code</span></button>
435
436
  <button class="icon-button" title="Copy one-off-session code snippet" data-tags="chat,live chat,message" data-icon-name="one-off-session"><svg><use href="#one-off-session" xlink:href="#one-off-session"/></svg><span class="visually-hidden">Copy one-off-session icon code</span></button>
436
437
  <button class="icon-button" title="Copy one-time code snippet" data-tags="banknotes,business,cash,dollar,finance,money,payment" data-icon-name="one-time"><svg><use href="#one-time" xlink:href="#one-time"/></svg><span class="visually-hidden">Copy one-time icon code</span></button>
437
- <button class="icon-button" title="Copy package code snippet" data-tags="backup,clone,copies,copy,document,duplicate,file,files,group,layer,layers,note,paper,paste,report,separate,split,ungroup" data-icon-name="package"><svg><use href="#package" xlink:href="#package"/></svg><span class="visually-hidden">Copy package icon code</span></button>
438
+ <button class="icon-button" title="Copy packages code snippet" data-tags="backup,clone,copies,copy,document,duplicate,file,files,group,layer,layers,note,paper,paste,report,separate,split,ungroup" data-icon-name="packages"><svg><use href="#packages" xlink:href="#packages"/></svg><span class="visually-hidden">Copy packages icon code</span></button>
438
439
  <button class="icon-button" title="Copy pause code snippet" data-tags="audio,pause,square" data-icon-name="pause"><svg><use href="#pause" xlink:href="#pause"/></svg><span class="visually-hidden">Copy pause icon code</span></button>
439
440
  <button class="icon-button" title="Copy pause-circle code snippet" data-tags="audio,circle,pause" data-icon-name="pause-circle"><svg><use href="#pause-circle" xlink:href="#pause-circle"/></svg><span class="visually-hidden">Copy pause-circle icon code</span></button>
440
441
  <button class="icon-button" title="Copy payout code snippet" data-tags="coins,currency,give,hand,money" data-icon-name="payout"><svg><use href="#payout" xlink:href="#payout"/></svg><span class="visually-hidden">Copy payout icon code</span></button>
@@ -541,7 +542,7 @@
541
542
  <button class="icon-button" title="Copy window-paragraph code snippet" data-tags="browser,flexbox,grid,layout,table,web" data-icon-name="window-paragraph"><svg><use href="#window-paragraph" xlink:href="#window-paragraph"/></svg><span class="visually-hidden">Copy window-paragraph icon code</span></button>
542
543
  <button class="icon-button" title="Copy world code snippet" data-tags="earth,globe,map,travel" data-icon-name="world"><svg><use href="#world" xlink:href="#world"/></svg><span class="visually-hidden">Copy world icon code</span></button>
543
544
  <button class="icon-button" title="Copy wrench code snippet" data-tags="preferences,settings,spanner,tool,tools" data-icon-name="wrench"><svg><use href="#wrench" xlink:href="#wrench"/></svg><span class="visually-hidden">Copy wrench icon code</span></button>
544
- <svg data-pdsicons="9.0.0" style="display:none">
545
+ <svg data-pdsicons="9.2.0" style="display:none">
545
546
  <style>
546
547
  .pdsicon {
547
548
  fill: currentColor;
@@ -753,6 +754,7 @@
753
754
  <symbol id="layout-list" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M2 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m-6 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m-6 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1"/></symbol>
754
755
  <symbol id="layout-top" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M7.759 2h8.482c.805 0 1.47 0 2.01.044.563.046 1.08.145 1.565.392a4 4 0 0 1 1.748 1.748c.247.485.346 1.002.392 1.564C22 6.29 22 6.954 22 7.758v8.483c0 .805 0 1.47-.044 2.01-.046.563-.145 1.08-.392 1.565a4 4 0 0 1-1.748 1.748c-.485.247-1.002.346-1.564.392-.541.044-1.206.044-2.01.044H7.758c-.805 0-1.47 0-2.01-.044-.563-.046-1.08-.145-1.565-.392a4 4 0 0 1-1.748-1.748c-.247-.485-.346-1.002-.392-1.564C2 17.71 2 17.046 2 16.242V7.758c0-.805 0-1.47.044-2.01.046-.563.145-1.08.392-1.565a4 4 0 0 1 1.748-1.748c.485-.247 1.002-.346 1.564-.392C6.29 2 6.954 2 7.758 2M4 10v6.2c0 .857 0 1.439.038 1.889.035.438.1.663.18.819a2 2 0 0 0 .874.874c.156.08.38.145.819.18C6.361 20 6.943 20 7.8 20h8.4c.857 0 1.439 0 1.889-.038.438-.035.663-.1.819-.18a2 2 0 0 0 .874-.874c.08-.156.145-.38.18-.819.037-.45.038-1.032.038-1.889V10zm16-2H4v-.2c0-.857 0-1.439.038-1.889.035-.438.1-.663.18-.819a2 2 0 0 1 .874-.874c.156-.08.38-.145.819-.18C6.361 4 6.943 4 7.8 4h8.4c.857 0 1.439 0 1.889.038.438.035.663.1.819.18a2 2 0 0 1 .874.874c.08.156.145.38.18.819C20 6.361 20 6.943 20 7.8z"/></symbol>
755
756
  <symbol id="left-small" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M15.707 5.293a1 1 0 0 1 0 1.414L10.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414l-6-6a1 1 0 0 1 0-1.414l6-6a1 1 0 0 1 1.414 0"/></symbol>
757
+ <symbol id="link-broken" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M9 1a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0V2a1 1 0 0 1 1-1m4.414 2.515a5 5 0 0 1 7.071 7.07l-2.121 2.122a1 1 0 0 1-1.414-1.414l2.121-2.121a3 3 0 0 0-4.243-4.243l-2.12 2.121a1 1 0 1 1-1.415-1.414zM2.793 2.793a1 1 0 0 1 1.414 0l1.414 1.414a1 1 0 0 1-1.414 1.414L2.793 4.207a1 1 0 0 1 0-1.414M1 9a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H2a1 1 0 0 1-1-1m6.05 2.293a1 1 0 0 1 0 1.414L4.93 14.828a3 3 0 0 0 4.243 4.243l2.12-2.121a1 1 0 0 1 1.415 1.414l-2.121 2.121a5 5 0 0 1-7.071-7.07l2.121-2.122a1 1 0 0 1 1.414 0M19 15a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2h-2a1 1 0 0 1-1-1m-.621 3.379a1 1 0 0 1 1.414 0l1.414 1.414a1 1 0 0 1-1.414 1.414l-1.414-1.414a1 1 0 0 1 0-1.414M15 19a1 1 0 0 1 1 1v2a1 1 0 1 1-2 0v-2a1 1 0 0 1 1-1"/></symbol>
756
758
  <symbol id="list-bullet" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M2 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m-6 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m-6 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1"/></symbol>
757
759
  <symbol id="list-details" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M6.161 2H17.84c.527 0 .982 0 1.356.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356v.678c0 .527 0 .981-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.357.031H6.162c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167C2 7.82 2 7.365 2 6.839V6.16c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C5.18 2 5.635 2 6.161 2M4.968 4.024c-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C4 5.25 4 5.623 4 6.2v.6c0 .577 0 .949.024 1.232.022.272.06.373.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C5.25 9 5.623 9 6.2 9h11.6c.577 0 .949 0 1.232-.024.272-.022.372-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C20 7.75 20 7.377 20 6.8v-.6c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C18.75 4 18.377 4 17.8 4H6.2c-.577 0-.949 0-1.232.024M6.16 13h11.677c.528 0 .982 0 1.357.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356v.678c0 .527 0 .982-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.356.031H6.16c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167A18 18 0 0 1 2 17.838v-.677c0-.527 0-.982.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C5.18 13 5.635 13 6.161 13m-1.193 2.024c-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C4 16.25 4 16.623 4 17.2v.6c0 .577 0 .949.024 1.232.022.272.06.372.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C5.25 20 5.623 20 6.2 20h11.6c.577 0 .949 0 1.232-.024.272-.022.372-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C20 18.75 20 18.377 20 17.8v-.6c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C18.75 15 18.377 15 17.8 15H6.2c-.577 0-.949 0-1.232.024"/></symbol>
758
760
  <symbol id="list-numbers" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M8 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m0 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m0 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1M2.878 7.386v.528h2.347v-.528l-.549-.047c-.1-.007-.106-.027-.106-.134V4.064H2.965l-.073.548.581.12c.067.02.087.06.087.14v2.333c0 .1-.013.127-.107.134zm-.347 6.57v-.622l.896-.875.059-.057c.633-.614.903-.877.903-1.246 0-.248-.12-.428-.474-.428-.368 0-.522.12-.522.595l-.909-.08c.007-1.063.816-1.237 1.517-1.237 1.036 0 1.404.44 1.404 1.07 0 .626-.432 1.04-.918 1.505l-.004.005-.756.722h.983c.067 0 .094-.014.107-.08l.093-.528h.709v1.256zm3.138 4.999c0-.602-.314-.942-.882-1.03V17.9c.42-.127.768-.481.768-1.043 0-.715-.394-1.11-1.423-1.11-.702 0-1.497.181-1.497 1.237l.915.08c0-.474.174-.594.535-.594.374 0 .488.206.488.46 0 .428-.26.662-.742.722l-.328.04v.669c.201-.034.328-.047.495-.047.414 0 .669.167.669.575 0 .468-.321.601-.696.601-.468 0-.748-.193-1.002-.44l-.535.588c.341.374.942.614 1.617.614.956 0 1.618-.414 1.618-1.296"/></symbol>
@@ -802,7 +804,7 @@
802
804
  <symbol id="newsletter-2" viewBox="0 0 24 24" class="pdsicon"><path d="M12 23H8.8c-1.84 0-2.76 0-3.62-.44a4 4 0 0 1-1.74-1.74C3 20 3 19 3 17.2V6.8C3 5 3 4 3.44 3.18a4 4 0 0 1 1.74-1.74C6.04 1 6.96 1 8.8 1h6.4c1.84 0 2.76 0 3.62.44a4 4 0 0 1 1.74 1.74C21 4 21 5 21 6.8V10a1 1 0 0 1-2 0V6.8a7.6 7.6 0 0 0-.22-2.71 1.93 1.93 0 0 0-.87-.87A7.6 7.6 0 0 0 15.2 3H8.8a7.6 7.6 0 0 0-2.71.22 1.93 1.93 0 0 0-.87.87A7.6 7.6 0 0 0 5 6.8v10.4a7.6 7.6 0 0 0 .22 2.71c.187.377.493.683.87.87A7.6 7.6 0 0 0 8.8 21H12a1 1 0 0 1 0 2m5-1a1 1 0 0 1-.65-.24 41 41 0 0 1-3.63-3.42 3.29 3.29 0 0 1 .5-4.6 3.17 3.17 0 0 1 3.78-.22 3.21 3.21 0 0 1 3.76.21 3.26 3.26 0 0 1 .51 4.61 38.5 38.5 0 0 1-3.63 3.42A1 1 0 0 1 17 22m-1.76-7a1.13 1.13 0 0 0-.74.28 1.26 1.26 0 0 0-.21 1.81q1.272 1.381 2.71 2.59a32 32 0 0 0 2.71-2.59 1.25 1.25 0 0 0-.21-1.8 1.23 1.23 0 0 0-1.75.2 1 1 0 0 1-1.5 0 1.4 1.4 0 0 0-1.01-.49M9 16H8a1 1 0 0 1 0-2h1a1 1 0 0 1 0 2m3.5-4H8a1 1 0 0 1 0-2h4.5a1 1 0 0 1 0 2M16 8H8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2"/></symbol>
803
805
  <symbol id="one-off-session" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M5 10c0-4.977 4.06-9 9.053-9s9.052 4.023 9.052 9a8.9 8.9 0 0 1-.585 3.19l-.078.208v.004l.02.164.406 3.298c.019.152.04.325.045.475.006.166-.002.425-.125.695a1.5 1.5 0 0 1-.772.754 1.5 1.5 0 0 1-.698.11c-.15-.01-.322-.034-.474-.057l-.027-.004-3.186-.467c-.088-.013-.135-.02-.169-.023h-.004l-.014.004c-.043.015-.101.036-.2.074a9.1 9.1 0 0 1-3.727.56C12.564 21.333 10.3 23 7.632 23a6.3 6.3 0 0 1-2.083-.356l-.224-.078-.022-.007h-.005l-.168.023-2.995.409a1 1 0 0 1-1.111-1.207l.611-2.762c.021-.096.033-.148.04-.186l.001-.006-.007-.023c-.016-.055-.04-.13-.08-.25a6.6 6.6 0 0 1-.326-2.057c0-2.626 1.533-4.909 3.755-5.93A9 9 0 0 1 5 10m2 .031q.311-.03.632-.031C11.172 10 14 12.933 14 16.5q0 .252-.019.5h.072a7.1 7.1 0 0 0 2.532-.465c.141-.053.308-.115.46-.148.14-.029.258-.041.4-.042.156-.001.314.022.44.041l.037.006 2.925.428-.37-3.01-.005-.034c-.015-.123-.034-.276-.03-.426a2 2 0 0 1 .046-.386 3.3 3.3 0 0 1 .163-.486c.293-.769.454-1.604.454-2.478 0-3.86-3.151-7-7.052-7C10.15 3 7 6.14 7 10zm4.86 7.602Q12 17.091 12 16.5c0-2.508-1.979-4.5-4.368-4.5s-4.369 1.992-4.369 4.5a4.6 4.6 0 0 0 .245 1.49c.056.172.12.366.146.529.024.153.03.27.02.426-.01.164-.047.332-.078.47l-.008.04-.301 1.36 1.572-.215.036-.005c.124-.017.277-.038.423-.037.139.001.242.012.378.039.144.028.317.09.47.144l.05.017c.442.157.918.242 1.416.242 2 0 3.71-1.394 4.217-3.319z"/></symbol>
804
806
  <symbol id="one-time" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M1 4.667c0-.507.41-.917.917-.917h20.166c.507 0 .917.41.917.917v14.666c0 .507-.41.917-.917.917H1.917A.917.917 0 0 1 1 19.333zm1.833.916v12.834h18.334V5.583z"/><path fill-rule="evenodd" d="M12 10.167a1.833 1.833 0 1 0 0 3.667 1.833 1.833 0 0 0 0-3.667M8.334 12a3.667 3.667 0 1 1 7.333 0 3.667 3.667 0 0 1-7.333 0"/></symbol>
805
- <symbol id="package" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M8.333 1a.917.917 0 0 0 0 1.833h7.334a.917.917 0 0 0 0-1.833zM4.667 5.583c0-.506.41-.916.916-.916h12.834a.917.917 0 0 1 0 1.833H5.583a.917.917 0 0 1-.916-.917M2.833 9.25c0-.506.41-.917.917-.917h16.5c.506 0 .917.41.917.917v12.833c0 .507-.41.917-.917.917H3.75a.917.917 0 0 1-.917-.917zm1.834.917v11h14.666v-11z"/></symbol>
807
+ <symbol id="packages" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M8.333 1a.917.917 0 0 0 0 1.833h7.334a.917.917 0 0 0 0-1.833zM4.667 5.583c0-.506.41-.916.916-.916h12.834a.917.917 0 0 1 0 1.833H5.583a.917.917 0 0 1-.916-.917M2.833 9.25c0-.506.41-.917.917-.917h16.5c.506 0 .917.41.917.917v12.833c0 .507-.41.917-.917.917H3.75a.917.917 0 0 1-.917-.917zm1.834.917v11h14.666v-11z"/></symbol>
806
808
  <symbol id="pause" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M7.759 2h8.482c.805 0 1.47 0 2.01.044.563.046 1.08.145 1.565.392a4 4 0 0 1 1.748 1.748c.247.485.346 1.002.392 1.564C22 6.29 22 6.954 22 7.758v8.483c0 .805 0 1.47-.044 2.01-.046.563-.145 1.08-.392 1.565a4 4 0 0 1-1.748 1.748c-.485.247-1.002.346-1.564.392-.541.044-1.206.044-2.01.044H7.758c-.805 0-1.47 0-2.01-.044-.563-.046-1.08-.145-1.565-.392a4 4 0 0 1-1.748-1.748c-.247-.485-.346-1.002-.392-1.564C2 17.71 2 17.046 2 16.242V7.758c0-.805 0-1.47.044-2.01.046-.563.145-1.08.392-1.565a4 4 0 0 1 1.748-1.748c.485-.247 1.002-.346 1.564-.392C6.29 2 6.954 2 7.758 2M5.91 4.038c-.438.035-.663.1-.819.18a2 2 0 0 0-.874.874c-.08.156-.145.38-.18.819C4 6.361 4 6.943 4 7.8v8.4c0 .857 0 1.439.038 1.889.035.438.1.663.18.819a2 2 0 0 0 .874.874c.156.08.38.145.819.18C6.361 20 6.943 20 7.8 20h8.4c.857 0 1.439 0 1.889-.038.438-.035.663-.1.819-.18a2 2 0 0 0 .874-.874c.08-.156.145-.38.18-.819.037-.45.038-1.032.038-1.889V7.8c0-.857 0-1.439-.038-1.889-.035-.438-.1-.663-.18-.819a2 2 0 0 0-.874-.874c-.156-.08-.38-.145-.819-.18C17.639 4 17.057 4 16.2 4H7.8c-.857 0-1.439 0-1.889.038M9.5 8a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1m5 0a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1"/></symbol>
807
809
  <symbol id="pause-circle" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m8.5-4a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1m5 0a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1"/></symbol>
808
810
  <symbol id="payout" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M7.683 6.654c.408 0 .812-.081 1.187-.24a3 3 0 0 0 4.333-4.147 3 3 0 0 0-3.367-.707A3 3 0 0 0 7.13.707 3 3 0 0 0 4.923 2.5a3.1 3.1 0 0 0-.227 1.447c.047.493.214.967.487 1.38.277.404.648.736 1.08.967.436.237.924.36 1.42.36m3.17-3.992A1.67 1.67 0 0 1 12.57 3.7c.127.303.16.638.093.96a1.693 1.693 0 0 1-3.045.59 1.67 1.67 0 0 1-.288-.93 1.67 1.67 0 0 1 .506-1.18 1.67 1.67 0 0 1 1.017-.478m-3.17-.668c.386-.002.76.13 1.06.373a2.95 2.95 0 0 0-.667 1.373 2.9 2.9 0 0 0 .087 1.514 1.7 1.7 0 0 1-.48.073 1.66 1.66 0 0 1-1.18-.493 1.667 1.667 0 0 1 1.18-2.84m7.16 7.486a1.72 1.72 0 0 0-1.086-.486c-.41-.031-.818.087-1.147.333l-.987.72a1.73 1.73 0 0 0-.406-1 1.7 1.7 0 0 0-.927-.553l-1.587-.387a4 4 0 0 0-.947-.113 6.2 6.2 0 0 0-2.066.586l-1.074.447a1.29 1.29 0 0 0-.686-.887 2.1 2.1 0 0 0-1.007-.146H2.39a2.1 2.1 0 0 0-1 .14c-.25.127-.453.33-.58.58A2.1 2.1 0 0 0 .663 9.72v3.867c-.039.344.01.693.14 1.013.13.25.335.454.587.58.316.132.66.182 1 .147h.533c.345.046.695.004 1.02-.12.209-.106.384-.267.507-.467.129-.199.203-.43.213-.666h1.093q.265 0 .52.06l1.834.446a3.5 3.5 0 0 0 1.506.034l2.034-.394a3.5 3.5 0 0 0 1.753-.913l1.44-1.4a1.687 1.687 0 0 0 .507-1.213c0-.23-.045-.456-.133-.667a1.8 1.8 0 0 0-.374-.547M3.35 13.994a3 3 0 0 1-.4 0l-.954-.007a2.4 2.4 0 0 1 0-.433V9.3h.967c.187 0 .387 0 .387-.033v4.727m10.56-3.067-1.44 1.4v-.007c-.297.29-.673.487-1.08.567l-2 .393a2.2 2.2 0 0 1-.934 0l-1.84-.446a3.5 3.5 0 0 0-.833-.1h-1.12v-2.267l1.587-.693A5.3 5.3 0 0 1 7.783 9.3q.317.002.627.074l1.593.386a.38.38 0 0 1 .287.347v.207a.4.4 0 0 1-.12.26.4.4 0 0 1-.267.093H8.876a.67.67 0 0 0-.473.193.67.67 0 0 0-.193.474.667.667 0 0 0 .666.666h1.627c.441 0 .87-.14 1.227-.4l1.673-1.22a.41.41 0 0 1 .513.034.4.4 0 0 1 .08.113.3.3 0 0 1 0 .133.27.27 0 0 1-.013.16.24.24 0 0 1-.073.107"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -1 +1 @@
1
- {"version":3,"file":"assetPath.js","sourceRoot":"","sources":["../../../src/components/pds-icon/assetPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,IAAI,uBAAuB,GAAG,KAAK,CAAC;AAQpC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE;;IAC3C,MAAM,iBAAiB,GAAG,MAAA,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAkB,4BAA4B,CAAC,0CAAE,OAAO,CAAC,aAAa,CAAC;IAE5H,yDAAyD;IACzD,MAAM,eAAe,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAEnD,kDAAkD;IAClD,MAAM,YAAY,GAAG,6DAA6D,CAAC;IAEnF,MAAM,aAAa,GAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,IAAI,eAAe,IAAI,YAAY,IAAI,GAAG,CAAA;IAExH,4DAA4D;IAC5D,IAAK,aAAa,CAAC,UAAU,CAAC,+BAA+B,CAAC,IAAI,CAAC,uBAAuB,EAAG,CAAC;QAC5F,uBAAuB,GAAG,IAAI,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC;;KAEZ,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,SAAS,GAAG,IAAI,CAAC;IAErB,IAAK,IAAI,CAAC,UAAU,CAAE,IAAI,CAAC,EAAG,CAAC;QAC7B,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IAED,IAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAG,CAAC;QACnC,SAAS,GAAG,GAAG,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED,OAAO,aAAa,GAAG,SAAS,CAAC;AACnC,CAAC,CAAA","sourcesContent":["import { Build } from '@stencil/core';\n\nlet missingAssetPathWarning = false;\n\ndeclare global {\n interface Window {\n __PINE_ASSET_PATH__?: string\n }\n}\n\n/**\n *\n * Reads the component asset path config from meta tag or a global variable.\n * This is a temporary workaround until these issues have been addressed:\n *\n * https://github.com/ionic-team/stencil/issues/2826/\n * https://github.com/ionic-team/stencil/issues/3470\n * https://github.com/ionic-team/stencil-ds-output-targets/issues/186\n */\nexport const getAssetPath = (path: string) => {\n const metaPineAssetPath = document.head.querySelector<HTMLMetaElement>('meta[data-pine-asset-path]')?.dataset.pineAssetPath;\n\n // Get the asset path from the window object if available\n const windowAssetPath = window.__PINE_ASSET_PATH__;\n\n // Set the CDN Asset path using the latest version\n const cdnAssetPath = 'https://cdn.jsdelivr.net/npm/@pine-ds/icons/dist/pds-icons/';\n\n const assetBasePath = Build.isTesting ? '/dist/pds-icons' : metaPineAssetPath || windowAssetPath || cdnAssetPath || '/'\n\n // Display a warning if the assets are fetched from the CDN.\n if ( assetBasePath.startsWith('https://cdn.jsdelivr.net/npm/') && !missingAssetPathWarning ) {\n missingAssetPathWarning = true;\n console.warn(`\n Fetching Pine assets from jsDelivr CDN.\\n\\n It's recommended that you bundle Pine Assets with your application and set the path accordingly.\\n\\nFor more information, read the documentation: \\nhttps://pine-design-system.netlify.app/?path=/docs/resources-assets--docs\n `)\n }\n\n let assetPath = path;\n\n if ( path.startsWith ('./') ) {\n assetPath = path.substring(2);\n }\n\n if ( !assetBasePath.endsWith('/') ) {\n assetPath = '/' + assetPath;\n }\n\n return assetBasePath + assetPath;\n}\n\n\nexport {};\n"]}
1
+ {"version":3,"file":"assetPath.js","sourceRoot":"","sources":["../../../../src/components/pds-icon/assetPath.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,IAAI,uBAAuB,GAAG,KAAK,CAAC;AAQpC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAY,EAAE,EAAE;;IAC3C,MAAM,iBAAiB,GAAG,MAAA,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAkB,4BAA4B,CAAC,0CAAE,OAAO,CAAC,aAAa,CAAC;IAE5H,yDAAyD;IACzD,MAAM,eAAe,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAEnD,kDAAkD;IAClD,MAAM,YAAY,GAAG,6DAA6D,CAAC;IAEnF,MAAM,aAAa,GAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,IAAI,eAAe,IAAI,YAAY,IAAI,GAAG,CAAA;IAExH,4DAA4D;IAC5D,IAAK,aAAa,CAAC,UAAU,CAAC,+BAA+B,CAAC,IAAI,CAAC,uBAAuB,EAAG,CAAC;QAC5F,uBAAuB,GAAG,IAAI,CAAC;QAC/B,OAAO,CAAC,IAAI,CAAC;;KAEZ,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,SAAS,GAAG,IAAI,CAAC;IAErB,IAAK,IAAI,CAAC,UAAU,CAAE,IAAI,CAAC,EAAG,CAAC;QAC7B,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAChC,CAAC;IAED,IAAK,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAG,CAAC;QACnC,SAAS,GAAG,GAAG,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED,OAAO,aAAa,GAAG,SAAS,CAAC;AACnC,CAAC,CAAA","sourcesContent":["import { Build } from '@stencil/core';\n\nlet missingAssetPathWarning = false;\n\ndeclare global {\n interface Window {\n __PINE_ASSET_PATH__?: string\n }\n}\n\n/**\n *\n * Reads the component asset path config from meta tag or a global variable.\n * This is a temporary workaround until these issues have been addressed:\n *\n * https://github.com/ionic-team/stencil/issues/2826/\n * https://github.com/ionic-team/stencil/issues/3470\n * https://github.com/ionic-team/stencil-ds-output-targets/issues/186\n */\nexport const getAssetPath = (path: string) => {\n const metaPineAssetPath = document.head.querySelector<HTMLMetaElement>('meta[data-pine-asset-path]')?.dataset.pineAssetPath;\n\n // Get the asset path from the window object if available\n const windowAssetPath = window.__PINE_ASSET_PATH__;\n\n // Set the CDN Asset path using the latest version\n const cdnAssetPath = 'https://cdn.jsdelivr.net/npm/@pine-ds/icons/dist/pds-icons/';\n\n const assetBasePath = Build.isTesting ? '/dist/pds-icons' : metaPineAssetPath || windowAssetPath || cdnAssetPath || '/'\n\n // Display a warning if the assets are fetched from the CDN.\n if ( assetBasePath.startsWith('https://cdn.jsdelivr.net/npm/') && !missingAssetPathWarning ) {\n missingAssetPathWarning = true;\n console.warn(`\n Fetching Pine assets from jsDelivr CDN.\\n\\n It's recommended that you bundle Pine Assets with your application and set the path accordingly.\\n\\nFor more information, read the documentation: \\nhttps://pine-design-system.netlify.app/?path=/docs/resources-assets--docs\n `)\n }\n\n let assetPath = path;\n\n if ( path.startsWith ('./') ) {\n assetPath = path.substring(2);\n }\n\n if ( !assetBasePath.endsWith('/') ) {\n assetPath = '/' + assetPath;\n }\n\n return assetBasePath + assetPath;\n}\n\n\nexport {};\n"]}
@@ -1 +1 @@
1
- {"version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AC,CAAC,oBAAoB,CACrD,CAAC,IAAiC,EAAE,EAAE;gBACpC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC;oBAC3B,EAAE,CAAC,UAAU,EAAE,CAAC;oBAChB,IAAI,CAAC,EAAE,GAAG,SAAS,CAAC;oBACpB,EAAE,EAAE,CAAC;gBACP,CAAC;YACH,CAAC,EACD,EAAE,UAAU,EAAE,CACf,CAAC,CAAC;YAEH,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;aAAM,CAAC;YACN,+CAA+C;YAC/C,qCAAqC;YACrC,EAAE,EAAE,CAAC;QACP,CAAC;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\n componentDidLoad() {\n this.setCSSVariables();\n }\n\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n this.setCSSVariables();\n }\n\n setCSSVariables() {\n this.el.style.setProperty(`--dimension-icon-height`, this.iconSize());\n this.el.style.setProperty(`--dimension-icon-width`, this.iconSize());\n this.el.style.setProperty(`--color-icon-fill`, typeof this.color !== 'undefined' ? this.color : 'currentColor');\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('size')\n @Watch('color')\n updateStyles() {\n this.setCSSVariables();\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 return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n alt=\"\"\n role=\"img\"\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;IANpB;QAQU,wBAAmB,GAAyB,EAAE,CA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ACP,CAAC;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\n componentDidLoad() {\n this.setCSSVariables();\n }\n\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n this.setCSSVariables();\n }\n\n setCSSVariables() {\n this.el.style.setProperty(`--dimension-icon-height`, this.iconSize());\n this.el.style.setProperty(`--dimension-icon-width`, this.iconSize());\n this.el.style.setProperty(`--color-icon-fill`, typeof this.color !== 'undefined' ? this.color : 'currentColor');\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('size')\n @Watch('color')\n updateStyles() {\n this.setCSSVariables();\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 return (\n\n <Host\n aria-label={ariaLabel !== undefined && !this.hasAriaHidden() ? ariaLabel : null }\n alt=\"\"\n role=\"img\"\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 +1 @@
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,CAAC;QACR,IAAI,OAAO,KAAK,IAAI,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;YACnE,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC/C,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;gBAC3B,CAAC;gBAED,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;gBACrD,MAAM,GAAG,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;gBAErC,IAAI,GAAG,EAAE,CAAC;oBACR,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;gBACzC,CAAC;gBAED,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;YAC3B,CAAC;iBAAM,CAAC;gBACN,0BAA0B;gBAC1B,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE;oBAC5B,IAAI,GAAG,CAAC,EAAE,EAAE,CAAC;wBACX,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE;4BACpC,IAAI,UAAU,IAAI,QAAQ,KAAK,KAAK,EAAE,CAAC;gCACrC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC,CAAC;4BAC3C,CAAC;4BACD,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC;wBAC5C,CAAC,CAAC,CAAC;oBACL,CAAC;oBACD,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;gBAC9B,CAAC,CAAC,CAAC;gBAEH,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YACzB,CAAC;QACH,CAAC;aAAM,CAAC;YACN,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC5B,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC,CAAA","sourcesContent":["import { isEncodedDataUrl, isSvgDataUrl, validateContent } from './validate';\n\nexport const pdsIconContent = new Map<string, string>();\nconst requests = new Map<string, Promise<any>>(); // eslint-disable-line @typescript-eslint/no-explicit-any\n\nlet parser: DOMParser;\n\nexport const getSvgContent = (url: string, sanitize = false) => {\n let req = requests.get(url);\n\n if(!req) {\n if (typeof fetch != 'undefined' && typeof document !== 'undefined') {\n if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\n // we don't have a request\n req = fetch(url).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n pdsIconContent.set(url, svgContent || '');\n });\n }\n pdsIconContent.set(url, '');\n });\n\n requests.set(url, req);\n }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n\n return req;\n}\n"]}
1
+ {"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,CAAC;QACR,IAAI,OAAO,KAAK,IAAI,WAAW,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;YACnE,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,gBAAgB,CAAC,GAAG,CAAC,EAAE,CAAC;gBAC/C,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,M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ate';\n\nexport const pdsIconContent = new Map<string, string>();\nconst requests = new Map<string, Promise<any>>(); // eslint-disable-line @typescript-eslint/no-explicit-any\n\nlet parser: DOMParser;\n\nexport const getSvgContent = (url: string, sanitize = false) => {\n let req = requests.get(url);\n\n if(!req) {\n if (typeof fetch != 'undefined' && typeof document !== 'undefined') {\n if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n if (!parser) {\n parser = new DOMParser();\n }\n\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n\n if (svg) {\n pdsIconContent.set(url, svg.outerHTML);\n }\n\n return Promise.resolve();\n } else {\n // we don't have a request\n req = fetch(url).then((rsp) => {\n if (rsp.ok) {\n return rsp.text().then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n pdsIconContent.set(url, svgContent || '');\n });\n }\n pdsIconContent.set(url, '');\n });\n\n requests.set(url, req);\n }\n } else {\n pdsIconContent.set(url, '');\n return Promise.resolve();\n }\n }\n\n return req;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/pds-icon/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAI3C,IAAI,UAA+B,CAAC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC7D,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,GAAwB,EAAE;IAClD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,IAAI,GAAG,EAAE,CAAC;IACnB,CA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AAW,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,CAAC;YAC1B,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACpC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAChD,CAAC;YACD,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC,CAAA","sourcesContent":["import { getAssetPath } from './assetPath';\n\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 `pds-input` should inherit\n * the `title` attribute that developers set directly on `pds-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,aAAa,CAAC;AAI3C,IAAI,UAA+B,CAAC;AAEpC,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAkC,EAAE,EAAE;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I,CAAC;AACd,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,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,CAAC;YAC1B,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACpC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;gBACnB,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YAChD,CAAC;YACD,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC,CAAA","sourcesContent":["import { getAssetPath } from './assetPath';\n\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 `pds-input` should inherit\n * the `title` attribute that developers set directly on `pds-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 +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,CAAC;QACpD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE,CAAC;YACvD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED,gCAAgC;IAChC,MAAM,MAAM,GAAG,GAAG,CAAC,iBAAiB,CAAC;IACrC,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE,CAAC;QACtD,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,CAA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ourcesContent":["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"]}
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,CAA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C,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC1D,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAgB,CAAC,EAAE,CAAC;gBAC/C,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;IACH,CAAC;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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export { addIcons } from './components/pds-icon/utils';\nexport type { Components, JSX } from './components';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export { addIcons } from './components/pds-icon/utils';\nexport type { Components, JSX } from './components';\n"]}
package/dist/docs.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2025-04-17T11:05:04",
2
+ "timestamp": "2025-04-24T11:05:00",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.28.2",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-icons",
3
- "version": "9.0.0",
3
+ "version": "9.2.0",
4
4
  "icons": [
5
5
  {
6
6
  "name": "access-key",
@@ -2293,6 +2293,20 @@
2293
2293
  "left"
2294
2294
  ]
2295
2295
  },
2296
+ {
2297
+ "name": "link-broken",
2298
+ "category": "actions",
2299
+ "tags": [
2300
+ "break",
2301
+ "broken",
2302
+ "chain",
2303
+ "connection",
2304
+ "hyperlink",
2305
+ "link",
2306
+ "unlink",
2307
+ "website"
2308
+ ]
2309
+ },
2296
2310
  {
2297
2311
  "name": "list-bullet",
2298
2312
  "category": "text-editor",
@@ -2912,7 +2926,7 @@
2912
2926
  ]
2913
2927
  },
2914
2928
  {
2915
- "name": "package",
2929
+ "name": "packages",
2916
2930
  "category": "features",
2917
2931
  "tags": [
2918
2932
  "backup",
@@ -1,4 +1,4 @@
1
- <svg data-pdsicons="9.0.0" style="display:none">
1
+ <svg data-pdsicons="9.2.0" style="display:none">
2
2
  <style>
3
3
  .pdsicon {
4
4
  fill: currentColor;
@@ -210,6 +210,7 @@
210
210
  <symbol id="layout-list" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M2 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m-6 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m-6 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1"/></symbol>
211
211
  <symbol id="layout-top" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M7.759 2h8.482c.805 0 1.47 0 2.01.044.563.046 1.08.145 1.565.392a4 4 0 0 1 1.748 1.748c.247.485.346 1.002.392 1.564C22 6.29 22 6.954 22 7.758v8.483c0 .805 0 1.47-.044 2.01-.046.563-.145 1.08-.392 1.565a4 4 0 0 1-1.748 1.748c-.485.247-1.002.346-1.564.392-.541.044-1.206.044-2.01.044H7.758c-.805 0-1.47 0-2.01-.044-.563-.046-1.08-.145-1.565-.392a4 4 0 0 1-1.748-1.748c-.247-.485-.346-1.002-.392-1.564C2 17.71 2 17.046 2 16.242V7.758c0-.805 0-1.47.044-2.01.046-.563.145-1.08.392-1.565a4 4 0 0 1 1.748-1.748c.485-.247 1.002-.346 1.564-.392C6.29 2 6.954 2 7.758 2M4 10v6.2c0 .857 0 1.439.038 1.889.035.438.1.663.18.819a2 2 0 0 0 .874.874c.156.08.38.145.819.18C6.361 20 6.943 20 7.8 20h8.4c.857 0 1.439 0 1.889-.038.438-.035.663-.1.819-.18a2 2 0 0 0 .874-.874c.08-.156.145-.38.18-.819.037-.45.038-1.032.038-1.889V10zm16-2H4v-.2c0-.857 0-1.439.038-1.889.035-.438.1-.663.18-.819a2 2 0 0 1 .874-.874c.156-.08.38-.145.819-.18C6.361 4 6.943 4 7.8 4h8.4c.857 0 1.439 0 1.889.038.438.035.663.1.819.18a2 2 0 0 1 .874.874c.08.156.145.38.18.819C20 6.361 20 6.943 20 7.8z"/></symbol>
212
212
  <symbol id="left-small" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M15.707 5.293a1 1 0 0 1 0 1.414L10.414 12l5.293 5.293a1 1 0 0 1-1.414 1.414l-6-6a1 1 0 0 1 0-1.414l6-6a1 1 0 0 1 1.414 0"/></symbol>
213
+ <symbol id="link-broken" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M9 1a1 1 0 0 1 1 1v2a1 1 0 0 1-2 0V2a1 1 0 0 1 1-1m4.414 2.515a5 5 0 0 1 7.071 7.07l-2.121 2.122a1 1 0 0 1-1.414-1.414l2.121-2.121a3 3 0 0 0-4.243-4.243l-2.12 2.121a1 1 0 1 1-1.415-1.414zM2.793 2.793a1 1 0 0 1 1.414 0l1.414 1.414a1 1 0 0 1-1.414 1.414L2.793 4.207a1 1 0 0 1 0-1.414M1 9a1 1 0 0 1 1-1h2a1 1 0 0 1 0 2H2a1 1 0 0 1-1-1m6.05 2.293a1 1 0 0 1 0 1.414L4.93 14.828a3 3 0 0 0 4.243 4.243l2.12-2.121a1 1 0 0 1 1.415 1.414l-2.121 2.121a5 5 0 0 1-7.071-7.07l2.121-2.122a1 1 0 0 1 1.414 0M19 15a1 1 0 0 1 1-1h2a1 1 0 1 1 0 2h-2a1 1 0 0 1-1-1m-.621 3.379a1 1 0 0 1 1.414 0l1.414 1.414a1 1 0 0 1-1.414 1.414l-1.414-1.414a1 1 0 0 1 0-1.414M15 19a1 1 0 0 1 1 1v2a1 1 0 1 1-2 0v-2a1 1 0 0 1 1-1"/></symbol>
213
214
  <symbol id="list-bullet" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M2 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m-6 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m-6 6a2 2 0 1 1 4 0 2 2 0 0 1-4 0m6 0a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1"/></symbol>
214
215
  <symbol id="list-details" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M6.161 2H17.84c.527 0 .982 0 1.356.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356v.678c0 .527 0 .981-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.357.031H6.162c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167C2 7.82 2 7.365 2 6.839V6.16c0-.527 0-.981.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C5.18 2 5.635 2 6.161 2M4.968 4.024c-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C4 5.25 4 5.623 4 6.2v.6c0 .577 0 .949.024 1.232.022.272.06.373.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C5.25 9 5.623 9 6.2 9h11.6c.577 0 .949 0 1.232-.024.272-.022.372-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C20 7.75 20 7.377 20 6.8v-.6c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C18.75 4 18.377 4 17.8 4H6.2c-.577 0-.949 0-1.232.024M6.16 13h11.677c.528 0 .982 0 1.357.03.395.033.789.104 1.167.297a3 3 0 0 1 1.311 1.311c.193.378.264.772.296 1.167.031.375.031.83.031 1.356v.678c0 .527 0 .982-.03 1.356-.033.395-.104.789-.297 1.167a3 3 0 0 1-1.311 1.311c-.378.193-.772.264-1.167.296-.375.031-.83.031-1.356.031H6.16c-.527 0-.981 0-1.356-.03-.395-.033-.789-.104-1.167-.297a3 3 0 0 1-1.311-1.311c-.193-.378-.264-.772-.296-1.167A18 18 0 0 1 2 17.838v-.677c0-.527 0-.982.03-1.356.033-.395.104-.789.297-1.167a3 3 0 0 1 1.311-1.311c.378-.193.772-.264 1.167-.296C5.18 13 5.635 13 6.161 13m-1.193 2.024c-.272.022-.373.06-.422.085a1 1 0 0 0-.437.437c-.025.05-.063.15-.085.422C4 16.25 4 16.623 4 17.2v.6c0 .577 0 .949.024 1.232.022.272.06.372.085.422a1 1 0 0 0 .437.437c.05.025.15.063.422.085C5.25 20 5.623 20 6.2 20h11.6c.577 0 .949 0 1.232-.024.272-.022.372-.06.422-.085a1 1 0 0 0 .437-.437c.025-.05.063-.15.085-.422C20 18.75 20 18.377 20 17.8v-.6c0-.577 0-.949-.024-1.232-.022-.272-.06-.373-.085-.422a1 1 0 0 0-.437-.437c-.05-.025-.15-.063-.422-.085C18.75 15 18.377 15 17.8 15H6.2c-.577 0-.949 0-1.232.024"/></symbol>
215
216
  <symbol id="list-numbers" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M8 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m0 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1m0 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1M2.878 7.386v.528h2.347v-.528l-.549-.047c-.1-.007-.106-.027-.106-.134V4.064H2.965l-.073.548.581.12c.067.02.087.06.087.14v2.333c0 .1-.013.127-.107.134zm-.347 6.57v-.622l.896-.875.059-.057c.633-.614.903-.877.903-1.246 0-.248-.12-.428-.474-.428-.368 0-.522.12-.522.595l-.909-.08c.007-1.063.816-1.237 1.517-1.237 1.036 0 1.404.44 1.404 1.07 0 .626-.432 1.04-.918 1.505l-.004.005-.756.722h.983c.067 0 .094-.014.107-.08l.093-.528h.709v1.256zm3.138 4.999c0-.602-.314-.942-.882-1.03V17.9c.42-.127.768-.481.768-1.043 0-.715-.394-1.11-1.423-1.11-.702 0-1.497.181-1.497 1.237l.915.08c0-.474.174-.594.535-.594.374 0 .488.206.488.46 0 .428-.26.662-.742.722l-.328.04v.669c.201-.034.328-.047.495-.047.414 0 .669.167.669.575 0 .468-.321.601-.696.601-.468 0-.748-.193-1.002-.44l-.535.588c.341.374.942.614 1.617.614.956 0 1.618-.414 1.618-1.296"/></symbol>
@@ -259,7 +260,7 @@
259
260
  <symbol id="newsletter-2" viewBox="0 0 24 24" class="pdsicon"><path d="M12 23H8.8c-1.84 0-2.76 0-3.62-.44a4 4 0 0 1-1.74-1.74C3 20 3 19 3 17.2V6.8C3 5 3 4 3.44 3.18a4 4 0 0 1 1.74-1.74C6.04 1 6.96 1 8.8 1h6.4c1.84 0 2.76 0 3.62.44a4 4 0 0 1 1.74 1.74C21 4 21 5 21 6.8V10a1 1 0 0 1-2 0V6.8a7.6 7.6 0 0 0-.22-2.71 1.93 1.93 0 0 0-.87-.87A7.6 7.6 0 0 0 15.2 3H8.8a7.6 7.6 0 0 0-2.71.22 1.93 1.93 0 0 0-.87.87A7.6 7.6 0 0 0 5 6.8v10.4a7.6 7.6 0 0 0 .22 2.71c.187.377.493.683.87.87A7.6 7.6 0 0 0 8.8 21H12a1 1 0 0 1 0 2m5-1a1 1 0 0 1-.65-.24 41 41 0 0 1-3.63-3.42 3.29 3.29 0 0 1 .5-4.6 3.17 3.17 0 0 1 3.78-.22 3.21 3.21 0 0 1 3.76.21 3.26 3.26 0 0 1 .51 4.61 38.5 38.5 0 0 1-3.63 3.42A1 1 0 0 1 17 22m-1.76-7a1.13 1.13 0 0 0-.74.28 1.26 1.26 0 0 0-.21 1.81q1.272 1.381 2.71 2.59a32 32 0 0 0 2.71-2.59 1.25 1.25 0 0 0-.21-1.8 1.23 1.23 0 0 0-1.75.2 1 1 0 0 1-1.5 0 1.4 1.4 0 0 0-1.01-.49M9 16H8a1 1 0 0 1 0-2h1a1 1 0 0 1 0 2m3.5-4H8a1 1 0 0 1 0-2h4.5a1 1 0 0 1 0 2M16 8H8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2"/></symbol>
260
261
  <symbol id="one-off-session" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M5 10c0-4.977 4.06-9 9.053-9s9.052 4.023 9.052 9a8.9 8.9 0 0 1-.585 3.19l-.078.208v.004l.02.164.406 3.298c.019.152.04.325.045.475.006.166-.002.425-.125.695a1.5 1.5 0 0 1-.772.754 1.5 1.5 0 0 1-.698.11c-.15-.01-.322-.034-.474-.057l-.027-.004-3.186-.467c-.088-.013-.135-.02-.169-.023h-.004l-.014.004c-.043.015-.101.036-.2.074a9.1 9.1 0 0 1-3.727.56C12.564 21.333 10.3 23 7.632 23a6.3 6.3 0 0 1-2.083-.356l-.224-.078-.022-.007h-.005l-.168.023-2.995.409a1 1 0 0 1-1.111-1.207l.611-2.762c.021-.096.033-.148.04-.186l.001-.006-.007-.023c-.016-.055-.04-.13-.08-.25a6.6 6.6 0 0 1-.326-2.057c0-2.626 1.533-4.909 3.755-5.93A9 9 0 0 1 5 10m2 .031q.311-.03.632-.031C11.172 10 14 12.933 14 16.5q0 .252-.019.5h.072a7.1 7.1 0 0 0 2.532-.465c.141-.053.308-.115.46-.148.14-.029.258-.041.4-.042.156-.001.314.022.44.041l.037.006 2.925.428-.37-3.01-.005-.034c-.015-.123-.034-.276-.03-.426a2 2 0 0 1 .046-.386 3.3 3.3 0 0 1 .163-.486c.293-.769.454-1.604.454-2.478 0-3.86-3.151-7-7.052-7C10.15 3 7 6.14 7 10zm4.86 7.602Q12 17.091 12 16.5c0-2.508-1.979-4.5-4.368-4.5s-4.369 1.992-4.369 4.5a4.6 4.6 0 0 0 .245 1.49c.056.172.12.366.146.529.024.153.03.27.02.426-.01.164-.047.332-.078.47l-.008.04-.301 1.36 1.572-.215.036-.005c.124-.017.277-.038.423-.037.139.001.242.012.378.039.144.028.317.09.47.144l.05.017c.442.157.918.242 1.416.242 2 0 3.71-1.394 4.217-3.319z"/></symbol>
261
262
  <symbol id="one-time" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M1 4.667c0-.507.41-.917.917-.917h20.166c.507 0 .917.41.917.917v14.666c0 .507-.41.917-.917.917H1.917A.917.917 0 0 1 1 19.333zm1.833.916v12.834h18.334V5.583z"/><path fill-rule="evenodd" d="M12 10.167a1.833 1.833 0 1 0 0 3.667 1.833 1.833 0 0 0 0-3.667M8.334 12a3.667 3.667 0 1 1 7.333 0 3.667 3.667 0 0 1-7.333 0"/></symbol>
262
- <symbol id="package" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M8.333 1a.917.917 0 0 0 0 1.833h7.334a.917.917 0 0 0 0-1.833zM4.667 5.583c0-.506.41-.916.916-.916h12.834a.917.917 0 0 1 0 1.833H5.583a.917.917 0 0 1-.916-.917M2.833 9.25c0-.506.41-.917.917-.917h16.5c.506 0 .917.41.917.917v12.833c0 .507-.41.917-.917.917H3.75a.917.917 0 0 1-.917-.917zm1.834.917v11h14.666v-11z"/></symbol>
263
+ <symbol id="packages" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M8.333 1a.917.917 0 0 0 0 1.833h7.334a.917.917 0 0 0 0-1.833zM4.667 5.583c0-.506.41-.916.916-.916h12.834a.917.917 0 0 1 0 1.833H5.583a.917.917 0 0 1-.916-.917M2.833 9.25c0-.506.41-.917.917-.917h16.5c.506 0 .917.41.917.917v12.833c0 .507-.41.917-.917.917H3.75a.917.917 0 0 1-.917-.917zm1.834.917v11h14.666v-11z"/></symbol>
263
264
  <symbol id="pause" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M7.759 2h8.482c.805 0 1.47 0 2.01.044.563.046 1.08.145 1.565.392a4 4 0 0 1 1.748 1.748c.247.485.346 1.002.392 1.564C22 6.29 22 6.954 22 7.758v8.483c0 .805 0 1.47-.044 2.01-.046.563-.145 1.08-.392 1.565a4 4 0 0 1-1.748 1.748c-.485.247-1.002.346-1.564.392-.541.044-1.206.044-2.01.044H7.758c-.805 0-1.47 0-2.01-.044-.563-.046-1.08-.145-1.565-.392a4 4 0 0 1-1.748-1.748c-.247-.485-.346-1.002-.392-1.564C2 17.71 2 17.046 2 16.242V7.758c0-.805 0-1.47.044-2.01.046-.563.145-1.08.392-1.565a4 4 0 0 1 1.748-1.748c.485-.247 1.002-.346 1.564-.392C6.29 2 6.954 2 7.758 2M5.91 4.038c-.438.035-.663.1-.819.18a2 2 0 0 0-.874.874c-.08.156-.145.38-.18.819C4 6.361 4 6.943 4 7.8v8.4c0 .857 0 1.439.038 1.889.035.438.1.663.18.819a2 2 0 0 0 .874.874c.156.08.38.145.819.18C6.361 20 6.943 20 7.8 20h8.4c.857 0 1.439 0 1.889-.038.438-.035.663-.1.819-.18a2 2 0 0 0 .874-.874c.08-.156.145-.38.18-.819.037-.45.038-1.032.038-1.889V7.8c0-.857 0-1.439-.038-1.889-.035-.438-.1-.663-.18-.819a2 2 0 0 0-.874-.874c-.156-.08-.38-.145-.819-.18C17.639 4 17.057 4 16.2 4H7.8c-.857 0-1.439 0-1.889.038M9.5 8a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1m5 0a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1"/></symbol>
264
265
  <symbol id="pause-circle" viewBox="0 0 24 24" class="pdsicon"><path fill-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12m8.5-4a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1m5 0a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0V9a1 1 0 0 1 1-1"/></symbol>
265
266
  <symbol id="payout" viewBox="0 0 16 16" class="pdsicon"><g clip-path="url(#a)"><path fill-rule="evenodd" d="M7.683 6.654c.408 0 .812-.081 1.187-.24a3 3 0 0 0 4.333-4.147 3 3 0 0 0-3.367-.707A3 3 0 0 0 7.13.707 3 3 0 0 0 4.923 2.5a3.1 3.1 0 0 0-.227 1.447c.047.493.214.967.487 1.38.277.404.648.736 1.08.967.436.237.924.36 1.42.36m3.17-3.992A1.67 1.67 0 0 1 12.57 3.7c.127.303.16.638.093.96a1.693 1.693 0 0 1-3.045.59 1.67 1.67 0 0 1-.288-.93 1.67 1.67 0 0 1 .506-1.18 1.67 1.67 0 0 1 1.017-.478m-3.17-.668c.386-.002.76.13 1.06.373a2.95 2.95 0 0 0-.667 1.373 2.9 2.9 0 0 0 .087 1.514 1.7 1.7 0 0 1-.48.073 1.66 1.66 0 0 1-1.18-.493 1.667 1.667 0 0 1 1.18-2.84m7.16 7.486a1.72 1.72 0 0 0-1.086-.486c-.41-.031-.818.087-1.147.333l-.987.72a1.73 1.73 0 0 0-.406-1 1.7 1.7 0 0 0-.927-.553l-1.587-.387a4 4 0 0 0-.947-.113 6.2 6.2 0 0 0-2.066.586l-1.074.447a1.29 1.29 0 0 0-.686-.887 2.1 2.1 0 0 0-1.007-.146H2.39a2.1 2.1 0 0 0-1 .14c-.25.127-.453.33-.58.58A2.1 2.1 0 0 0 .663 9.72v3.867c-.039.344.01.693.14 1.013.13.25.335.454.587.58.316.132.66.182 1 .147h.533c.345.046.695.004 1.02-.12.209-.106.384-.267.507-.467.129-.199.203-.43.213-.666h1.093q.265 0 .52.06l1.834.446a3.5 3.5 0 0 0 1.506.034l2.034-.394a3.5 3.5 0 0 0 1.753-.913l1.44-1.4a1.687 1.687 0 0 0 .507-1.213c0-.23-.045-.456-.133-.667a1.8 1.8 0 0 0-.374-.547M3.35 13.994a3 3 0 0 1-.4 0l-.954-.007a2.4 2.4 0 0 1 0-.433V9.3h.967c.187 0 .387 0 .387-.033v4.727m10.56-3.067-1.44 1.4v-.007c-.297.29-.673.487-1.08.567l-2 .393a2.2 2.2 0 0 1-.934 0l-1.84-.446a3.5 3.5 0 0 0-.833-.1h-1.12v-2.267l1.587-.693A5.3 5.3 0 0 1 7.783 9.3q.317.002.627.074l1.593.386a.38.38 0 0 1 .287.347v.207a.4.4 0 0 1-.12.26.4.4 0 0 1-.267.093H8.876a.67.67 0 0 0-.473.193.67.67 0 0 0-.193.474.667.667 0 0 0 .666.666h1.627c.441 0 .87-.14 1.227-.4l1.673-1.22a.41.41 0 0 1 .513.034.4.4 0 0 1 .08.113.3.3 0 0 1 0 .133.27.27 0 0 1-.013.16.24.24 0 0 1-.073.107"/></g><defs><clipPath id="a"><path d="M0 0h16v16H0z"/></clipPath></defs></symbol>
@@ -0,0 +1,33 @@
1
+ import fs from "fs-extra";
2
+ import { join } from "path";
3
+ export const collectionCopy = async (rootDir) => {
4
+ const optimizedSrc = join(rootDir, 'src', 'svg');
5
+ const distSvgDest = join(rootDir, 'dist', 'svg');
6
+ const collectionDest = join(rootDir, 'dist', 'collection', 'components', 'pds-icon', 'svg');
7
+ const pdsIconsSvgDest = join(rootDir, 'dist', 'pds-icons', 'svg');
8
+ await fs.copy(optimizedSrc, collectionDest);
9
+ console.log('Copied optimized SVGs to collection: ', collectionDest);
10
+ await fs.copy(optimizedSrc, distSvgDest);
11
+ console.log('Copied optimized SVGs to dist/svg: ', distSvgDest);
12
+ await fs.copy(optimizedSrc, pdsIconsSvgDest);
13
+ console.log('Copied optimized SVGs to dist/pds-icons/svg: ', pdsIconsSvgDest);
14
+ // we don't want to copy the src/svgs to the collection (distribution)
15
+ await fs.remove(join(rootDir, 'dist', 'collection', 'svg'));
16
+ // don't want to copy the test svgs to the collection either
17
+ await fs.remove(join(rootDir, 'dist', 'collection', 'components', 'test'));
18
+ const cePackageDir = join(rootDir, 'components');
19
+ const cePackageJsonPath = join(cePackageDir, 'package.json');
20
+ const ceCjsPath = join(cePackageDir, 'index.cjs.js');
21
+ const emptyCjs = `/*empty cjs*/`;
22
+ await fs.writeFile(ceCjsPath, emptyCjs);
23
+ const cePackageJson = {
24
+ name: '@pine-ds/icons/components',
25
+ description: 'Pine Icons custom element',
26
+ main: './index.cjs.js',
27
+ module: '.index.js',
28
+ types: './index.d.ts',
29
+ private: true,
30
+ };
31
+ await fs.writeFile(cePackageJsonPath, JSON.stringify(cePackageJson, null, 2));
32
+ };
33
+ //# sourceMappingURL=collection-copy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection-copy.js","sourceRoot":"","sources":["../../scripts/collection-copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,OAAe,EAAE,EAAE;IACtD,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACjD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IACjD,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC;IAC5F,MAAM,eAAe,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;IAElE,MAAM,EAAE,CAAC,IAAI,CAAC,YAAY,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CAAC,CAAA","sourcesContent":["import fs from 'fs-extra';\nimport { join } from 'path';\n\nexport const collectionCopy = async (rootDir: string) => {\n const optimizedSrc = join(rootDir, 'src', 'svg');\n const distSvgDest = join(rootDir, 'dist', 'svg');\n const collectionDest = join(rootDir, 'dist', 'collection', 'components', 'pds-icon', 'svg');\n const pdsIconsSvgDest = join(rootDir, 'dist', 'pds-icons', 'svg');\n\n await fs.copy(optimizedSrc, collectionDest);\n console.log('Copied optimized SVGs to collection: ', collectionDest);\n\n await fs.copy(optimizedSrc, distSvgDest);\n console.log('Copied optimized SVGs to dist/svg: ', distSvgDest);\n\n await fs.copy(optimizedSrc, pdsIconsSvgDest);\n console.log('Copied optimized SVGs to dist/pds-icons/svg: ', pdsIconsSvgDest);\n\n // we don't want to copy the src/svgs to the collection (distribution)\n await fs.remove(join(rootDir, 'dist', 'collection', 'svg'));\n\n // don't want to copy the test svgs to the collection either\n await fs.remove(join(rootDir, 'dist', 'collection', 'components', 'test'));\n\n const cePackageDir = join(rootDir, 'components');\n const cePackageJsonPath = join(cePackageDir, 'package.json');\n const ceCjsPath = join(cePackageDir, 'index.cjs.js');\n\n const emptyCjs = `/*empty cjs*/`;\n await fs.writeFile(ceCjsPath, emptyCjs);\n\n const cePackageJson = {\n name: '@pine-ds/icons/components',\n description: 'Pine Icons custom element',\n main: './index.cjs.js',\n module: '.index.js',\n types: './index.d.ts',\n private: true,\n };\n\n await fs.writeFile(cePackageJsonPath, JSON.stringify(cePackageJson, null, 2));\n}\n"]}