@pine-ds/icons 2.0.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cheatsheet.html +20 -4
- package/dist/cjs/index-b35d5b0f.js +1778 -0
- package/dist/cjs/index-b35d5b0f.js.map +1 -0
- package/dist/cjs/index.cjs.js +12 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/pds-icon.cjs.entry.js +190 -0
- package/dist/cjs/pds-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/pds-icons.cjs.js +25 -0
- package/dist/cjs/pds-icons.cjs.js.map +1 -0
- package/dist/cjs/utils-395a38b7.js +81 -0
- package/dist/cjs/utils-395a38b7.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/pds-icon/pds-icon.css +22 -0
- package/dist/collection/components/pds-icon/pds-icon.js +186 -0
- package/dist/collection/components/pds-icon/pds-icon.js.map +1 -0
- package/dist/collection/components/pds-icon/request.js +29 -0
- package/dist/collection/components/pds-icon/request.js.map +1 -0
- package/dist/collection/components/pds-icon/svg/blog-filled.svg +1 -0
- package/dist/collection/components/pds-icon/svg/flash-filled.svg +1 -0
- package/dist/collection/components/pds-icon/svg/flash.svg +1 -0
- package/dist/collection/components/pds-icon/svg/form-filled.svg +1 -0
- package/dist/collection/components/pds-icon/svg/mail-filled.svg +1 -0
- package/dist/collection/components/pds-icon/svg/map.svg +1 -0
- package/dist/collection/components/pds-icon/svg/publish.svg +1 -0
- package/dist/collection/components/pds-icon/svg/wrench.svg +1 -0
- package/dist/collection/components/pds-icon/test/pds-icon.e2e.js +10 -0
- package/dist/collection/components/pds-icon/test/pds-icon.e2e.js.map +1 -0
- package/dist/collection/components/pds-icon/test/pds-icon.spec.js +70 -0
- package/dist/collection/components/pds-icon/test/pds-icon.spec.js.map +1 -0
- package/dist/collection/components/pds-icon/utils.js +81 -0
- package/dist/collection/components/pds-icon/utils.js.map +1 -0
- package/dist/collection/components/pds-icon/validate.js +44 -0
- package/dist/collection/components/pds-icon/validate.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/docs.d.ts +421 -0
- package/dist/docs.json +95 -0
- package/dist/esm/index-8effeb27.js +1749 -0
- package/dist/esm/index-8effeb27.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/pds-icon.entry.js +186 -0
- package/dist/esm/pds-icon.entry.js.map +1 -0
- package/dist/esm/pds-icons.js +20 -0
- package/dist/esm/pds-icons.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/utils-a0ad61d0.js +75 -0
- package/dist/esm/utils-a0ad61d0.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +3 -0
- package/dist/loader/index.cjs.js +3 -0
- package/dist/loader/index.d.ts +21 -0
- package/dist/loader/index.es2017.js +3 -0
- package/dist/loader/index.js +4 -0
- package/dist/loader/package.json +11 -0
- package/dist/pds-icons/index.esm.js +2 -0
- package/dist/pds-icons/index.esm.js.map +1 -0
- package/dist/pds-icons/p-91678731.entry.js +2 -0
- package/dist/pds-icons/p-91678731.entry.js.map +1 -0
- package/dist/pds-icons/p-a3383818.js +3 -0
- package/dist/pds-icons/p-a3383818.js.map +1 -0
- package/dist/pds-icons/p-dc5765cb.js +2 -0
- package/dist/pds-icons/p-dc5765cb.js.map +1 -0
- package/dist/pds-icons/pds-icons.esm.js +2 -0
- package/dist/pds-icons/pds-icons.esm.js.map +1 -0
- package/dist/pds-icons.json +61 -1
- package/dist/pds-icons.symbols.svg +9 -1
- package/dist/svg/blog-filled.svg +1 -0
- package/dist/svg/flash-filled.svg +1 -0
- package/dist/svg/flash.svg +1 -0
- package/dist/svg/form-filled.svg +1 -0
- package/dist/svg/mail-filled.svg +1 -0
- package/dist/svg/map.svg +1 -0
- package/dist/svg/publish.svg +1 -0
- package/dist/svg/wrench.svg +1 -0
- package/dist/types/components/pds-icon/pds-icon.d.ts +37 -0
- package/dist/types/components/pds-icon/request.d.ts +2 -0
- package/dist/types/components/pds-icon/utils.d.ts +24 -0
- package/dist/types/components/pds-icon/validate.d.ts +2 -0
- package/dist/types/components.d.ts +71 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1652 -0
- package/icons/index.d.ts +9 -1
- package/icons/index.js +9 -1
- package/icons/index.mjs +9 -1
- package/icons/package.json +1 -1
- package/package.json +1 -1
- package/readme.md +1 -1
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/access-key.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/add-circle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/add-image.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/add-small.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/add.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/ai-sparkle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/ai-writer-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/ai-writer.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/align-center.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/align-justify.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/align-left.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/align-right.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/analytics-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/analytics-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/app-store.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/archive.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-corner.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-down.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-left.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-right.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/arrow-up.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/assessment.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/at-sign.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/attach.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/automations.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/ban.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/bank.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/bell.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/blog.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/bold.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/broadcast.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/calendar-date.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/calendar-schedule.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/calendar-simple.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-amex.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-apple-card.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-diners-club.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-discover.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-gpay-card.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-mastercard.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-paypal.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-stripe.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-bw-visa.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/card-update.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/caret-down.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/caret-left.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/caret-right.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/caret-up.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/cart-add.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/cart.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/certificate.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/check-circle-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/check-circle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/check.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-1.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-2.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-3.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-4.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-5.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-6.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-7.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-8.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/circle-9.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/clock.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/closed-captions.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/code.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/color.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/columns.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/comment.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/connect.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/contact.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/contacts-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/contacts-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/conversation.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/copy.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/coupon.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/course.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/creator-studio-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/creator-studio.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/credit-card.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/custom-field.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/customize.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/danger-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/danger.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/dashboard-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/dashboard-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/delete-circle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/delete-key.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/delete-x.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/dollar-sign.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/dot-menu-horizontal.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/down-small.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/download.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/downsell.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/draft.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/drop.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/duplicate.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/email-activity.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/emoji.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/enlarge-vertical.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/enlarge.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/expand.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/facebook-2.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/facebook.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/favorite.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/feedback.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/file-money.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/file.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/filter.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/flag.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/folder-group.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/folder.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/form-field.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/form.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/fullscreen.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/funnel.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/grant-offer.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/handle-2-vertical.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/handle-2.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/handle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/hashtag.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/heading-large.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/heading-small.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/headset.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/help-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/help-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/home-alt.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/horizontal-line.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/image.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/info-circle-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/info-circle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/instagram.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/ios-battery.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/ios-data.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/ios-wifi.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/italic.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/kajabi-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/kajabi-outlined.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/lab.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/launch.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/layout-grid.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/layout-list.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/left-small.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/linkedin.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/list-bullet.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/list-numbers.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/location.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/lock-alt.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/lock.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/logo-afterpay.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/loop.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/mail.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/mapped.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/margin-left.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/margin-right.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/marker-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/marker.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/marketing-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/marketing-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/menu-2.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/menu-alt.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/menu.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/merge.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/microphone-off.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/microphone.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/move-left.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/move-right.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/multi-pay.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/newsletter.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/one-off-session.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/one-time.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/partners-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/partners-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/pause-circle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/pause.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/payout.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/pen.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/phone-portrait.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/phone-toolbar.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/play-circle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/play-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/play-store.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/play.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/plug.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/present.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/preview-off.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/preview-on.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/products-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/products-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/question-circle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/quote.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/redo.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/refresh.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/remove-circle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/remove.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/rename.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/reset-password.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/restore.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/right-small.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/round-dollar.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/rows.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/sales-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/sales-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/scissor.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/screen-share-off.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/screen-share-on.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/search-small.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/search.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/send-message.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/sequences.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/series.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/settings-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/settings-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/share.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/skipped.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/slash-divider.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/sparkle-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/sparkle.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/speaker.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/stack.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/star.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/stop.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/stopwatch.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/strikethrough.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/subscript.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/subscriptions.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/super-admin.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/superscript.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/sync.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/tablet-landscape.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/tablet-portrait.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/text-styles.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/theme-store.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/thumbs-down-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/thumbs-down.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/thumbs-up-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/thumbs-up.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/tiktok.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/trash.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/twitter.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/underline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/undo.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/unlock.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/unmapped.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/up-small.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/upload.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/url.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/user-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/user.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/users-wm.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/users.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/video-off.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/video-on.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/warning-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/warning.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/website-filled.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/website-outline.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/window-paragraph.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/world.svg +0 -0
- /package/dist/{pds-icons → collection/components/pds-icon}/svg/youtube.svg +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { newE2EPage } from "@stencil/core/testing";
|
|
2
|
+
describe('pds-icon', () => {
|
|
3
|
+
it('renders', async () => {
|
|
4
|
+
const page = await newE2EPage();
|
|
5
|
+
await page.setContent('<pds-icon role="img" style="height: 16px; width: 16px;"></pds-icon>');
|
|
6
|
+
const element = await page.find('pds-icon');
|
|
7
|
+
expect(element).toHaveClass('hydrated');
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=pds-icon.e2e.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pds-icon.e2e.js","sourceRoot":"","sources":["../../../../src/components/pds-icon/test/pds-icon.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;EACxB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;IAEhC,MAAM,IAAI,CAAC,UAAU,CAAC,qEAAqE,CAAC,CAAC;IAC7F,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC5C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;EAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('pds-icon', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n\n await page.setContent('<pds-icon role=\"img\" style=\"height: 16px; width: 16px;\"></pds-icon>');\n const element = await page.find('pds-icon');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
+
import { PdsIcon } from "../pds-icon";
|
|
3
|
+
describe('pds-icon', () => {
|
|
4
|
+
it('renders', async () => {
|
|
5
|
+
const { root } = await newSpecPage({
|
|
6
|
+
components: [PdsIcon],
|
|
7
|
+
html: '<pds-icon></pds-icon>',
|
|
8
|
+
});
|
|
9
|
+
expect(root).toEqualHtml(`
|
|
10
|
+
<pds-icon role="img" size="regular" style="height: 16px; width: 16px;">
|
|
11
|
+
<mock:shadow-root>
|
|
12
|
+
<div class="icon-inner"></div>
|
|
13
|
+
</mock:shadow-root>
|
|
14
|
+
</pds-icon>
|
|
15
|
+
`);
|
|
16
|
+
});
|
|
17
|
+
it('renders the correct size when passed', async () => {
|
|
18
|
+
const { root } = await newSpecPage({
|
|
19
|
+
components: [PdsIcon],
|
|
20
|
+
html: '<pds-icon size="small"></pds-icon>',
|
|
21
|
+
});
|
|
22
|
+
expect(root).toEqualHtml(`
|
|
23
|
+
<pds-icon role="img" size="small" style="height: 12px; width: 12px;">
|
|
24
|
+
<mock:shadow-root>
|
|
25
|
+
<div class="icon-inner"></div>
|
|
26
|
+
</mock:shadow-root>
|
|
27
|
+
</pds-icon>
|
|
28
|
+
`);
|
|
29
|
+
});
|
|
30
|
+
it('allows custom size', async () => {
|
|
31
|
+
const { root } = await newSpecPage({
|
|
32
|
+
components: [PdsIcon],
|
|
33
|
+
html: '<pds-icon size="32px"></pds-icon>',
|
|
34
|
+
});
|
|
35
|
+
expect(root).toEqualHtml(`
|
|
36
|
+
<pds-icon role="img" size="32px" style="height: 32px; width: 32px;">
|
|
37
|
+
<mock:shadow-root>
|
|
38
|
+
<div class="icon-inner"></div>
|
|
39
|
+
</mock:shadow-root>
|
|
40
|
+
</pds-icon>
|
|
41
|
+
`);
|
|
42
|
+
});
|
|
43
|
+
it('renders icon when found', async () => {
|
|
44
|
+
const { root } = await newSpecPage({
|
|
45
|
+
components: [PdsIcon],
|
|
46
|
+
html: '<pds-icon name="archive"></pds-icon>',
|
|
47
|
+
});
|
|
48
|
+
expect(root).toEqualHtml(`
|
|
49
|
+
<pds-icon aria-label="archive" name="archive" role="img" size="regular" style="height: 16px; width: 16px;">
|
|
50
|
+
<mock:shadow-root>
|
|
51
|
+
<div class="icon-inner"></div>
|
|
52
|
+
</mock:shadow-root>
|
|
53
|
+
</pds-icon>
|
|
54
|
+
`);
|
|
55
|
+
});
|
|
56
|
+
it('add correct styles when color specified', async () => {
|
|
57
|
+
const { root } = await newSpecPage({
|
|
58
|
+
components: [PdsIcon],
|
|
59
|
+
html: '<pds-icon name="archive" color="red"></pds-icon>',
|
|
60
|
+
});
|
|
61
|
+
expect(root).toEqualHtml(`
|
|
62
|
+
<pds-icon aria-label="archive" class="pds-color pds-color-red" color="red" name="archive" role="img" size="regular" style="height: 16px; width: 16px; color: red">
|
|
63
|
+
<mock:shadow-root>
|
|
64
|
+
<div class="icon-inner"></div>
|
|
65
|
+
</mock:shadow-root>
|
|
66
|
+
</pds-icon>
|
|
67
|
+
`);
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=pds-icon.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pds-icon.spec.js","sourceRoot":"","sources":["../../../../src/components/pds-icon/test/pds-icon.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE;EACxB,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;IACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;MACjC,UAAU,EAAE,CAAC,OAAO,CAAC;MACrB,IAAI,EAAE,uBAAuB;KAC9B,CAAC,CAAC;IACH,MAAM,CAAC,IAAI,CAAC,CAAC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'@stencil/core/testing';\nimport { PdsIcon } from '../pds-icon';\n\ndescribe('pds-icon', () => {\n it('renders', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders the correct size when passed', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon size=\"small\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon role=\"img\" size=\"small\" style=\"height: 12px; width: 12px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('allows custom size', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon size=\"32px\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon role=\"img\" size=\"32px\" style=\"height: 32px; width: 32px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('renders icon when found', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon name=\"archive\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon aria-label=\"archive\" name=\"archive\" role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px;\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n it('add correct styles when color specified', async () => {\n const { root } = await newSpecPage({\n components: [PdsIcon],\n html: '<pds-icon name=\"archive\" color=\"red\"></pds-icon>',\n });\n expect(root).toEqualHtml(`\n <pds-icon aria-label=\"archive\" class=\"pds-color pds-color-red\" color=\"red\" name=\"archive\" role=\"img\" size=\"regular\" style=\"height: 16px; width: 16px; color: red\">\n <mock:shadow-root>\n <div class=\"icon-inner\"></div>\n </mock:shadow-root>\n </pds-icon>\n `);\n });\n\n});\n"]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { getAssetPath } from "@stencil/core";
|
|
2
|
+
let CACHED_MAP;
|
|
3
|
+
export const addIcons = (icons) => {
|
|
4
|
+
const map = getIconMap();
|
|
5
|
+
Object.keys(icons).forEach(name => map.set(name, icons[name]));
|
|
6
|
+
};
|
|
7
|
+
export const getIconMap = () => {
|
|
8
|
+
if (typeof window === 'undefined') {
|
|
9
|
+
return new Map();
|
|
10
|
+
}
|
|
11
|
+
else {
|
|
12
|
+
if (!CACHED_MAP) {
|
|
13
|
+
const win = window; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
14
|
+
win.PdsIcons = win.PdsIcons || {};
|
|
15
|
+
CACHED_MAP = win.PdsIcons.map = win.PdsIcons.map || new Map();
|
|
16
|
+
}
|
|
17
|
+
return CACHED_MAP;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
export const getName = (iconName) => {
|
|
21
|
+
if (isStr(iconName)) {
|
|
22
|
+
iconName = toLower(iconName);
|
|
23
|
+
}
|
|
24
|
+
if (!isStr(iconName) || iconName.trim() === '') {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const invalidChars = iconName.replace(/[a-z]|-|\d/gi, '');
|
|
28
|
+
if (invalidChars != '') {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return iconName;
|
|
32
|
+
};
|
|
33
|
+
const getNamedUrl = (iconName) => {
|
|
34
|
+
const url = getIconMap().get(iconName);
|
|
35
|
+
if (url) {
|
|
36
|
+
return url;
|
|
37
|
+
}
|
|
38
|
+
return getAssetPath(`svg/${iconName}.svg`);
|
|
39
|
+
};
|
|
40
|
+
export const getSrc = (src) => {
|
|
41
|
+
if (isStr(src)) {
|
|
42
|
+
src = src.trim();
|
|
43
|
+
if (isSrc(src)) {
|
|
44
|
+
return src;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
};
|
|
49
|
+
export const getUrl = (icon) => {
|
|
50
|
+
const url = getName(icon.name);
|
|
51
|
+
if (url) {
|
|
52
|
+
return getNamedUrl(url);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export const isSrc = (str) => str.length > 0 && /(\/|\.)/.test(str);
|
|
56
|
+
export const isStr = (val) => typeof val === 'string'; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
57
|
+
export const toLower = (val) => val.toLowerCase();
|
|
58
|
+
/**
|
|
59
|
+
* Elements inside of web components sometimes need to inherit global attributes
|
|
60
|
+
* set on the host. For example, the inner input in `ion-input` should inherit
|
|
61
|
+
* the `title` attribute that developers set directly on `ion-input`. This
|
|
62
|
+
* helper function should be called in componentWillLoad and assigned to a variable
|
|
63
|
+
* that is later used in the render function.
|
|
64
|
+
*
|
|
65
|
+
* This does not need to be reactive as changing attributes on the host element
|
|
66
|
+
* does not trigger a re-render.
|
|
67
|
+
*/
|
|
68
|
+
export const inheritAttributes = (el, attributes = []) => {
|
|
69
|
+
const attributeObject = {}; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
70
|
+
attributes.forEach(attr => {
|
|
71
|
+
if (el.hasAttribute(attr)) {
|
|
72
|
+
const value = el.getAttribute(attr);
|
|
73
|
+
if (value !== null) {
|
|
74
|
+
attributeObject[attr] = el.getAttribute(attr);
|
|
75
|
+
}
|
|
76
|
+
el.removeAttribute(attr);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return attributeObject;
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +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,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AAC,YAAY,CAAC,IAAI,CAAC,EAAE;MACzB,MAAM,KAAK,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;MACpC,IAAI,KAAK,KAAK,IAAI,EAAE;QAClB,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;OAC/C;MACD,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;KAC1B;EACH,CAAC,CAAC,CAAC;EAEH,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 = (iconName: string | undefined) => {\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 = (icon: PdsIcon) => {\n const url = getName(icon.name);\n if (url) {\n return getNamedUrl(url);\n }\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"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { isStr } from "./utils";
|
|
2
|
+
export const validateContent = (svgContent) => {
|
|
3
|
+
const div = document.createElement('div');
|
|
4
|
+
div.innerHTML = svgContent;
|
|
5
|
+
// setup this way to ensure it works on our buddy IE
|
|
6
|
+
for (let i = div.childNodes.length - 1; i >= 0; i--) {
|
|
7
|
+
if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {
|
|
8
|
+
div.removeChild(div.childNodes[i]);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
// must only have 1 root element
|
|
12
|
+
const svgElm = div.firstElementChild;
|
|
13
|
+
if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {
|
|
14
|
+
const svgClass = svgElm.getAttribute('class') || '';
|
|
15
|
+
svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());
|
|
16
|
+
// root element must be an svg
|
|
17
|
+
// lets double check we've got valid elements
|
|
18
|
+
// do not allow scripts
|
|
19
|
+
if (isValid(svgElm)) {
|
|
20
|
+
return div.innerHTML;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return '';
|
|
24
|
+
};
|
|
25
|
+
export const isValid = (elm) => {
|
|
26
|
+
if (elm.nodeType === 1) {
|
|
27
|
+
if (elm.nodeName.toLowerCase() === 'script') {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
for (let i = 0; i < elm.attributes.length; i++) {
|
|
31
|
+
const name = elm.attributes[i].name;
|
|
32
|
+
if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
for (let i = 0; i < elm.childNodes.length; i++) {
|
|
37
|
+
if (!isValid(elm.childNodes[i])) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +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;EACpD,MAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;EAC1C,GAAG,CAAC,SAAS,GAAG,UAAU,CAAC;EAE3B,oDAAoD;EACpD,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;IACnD,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,EAAE;MACtD,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;KACpC;GACF;EAED,gCAAgC;EAChC,MAAM,MAAM,GAAG,GAAG,CAAC,i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AAO,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"]}
|
|
@@ -0,0 +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"]}
|
package/dist/docs.d.ts
ADDED
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This is an autogenerated file created by the Stencil compiler.
|
|
4
|
+
* DO NOT MODIFY IT MANUALLY
|
|
5
|
+
*/
|
|
6
|
+
interface ComponentCompilerPropertyComplexType {
|
|
7
|
+
/**
|
|
8
|
+
* The string of the original type annotation in the Stencil source code
|
|
9
|
+
*/
|
|
10
|
+
original: string;
|
|
11
|
+
/**
|
|
12
|
+
* A 'resolved' type, where e.g. imported types have been resolved and inlined
|
|
13
|
+
*
|
|
14
|
+
* For instance, an annotation like `(foo: Foo) => string;` will be
|
|
15
|
+
* converted to `(foo: { foo: string }) => string;`.
|
|
16
|
+
*/
|
|
17
|
+
resolved: string;
|
|
18
|
+
/**
|
|
19
|
+
* A record of the types which were referenced in the assorted type
|
|
20
|
+
* annotation in the original source file.
|
|
21
|
+
*/
|
|
22
|
+
references: ComponentCompilerTypeReferences;
|
|
23
|
+
}
|
|
24
|
+
type ComponentCompilerTypeReferences = Record<string, ComponentCompilerTypeReference>;
|
|
25
|
+
interface ComponentCompilerTypeReference {
|
|
26
|
+
/**
|
|
27
|
+
* A type may be defined:
|
|
28
|
+
* - locally (in the same file as the component that uses it)
|
|
29
|
+
* - globally
|
|
30
|
+
* - by importing it into a file (and is defined elsewhere)
|
|
31
|
+
*/
|
|
32
|
+
location: "local" | "global" | "import";
|
|
33
|
+
/**
|
|
34
|
+
* The path to the type reference, if applicable (global types should not need a path associated with them)
|
|
35
|
+
*/
|
|
36
|
+
path?: string;
|
|
37
|
+
/**
|
|
38
|
+
* An ID for this type which is unique within a Stencil project.
|
|
39
|
+
*/
|
|
40
|
+
id: string;
|
|
41
|
+
}
|
|
42
|
+
interface ComponentCompilerReferencedType {
|
|
43
|
+
/**
|
|
44
|
+
* The path to the module where the type is declared.
|
|
45
|
+
*/
|
|
46
|
+
path: string;
|
|
47
|
+
/**
|
|
48
|
+
* The string of the original type annotation in the Stencil source code
|
|
49
|
+
*/
|
|
50
|
+
declaration: string;
|
|
51
|
+
/**
|
|
52
|
+
* An extracted docstring
|
|
53
|
+
*/
|
|
54
|
+
docstring: string;
|
|
55
|
+
}
|
|
56
|
+
interface ComponentCompilerEventComplexType {
|
|
57
|
+
original: string;
|
|
58
|
+
resolved: string;
|
|
59
|
+
references: ComponentCompilerTypeReferences;
|
|
60
|
+
}
|
|
61
|
+
interface ComponentCompilerMethodComplexType {
|
|
62
|
+
signature: string;
|
|
63
|
+
parameters: CompilerJsDoc[];
|
|
64
|
+
references: ComponentCompilerTypeReferences;
|
|
65
|
+
return: string;
|
|
66
|
+
}
|
|
67
|
+
interface CompilerJsDoc {
|
|
68
|
+
/**
|
|
69
|
+
* The text associated with the JSDoc
|
|
70
|
+
*/
|
|
71
|
+
text: string;
|
|
72
|
+
/**
|
|
73
|
+
* Tags included in the JSDoc
|
|
74
|
+
*/
|
|
75
|
+
tags: CompilerJsDocTagInfo[];
|
|
76
|
+
}
|
|
77
|
+
interface CompilerJsDocTagInfo {
|
|
78
|
+
/**
|
|
79
|
+
* The name of the tag - e.g. `@deprecated`
|
|
80
|
+
*/
|
|
81
|
+
name: string;
|
|
82
|
+
/**
|
|
83
|
+
* Additional text that is associated with the tag - e.g. `@deprecated use v2 of this API`
|
|
84
|
+
*/
|
|
85
|
+
text?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The Type Library holds information about the types which are used in a
|
|
89
|
+
* Stencil project. During compilation, Stencil gathers information about the
|
|
90
|
+
* types which form part of a component's public API, such as properties
|
|
91
|
+
* decorated with `@Prop`, `@Event`, `@Watch`, etc. This type information is
|
|
92
|
+
* then added to the Type Library, where it can be accessed later on for
|
|
93
|
+
* generating documentation.
|
|
94
|
+
*
|
|
95
|
+
* This information is included in the file written by the `docs-json` output
|
|
96
|
+
* target (see {@link JsonDocs.typeLibrary}).
|
|
97
|
+
*/
|
|
98
|
+
export type JsonDocsTypeLibrary = Record<string, ComponentCompilerReferencedType>;
|
|
99
|
+
/**
|
|
100
|
+
* A container for JSDoc metadata for a project
|
|
101
|
+
*/
|
|
102
|
+
export interface JsonDocs {
|
|
103
|
+
/**
|
|
104
|
+
* The metadata for the JSDocs for each component in a Stencil project
|
|
105
|
+
*/
|
|
106
|
+
components: JsonDocsComponent[];
|
|
107
|
+
/**
|
|
108
|
+
* The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
|
|
109
|
+
*/
|
|
110
|
+
timestamp: string;
|
|
111
|
+
compiler: {
|
|
112
|
+
/**
|
|
113
|
+
* The name of the compiler that generated the metadata
|
|
114
|
+
*/
|
|
115
|
+
name: string;
|
|
116
|
+
/**
|
|
117
|
+
* The version of the Stencil compiler that generated the metadata
|
|
118
|
+
*/
|
|
119
|
+
version: string;
|
|
120
|
+
/**
|
|
121
|
+
* The version of TypeScript that was used to generate the metadata
|
|
122
|
+
*/
|
|
123
|
+
typescriptVersion: string;
|
|
124
|
+
};
|
|
125
|
+
typeLibrary: JsonDocsTypeLibrary;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Container for JSDoc metadata for a single Stencil component
|
|
129
|
+
*/
|
|
130
|
+
export interface JsonDocsComponent {
|
|
131
|
+
/**
|
|
132
|
+
* The directory containing the Stencil component, minus the file name.
|
|
133
|
+
*
|
|
134
|
+
* @example /workspaces/stencil-project/src/components/my-component
|
|
135
|
+
*/
|
|
136
|
+
dirPath?: string;
|
|
137
|
+
/**
|
|
138
|
+
* The name of the file containing the Stencil component, with no path
|
|
139
|
+
*
|
|
140
|
+
* @example my-component.tsx
|
|
141
|
+
*/
|
|
142
|
+
fileName?: string;
|
|
143
|
+
/**
|
|
144
|
+
* The full path of the file containing the Stencil component
|
|
145
|
+
*
|
|
146
|
+
* @example /workspaces/stencil-project/src/components/my-component/my-component.tsx
|
|
147
|
+
*/
|
|
148
|
+
filePath?: string;
|
|
149
|
+
/**
|
|
150
|
+
* The path to the component's `readme.md` file, including the filename
|
|
151
|
+
*
|
|
152
|
+
* @example /workspaces/stencil-project/src/components/my-component/readme.md
|
|
153
|
+
*/
|
|
154
|
+
readmePath?: string;
|
|
155
|
+
/**
|
|
156
|
+
* The path to the component's `usage` directory
|
|
157
|
+
*
|
|
158
|
+
* @example /workspaces/stencil-project/src/components/my-component/usage/
|
|
159
|
+
*/
|
|
160
|
+
usagesDir?: string;
|
|
161
|
+
/**
|
|
162
|
+
* The encapsulation strategy for a component
|
|
163
|
+
*/
|
|
164
|
+
encapsulation: "shadow" | "scoped" | "none";
|
|
165
|
+
/**
|
|
166
|
+
* The tag name for the component, for use in HTML
|
|
167
|
+
*/
|
|
168
|
+
tag: string;
|
|
169
|
+
/**
|
|
170
|
+
* The contents of a component's `readme.md` that are user generated.
|
|
171
|
+
*
|
|
172
|
+
* Auto-generated contents are not stored in this reference.
|
|
173
|
+
*/
|
|
174
|
+
readme: string;
|
|
175
|
+
/**
|
|
176
|
+
* The description of a Stencil component, found in the JSDoc that sits above the component's declaration
|
|
177
|
+
*/
|
|
178
|
+
docs: string;
|
|
179
|
+
/**
|
|
180
|
+
* JSDoc tags found in the JSDoc comment written atop a component's declaration
|
|
181
|
+
*/
|
|
182
|
+
docsTags: JsonDocsTag[];
|
|
183
|
+
/**
|
|
184
|
+
* The text from the class-level JSDoc for a Stencil component, if present.
|
|
185
|
+
*/
|
|
186
|
+
overview?: string;
|
|
187
|
+
/**
|
|
188
|
+
* A mapping of usage example file names to their contents for the component.
|
|
189
|
+
*/
|
|
190
|
+
usage: JsonDocsUsage;
|
|
191
|
+
/**
|
|
192
|
+
* Array of metadata for a component's `@Prop`s
|
|
193
|
+
*/
|
|
194
|
+
props: JsonDocsProp[];
|
|
195
|
+
/**
|
|
196
|
+
* Array of metadata for a component's `@Method`s
|
|
197
|
+
*/
|
|
198
|
+
methods: JsonDocsMethod[];
|
|
199
|
+
/**
|
|
200
|
+
* Array of metadata for a component's `@Event`s
|
|
201
|
+
*/
|
|
202
|
+
events: JsonDocsEvent[];
|
|
203
|
+
/**
|
|
204
|
+
* Array of metadata for a component's `@Listen` handlers
|
|
205
|
+
*/
|
|
206
|
+
listeners: JsonDocsListener[];
|
|
207
|
+
/**
|
|
208
|
+
* Array of metadata for a component's CSS styling information
|
|
209
|
+
*/
|
|
210
|
+
styles: JsonDocsStyle[];
|
|
211
|
+
/**
|
|
212
|
+
* Array of component Slot information, generated from `@slot` tags
|
|
213
|
+
*/
|
|
214
|
+
slots: JsonDocsSlot[];
|
|
215
|
+
/**
|
|
216
|
+
* Array of component Parts information, generate from `@part` tags
|
|
217
|
+
*/
|
|
218
|
+
parts: JsonDocsPart[];
|
|
219
|
+
/**
|
|
220
|
+
* Array of metadata describing where the current component is used
|
|
221
|
+
*/
|
|
222
|
+
dependents: string[];
|
|
223
|
+
/**
|
|
224
|
+
* Array of metadata listing the components which are used in current component
|
|
225
|
+
*/
|
|
226
|
+
dependencies: string[];
|
|
227
|
+
/**
|
|
228
|
+
* Describes a tree of components coupling
|
|
229
|
+
*/
|
|
230
|
+
dependencyGraph: JsonDocsDependencyGraph;
|
|
231
|
+
/**
|
|
232
|
+
* A deprecation reason/description found following a `@deprecated` tag
|
|
233
|
+
*/
|
|
234
|
+
deprecation?: string;
|
|
235
|
+
}
|
|
236
|
+
export interface JsonDocsDependencyGraph {
|
|
237
|
+
[tagName: string]: string[];
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* A descriptor for a single JSDoc tag found in a block comment
|
|
241
|
+
*/
|
|
242
|
+
export interface JsonDocsTag {
|
|
243
|
+
/**
|
|
244
|
+
* The tag name (immediately following the '@')
|
|
245
|
+
*/
|
|
246
|
+
name: string;
|
|
247
|
+
/**
|
|
248
|
+
* The description that immediately follows the tag name
|
|
249
|
+
*/
|
|
250
|
+
text?: string;
|
|
251
|
+
}
|
|
252
|
+
export interface JsonDocsValue {
|
|
253
|
+
value?: string;
|
|
254
|
+
type: string;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* A mapping of file names to their contents.
|
|
258
|
+
*
|
|
259
|
+
* This type is meant to be used when reading one or more usage markdown files associated with a component. For the
|
|
260
|
+
* given directory structure:
|
|
261
|
+
* ```
|
|
262
|
+
* src/components/my-component
|
|
263
|
+
* ├── my-component.tsx
|
|
264
|
+
* └── usage
|
|
265
|
+
* ├── bar.md
|
|
266
|
+
* └── foo.md
|
|
267
|
+
* ```
|
|
268
|
+
* an instance of this type would include the name of the markdown file, mapped to its contents:
|
|
269
|
+
* ```ts
|
|
270
|
+
* {
|
|
271
|
+
* 'bar': STRING_CONTENTS_OF_BAR.MD
|
|
272
|
+
* 'foo': STRING_CONTENTS_OF_FOO.MD
|
|
273
|
+
* }
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
276
|
+
export interface JsonDocsUsage {
|
|
277
|
+
[key: string]: string;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* An intermediate representation of a `@Prop` decorated member's JSDoc
|
|
281
|
+
*/
|
|
282
|
+
export interface JsonDocsProp {
|
|
283
|
+
/**
|
|
284
|
+
* the name of the prop
|
|
285
|
+
*/
|
|
286
|
+
name: string;
|
|
287
|
+
complexType?: ComponentCompilerPropertyComplexType;
|
|
288
|
+
/**
|
|
289
|
+
* the type of the prop, in terms of the TypeScript type system (as opposed to JavaScript's or HTML's)
|
|
290
|
+
*/
|
|
291
|
+
type: string;
|
|
292
|
+
/**
|
|
293
|
+
* `true` if the prop was configured as "mutable" where it was declared, `false` otherwise
|
|
294
|
+
*/
|
|
295
|
+
mutable: boolean;
|
|
296
|
+
/**
|
|
297
|
+
* The name of the attribute that is exposed to configure a compiled web component
|
|
298
|
+
*/
|
|
299
|
+
attr?: string;
|
|
300
|
+
/**
|
|
301
|
+
* `true` if the prop was configured to "reflect" back to HTML where it (the prop) was declared, `false` otherwise
|
|
302
|
+
*/
|
|
303
|
+
reflectToAttr: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* the JSDoc description text associated with the prop
|
|
306
|
+
*/
|
|
307
|
+
docs: string;
|
|
308
|
+
/**
|
|
309
|
+
* JSDoc tags associated with the prop
|
|
310
|
+
*/
|
|
311
|
+
docsTags: JsonDocsTag[];
|
|
312
|
+
/**
|
|
313
|
+
* The default value of the prop
|
|
314
|
+
*/
|
|
315
|
+
default?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Deprecation text associated with the prop. This is the text that immediately follows a `@deprecated` tag
|
|
318
|
+
*/
|
|
319
|
+
deprecation?: string;
|
|
320
|
+
values: JsonDocsValue[];
|
|
321
|
+
/**
|
|
322
|
+
* `true` if a component is declared with a '?', `false` otherwise
|
|
323
|
+
*
|
|
324
|
+
* @example
|
|
325
|
+
* ```tsx
|
|
326
|
+
* @Prop() componentProps?: any;
|
|
327
|
+
* ```
|
|
328
|
+
*/
|
|
329
|
+
optional: boolean;
|
|
330
|
+
/**
|
|
331
|
+
* `true` if a component is declared with a '!', `false` otherwise
|
|
332
|
+
*
|
|
333
|
+
* @example
|
|
334
|
+
* ```tsx
|
|
335
|
+
* @Prop() componentProps!: any;
|
|
336
|
+
* ```
|
|
337
|
+
*/
|
|
338
|
+
required: boolean;
|
|
339
|
+
}
|
|
340
|
+
export interface JsonDocsMethod {
|
|
341
|
+
name: string;
|
|
342
|
+
docs: string;
|
|
343
|
+
docsTags: JsonDocsTag[];
|
|
344
|
+
deprecation?: string;
|
|
345
|
+
signature: string;
|
|
346
|
+
returns: JsonDocsMethodReturn;
|
|
347
|
+
parameters: JsonDocMethodParameter[];
|
|
348
|
+
complexType: ComponentCompilerMethodComplexType;
|
|
349
|
+
}
|
|
350
|
+
export interface JsonDocsMethodReturn {
|
|
351
|
+
type: string;
|
|
352
|
+
docs: string;
|
|
353
|
+
}
|
|
354
|
+
export interface JsonDocMethodParameter {
|
|
355
|
+
name: string;
|
|
356
|
+
type: string;
|
|
357
|
+
docs: string;
|
|
358
|
+
}
|
|
359
|
+
export interface JsonDocsEvent {
|
|
360
|
+
event: string;
|
|
361
|
+
bubbles: boolean;
|
|
362
|
+
cancelable: boolean;
|
|
363
|
+
composed: boolean;
|
|
364
|
+
complexType: ComponentCompilerEventComplexType;
|
|
365
|
+
docs: string;
|
|
366
|
+
docsTags: JsonDocsTag[];
|
|
367
|
+
deprecation?: string;
|
|
368
|
+
detail: string;
|
|
369
|
+
}
|
|
370
|
+
export interface JsonDocsStyle {
|
|
371
|
+
name: string;
|
|
372
|
+
docs: string;
|
|
373
|
+
annotation: string;
|
|
374
|
+
}
|
|
375
|
+
export interface JsonDocsListener {
|
|
376
|
+
event: string;
|
|
377
|
+
target?: string;
|
|
378
|
+
capture: boolean;
|
|
379
|
+
passive: boolean;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* A descriptor for a slot
|
|
383
|
+
*
|
|
384
|
+
* Objects of this type are translated from the JSDoc tag, `@slot`
|
|
385
|
+
*/
|
|
386
|
+
export interface JsonDocsSlot {
|
|
387
|
+
/**
|
|
388
|
+
* The name of the slot. Defaults to an empty string for an unnamed slot.
|
|
389
|
+
*/
|
|
390
|
+
name: string;
|
|
391
|
+
/**
|
|
392
|
+
* A textual description of the slot.
|
|
393
|
+
*/
|
|
394
|
+
docs: string;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* A descriptor of a CSS Shadow Part
|
|
398
|
+
*
|
|
399
|
+
* Objects of this type are translated from the JSDoc tag, `@part`, or the 'part'
|
|
400
|
+
* attribute on a component in TSX
|
|
401
|
+
*/
|
|
402
|
+
export interface JsonDocsPart {
|
|
403
|
+
/**
|
|
404
|
+
* The name of the Shadow part
|
|
405
|
+
*/
|
|
406
|
+
name: string;
|
|
407
|
+
/**
|
|
408
|
+
* A textual description of the Shadow part.
|
|
409
|
+
*/
|
|
410
|
+
docs: string;
|
|
411
|
+
}
|
|
412
|
+
export interface StyleDoc {
|
|
413
|
+
name: string;
|
|
414
|
+
docs: string;
|
|
415
|
+
annotation: "prop";
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
export {};
|
|
419
|
+
|
|
420
|
+
declare const _default: JsonDocs;
|
|
421
|
+
export default _default;
|