@usecapsule/core-components 2.0.2 → 2.0.4-dev.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/capsule/capsule.esm.js +1 -52
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js +1 -572
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/p-0462f723.js +2 -0
- package/dist/capsule/p-0462f723.js.map +1 -0
- package/dist/capsule/p-68c73705.entry.js +2 -0
- package/dist/capsule/p-68c73705.entry.js.map +1 -0
- package/dist/capsule/p-6fb7c4d1.js +3 -0
- package/dist/capsule/p-6fb7c4d1.js.map +1 -0
- package/dist/capsule/p-91412151.entry.js +2 -0
- package/dist/capsule/p-91412151.entry.js.map +1 -0
- package/dist/capsule/p-a95ec4df.entry.js +2 -0
- package/dist/capsule/p-a95ec4df.entry.js.map +1 -0
- package/dist/capsule/p-c2bf050b.js +2 -0
- package/dist/capsule/p-c2bf050b.js.map +1 -0
- package/dist/capsule/p-cacdef26.entry.js +29 -0
- package/dist/capsule/p-cacdef26.entry.js.map +1 -0
- package/dist/capsule/p-d7be092d.entry.js +10 -0
- package/dist/capsule/p-d7be092d.entry.js.map +1 -0
- package/dist/capsule/p-e1255160.js +2 -0
- package/dist/capsule/p-e1255160.js.map +1 -0
- package/dist/capsule/p-f604b591.entry.js +2 -0
- package/dist/capsule/p-f604b591.entry.js.map +1 -0
- package/dist/cjs/_commonjsHelpers-b3309d7b.js +12 -0
- package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/capsule.cjs.js +27 -0
- package/dist/cjs/capsule.cjs.js.map +1 -0
- package/dist/cjs/constants-4bb85cc5.js +12 -0
- package/dist/cjs/constants-4bb85cc5.js.map +1 -0
- package/dist/cjs/cpsl-alert_17.cjs.entry.js +10737 -0
- package/dist/cjs/cpsl-alert_17.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-animation.cjs.entry.js +20129 -0
- package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-col.cjs.entry.js +125 -0
- package/dist/cjs/cpsl-col.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-grid.cjs.entry.js +25 -0
- package/dist/cjs/cpsl-grid.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-info-box.cjs.entry.js +22 -0
- package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-row.cjs.entry.js +22 -0
- package/dist/cjs/cpsl-row.cjs.entry.js.map +1 -0
- package/dist/cjs/index-3fccb5b4.js +2012 -0
- package/dist/cjs/index-3fccb5b4.js.map +1 -0
- package/dist/cjs/index.cjs.js +342 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/assets/icons/alert-circle.svg +3 -0
- package/dist/collection/assets/icons/angel-list-brand.svg +3 -0
- package/dist/collection/assets/icons/angel-list.svg +3 -0
- package/dist/collection/assets/icons/apple-brand.svg +3 -0
- package/dist/collection/assets/icons/apple.svg +3 -0
- package/dist/collection/assets/icons/arrow-narrow.svg +3 -0
- package/dist/collection/assets/icons/arrow.svg +3 -0
- package/dist/collection/assets/icons/backup-kit.svg +4 -0
- package/dist/collection/assets/icons/capsule-logo.svg +18 -0
- package/dist/collection/assets/icons/capsule-rings-dark.svg +34 -0
- package/dist/collection/assets/icons/capsule-rings.svg +34 -0
- package/dist/collection/assets/icons/capsule.svg +4 -0
- package/dist/collection/assets/icons/check.svg +3 -0
- package/dist/collection/assets/icons/clock.svg +3 -0
- package/dist/collection/assets/icons/close.svg +4 -0
- package/dist/collection/assets/icons/clubhouse-brand.svg +4 -0
- package/dist/collection/assets/icons/clubhouse.svg +4 -0
- package/dist/collection/assets/icons/copy.svg +3 -0
- package/dist/collection/assets/icons/decent-brand.svg +3 -0
- package/dist/collection/assets/icons/decent.svg +3 -0
- package/dist/collection/assets/icons/discord-brand.svg +4 -0
- package/dist/collection/assets/icons/discord.svg +4 -0
- package/dist/collection/assets/icons/download-cloud.svg +3 -0
- package/dist/collection/assets/icons/dribbble-brand.svg +4 -0
- package/dist/collection/assets/icons/dribbble.svg +3 -0
- package/dist/collection/assets/icons/eye-off.svg +3 -0
- package/dist/collection/assets/icons/eye.svg +4 -0
- package/dist/collection/assets/icons/facebook-brand.svg +11 -0
- package/dist/collection/assets/icons/facebook.svg +10 -0
- package/dist/collection/assets/icons/figma-brand.svg +14 -0
- package/dist/collection/assets/icons/figma.svg +3 -0
- package/dist/collection/assets/icons/github-brand.svg +10 -0
- package/dist/collection/assets/icons/github.svg +10 -0
- package/dist/collection/assets/icons/google-brand.svg +13 -0
- package/dist/collection/assets/icons/google.svg +10 -0
- package/dist/collection/assets/icons/help-circle.svg +3 -0
- package/dist/collection/assets/icons/hero-email.svg +12 -0
- package/dist/collection/assets/icons/hero-lock.svg +4 -0
- package/dist/collection/assets/icons/hero-passkey.svg +12 -0
- package/dist/collection/assets/icons/hero-phone.svg +4 -0
- package/dist/collection/assets/icons/hero-wallet.svg +5 -0
- package/dist/collection/assets/icons/index.js +75 -0
- package/dist/collection/assets/icons/index.js.map +1 -0
- package/dist/collection/assets/icons/info-circle.svg +3 -0
- package/dist/collection/assets/icons/instagram-brand.svg +12 -0
- package/dist/collection/assets/icons/instagram.svg +12 -0
- package/dist/collection/assets/icons/key.svg +3 -0
- package/dist/collection/assets/icons/lightning.svg +3 -0
- package/dist/collection/assets/icons/linkedin-brand.svg +10 -0
- package/dist/collection/assets/icons/linkedin.svg +10 -0
- package/dist/collection/assets/icons/mail.svg +3 -0
- package/dist/collection/assets/icons/more-login-options.svg +13 -0
- package/dist/collection/assets/icons/phone.svg +3 -0
- package/dist/collection/assets/icons/pintrest-brand.svg +11 -0
- package/dist/collection/assets/icons/pintrest.svg +10 -0
- package/dist/collection/assets/icons/plus-circle.svg +5 -0
- package/dist/collection/assets/icons/ramp-network-brand.svg +3 -0
- package/dist/collection/assets/icons/ramp-network.svg +3 -0
- package/dist/collection/assets/icons/reddit-brand.svg +11 -0
- package/dist/collection/assets/icons/reddit.svg +3 -0
- package/dist/collection/assets/icons/signal-brand.svg +3 -0
- package/dist/collection/assets/icons/signal.svg +3 -0
- package/dist/collection/assets/icons/snapchat-brand.svg +4 -0
- package/dist/collection/assets/icons/snapchat.svg +3 -0
- package/dist/collection/assets/icons/telegram-brand.svg +15 -0
- package/dist/collection/assets/icons/telegram.svg +10 -0
- package/dist/collection/assets/icons/tik-tok-brand.svg +5 -0
- package/dist/collection/assets/icons/tik-tok.svg +3 -0
- package/dist/collection/assets/icons/tumblr-brand.svg +10 -0
- package/dist/collection/assets/icons/tumblr.svg +10 -0
- package/dist/collection/assets/icons/twitter-brand.svg +3 -0
- package/dist/collection/assets/icons/twitter.svg +3 -0
- package/dist/collection/assets/icons/wallet.svg +5 -0
- package/dist/collection/assets/icons/youtube-brand.svg +11 -0
- package/dist/collection/assets/icons/youtube.svg +3 -0
- package/dist/collection/collection-manifest.json +33 -0
- package/dist/collection/components/cpsl-alert/cpsl-alert.css +98 -0
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +80 -0
- package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -0
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js +29 -0
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js +37 -0
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js.map +1 -0
- package/dist/collection/components/cpsl-animation/cpsl-animation.css +17 -0
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +102 -0
- package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +29 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +37 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +1 -0
- package/dist/collection/components/cpsl-button/cpsl-button.css +162 -0
- package/dist/collection/components/cpsl-button/cpsl-button.js +68 -0
- package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -0
- package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js +29 -0
- package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js +37 -0
- package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js.map +1 -0
- package/dist/collection/components/cpsl-code-input/code-change-interface.js +2 -0
- package/dist/collection/components/cpsl-code-input/code-change-interface.js.map +1 -0
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +134 -0
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +223 -0
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -0
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js +29 -0
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js +37 -0
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js.map +1 -0
- package/dist/collection/components/cpsl-col/cpsl-col.css +200 -0
- package/dist/collection/components/cpsl-col/cpsl-col.js +528 -0
- package/dist/collection/components/cpsl-col/cpsl-col.js.map +1 -0
- package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js +29 -0
- package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js +37 -0
- package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js.map +1 -0
- package/dist/collection/components/cpsl-divider/cpsl-divider.css +73 -0
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +19 -0
- package/dist/collection/components/cpsl-divider/cpsl-divider.js.map +1 -0
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js +29 -0
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js +37 -0
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js.map +1 -0
- package/dist/collection/components/cpsl-grid/cpsl-grid.css +235 -0
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +46 -0
- package/dist/collection/components/cpsl-grid/cpsl-grid.js.map +1 -0
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js +29 -0
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js +37 -0
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js.map +1 -0
- package/dist/collection/components/cpsl-icon/cpsl-icon.css +95 -0
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +68 -0
- package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -0
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js +29 -0
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js +37 -0
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js.map +1 -0
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +77 -0
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +19 -0
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js.map +1 -0
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js +29 -0
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js +37 -0
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js.map +1 -0
- package/dist/collection/components/cpsl-input/cpsl-input.css +194 -0
- package/dist/collection/components/cpsl-input/cpsl-input.js +708 -0
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -0
- package/dist/collection/components/cpsl-input/input-interface.js +2 -0
- package/dist/collection/components/cpsl-input/input-interface.js.map +1 -0
- package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js +29 -0
- package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js +37 -0
- package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js.map +1 -0
- package/dist/collection/components/cpsl-modal/cpsl-modal.css +172 -0
- package/dist/collection/components/cpsl-modal/cpsl-modal.js +431 -0
- package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -0
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js +29 -0
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js +37 -0
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js.map +1 -0
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +11 -0
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +108 -0
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -0
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js +29 -0
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js +37 -0
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js.map +1 -0
- package/dist/collection/components/cpsl-pill/cpsl-pill.css +92 -0
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +43 -0
- package/dist/collection/components/cpsl-pill/cpsl-pill.js.map +1 -0
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js +29 -0
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js +37 -0
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js.map +1 -0
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +82 -0
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.js +71 -0
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.js.map +1 -0
- package/dist/collection/components/cpsl-progress-indicator/progress-indicator-interface.js +2 -0
- package/dist/collection/components/cpsl-progress-indicator/progress-indicator-interface.js.map +1 -0
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js +29 -0
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js +37 -0
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js.map +1 -0
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +81 -0
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +107 -0
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js.map +1 -0
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js +29 -0
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js +37 -0
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js.map +1 -0
- package/dist/collection/components/cpsl-row/cpsl-row.css +136 -0
- package/dist/collection/components/cpsl-row/cpsl-row.js +19 -0
- package/dist/collection/components/cpsl-row/cpsl-row.js.map +1 -0
- package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js +29 -0
- package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js +37 -0
- package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js.map +1 -0
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +175 -0
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +252 -0
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js.map +1 -0
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js +29 -0
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js +37 -0
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js.map +1 -0
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +68 -0
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +69 -0
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js.map +1 -0
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js +29 -0
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js +37 -0
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js.map +1 -0
- package/dist/collection/components/cpsl-tab/cpsl-tab.css +23 -0
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +121 -0
- package/dist/collection/components/cpsl-tab/cpsl-tab.js.map +1 -0
- package/dist/collection/components/cpsl-tab/tab-interface.js +2 -0
- package/dist/collection/components/cpsl-tab/tab-interface.js.map +1 -0
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js +29 -0
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js +37 -0
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js.map +1 -0
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +111 -0
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +170 -0
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -0
- package/dist/collection/components/cpsl-tabs/tabs-interface.js +2 -0
- package/dist/collection/components/cpsl-tabs/tabs-interface.js.map +1 -0
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js +29 -0
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js +37 -0
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js.map +1 -0
- package/dist/collection/components/cpsl-text/cpsl-text.css +59 -0
- package/dist/collection/components/cpsl-text/cpsl-text.js +19 -0
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -0
- package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js +29 -0
- package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js +37 -0
- package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js.map +1 -0
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +97 -0
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +67 -0
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js.map +1 -0
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js +29 -0
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js +37 -0
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js.map +1 -0
- package/dist/collection/constants.js +6 -0
- package/dist/collection/constants.js.map +1 -0
- package/dist/collection/index.js +3 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/interface.js +2 -0
- package/dist/collection/interface.js.map +1 -0
- package/dist/collection/utils/media.js +18 -0
- package/dist/collection/utils/media.js.map +1 -0
- package/dist/collection/utils/theme/generateBorderRadii.js +56 -0
- package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -0
- package/dist/collection/utils/theme/generateFont.js +7 -0
- package/dist/collection/utils/theme/generateFont.js.map +1 -0
- package/dist/collection/utils/theme/generatePalette.js +46 -0
- package/dist/collection/utils/theme/generatePalette.js.map +1 -0
- package/dist/collection/utils/theme/generateTheme.js +12 -0
- package/dist/collection/utils/theme/generateTheme.js.map +1 -0
- package/dist/collection/utils/theme/utils.js +21 -0
- package/dist/collection/utils/theme/utils.js.map +1 -0
- package/dist/esm/_commonjsHelpers-1789f0cf.js +9 -0
- package/dist/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
- package/dist/esm/capsule.js +22 -0
- package/dist/esm/capsule.js.map +1 -0
- package/dist/esm/cpsl-alert_17.entry.js +10717 -0
- package/dist/esm/cpsl-alert_17.entry.js.map +1 -0
- package/dist/{capsule → esm}/cpsl-animation.entry.js +20 -114
- package/dist/esm/cpsl-animation.entry.js.map +1 -0
- package/dist/{capsule → esm}/cpsl-col.entry.js +4 -3
- package/dist/esm/cpsl-col.entry.js.map +1 -0
- package/dist/{capsule → esm}/cpsl-grid.entry.js +5 -4
- package/dist/esm/cpsl-grid.entry.js.map +1 -0
- package/dist/{capsule → esm}/cpsl-info-box.entry.js +4 -3
- package/dist/esm/cpsl-info-box.entry.js.map +1 -0
- package/dist/esm/cpsl-row.entry.js +18 -0
- package/dist/esm/cpsl-row.entry.js.map +1 -0
- package/dist/esm/index-f00e090c.js +1982 -0
- package/dist/esm/index-f00e090c.js.map +1 -0
- package/dist/esm/index.js +338 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.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/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/scripts/buildIconLibrary.js +33 -0
- package/dist/scripts/buildIconLibrary.js.map +1 -0
- package/dist/types/assets/icons/index.d.ts +5 -0
- package/dist/types/components/cpsl-text/cpsl-text.d.ts +0 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interface.d.ts +0 -15
- package/dist/types/utils/theme/generateFont.d.ts +1 -1
- package/dist/types/utils/theme/generateTheme.d.ts +2 -1
- package/package.json +2 -2
- package/dist/capsule/_commonjsHelpers-bc8ff177.js +0 -36
- package/dist/capsule/_commonjsHelpers-bc8ff177.js.map +0 -1
- package/dist/capsule/cpsl-alert.entry.js +0 -31
- package/dist/capsule/cpsl-alert.entry.js.map +0 -1
- package/dist/capsule/cpsl-animation.entry.js.map +0 -1
- package/dist/capsule/cpsl-button.entry.js +0 -24
- package/dist/capsule/cpsl-button.entry.js.map +0 -1
- package/dist/capsule/cpsl-code-input.entry.js +0 -106
- package/dist/capsule/cpsl-code-input.entry.js.map +0 -1
- package/dist/capsule/cpsl-col.entry.js.map +0 -1
- package/dist/capsule/cpsl-divider.entry.js +0 -17
- package/dist/capsule/cpsl-divider.entry.js.map +0 -1
- package/dist/capsule/cpsl-grid.entry.js.map +0 -1
- package/dist/capsule/cpsl-icon.entry.js +0 -20
- package/dist/capsule/cpsl-icon.entry.js.map +0 -1
- package/dist/capsule/cpsl-info-box.entry.js.map +0 -1
- package/dist/capsule/cpsl-input.entry.js +0 -124
- package/dist/capsule/cpsl-input.entry.js.map +0 -1
- package/dist/capsule/cpsl-modal.entry.js +0 -3338
- package/dist/capsule/cpsl-modal.entry.js.map +0 -1
- package/dist/capsule/cpsl-overlay.entry.js +0 -44
- package/dist/capsule/cpsl-overlay.entry.js.map +0 -1
- package/dist/capsule/cpsl-pill.entry.js +0 -18
- package/dist/capsule/cpsl-pill.entry.js.map +0 -1
- package/dist/capsule/cpsl-progress-indicator.entry.js +0 -29
- package/dist/capsule/cpsl-progress-indicator.entry.js.map +0 -1
- package/dist/capsule/cpsl-qr-code.entry.js +0 -56
- package/dist/capsule/cpsl-qr-code.entry.js.map +0 -1
- package/dist/capsule/cpsl-row.entry.js +0 -17
- package/dist/capsule/cpsl-row.entry.js.map +0 -1
- package/dist/capsule/cpsl-slide-button.entry.js +0 -130
- package/dist/capsule/cpsl-slide-button.entry.js.map +0 -1
- package/dist/capsule/cpsl-spinner.entry.js +0 -25
- package/dist/capsule/cpsl-spinner.entry.js.map +0 -1
- package/dist/capsule/cpsl-tab.entry.js +0 -37
- package/dist/capsule/cpsl-tab.entry.js.map +0 -1
- package/dist/capsule/cpsl-tabs.entry.js +0 -71
- package/dist/capsule/cpsl-tabs.entry.js.map +0 -1
- package/dist/capsule/cpsl-text.entry.js +0 -66
- package/dist/capsule/cpsl-text.entry.js.map +0 -1
- package/dist/capsule/cpsl-tile-button.entry.js +0 -19
- package/dist/capsule/cpsl-tile-button.entry.js.map +0 -1
- package/dist/capsule/index-3ac1b9e9.js +0 -617
- package/dist/capsule/index-3ac1b9e9.js.map +0 -1
- package/dist/capsule/index-3ad00c7e.js +0 -6064
- package/dist/capsule/index-3ad00c7e.js.map +0 -1
- package/dist/capsule/index-f19e63df.js +0 -4148
- package/dist/capsule/index-f19e63df.js.map +0 -1
- package/dist/capsule/shadow-css-bc9e2af8.js +0 -478
- package/dist/capsule/shadow-css-bc9e2af8.js.map +0 -1
- /package/dist/{capsule → esm}/app-globals-0f993ce5.js +0 -0
- /package/dist/{capsule → esm}/app-globals-0f993ce5.js.map +0 -0
- /package/dist/{capsule → esm}/constants-7b49abd5.js +0 -0
- /package/dist/{capsule → esm}/constants-7b49abd5.js.map +0 -0
@@ -1,478 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Stencil Client Platform v4.12.5 | MIT Licensed | https://stenciljs.com
|
3
|
-
*/
|
4
|
-
/**
|
5
|
-
* Utility function that will escape all regular expression special characters in a string.
|
6
|
-
*
|
7
|
-
* @param text The string potentially containing special characters.
|
8
|
-
* @returns The string with all special characters escaped.
|
9
|
-
*/
|
10
|
-
const escapeRegExpSpecialCharacters = (text) => {
|
11
|
-
return text.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
12
|
-
};
|
13
|
-
|
14
|
-
/**
|
15
|
-
* @license
|
16
|
-
* Copyright Google Inc. All Rights Reserved.
|
17
|
-
*
|
18
|
-
* Use of this source code is governed by an MIT-style license that can be
|
19
|
-
* found in the LICENSE file at https://angular.io/license
|
20
|
-
*
|
21
|
-
* This file is a port of shadowCSS from `webcomponents.js` to TypeScript.
|
22
|
-
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
23
|
-
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
24
|
-
*/
|
25
|
-
const safeSelector = (selector) => {
|
26
|
-
const placeholders = [];
|
27
|
-
let index = 0;
|
28
|
-
// Replaces attribute selectors with placeholders.
|
29
|
-
// The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
|
30
|
-
selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
|
31
|
-
const replaceBy = `__ph-${index}__`;
|
32
|
-
placeholders.push(keep);
|
33
|
-
index++;
|
34
|
-
return replaceBy;
|
35
|
-
});
|
36
|
-
// Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
|
37
|
-
// WS and "+" would otherwise be interpreted as selector separators.
|
38
|
-
const content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
39
|
-
const replaceBy = `__ph-${index}__`;
|
40
|
-
placeholders.push(exp);
|
41
|
-
index++;
|
42
|
-
return pseudo + replaceBy;
|
43
|
-
});
|
44
|
-
const ss = {
|
45
|
-
content,
|
46
|
-
placeholders,
|
47
|
-
};
|
48
|
-
return ss;
|
49
|
-
};
|
50
|
-
const restoreSafeSelector = (placeholders, content) => {
|
51
|
-
return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
|
52
|
-
};
|
53
|
-
const _polyfillHost = '-shadowcsshost';
|
54
|
-
const _polyfillSlotted = '-shadowcssslotted';
|
55
|
-
// note: :host-context pre-processed to -shadowcsshostcontext.
|
56
|
-
const _polyfillHostContext = '-shadowcsscontext';
|
57
|
-
const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
|
58
|
-
const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
|
59
|
-
const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
|
60
|
-
const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
|
61
|
-
const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
|
62
|
-
const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
63
|
-
const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
|
64
|
-
const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
|
65
|
-
const _polyfillHostRe = /-shadowcsshost/gim;
|
66
|
-
/**
|
67
|
-
* Little helper for generating a regex that will match a specified
|
68
|
-
* CSS selector when that selector is _not_ a part of a `@supports` rule.
|
69
|
-
*
|
70
|
-
* The pattern will match the provided `selector` (i.e. ':host', ':host-context', etc.)
|
71
|
-
* when that selector is not a part of a `@supports` selector rule _or_ if the selector
|
72
|
-
* is a part of the rule's declaration.
|
73
|
-
*
|
74
|
-
* For instance, if we create the regex with the selector ':host-context':
|
75
|
-
* - '@supports selector(:host-context())' will return no matches (starts with '@supports')
|
76
|
-
* - '@supports selector(:host-context()) { :host-context() { ... }}' will match the second ':host-context' (part of declaration)
|
77
|
-
* - ':host-context() { ... }' will match ':host-context' (selector is not a '@supports' rule)
|
78
|
-
* - ':host() { ... }' will return no matches (selector doesn't match selector used to create regex)
|
79
|
-
*
|
80
|
-
* @param selector The CSS selector we want to match for replacement
|
81
|
-
* @returns A look-behind regex containing the selector
|
82
|
-
*/
|
83
|
-
const createSupportsRuleRe = (selector) => new RegExp(`((?<!(^@supports(.*)))|(?<=\{.*))(${selector}\\b)`, 'gim');
|
84
|
-
const _colonSlottedRe = createSupportsRuleRe('::slotted');
|
85
|
-
const _colonHostRe = createSupportsRuleRe(':host');
|
86
|
-
const _colonHostContextRe = createSupportsRuleRe(':host-context');
|
87
|
-
const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
|
88
|
-
const stripComments = (input) => {
|
89
|
-
return input.replace(_commentRe, '');
|
90
|
-
};
|
91
|
-
const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
|
92
|
-
const extractCommentsWithHash = (input) => {
|
93
|
-
return input.match(_commentWithHashRe) || [];
|
94
|
-
};
|
95
|
-
const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
96
|
-
const _curlyRe = /([{}])/g;
|
97
|
-
const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
|
98
|
-
const OPEN_CURLY = '{';
|
99
|
-
const CLOSE_CURLY = '}';
|
100
|
-
const BLOCK_PLACEHOLDER = '%BLOCK%';
|
101
|
-
const processRules = (input, ruleCallback) => {
|
102
|
-
const inputWithEscapedBlocks = escapeBlocks(input);
|
103
|
-
let nextBlockIndex = 0;
|
104
|
-
return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
|
105
|
-
const selector = m[2];
|
106
|
-
let content = '';
|
107
|
-
let suffix = m[4];
|
108
|
-
let contentPrefix = '';
|
109
|
-
if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
|
110
|
-
content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
|
111
|
-
suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
|
112
|
-
contentPrefix = '{';
|
113
|
-
}
|
114
|
-
const cssRule = {
|
115
|
-
selector,
|
116
|
-
content,
|
117
|
-
};
|
118
|
-
const rule = ruleCallback(cssRule);
|
119
|
-
return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
|
120
|
-
});
|
121
|
-
};
|
122
|
-
const escapeBlocks = (input) => {
|
123
|
-
const inputParts = input.split(_curlyRe);
|
124
|
-
const resultParts = [];
|
125
|
-
const escapedBlocks = [];
|
126
|
-
let bracketCount = 0;
|
127
|
-
let currentBlockParts = [];
|
128
|
-
for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
|
129
|
-
const part = inputParts[partIndex];
|
130
|
-
if (part === CLOSE_CURLY) {
|
131
|
-
bracketCount--;
|
132
|
-
}
|
133
|
-
if (bracketCount > 0) {
|
134
|
-
currentBlockParts.push(part);
|
135
|
-
}
|
136
|
-
else {
|
137
|
-
if (currentBlockParts.length > 0) {
|
138
|
-
escapedBlocks.push(currentBlockParts.join(''));
|
139
|
-
resultParts.push(BLOCK_PLACEHOLDER);
|
140
|
-
currentBlockParts = [];
|
141
|
-
}
|
142
|
-
resultParts.push(part);
|
143
|
-
}
|
144
|
-
if (part === OPEN_CURLY) {
|
145
|
-
bracketCount++;
|
146
|
-
}
|
147
|
-
}
|
148
|
-
if (currentBlockParts.length > 0) {
|
149
|
-
escapedBlocks.push(currentBlockParts.join(''));
|
150
|
-
resultParts.push(BLOCK_PLACEHOLDER);
|
151
|
-
}
|
152
|
-
const strEscapedBlocks = {
|
153
|
-
escapedString: resultParts.join(''),
|
154
|
-
blocks: escapedBlocks,
|
155
|
-
};
|
156
|
-
return strEscapedBlocks;
|
157
|
-
};
|
158
|
-
/**
|
159
|
-
* Replaces certain strings within the CSS with placeholders
|
160
|
-
* that will later be replaced with class selectors appropriate
|
161
|
-
* for the level of encapsulation (shadow or scoped).
|
162
|
-
*
|
163
|
-
* When performing these replacements, we want to ignore selectors that are a
|
164
|
-
* part of an `@supports` rule. Replacing these selectors will result in invalid
|
165
|
-
* CSS that gets passed to autoprefixer/postcss once the placeholders are replaced.
|
166
|
-
* For example, a rule like:
|
167
|
-
*
|
168
|
-
* ```css
|
169
|
-
* @supports selector(:host()) {
|
170
|
-
* :host {
|
171
|
-
* color: red;
|
172
|
-
* }
|
173
|
-
* }
|
174
|
-
* ```
|
175
|
-
*
|
176
|
-
* Should be converted to:
|
177
|
-
*
|
178
|
-
* ```css
|
179
|
-
* @supports selector(:host()) {
|
180
|
-
* -shadowcsshost {
|
181
|
-
* color: red;
|
182
|
-
* }
|
183
|
-
* }
|
184
|
-
* ```
|
185
|
-
*
|
186
|
-
* The order the regex replacements happen in matters since we match
|
187
|
-
* against a whole selector word so we need to match all of `:host-context`
|
188
|
-
* before we try to replace `:host`. Otherwise the pattern for `:host` would match
|
189
|
-
* `:host-context` resulting in something like `:-shadowcsshost-context`.
|
190
|
-
*
|
191
|
-
* @param cssText A CSS string for a component
|
192
|
-
* @returns The modified CSS string
|
193
|
-
*/
|
194
|
-
const insertPolyfillHostInCssText = (cssText) => {
|
195
|
-
// These replacements use a special syntax with the `$1`. When the replacement
|
196
|
-
// occurs, `$1` maps to the content of the string leading up to the selector
|
197
|
-
// to be replaced.
|
198
|
-
//
|
199
|
-
// Otherwise, we will replace all the preceding content in addition to the
|
200
|
-
// selector because of the lookbehind in the regex.
|
201
|
-
//
|
202
|
-
// e.g. `/*!@___0___*/:host {}` => `/*!@___0___*/--shadowcsshost {}`
|
203
|
-
cssText = cssText
|
204
|
-
.replace(_colonHostContextRe, `$1${_polyfillHostContext}`)
|
205
|
-
.replace(_colonHostRe, `$1${_polyfillHost}`)
|
206
|
-
.replace(_colonSlottedRe, `$1${_polyfillSlotted}`);
|
207
|
-
return cssText;
|
208
|
-
};
|
209
|
-
const convertColonRule = (cssText, regExp, partReplacer) => {
|
210
|
-
// m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
|
211
|
-
return cssText.replace(regExp, (...m) => {
|
212
|
-
if (m[2]) {
|
213
|
-
const parts = m[2].split(',');
|
214
|
-
const r = [];
|
215
|
-
for (let i = 0; i < parts.length; i++) {
|
216
|
-
const p = parts[i].trim();
|
217
|
-
if (!p)
|
218
|
-
break;
|
219
|
-
r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
|
220
|
-
}
|
221
|
-
return r.join(',');
|
222
|
-
}
|
223
|
-
else {
|
224
|
-
return _polyfillHostNoCombinator + m[3];
|
225
|
-
}
|
226
|
-
});
|
227
|
-
};
|
228
|
-
const colonHostPartReplacer = (host, part, suffix) => {
|
229
|
-
return host + part.replace(_polyfillHost, '') + suffix;
|
230
|
-
};
|
231
|
-
const convertColonHost = (cssText) => {
|
232
|
-
return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
|
233
|
-
};
|
234
|
-
const colonHostContextPartReplacer = (host, part, suffix) => {
|
235
|
-
if (part.indexOf(_polyfillHost) > -1) {
|
236
|
-
return colonHostPartReplacer(host, part, suffix);
|
237
|
-
}
|
238
|
-
else {
|
239
|
-
return host + part + suffix + ', ' + part + ' ' + host + suffix;
|
240
|
-
}
|
241
|
-
};
|
242
|
-
const convertColonSlotted = (cssText, slotScopeId) => {
|
243
|
-
const slotClass = '.' + slotScopeId + ' > ';
|
244
|
-
const selectors = [];
|
245
|
-
cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
|
246
|
-
if (m[2]) {
|
247
|
-
const compound = m[2].trim();
|
248
|
-
const suffix = m[3];
|
249
|
-
const slottedSelector = slotClass + compound + suffix;
|
250
|
-
let prefixSelector = '';
|
251
|
-
for (let i = m[4] - 1; i >= 0; i--) {
|
252
|
-
const char = m[5][i];
|
253
|
-
if (char === '}' || char === ',') {
|
254
|
-
break;
|
255
|
-
}
|
256
|
-
prefixSelector = char + prefixSelector;
|
257
|
-
}
|
258
|
-
const orgSelector = (prefixSelector + slottedSelector).trim();
|
259
|
-
const addedSelector = `${prefixSelector.trimEnd()}${slottedSelector.trim()}`.trim();
|
260
|
-
if (orgSelector !== addedSelector) {
|
261
|
-
const updatedSelector = `${addedSelector}, ${orgSelector}`;
|
262
|
-
selectors.push({
|
263
|
-
orgSelector,
|
264
|
-
updatedSelector,
|
265
|
-
});
|
266
|
-
}
|
267
|
-
return slottedSelector;
|
268
|
-
}
|
269
|
-
else {
|
270
|
-
return _polyfillHostNoCombinator + m[3];
|
271
|
-
}
|
272
|
-
});
|
273
|
-
return {
|
274
|
-
selectors,
|
275
|
-
cssText,
|
276
|
-
};
|
277
|
-
};
|
278
|
-
const convertColonHostContext = (cssText) => {
|
279
|
-
return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
|
280
|
-
};
|
281
|
-
const convertShadowDOMSelectors = (cssText) => {
|
282
|
-
return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
|
283
|
-
};
|
284
|
-
const makeScopeMatcher = (scopeSelector) => {
|
285
|
-
const lre = /\[/g;
|
286
|
-
const rre = /\]/g;
|
287
|
-
scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
|
288
|
-
return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
|
289
|
-
};
|
290
|
-
const selectorNeedsScoping = (selector, scopeSelector) => {
|
291
|
-
const re = makeScopeMatcher(scopeSelector);
|
292
|
-
return !re.test(selector);
|
293
|
-
};
|
294
|
-
const injectScopingSelector = (selector, scopingSelector) => {
|
295
|
-
return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
|
296
|
-
return before + scopingSelector + colon + after;
|
297
|
-
});
|
298
|
-
};
|
299
|
-
const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
|
300
|
-
// In Android browser, the lastIndex is not reset when the regex is used in String.replace()
|
301
|
-
_polyfillHostRe.lastIndex = 0;
|
302
|
-
if (_polyfillHostRe.test(selector)) {
|
303
|
-
const replaceBy = `.${hostSelector}`;
|
304
|
-
return selector
|
305
|
-
.replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
|
306
|
-
.replace(_polyfillHostRe, replaceBy + ' ');
|
307
|
-
}
|
308
|
-
return scopeSelector + ' ' + selector;
|
309
|
-
};
|
310
|
-
const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
|
311
|
-
const isRe = /\[is=([^\]]*)\]/g;
|
312
|
-
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
313
|
-
const className = '.' + scopeSelector;
|
314
|
-
const _scopeSelectorPart = (p) => {
|
315
|
-
let scopedP = p.trim();
|
316
|
-
if (!scopedP) {
|
317
|
-
return '';
|
318
|
-
}
|
319
|
-
if (p.indexOf(_polyfillHostNoCombinator) > -1) {
|
320
|
-
scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
321
|
-
}
|
322
|
-
else {
|
323
|
-
// remove :host since it should be unnecessary
|
324
|
-
const t = p.replace(_polyfillHostRe, '');
|
325
|
-
if (t.length > 0) {
|
326
|
-
scopedP = injectScopingSelector(t, className);
|
327
|
-
}
|
328
|
-
}
|
329
|
-
return scopedP;
|
330
|
-
};
|
331
|
-
const safeContent = safeSelector(selector);
|
332
|
-
selector = safeContent.content;
|
333
|
-
let scopedSelector = '';
|
334
|
-
let startIndex = 0;
|
335
|
-
let res;
|
336
|
-
const sep = /( |>|\+|~(?!=))\s*/g;
|
337
|
-
// If a selector appears before :host it should not be shimmed as it
|
338
|
-
// matches on ancestor elements and not on elements in the host's shadow
|
339
|
-
// `:host-context(div)` is transformed to
|
340
|
-
// `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
|
341
|
-
// the `div` is not part of the component in the 2nd selectors and should not be scoped.
|
342
|
-
// Historically `component-tag:host` was matching the component so we also want to preserve
|
343
|
-
// this behavior to avoid breaking legacy apps (it should not match).
|
344
|
-
// The behavior should be:
|
345
|
-
// - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
|
346
|
-
// - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
|
347
|
-
// `:host-context(tag)`)
|
348
|
-
const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
|
349
|
-
// Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
|
350
|
-
let shouldScope = !hasHost;
|
351
|
-
while ((res = sep.exec(selector)) !== null) {
|
352
|
-
const separator = res[1];
|
353
|
-
const part = selector.slice(startIndex, res.index).trim();
|
354
|
-
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
355
|
-
const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
|
356
|
-
scopedSelector += `${scopedPart} ${separator} `;
|
357
|
-
startIndex = sep.lastIndex;
|
358
|
-
}
|
359
|
-
const part = selector.substring(startIndex);
|
360
|
-
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
361
|
-
scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
|
362
|
-
// replace the placeholders with their original values
|
363
|
-
return restoreSafeSelector(safeContent.placeholders, scopedSelector);
|
364
|
-
};
|
365
|
-
const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
|
366
|
-
return selector
|
367
|
-
.split(',')
|
368
|
-
.map((shallowPart) => {
|
369
|
-
if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
|
370
|
-
return shallowPart.trim();
|
371
|
-
}
|
372
|
-
if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
|
373
|
-
return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
|
374
|
-
}
|
375
|
-
else {
|
376
|
-
return shallowPart.trim();
|
377
|
-
}
|
378
|
-
})
|
379
|
-
.join(', ');
|
380
|
-
};
|
381
|
-
const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
382
|
-
return processRules(cssText, (rule) => {
|
383
|
-
let selector = rule.selector;
|
384
|
-
let content = rule.content;
|
385
|
-
if (rule.selector[0] !== '@') {
|
386
|
-
selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
|
387
|
-
}
|
388
|
-
else if (rule.selector.startsWith('@media') ||
|
389
|
-
rule.selector.startsWith('@supports') ||
|
390
|
-
rule.selector.startsWith('@page') ||
|
391
|
-
rule.selector.startsWith('@document')) {
|
392
|
-
content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
|
393
|
-
}
|
394
|
-
const cssRule = {
|
395
|
-
selector: selector.replace(/\s{2,}/g, ' ').trim(),
|
396
|
-
content,
|
397
|
-
};
|
398
|
-
return cssRule;
|
399
|
-
});
|
400
|
-
};
|
401
|
-
const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
|
402
|
-
cssText = insertPolyfillHostInCssText(cssText);
|
403
|
-
cssText = convertColonHost(cssText);
|
404
|
-
cssText = convertColonHostContext(cssText);
|
405
|
-
const slotted = convertColonSlotted(cssText, slotScopeId);
|
406
|
-
cssText = slotted.cssText;
|
407
|
-
cssText = convertShadowDOMSelectors(cssText);
|
408
|
-
if (scopeId) {
|
409
|
-
cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
|
410
|
-
}
|
411
|
-
cssText = replaceShadowCssHost(cssText, hostScopeId);
|
412
|
-
cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
|
413
|
-
return {
|
414
|
-
cssText: cssText.trim(),
|
415
|
-
// We need to replace the shadow CSS host string in each of these selectors since we created
|
416
|
-
// them prior to the replacement happening in the components CSS text.
|
417
|
-
slottedSelectors: slotted.selectors.map((ref) => ({
|
418
|
-
orgSelector: replaceShadowCssHost(ref.orgSelector, hostScopeId),
|
419
|
-
updatedSelector: replaceShadowCssHost(ref.updatedSelector, hostScopeId),
|
420
|
-
})),
|
421
|
-
};
|
422
|
-
};
|
423
|
-
/**
|
424
|
-
* Helper function that replaces the interim string representing a `:host` selector with
|
425
|
-
* the host scope selector class for the element.
|
426
|
-
*
|
427
|
-
* @param cssText The CSS string to make the replacement in
|
428
|
-
* @param hostScopeId The scope ID that will be used as the class representing the host element
|
429
|
-
* @returns CSS with the selector replaced
|
430
|
-
*/
|
431
|
-
const replaceShadowCssHost = (cssText, hostScopeId) => {
|
432
|
-
return cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
|
433
|
-
};
|
434
|
-
const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
435
|
-
const hostScopeId = scopeId + '-h';
|
436
|
-
const slotScopeId = scopeId + '-s';
|
437
|
-
const commentsWithHash = extractCommentsWithHash(cssText);
|
438
|
-
cssText = stripComments(cssText);
|
439
|
-
const orgSelectors = [];
|
440
|
-
if (commentOriginalSelector) {
|
441
|
-
const processCommentedSelector = (rule) => {
|
442
|
-
const placeholder = `/*!@___${orgSelectors.length}___*/`;
|
443
|
-
const comment = `/*!@${rule.selector}*/`;
|
444
|
-
orgSelectors.push({ placeholder, comment });
|
445
|
-
rule.selector = placeholder + rule.selector;
|
446
|
-
return rule;
|
447
|
-
};
|
448
|
-
cssText = processRules(cssText, (rule) => {
|
449
|
-
if (rule.selector[0] !== '@') {
|
450
|
-
return processCommentedSelector(rule);
|
451
|
-
}
|
452
|
-
else if (rule.selector.startsWith('@media') ||
|
453
|
-
rule.selector.startsWith('@supports') ||
|
454
|
-
rule.selector.startsWith('@page') ||
|
455
|
-
rule.selector.startsWith('@document')) {
|
456
|
-
rule.content = processRules(rule.content, processCommentedSelector);
|
457
|
-
return rule;
|
458
|
-
}
|
459
|
-
return rule;
|
460
|
-
});
|
461
|
-
}
|
462
|
-
const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
|
463
|
-
cssText = [scoped.cssText, ...commentsWithHash].join('\n');
|
464
|
-
if (commentOriginalSelector) {
|
465
|
-
orgSelectors.forEach(({ placeholder, comment }) => {
|
466
|
-
cssText = cssText.replace(placeholder, comment);
|
467
|
-
});
|
468
|
-
}
|
469
|
-
scoped.slottedSelectors.forEach((slottedSelector) => {
|
470
|
-
const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), 'g');
|
471
|
-
cssText = cssText.replace(regex, slottedSelector.updatedSelector);
|
472
|
-
});
|
473
|
-
return cssText;
|
474
|
-
};
|
475
|
-
|
476
|
-
export { scopeCss };
|
477
|
-
|
478
|
-
//# sourceMappingURL=shadow-css-bc9e2af8.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"shadow-css-bc9e2af8.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,6BAA6B,GAAG,CAAC,IAAI,KAAK;AAChD,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACvD,CAAC,CAAC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM,YAAY,GAAG,CAAC,QAAQ,KAAK;AACnC,IAAI,MAAM,YAAY,GAAG,EAAE,CAAC;AAC5B,IAAI,IAAI,KAAK,GAAG,CAAC,CAAC;AAClB;AACA;AACA,IAAI,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK;AAC9D,QAAQ,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AAC5C,QAAQ,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAChC,QAAQ,KAAK,EAAE,CAAC;AAChB,QAAQ,OAAO,SAAS,CAAC;AACzB,KAAK,CAAC,CAAC;AACP;AACA;AACA,IAAI,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,2BAA2B,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,KAAK;AACtF,QAAQ,MAAM,SAAS,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;AAC5C,QAAQ,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/B,QAAQ,KAAK,EAAE,CAAC;AAChB,QAAQ,OAAO,MAAM,GAAG,SAAS,CAA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AAC;AACxB,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;AAC5E,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,gBAAgB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC/D,IAAI,IAAI,uBAAuB,EAAE;AACjC,QAAQ,YAAY,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK;AAC3D,YAAY,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAC5D,SAAS,CAAC,CAAC;AACX,KAAK;AACL,IAAI,MAAM,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,eAAe,KAAK;AACzD,QAAQ,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,6BAA6B,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC,CAAC;AAClG,QAAQ,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,eAAe,CAAC,eAAe,CAAC,CAAC;AAC1E,KAAK,CAAC,CAAC;AACP,IAAI,OAAO,OAAO,CAAC;AACnB;;;;","names":[],"sources":["../node_modules/@stencil/core/internal/client/shadow-css.js"],"sourcesContent":["/*\n Stencil Client Platform v4.12.5 | MIT Licensed | https://stenciljs.com\n */\n/**\n * Utility function that will escape all regular expression special characters in a string.\n *\n * @param text The string potentially containing special characters.\n * @returns The string with all special characters escaped.\n */\nconst escapeRegExpSpecialCharacters = (text) => {\n return text.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n};\n\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n *\n * This file is a port of shadowCSS from `webcomponents.js` to TypeScript.\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts\n */\nconst safeSelector = (selector) => {\n const placeholders = [];\n let index = 0;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = selector.replace(/(\\[[^\\]]*\\])/g, (_, keep) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(keep);\n index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n const content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, pseudo, exp) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(exp);\n index++;\n return pseudo + replaceBy;\n });\n const ss = {\n content,\n placeholders,\n };\n return ss;\n};\nconst restoreSafeSelector = (placeholders, content) => {\n return content.replace(/__ph-(\\d+)__/g, (_, index) => placeholders[+index]);\n};\nconst _polyfillHost = '-shadowcsshost';\nconst _polyfillSlotted = '-shadowcssslotted';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = ')(?:\\\\((' + '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' + ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nconst _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];\nconst _selectorReSuffix = '([>\\\\s~+[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\n/**\n * Little helper for generating a regex that will match a specified\n * CSS selector when that selector is _not_ a part of a `@supports` rule.\n *\n * The pattern will match the provided `selector` (i.e. ':host', ':host-context', etc.)\n * when that selector is not a part of a `@supports` selector rule _or_ if the selector\n * is a part of the rule's declaration.\n *\n * For instance, if we create the regex with the selector ':host-context':\n * - '@supports selector(:host-context())' will return no matches (starts with '@supports')\n * - '@supports selector(:host-context()) { :host-context() { ... }}' will match the second ':host-context' (part of declaration)\n * - ':host-context() { ... }' will match ':host-context' (selector is not a '@supports' rule)\n * - ':host() { ... }' will return no matches (selector doesn't match selector used to create regex)\n *\n * @param selector The CSS selector we want to match for replacement\n * @returns A look-behind regex containing the selector\n */\nconst createSupportsRuleRe = (selector) => new RegExp(`((?<!(^@supports(.*)))|(?<=\\{.*))(${selector}\\\\b)`, 'gim');\nconst _colonSlottedRe = createSupportsRuleRe('::slotted');\nconst _colonHostRe = createSupportsRuleRe(':host');\nconst _colonHostContextRe = createSupportsRuleRe(':host-context');\nconst _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\nconst stripComments = (input) => {\n return input.replace(_commentRe, '');\n};\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\nconst extractCommentsWithHash = (input) => {\n return input.match(_commentWithHashRe) || [];\n};\nconst _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nconst _curlyRe = /([{}])/g;\nconst _selectorPartsRe = /(^.*?[^\\\\])??((:+)(.*)|$)/;\nconst OPEN_CURLY = '{';\nconst CLOSE_CURLY = '}';\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst processRules = (input, ruleCallback) => {\n const inputWithEscapedBlocks = escapeBlocks(input);\n let nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n const cssRule = {\n selector,\n content,\n };\n const rule = ruleCallback(cssRule);\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n });\n};\nconst escapeBlocks = (input) => {\n const inputParts = input.split(_curlyRe);\n const resultParts = [];\n const escapedBlocks = [];\n let bracketCount = 0;\n let currentBlockParts = [];\n for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {\n const part = inputParts[partIndex];\n if (part === CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n }\n else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part === OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n const strEscapedBlocks = {\n escapedString: resultParts.join(''),\n blocks: escapedBlocks,\n };\n return strEscapedBlocks;\n};\n/**\n * Replaces certain strings within the CSS with placeholders\n * that will later be replaced with class selectors appropriate\n * for the level of encapsulation (shadow or scoped).\n *\n * When performing these replacements, we want to ignore selectors that are a\n * part of an `@supports` rule. Replacing these selectors will result in invalid\n * CSS that gets passed to autoprefixer/postcss once the placeholders are replaced.\n * For example, a rule like:\n *\n * ```css\n * @supports selector(:host()) {\n * :host {\n * color: red;\n * }\n * }\n * ```\n *\n * Should be converted to:\n *\n * ```css\n * @supports selector(:host()) {\n * -shadowcsshost {\n * color: red;\n * }\n * }\n * ```\n *\n * The order the regex replacements happen in matters since we match\n * against a whole selector word so we need to match all of `:host-context`\n * before we try to replace `:host`. Otherwise the pattern for `:host` would match\n * `:host-context` resulting in something like `:-shadowcsshost-context`.\n *\n * @param cssText A CSS string for a component\n * @returns The modified CSS string\n */\nconst insertPolyfillHostInCssText = (cssText) => {\n // These replacements use a special syntax with the `$1`. When the replacement\n // occurs, `$1` maps to the content of the string leading up to the selector\n // to be replaced.\n //\n // Otherwise, we will replace all the preceding content in addition to the\n // selector because of the lookbehind in the regex.\n //\n // e.g. `/*!@___0___*/:host {}` => `/*!@___0___*/--shadowcsshost {}`\n cssText = cssText\n .replace(_colonHostContextRe, `$1${_polyfillHostContext}`)\n .replace(_colonHostRe, `$1${_polyfillHost}`)\n .replace(_colonSlottedRe, `$1${_polyfillSlotted}`);\n return cssText;\n};\nconst convertColonRule = (cssText, regExp, partReplacer) => {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, (...m) => {\n if (m[2]) {\n const parts = m[2].split(',');\n const r = [];\n for (let i = 0; i < parts.length; i++) {\n const p = parts[i].trim();\n if (!p)\n break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n};\nconst colonHostPartReplacer = (host, part, suffix) => {\n return host + part.replace(_polyfillHost, '') + suffix;\n};\nconst convertColonHost = (cssText) => {\n return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);\n};\nconst colonHostContextPartReplacer = (host, part, suffix) => {\n if (part.indexOf(_polyfillHost) > -1) {\n return colonHostPartReplacer(host, part, suffix);\n }\n else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n};\nconst convertColonSlotted = (cssText, slotScopeId) => {\n const slotClass = '.' + slotScopeId + ' > ';\n const selectors = [];\n cssText = cssText.replace(_cssColonSlottedRe, (...m) => {\n if (m[2]) {\n const compound = m[2].trim();\n const suffix = m[3];\n const slottedSelector = slotClass + compound + suffix;\n let prefixSelector = '';\n for (let i = m[4] - 1; i >= 0; i--) {\n const char = m[5][i];\n if (char === '}' || char === ',') {\n break;\n }\n prefixSelector = char + prefixSelector;\n }\n const orgSelector = (prefixSelector + slottedSelector).trim();\n const addedSelector = `${prefixSelector.trimEnd()}${slottedSelector.trim()}`.trim();\n if (orgSelector !== addedSelector) {\n const updatedSelector = `${addedSelector}, ${orgSelector}`;\n selectors.push({\n orgSelector,\n updatedSelector,\n });\n }\n return slottedSelector;\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n return {\n selectors,\n cssText,\n };\n};\nconst convertColonHostContext = (cssText) => {\n return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);\n};\nconst convertShadowDOMSelectors = (cssText) => {\n return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n};\nconst makeScopeMatcher = (scopeSelector) => {\n const lre = /\\[/g;\n const rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n};\nconst selectorNeedsScoping = (selector, scopeSelector) => {\n const re = makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n};\nconst injectScopingSelector = (selector, scopingSelector) => {\n return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {\n return before + scopingSelector + colon + after;\n });\n};\nconst applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n const replaceBy = `.${hostSelector}`;\n return selector\n .replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))\n .replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n};\nconst applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {\n const isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);\n const className = '.' + scopeSelector;\n const _scopeSelectorPart = (p) => {\n let scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n // remove :host since it should be unnecessary\n const t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n scopedP = injectScopingSelector(t, className);\n }\n }\n return scopedP;\n };\n const safeContent = safeSelector(selector);\n selector = safeContent.content;\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return restoreSafeSelector(safeContent.placeholders, scopedSelector);\n};\nconst scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {\n return selector\n .split(',')\n .map((shallowPart) => {\n if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {\n return shallowPart.trim();\n }\n if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {\n return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();\n }\n else {\n return shallowPart.trim();\n }\n })\n .join(', ');\n};\nconst scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {\n return processRules(cssText, (rule) => {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);\n }\n else if (rule.selector.startsWith('@media') ||\n rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') ||\n rule.selector.startsWith('@document')) {\n content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);\n }\n const cssRule = {\n selector: selector.replace(/\\s{2,}/g, ' ').trim(),\n content,\n };\n return cssRule;\n });\n};\nconst scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {\n cssText = insertPolyfillHostInCssText(cssText);\n cssText = convertColonHost(cssText);\n cssText = convertColonHostContext(cssText);\n const slotted = convertColonSlotted(cssText, slotScopeId);\n cssText = slotted.cssText;\n cssText = convertShadowDOMSelectors(cssText);\n if (scopeId) {\n cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);\n }\n cssText = replaceShadowCssHost(cssText, hostScopeId);\n cssText = cssText.replace(/>\\s*\\*\\s+([^{, ]+)/gm, ' $1 ');\n return {\n cssText: cssText.trim(),\n // We need to replace the shadow CSS host string in each of these selectors since we created\n // them prior to the replacement happening in the components CSS text.\n slottedSelectors: slotted.selectors.map((ref) => ({\n orgSelector: replaceShadowCssHost(ref.orgSelector, hostScopeId),\n updatedSelector: replaceShadowCssHost(ref.updatedSelector, hostScopeId),\n })),\n };\n};\n/**\n * Helper function that replaces the interim string representing a `:host` selector with\n * the host scope selector class for the element.\n *\n * @param cssText The CSS string to make the replacement in\n * @param hostScopeId The scope ID that will be used as the class representing the host element\n * @returns CSS with the selector replaced\n */\nconst replaceShadowCssHost = (cssText, hostScopeId) => {\n return cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);\n};\nconst scopeCss = (cssText, scopeId, commentOriginalSelector) => {\n const hostScopeId = scopeId + '-h';\n const slotScopeId = scopeId + '-s';\n const commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n const orgSelectors = [];\n if (commentOriginalSelector) {\n const processCommentedSelector = (rule) => {\n const placeholder = `/*!@___${orgSelectors.length}___*/`;\n const comment = `/*!@${rule.selector}*/`;\n orgSelectors.push({ placeholder, comment });\n rule.selector = placeholder + rule.selector;\n return rule;\n };\n cssText = processRules(cssText, (rule) => {\n if (rule.selector[0] !== '@') {\n return processCommentedSelector(rule);\n }\n else if (rule.selector.startsWith('@media') ||\n rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') ||\n rule.selector.startsWith('@document')) {\n rule.content = processRules(rule.content, processCommentedSelector);\n return rule;\n }\n return rule;\n });\n }\n const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);\n cssText = [scoped.cssText, ...commentsWithHash].join('\\n');\n if (commentOriginalSelector) {\n orgSelectors.forEach(({ placeholder, comment }) => {\n cssText = cssText.replace(placeholder, comment);\n });\n }\n scoped.slottedSelectors.forEach((slottedSelector) => {\n const regex = new RegExp(escapeRegExpSpecialCharacters(slottedSelector.orgSelector), 'g');\n cssText = cssText.replace(regex, slottedSelector.updatedSelector);\n });\n return cssText;\n};\n\nexport { scopeCss };\n"],"version":3}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|