@usecapsule/core-components 3.2.0-dev.1 → 3.3.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/capsule-core.css +25 -10
- package/css/capsule-core.css.map +1 -1
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/{p-a6aaf3f4.entry.js → p-0e558c7f.entry.js} +3 -3
- package/dist/capsule/p-0e558c7f.entry.js.map +1 -0
- package/dist/capsule/{p-452b9998.entry.js → p-1bd11889.entry.js} +2 -2
- package/dist/capsule/p-1bd11889.entry.js.map +1 -0
- package/dist/capsule/p-32cdf894.entry.js +2 -0
- package/dist/capsule/p-32cdf894.entry.js.map +1 -0
- package/dist/capsule/p-3b042fd1.entry.js +2 -0
- package/dist/capsule/{p-6793ef7a.entry.js.map → p-3b042fd1.entry.js.map} +1 -1
- package/dist/capsule/{p-b976b6f0.entry.js → p-41bc3c58.entry.js} +2 -2
- package/dist/capsule/{p-b976b6f0.entry.js.map → p-41bc3c58.entry.js.map} +1 -1
- package/dist/capsule/p-5965b15e.entry.js +2 -0
- package/dist/capsule/{p-f6c74d69.entry.js.map → p-5965b15e.entry.js.map} +1 -1
- package/dist/capsule/{p-447d49b9.entry.js → p-5d62e610.entry.js} +2 -2
- package/dist/capsule/{p-447d49b9.entry.js.map → p-5d62e610.entry.js.map} +1 -1
- package/dist/capsule/p-60508b1e.entry.js +20 -0
- package/dist/capsule/p-60508b1e.entry.js.map +1 -0
- package/dist/capsule/{p-6dcaee48.entry.js → p-de2a16e4.entry.js} +2 -2
- package/dist/capsule/{p-6dcaee48.entry.js.map → p-de2a16e4.entry.js.map} +1 -1
- package/dist/capsule/p-e1255160.js.map +1 -1
- package/dist/capsule/p-f2393be6.js.map +1 -1
- package/dist/capsule/p-fa6b7678.js +3 -0
- package/dist/capsule/p-fa6b7678.js.map +1 -0
- package/dist/cjs/capsule.cjs.js +10 -10
- package/dist/cjs/capsule.cjs.js.map +1 -1
- package/dist/cjs/cpsl-alert_34.cjs.entry.js +17036 -13428
- package/dist/cjs/cpsl-alert_34.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-animation.cjs.entry.js +8 -4
- package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-col.cjs.entry.js +25 -6
- package/dist/cjs/cpsl-col.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
- package/dist/cjs/cpsl-hero.cjs.entry.js +38 -0
- package/dist/cjs/cpsl-hero.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-identicon.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
- package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-modal-v2.cjs.entry.js +3 -2
- package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
- package/dist/cjs/index-65f57499.js +1439 -0
- package/dist/cjs/index-65f57499.js.map +1 -0
- package/dist/cjs/index.cjs.js +47 -16
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/icons/arrow-circle-broken-down-left.svg +3 -0
- package/dist/collection/assets/icons/bank.svg +3 -0
- package/dist/collection/assets/icons/credit-card.svg +3 -0
- package/dist/collection/assets/icons/dot.svg +3 -0
- package/dist/collection/assets/icons/download.svg +3 -0
- package/dist/collection/assets/icons/globe.svg +3 -0
- package/dist/collection/assets/icons/hero-alert-circle.svg +3 -0
- package/dist/collection/assets/icons/hero-checkmark-capsule.svg +11 -0
- package/dist/collection/assets/icons/hero-checkmark.svg +3 -0
- package/dist/collection/assets/icons/hero-external-connection.svg +71 -0
- package/dist/collection/assets/icons/index.js +21 -3
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/assets/icons/link-external.svg +3 -0
- package/dist/collection/assets/icons/log-out.svg +3 -0
- package/dist/collection/assets/icons/moonpay-brand.svg +10 -0
- package/dist/collection/assets/icons/puzzle-piece.svg +3 -0
- package/dist/collection/assets/icons/qr-code-02.svg +3 -0
- package/dist/collection/assets/icons/qr-code.svg +3 -0
- package/dist/collection/assets/icons/refresh.svg +3 -3
- package/dist/collection/assets/icons/search.svg +3 -0
- package/dist/collection/assets/icons/send.svg +3 -0
- package/dist/collection/assets/icons/shield.svg +3 -0
- package/dist/collection/assets/icons/stripe-brand.svg +3 -0
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +3 -3
- package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +4 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -1
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +5 -2
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
- package/dist/collection/components/{cpsl-modal/cpsl-modal.css → cpsl-auth-modal/cpsl-auth-modal.css} +33 -58
- package/dist/collection/components/{cpsl-modal/cpsl-modal.js → cpsl-auth-modal/cpsl-auth-modal.js} +13 -131
- package/dist/collection/components/cpsl-auth-modal/cpsl-auth-modal.js.map +1 -0
- package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.css +89 -2
- package/dist/collection/components/cpsl-button/cpsl-button.js +9 -5
- package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +2 -2
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js.map +1 -1
- package/dist/collection/components/cpsl-card/cpsl-card.css +5 -2
- package/dist/collection/components/cpsl-card/cpsl-card.js +1 -1
- package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +3 -0
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +13 -7
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
- package/dist/collection/components/cpsl-col/cpsl-col.js +21 -5
- package/dist/collection/components/cpsl-col/cpsl-col.js.map +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.css +2 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +3 -2
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +1 -1
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -1
- package/dist/collection/components/cpsl-dropdown/dropdown-interface.js.map +1 -1
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +5 -5
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -1
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
- package/dist/collection/components/cpsl-hero/cpsl-hero.css +136 -71
- package/dist/collection/components/cpsl-hero/cpsl-hero.js +64 -9
- package/dist/collection/components/cpsl-hero/cpsl-hero.js.map +1 -1
- package/dist/collection/components/cpsl-hero/cpsl-hero.stories.js.map +1 -1
- package/dist/collection/components/cpsl-icon/cpsl-icon.css +8 -0
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
- package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -1
- package/dist/collection/components/cpsl-icon-group/cpsl-icon-group.css +97 -0
- package/dist/collection/components/cpsl-icon-group/cpsl-icon-group.js +121 -0
- package/dist/collection/components/cpsl-icon-group/cpsl-icon-group.js.map +1 -0
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.js +1 -1
- package/dist/collection/components/cpsl-identicon/cpsl-identicon.stories.js.map +1 -1
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -2
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.css +21 -2
- package/dist/collection/components/cpsl-input/cpsl-input.js +117 -11
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +2 -1
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -1
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +2 -2
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js.map +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +2 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +1 -1
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-popover/cpsl-popover.css +2 -0
- package/dist/collection/components/cpsl-popover/cpsl-popover.js +16 -6
- package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -1
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +12 -3
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +28 -23
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js.map +1 -1
- package/dist/collection/components/cpsl-radio/cpsl-radio.js +1 -1
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.css +17 -0
- package/dist/collection/components/cpsl-select/cpsl-select.js +96 -4
- package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +1 -1
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.js.map +1 -1
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +14 -3
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js.map +1 -1
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +30 -8
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +5 -7
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js.map +1 -1
- package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.css +24 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.js.map +1 -1
- package/dist/collection/components/cpsl-table/cpsl-table.js +3 -1
- package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +1 -4
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +5 -2
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.css +19 -0
- package/dist/collection/components/cpsl-text/cpsl-text.js +7 -3
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +3 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
- package/dist/collection/interface.js.map +1 -1
- package/dist/collection/utils/media.js +3 -0
- package/dist/collection/utils/media.js.map +1 -1
- package/dist/collection/utils/theme/generateBorderRadii.js +4 -3
- package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
- package/dist/collection/utils/theme/generateFont.js +1 -1
- package/dist/collection/utils/theme/generateFont.js.map +1 -1
- package/dist/collection/utils/theme/generatePalette.js +28 -9
- package/dist/collection/utils/theme/generatePalette.js.map +1 -1
- package/dist/collection/utils/theme/generateTheme.js +13 -3
- package/dist/collection/utils/theme/generateTheme.js.map +1 -1
- package/dist/collection/utils/theme/utils.js +1 -0
- package/dist/collection/utils/theme/utils.js.map +1 -1
- package/dist/esm/capsule.js +11 -11
- package/dist/esm/capsule.js.map +1 -1
- package/dist/esm/cpsl-alert_34.entry.js +17036 -13428
- package/dist/esm/cpsl-alert_34.entry.js.map +1 -1
- package/dist/esm/cpsl-animation.entry.js +7 -3
- package/dist/esm/cpsl-animation.entry.js.map +1 -1
- package/dist/esm/cpsl-col.entry.js +25 -6
- package/dist/esm/cpsl-col.entry.js.map +1 -1
- package/dist/esm/cpsl-grid.entry.js +3 -3
- package/dist/esm/cpsl-hero.entry.js +34 -0
- package/dist/esm/cpsl-hero.entry.js.map +1 -0
- package/dist/esm/cpsl-identicon.entry.js +2 -2
- package/dist/esm/cpsl-info-box.entry.js +3 -3
- package/dist/esm/cpsl-info-box.entry.js.map +1 -1
- package/dist/esm/cpsl-modal-v2.entry.js +3 -2
- package/dist/esm/cpsl-modal-v2.entry.js.map +1 -1
- package/dist/esm/cpsl-row.entry.js +2 -2
- package/dist/esm/index-91db3414.js +1408 -0
- package/dist/esm/index-91db3414.js.map +1 -0
- package/dist/esm/index.js +47 -16
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/loader/cdn.js +1 -3
- package/dist/loader/index.cjs.js +1 -3
- package/dist/loader/index.d.ts +3 -0
- package/dist/loader/index.es2017.js +1 -3
- package/dist/loader/index.js +1 -3
- package/dist/scripts/buildAssets.js +1 -1
- package/dist/types/assets/icons/index.d.ts +20 -2
- package/dist/types/components/cpsl-alert/cpsl-alert.d.ts +8 -0
- package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +6 -0
- package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +10 -0
- package/dist/types/components/cpsl-auth-modal/cpsl-auth-modal.d.ts +58 -0
- package/dist/types/components/cpsl-avatar/cpsl-avatar.d.ts +11 -0
- package/dist/types/components/cpsl-button/cpsl-button.d.ts +30 -1
- package/dist/types/components/cpsl-button-group/cpsl-button-group.d.ts +3 -0
- package/dist/types/components/cpsl-checkbox/cpsl-checkbox.d.ts +6 -0
- package/dist/types/components/cpsl-code-input/cpsl-code-input.d.ts +19 -0
- package/dist/types/components/cpsl-col/cpsl-col.d.ts +96 -0
- package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +31 -0
- package/dist/types/components/cpsl-dropdown/cpsl-dropdown.d.ts +15 -0
- package/dist/types/components/cpsl-dropdown/dropdown-interface.d.ts +1 -1
- package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +43 -0
- package/dist/types/components/cpsl-grid/cpsl-grid.d.ts +3 -0
- package/dist/types/components/cpsl-hero/cpsl-hero.d.ts +21 -1
- package/dist/types/components/cpsl-icon/cpsl-icon.d.ts +6 -0
- package/dist/types/components/cpsl-icon-group/cpsl-icon-group.d.ts +20 -0
- package/dist/types/components/cpsl-identicon/cpsl-identicon.d.ts +4 -0
- package/dist/types/components/cpsl-input/cpsl-input.d.ts +148 -0
- package/dist/types/components/cpsl-input/input-interface.d.ts +5 -0
- package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +32 -0
- package/dist/types/components/cpsl-nav-button-group/cpsl-nav-button-group.d.ts +3 -0
- package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +14 -0
- package/dist/types/components/cpsl-pagination/cpsl-pagination.d.ts +15 -0
- package/dist/types/components/cpsl-pill/cpsl-pill.d.ts +3 -0
- package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +53 -0
- package/dist/types/components/cpsl-progress-indicator/cpsl-progress-indicator.d.ts +6 -0
- package/dist/types/components/cpsl-qr-code/cpsl-qr-code.d.ts +11 -0
- package/dist/types/components/cpsl-radio/cpsl-radio.d.ts +6 -0
- package/dist/types/components/cpsl-select/cpsl-select.d.ts +67 -1
- package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +10 -0
- package/dist/types/components/cpsl-slide-button/cpsl-slide-button.d.ts +18 -0
- package/dist/types/components/cpsl-spinner/cpsl-spinner.d.ts +8 -0
- package/dist/types/components/cpsl-switch/cpsl-switch.d.ts +6 -0
- package/dist/types/components/cpsl-tab/cpsl-tab.d.ts +11 -0
- package/dist/types/components/cpsl-tabs/cpsl-tabs.d.ts +13 -0
- package/dist/types/components/cpsl-text/cpsl-text.d.ts +16 -1
- package/dist/types/components/cpsl-tile-button/cpsl-tile-button.d.ts +6 -0
- package/dist/types/components.d.ts +216 -118
- package/dist/types/interface.d.ts +13 -0
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/dist/types/utils/theme/generatePalette.d.ts +4 -2
- package/dist/types/utils/theme/generateTheme.d.ts +5 -1
- package/package.json +6 -12
- package/readme.md +47 -2
- package/dist/capsule/p-0462f723.js +0 -2
- package/dist/capsule/p-0462f723.js.map +0 -1
- package/dist/capsule/p-303e6e89.entry.js +0 -29
- package/dist/capsule/p-303e6e89.entry.js.map +0 -1
- package/dist/capsule/p-452b9998.entry.js.map +0 -1
- package/dist/capsule/p-6793ef7a.entry.js +0 -2
- package/dist/capsule/p-7dde3172.js +0 -3
- package/dist/capsule/p-7dde3172.js.map +0 -1
- package/dist/capsule/p-a6aaf3f4.entry.js.map +0 -1
- package/dist/capsule/p-f6c74d69.entry.js +0 -2
- package/dist/cjs/_commonjsHelpers-b3309d7b.js +0 -12
- package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +0 -1
- package/dist/cjs/index-528f7428.js +0 -2107
- package/dist/cjs/index-528f7428.js.map +0 -1
- package/dist/collection/assets/icons/double-arc.svg +0 -13
- package/dist/collection/assets/icons/single-arc.svg +0 -11
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js +0 -29
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js +0 -37
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js.map +0 -1
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +0 -29
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +0 -37
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +0 -1
- package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js +0 -29
- package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js +0 -37
- package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js.map +0 -1
- package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js +0 -29
- package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js +0 -37
- package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js.map +0 -1
- package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js +0 -29
- package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js +0 -37
- package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js.map +0 -1
- package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js +0 -29
- package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js +0 -37
- package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js.map +0 -1
- package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js +0 -29
- package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js +0 -37
- package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js.map +0 -1
- package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js +0 -29
- package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js +0 -37
- package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js.map +0 -1
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js +0 -29
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js +0 -37
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js.map +0 -1
- package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js +0 -29
- package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js +0 -37
- package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js.map +0 -1
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js +0 -29
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js +0 -37
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js.map +0 -1
- package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js +0 -29
- package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js +0 -37
- package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js.map +0 -1
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js +0 -29
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js +0 -37
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js.map +0 -1
- package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +0 -29
- package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +0 -37
- package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +0 -1
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js +0 -29
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js +0 -37
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js.map +0 -1
- package/dist/collection/components/cpsl-hero/test/cpsl-hero.e2e.js +0 -29
- package/dist/collection/components/cpsl-hero/test/cpsl-hero.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-hero/test/cpsl-hero.spec.js +0 -37
- package/dist/collection/components/cpsl-hero/test/cpsl-hero.spec.js.map +0 -1
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js +0 -29
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js +0 -37
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js.map +0 -1
- package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.e2e.js +0 -29
- package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.spec.js +0 -37
- package/dist/collection/components/cpsl-identicon/test/cpsl-identicon.spec.js.map +0 -1
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js +0 -29
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js +0 -37
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js.map +0 -1
- package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js +0 -29
- package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js +0 -37
- package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js.map +0 -1
- package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +0 -1
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js +0 -29
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js +0 -37
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js.map +0 -1
- package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +0 -29
- package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +0 -37
- package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +0 -1
- package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js +0 -29
- package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js +0 -37
- package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js.map +0 -1
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js +0 -29
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js +0 -37
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js.map +0 -1
- package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js +0 -29
- package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js +0 -37
- package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js.map +0 -1
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js +0 -29
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js +0 -37
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js.map +0 -1
- package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js +0 -29
- package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js +0 -37
- package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js.map +0 -1
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js +0 -29
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js +0 -37
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js.map +0 -1
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js +0 -29
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js +0 -37
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js.map +0 -1
- package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js +0 -29
- package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js +0 -37
- package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js.map +0 -1
- package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js +0 -29
- package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js +0 -37
- package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js.map +0 -1
- package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js +0 -29
- package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js +0 -37
- package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js.map +0 -1
- package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js +0 -29
- package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js +0 -37
- package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js.map +0 -1
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js +0 -29
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js +0 -37
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js.map +0 -1
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js +0 -29
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js +0 -37
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js.map +0 -1
- package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js +0 -29
- package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js +0 -37
- package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js.map +0 -1
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js +0 -29
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js +0 -37
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js.map +0 -1
- package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js +0 -29
- package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js +0 -37
- package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js.map +0 -1
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js +0 -29
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js +0 -37
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js.map +0 -1
- package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js +0 -29
- package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js +0 -37
- package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js.map +0 -1
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js +0 -29
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js +0 -37
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js.map +0 -1
- package/dist/esm/_commonjsHelpers-1789f0cf.js +0 -9
- package/dist/esm/_commonjsHelpers-1789f0cf.js.map +0 -1
- package/dist/esm/index-b188f201.js +0 -2076
- package/dist/esm/index-b188f201.js.map +0 -1
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +0 -39
- /package/dist/types/Users/{briancorbin/Documents/Programming/Capsule/component-library/core → norwood/capsule-repos/web-sdk/packages/core-components}/.stencil/scripts/buildAssets.d.ts +0 -0
package/dist/collection/components/{cpsl-modal/cpsl-modal.js → cpsl-auth-modal/cpsl-auth-modal.js}
RENAMED
@@ -1,26 +1,17 @@
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
2
2
|
import gsap from "gsap";
|
3
|
-
import Draggable from "gsap/Draggable";
|
4
3
|
import { MOBILE_SIZE } from "../../constants";
|
5
|
-
gsap.registerPlugin(Draggable);
|
6
4
|
const mm = gsap.matchMedia();
|
7
|
-
export class
|
5
|
+
export class CpslAuthModal {
|
8
6
|
constructor() {
|
9
|
-
this.getDraggableHeight = () => {
|
10
|
-
return this.innerContainerEl.clientHeight;
|
11
|
-
};
|
12
7
|
this.hasFooter = undefined;
|
8
|
+
this.isMobile = undefined;
|
13
9
|
this.enterTransitionDuration = 0.15;
|
14
10
|
this.exitTransitionDuration = 0.15;
|
15
|
-
this.footerExpanded = undefined;
|
16
|
-
this.footerTransitionDuration = 0.15;
|
17
11
|
this.noOverlay = undefined;
|
18
12
|
this.open = undefined;
|
19
13
|
this.zIndexOverride = undefined;
|
20
14
|
}
|
21
|
-
toggleHeight() {
|
22
|
-
this.footerExpanded ? this.expandFooterTl.play() : this.expandFooterTl.reverse();
|
23
|
-
}
|
24
15
|
toggleModal() {
|
25
16
|
if (this.hasAnimatedIn) {
|
26
17
|
this.handleAnimation();
|
@@ -30,13 +21,12 @@ export class CpslModal {
|
|
30
21
|
this.handleAnimation();
|
31
22
|
this.hasAnimatedIn = true;
|
32
23
|
mm.add(`(min-width: ${MOBILE_SIZE + 1}px)`, () => {
|
33
|
-
var _a;
|
34
|
-
(_a = this.draggable) === null || _a === void 0 ? void 0 : _a.disable();
|
35
24
|
gsap.timeline({}).set(this.modalWrapperEl, { yPercent: 0, scale: this.open ? 1 : 0.8, opacity: this.open ? 1 : 0 });
|
25
|
+
this.isMobile = false;
|
36
26
|
});
|
37
27
|
mm.add(`(max-width: ${MOBILE_SIZE}px)`, () => {
|
38
|
-
this.initDraggable();
|
39
28
|
gsap.timeline({}).set(this.modalWrapperEl, { scale: 1, opacity: 1, yPercent: this.open ? -100 : 0 });
|
29
|
+
this.isMobile = true;
|
40
30
|
});
|
41
31
|
this.hasFooter = this.footerSlotEl.assignedNodes().length >= 1;
|
42
32
|
this.footerSlotEl.addEventListener('slotchange', () => {
|
@@ -57,7 +47,6 @@ export class CpslModal {
|
|
57
47
|
this.cpslModalEntering.emit();
|
58
48
|
},
|
59
49
|
onComplete: () => {
|
60
|
-
this.addExpandAnim();
|
61
50
|
this.cpslModalEntered.emit();
|
62
51
|
},
|
63
52
|
})
|
@@ -75,7 +64,6 @@ export class CpslModal {
|
|
75
64
|
this.cpslModalEntering.emit();
|
76
65
|
},
|
77
66
|
onComplete: () => {
|
78
|
-
this.addExpandAnim();
|
79
67
|
this.cpslModalEntered.emit();
|
80
68
|
},
|
81
69
|
})
|
@@ -125,106 +113,37 @@ export class CpslModal {
|
|
125
113
|
}
|
126
114
|
}
|
127
115
|
}
|
128
|
-
addExpandAnim() {
|
129
|
-
setTimeout(() => {
|
130
|
-
this.expandFooterTl = gsap
|
131
|
-
.timeline({
|
132
|
-
reversed: true,
|
133
|
-
paused: true,
|
134
|
-
onReverseComplete: () => {
|
135
|
-
this.contentEl.style.setProperty('height', 'auto');
|
136
|
-
},
|
137
|
-
defaults: {
|
138
|
-
duration: this.footerTransitionDuration,
|
139
|
-
},
|
140
|
-
})
|
141
|
-
.set(this.footerExpandedEl, { overflow: 'auto', display: 'block' })
|
142
|
-
.set(this.headerExpandedEl, { display: 'block' })
|
143
|
-
.to(this.innerContainerEl, { paddingBottom: '8px' })
|
144
|
-
.to(this.contentEl, { height: '0px', overflow: 'hidden', opacity: 0 }, '<')
|
145
|
-
.to(this.footerEl, { height: '0px', overflow: 'hidden', opacity: 0 }, '<')
|
146
|
-
.to(this.footerExpandedEl, { height: 'auto', opacity: 1 }, '<')
|
147
|
-
.to(this.headerExpandedEl, { height: 'auto', opacity: 1 }, '<');
|
148
|
-
}, 10);
|
149
|
-
}
|
150
|
-
initDraggable() {
|
151
|
-
this.draggable = Draggable.create(this.modalContainerEl, {
|
152
|
-
trigger: this.headerEl,
|
153
|
-
dragClickables: false,
|
154
|
-
type: 'y',
|
155
|
-
edgeResistance: 0.2,
|
156
|
-
liveSnap: {
|
157
|
-
y: function (y) {
|
158
|
-
if (y < 0)
|
159
|
-
return 0;
|
160
|
-
return y;
|
161
|
-
},
|
162
|
-
},
|
163
|
-
onDrag: () => {
|
164
|
-
const y = gsap.utils.mapRange(0, this.getDraggableHeight(), 1, 0, this.draggable.y);
|
165
|
-
gsap.set(this.overlayEl, { opacity: y });
|
166
|
-
},
|
167
|
-
onDragEnd: () => {
|
168
|
-
if (this.draggable.y > 60) {
|
169
|
-
this.cpslModalRequestClose.emit();
|
170
|
-
}
|
171
|
-
else {
|
172
|
-
gsap.set(this.overlayEl, { opacity: 1 });
|
173
|
-
gsap.set(this.modalWrapperEl, { yPercent: -100 });
|
174
|
-
gsap.set(this.modalContainerEl, { y: 0 });
|
175
|
-
}
|
176
|
-
},
|
177
|
-
})[0];
|
178
|
-
}
|
179
116
|
get footerEl() {
|
180
117
|
return this.el.shadowRoot.getElementById('modal-footer');
|
181
118
|
}
|
182
|
-
get footerExpandedEl() {
|
183
|
-
return this.el.shadowRoot.getElementById('modal-footer-expanded');
|
184
|
-
}
|
185
|
-
get headerExpandedEl() {
|
186
|
-
return this.el.shadowRoot.getElementById('modal-header-expanded');
|
187
|
-
}
|
188
|
-
get innerContainerEl() {
|
189
|
-
return this.el.shadowRoot.getElementById('modal-inner-container');
|
190
|
-
}
|
191
|
-
get contentEl() {
|
192
|
-
return this.el.shadowRoot.getElementById('modal-content');
|
193
|
-
}
|
194
119
|
get modalWrapperEl() {
|
195
120
|
return this.el.shadowRoot.getElementById('modal-wrapper');
|
196
121
|
}
|
197
122
|
get modalContainerEl() {
|
198
123
|
return this.el.shadowRoot.getElementById('modal-container');
|
199
124
|
}
|
200
|
-
get overlayEl() {
|
201
|
-
return this.el.shadowRoot.getElementById('overlay');
|
202
|
-
}
|
203
125
|
get footerSlotEl() {
|
204
126
|
return this.footerEl.querySelectorAll('slot')[0];
|
205
127
|
}
|
206
|
-
get headerEl() {
|
207
|
-
return this.el.shadowRoot.getElementById('modal-header');
|
208
|
-
}
|
209
128
|
get Modal() {
|
210
|
-
return (h("div", { class: { 'modal-container': true, 'no-footer': !this.hasFooter }, part: "modal-container", id: "modal-container" }, h("
|
129
|
+
return (h("div", { class: { 'modal-container': true, 'no-footer': !this.hasFooter }, part: "modal-container", id: "modal-container" }, h("cpsl-card", { id: "modal-body-card", class: { 'modal-body-card': true }, part: "modal-body-card" }, h("slot", { name: "body" }), this.isMobile && (h("div", { class: "mobile-footer" }, h("slot", { name: "footer" })))), h("cpsl-card", { id: "modal-footer", part: "modal-footer", class: { 'footer-hidden': !this.hasFooter, 'modal-body-card': true }, style: { display: !this.isMobile ? 'block' : 'none' } }, h("slot", { name: "footer" }))));
|
211
130
|
}
|
212
131
|
render() {
|
213
132
|
if (this.noOverlay) {
|
214
|
-
return (h(Host, { style:
|
133
|
+
return (h(Host, { style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}, class: "no-overlay" }, this.Modal));
|
215
134
|
}
|
216
|
-
return (h(Host, { style:
|
135
|
+
return (h(Host, { style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}, class: { 'include-mobile-styling': true } }, h("cpsl-overlay", { zIndexOverride: this.zIndexOverride ? this.zIndexOverride : undefined, id: "overlay", open: this.open, enterTransitionDuration: this.enterTransitionDuration, exitTransitionDuration: this.exitTransitionDuration }), h("div", { id: "modal-wrapper", class: "modal-wrapper" }, this.Modal)));
|
217
136
|
}
|
218
|
-
static get is() { return "cpsl-modal"; }
|
137
|
+
static get is() { return "cpsl-auth-modal"; }
|
219
138
|
static get encapsulation() { return "shadow"; }
|
220
139
|
static get originalStyleUrls() {
|
221
140
|
return {
|
222
|
-
"$": ["cpsl-modal.scss"]
|
141
|
+
"$": ["cpsl-auth-modal.scss"]
|
223
142
|
};
|
224
143
|
}
|
225
144
|
static get styleUrls() {
|
226
145
|
return {
|
227
|
-
"$": ["cpsl-modal.css"]
|
146
|
+
"$": ["cpsl-auth-modal.css"]
|
228
147
|
};
|
229
148
|
}
|
230
149
|
static get properties() {
|
@@ -265,41 +184,6 @@ export class CpslModal {
|
|
265
184
|
"reflect": false,
|
266
185
|
"defaultValue": "0.15"
|
267
186
|
},
|
268
|
-
"footerExpanded": {
|
269
|
-
"type": "boolean",
|
270
|
-
"mutable": false,
|
271
|
-
"complexType": {
|
272
|
-
"original": "boolean",
|
273
|
-
"resolved": "boolean",
|
274
|
-
"references": {}
|
275
|
-
},
|
276
|
-
"required": false,
|
277
|
-
"optional": true,
|
278
|
-
"docs": {
|
279
|
-
"tags": [],
|
280
|
-
"text": "Whether or not to show `footerExpandedFooter` and `footerExpandedHeader` slots."
|
281
|
-
},
|
282
|
-
"attribute": "footer-expanded",
|
283
|
-
"reflect": false
|
284
|
-
},
|
285
|
-
"footerTransitionDuration": {
|
286
|
-
"type": "number",
|
287
|
-
"mutable": false,
|
288
|
-
"complexType": {
|
289
|
-
"original": "number",
|
290
|
-
"resolved": "number",
|
291
|
-
"references": {}
|
292
|
-
},
|
293
|
-
"required": false,
|
294
|
-
"optional": true,
|
295
|
-
"docs": {
|
296
|
-
"tags": [],
|
297
|
-
"text": "Duration in seconds of the footer expansion animation.\nDefault is 0.15."
|
298
|
-
},
|
299
|
-
"attribute": "footer-transition-duration",
|
300
|
-
"reflect": false,
|
301
|
-
"defaultValue": "0.15"
|
302
|
-
},
|
303
187
|
"noOverlay": {
|
304
188
|
"type": "boolean",
|
305
189
|
"mutable": false,
|
@@ -355,7 +239,8 @@ export class CpslModal {
|
|
355
239
|
}
|
356
240
|
static get states() {
|
357
241
|
return {
|
358
|
-
"hasFooter": {}
|
242
|
+
"hasFooter": {},
|
243
|
+
"isMobile": {}
|
359
244
|
};
|
360
245
|
}
|
361
246
|
static get events() {
|
@@ -439,12 +324,9 @@ export class CpslModal {
|
|
439
324
|
static get elementRef() { return "el"; }
|
440
325
|
static get watchers() {
|
441
326
|
return [{
|
442
|
-
"propName": "footerExpanded",
|
443
|
-
"methodName": "toggleHeight"
|
444
|
-
}, {
|
445
327
|
"propName": "open",
|
446
328
|
"methodName": "toggleModal"
|
447
329
|
}];
|
448
330
|
}
|
449
331
|
}
|
450
|
-
//# sourceMappingURL=cpsl-modal.js.map
|
332
|
+
//# sourceMappingURL=cpsl-auth-modal.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+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EAAE,EAAC,eAAe,EAAC,KAAK,EAAC,eAAe,IAC1C,IAAI,CAAC,KAAK,CACP,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, Watch, h, Event, EventEmitter } from '@stencil/core';\nimport gsap from 'gsap';\nimport { MOBILE_SIZE } from '../../constants';\n\nconst mm = gsap.matchMedia();\n@Component({\n tag: 'cpsl-auth-modal',\n styleUrl: 'cpsl-auth-modal.scss',\n shadow: true,\n})\nexport class CpslAuthModal {\n private hasAnimatedIn: boolean;\n\n @Element() el!: HTMLCpslAuthModalElement;\n\n @State() hasFooter: boolean;\n @State() isMobile: boolean;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the overlay. This will always show the modal, regardless of the value of `open`.\n */\n @Prop() noOverlay?: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalRequestClose!: EventEmitter<null>;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n @Watch('open')\n toggleModal() {\n if (this.hasAnimatedIn) {\n this.handleAnimation();\n }\n }\n\n componentDidLoad() {\n this.handleAnimation();\n this.hasAnimatedIn = true;\n\n mm.add(`(min-width: ${MOBILE_SIZE + 1}px)`, () => {\n gsap.timeline({}).set(this.modalWrapperEl, { yPercent: 0, scale: this.open ? 1 : 0.8, opacity: this.open ? 1 : 0 });\n this.isMobile = false;\n });\n mm.add(`(max-width: ${MOBILE_SIZE}px)`, () => {\n gsap.timeline({}).set(this.modalWrapperEl, { scale: 1, opacity: 1, yPercent: this.open ? -100 : 0 });\n this.isMobile = true;\n });\n\n this.hasFooter = this.footerSlotEl.assignedNodes().length >= 1;\n this.footerSlotEl.addEventListener('slotchange', () => {\n if (this.footerSlotEl.assignedNodes().length >= 1) {\n this.hasFooter = true;\n } else {\n this.hasFooter = false;\n }\n });\n }\n\n private handleAnimation() {\n if (this.open) {\n if (window.innerWidth >= MOBILE_SIZE + 1) {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalEntering.emit();\n },\n onComplete: () => {\n this.cpslModalEntered.emit();\n },\n })\n .set(this.modalWrapperEl, { display: 'flex', yPercent: 0 })\n .to(this.modalWrapperEl, {\n scale: 1,\n opacity: 1,\n duration: this.enterTransitionDuration,\n });\n } else {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalEntering.emit();\n },\n onComplete: () => {\n this.cpslModalEntered.emit();\n },\n })\n .set(this.modalWrapperEl, { display: 'flex', scale: 1, opacity: 1 })\n .to(this.modalWrapperEl, {\n yPercent: -100,\n duration: this.enterTransitionDuration,\n });\n }\n } else {\n if (window.innerWidth >= MOBILE_SIZE + 1) {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalExiting.emit();\n },\n onComplete: () => {\n this.cpslModalExited.emit();\n this.modalWrapperEl?.style.setProperty('display', 'none');\n },\n })\n .to(this.modalWrapperEl, {\n scale: 0.8,\n opacity: 0,\n duration: this.exitTransitionDuration,\n });\n } else {\n gsap\n .timeline({\n onStart: () => {\n this.cpslModalExiting.emit();\n },\n onComplete: () => {\n this.cpslModalExited.emit();\n this.modalWrapperEl?.style.setProperty('display', 'none');\n },\n })\n .to(this.modalWrapperEl, {\n yPercent: 0,\n duration: this.exitTransitionDuration,\n })\n .set(this.modalContainerEl, { y: 0 });\n }\n }\n }\n\n private get footerEl() {\n return this.el.shadowRoot.getElementById('modal-footer');\n }\n\n private get modalWrapperEl() {\n return this.el.shadowRoot.getElementById('modal-wrapper');\n }\n\n private get modalContainerEl() {\n return this.el.shadowRoot.getElementById('modal-container');\n }\n\n private get footerSlotEl() {\n return this.footerEl.querySelectorAll('slot')[0];\n }\n\n private get Modal() {\n return (\n <div class={{ 'modal-container': true, 'no-footer': !this.hasFooter }} part=\"modal-container\" id=\"modal-container\">\n <cpsl-card id=\"modal-body-card\" class={{ 'modal-body-card': true }} part=\"modal-body-card\">\n <slot name=\"body\"></slot>\n {this.isMobile && (\n <div class=\"mobile-footer\">\n <slot name=\"footer\"></slot>\n </div>\n )}\n </cpsl-card>\n <cpsl-card\n id=\"modal-footer\"\n part=\"modal-footer\"\n class={{ 'footer-hidden': !this.hasFooter, 'modal-body-card': true }}\n style={{ display: !this.isMobile ? 'block' : 'none' }}\n >\n <slot name=\"footer\"></slot>\n </cpsl-card>\n </div>\n );\n }\n\n render() {\n if (this.noOverlay) {\n return (\n <Host style={this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}} class=\"no-overlay\">\n {this.Modal}\n </Host>\n );\n }\n\n return (\n <Host style={this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}} class={{ 'include-mobile-styling': true }}>\n <cpsl-overlay\n zIndexOverride={this.zIndexOverride ? this.zIndexOverride : undefined}\n id=\"overlay\"\n open={this.open}\n enterTransitionDuration={this.enterTransitionDuration}\n exitTransitionDuration={this.exitTransitionDuration}\n />\n <div id=\"modal-wrapper\" class=\"modal-wrapper\">\n {this.Modal}\n </div>\n </Host>\n );\n }\n}\n"]}
|
@@ -7,7 +7,7 @@ export class CpslAvatar {
|
|
7
7
|
}
|
8
8
|
render() {
|
9
9
|
var _a;
|
10
|
-
return (h(Host, { key: '
|
10
|
+
return (h(Host, { key: '04dfd668bc6ab12f758e82ccfd915f06e1de3504' }, h("span", { key: '906c7c6e113040b95273c987689e848954e14a1c', class: { round: this.variant === 'round' } }, h("img", { key: '2d952a27ebbeb118c931162487f2d7e13370b41f', src: this.src, alt: (_a = this.alt) !== null && _a !== void 0 ? _a : 'avatar' }))));
|
11
11
|
}
|
12
12
|
static get is() { return "cpsl-avatar"; }
|
13
13
|
static get encapsulation() { return "shadow"; }
|
@@ -101,6 +101,22 @@
|
|
101
101
|
--button-secondary-active-background-color: var(--cpsl-color-secondary-button-surface-pressed);
|
102
102
|
--button-secondary-active-border-color: var(--cpsl-color-secondary-button-border-default);
|
103
103
|
--button-secondary-active-icon-color: var(--cpsl-color-secondary-button-text);
|
104
|
+
--button-tertiary-color: var(--cpsl-color-tertiary-button-text);
|
105
|
+
--button-tertiary-background-color: var(--cpsl-color-tertiary-button-surface-default);
|
106
|
+
--button-tertiary-border-color: var(--cpsl-color-tertiary-button-border-default);
|
107
|
+
--button-tertiary-icon-color: var(--cpsl-color-tertiary-button-text);
|
108
|
+
--button-tertiary-disabled-color: var(--cpsl-color-text-disabled);
|
109
|
+
--button-tertiary-disabled-background-color: var(--cpsl-color-tertiary-button-surface-disabled);
|
110
|
+
--button-tertiary-disabled-border-color: var(--cpsl-color-tertiary-button-border-disabled);
|
111
|
+
--button-tertiary-disabled-icon-color: var(--cpsl-color-tertiary-button-text);
|
112
|
+
--button-tertiary-hover-color: var(--cpsl-color-tertiary-button-text);
|
113
|
+
--button-tertiary-hover-background-color: var(--cpsl-color-tertiary-button-surface-hover);
|
114
|
+
--button-tertiary-hover-border-color: var(--cpsl-color-tertiary-button-surface-hover);
|
115
|
+
--button-tertiary-hover-icon-color: var(--cpsl-color-tertiary-button-text);
|
116
|
+
--button-tertiary-active-color: var(--cpsl-color-tertiary-button-text);
|
117
|
+
--button-tertiary-active-background-color: var(--cpsl-color-tertiary-button-surface-pressed);
|
118
|
+
--button-tertiary-active-border-color: var(--cpsl-color-tertiary-button-surface-pressed);
|
119
|
+
--button-tertiary-active-icon-color: var(--cpsl-color-tertiary-button-text);
|
104
120
|
--button-ghost-color: var(--cpsl-color-ghost-button-default);
|
105
121
|
--button-ghost-disabled-color: var(--cpsl-color-ghost-button-disabled);
|
106
122
|
--button-ghost-hover-color: var(--cpsl-color-ghost-button-hover);
|
@@ -151,6 +167,11 @@
|
|
151
167
|
--button-padding-bottom: 13px;
|
152
168
|
}
|
153
169
|
|
170
|
+
:host(.small.tertiary) {
|
171
|
+
--button-padding-top: 13px;
|
172
|
+
--button-padding-bottom: 13px;
|
173
|
+
}
|
174
|
+
|
154
175
|
:host(.medium) {
|
155
176
|
--button-font-size: var(--cpsl-font-size-body-m);
|
156
177
|
--button-padding-top: 14px;
|
@@ -161,12 +182,21 @@
|
|
161
182
|
--button-padding-top: 15px;
|
162
183
|
--button-padding-bottom: 15px;
|
163
184
|
}
|
185
|
+
:host(.medium) :host(.tertiary) {
|
186
|
+
--button-padding-top: 15px;
|
187
|
+
--button-padding-bottom: 15px;
|
188
|
+
}
|
164
189
|
|
165
190
|
:host(.medium.primary) {
|
166
191
|
--button-padding-top: 15px;
|
167
192
|
--button-padding-bottom: 15px;
|
168
193
|
}
|
169
194
|
|
195
|
+
:host(.medium.tertiary) {
|
196
|
+
--button-padding-top: 15px;
|
197
|
+
--button-padding-bottom: 15px;
|
198
|
+
}
|
199
|
+
|
170
200
|
:host(.disabled) {
|
171
201
|
cursor: default;
|
172
202
|
pointer-events: none;
|
@@ -198,6 +228,9 @@
|
|
198
228
|
:host(.primary):host(.disabled) ::slotted(cpsl-icon) {
|
199
229
|
--icon-color: var(--button-primary-disabled-icon-color);
|
200
230
|
}
|
231
|
+
:host(.primary):host(.disabled) ::slotted(cpsl-spinner) {
|
232
|
+
--background-color: var(--button-primary-disabled-background-color);
|
233
|
+
}
|
201
234
|
:host(.primary) :not(.disabled):hover {
|
202
235
|
--button-color: var(--button-primary-hover-color);
|
203
236
|
--button-background-color: var(--button-primary-hover-background-color);
|
@@ -236,6 +269,9 @@
|
|
236
269
|
:host(.secondary):host(.disabled) ::slotted(cpsl-icon) {
|
237
270
|
--icon-color: var(--button-secondary-disabled-icon-color);
|
238
271
|
}
|
272
|
+
:host(.secondary):host(.disabled) ::slotted(cpsl-spinner) {
|
273
|
+
--background-color: var(--button-secondary-disabled-icon-color);
|
274
|
+
}
|
239
275
|
:host(.secondary) :not(.disabled):hover {
|
240
276
|
--button-color: var(--button-secondary-hover-color);
|
241
277
|
--button-border-color: var(--button-secondary-hover-border-color);
|
@@ -256,6 +292,50 @@
|
|
256
292
|
--button-outline-color: var(--cpsl-color-secondary-button-outline);
|
257
293
|
}
|
258
294
|
|
295
|
+
:host(.tertiary) {
|
296
|
+
--button-border-radius: var(--cpsl-border-radius-tertiary-button);
|
297
|
+
--button-color: var(--button-tertiary-color);
|
298
|
+
--button-background-color: var(--button-tertiary-background-color);
|
299
|
+
--button-border-color: var(--button-tertiary-border-color);
|
300
|
+
--button-padding-start: 17px;
|
301
|
+
--button-padding-end: 17px;
|
302
|
+
--button-border-width: 0px;
|
303
|
+
}
|
304
|
+
:host(.tertiary) ::slotted(cpsl-icon) {
|
305
|
+
--icon-color: var(--button-tertiary-icon-color);
|
306
|
+
}
|
307
|
+
:host(.tertiary):host(.disabled) {
|
308
|
+
--button-color: var(--button-tertiary-disabled-color);
|
309
|
+
--button-background-color: var(--button-tertiary-disabled-background-color);
|
310
|
+
--button-border-color: var(--button-tertiary-disabled-border-color);
|
311
|
+
--button-outline-color: transparent;
|
312
|
+
}
|
313
|
+
:host(.tertiary):host(.disabled) ::slotted(cpsl-icon) {
|
314
|
+
--icon-color: var(--button-tertiary-disabled-icon-color);
|
315
|
+
}
|
316
|
+
:host(.tertiary):host(.disabled) ::slotted(cpsl-spinner) {
|
317
|
+
--background-color: var(--button-tertiary-disabled-icon-color);
|
318
|
+
}
|
319
|
+
:host(.tertiary) :not(.disabled):hover {
|
320
|
+
--button-color: var(--button-tertiary-hover-color);
|
321
|
+
--button-background-color: var(--button-tertiary-hover-background-color);
|
322
|
+
--button-border-color: var(--button-tertiary-hover-border-color);
|
323
|
+
}
|
324
|
+
:host(.tertiary) :not(.disabled):hover ::slotted(cpsl-icon) {
|
325
|
+
--icon-color: var(--button-tertiary-hover-icon-color);
|
326
|
+
}
|
327
|
+
:host(.tertiary) :not(.disabled):active {
|
328
|
+
--button-color: var(--button-tertiary-active-color);
|
329
|
+
--button-background-color: var(--button-tertiary-active-background-color);
|
330
|
+
--button-border-color: var(--button-tertiary-active-border-color);
|
331
|
+
}
|
332
|
+
:host(.tertiary) :not(.disabled):active ::slotted(cpsl-icon) {
|
333
|
+
--icon-color: var(--button-tertiary-active-icon-color);
|
334
|
+
}
|
335
|
+
:host(.tertiary) :not(.disabled):focus-visible {
|
336
|
+
--button-outline-color: var(--cpsl-color-tertiary-button-outline);
|
337
|
+
}
|
338
|
+
|
259
339
|
:host(.ghost) {
|
260
340
|
--button-color: var(--button-ghost-color);
|
261
341
|
--button-background-color: transparent;
|
@@ -269,8 +349,6 @@
|
|
269
349
|
}
|
270
350
|
:host(.ghost) ::slotted(cpsl-icon) {
|
271
351
|
--icon-color: var(--button-ghost-color);
|
272
|
-
--height: var(--cpsl-font-size-body-xl);
|
273
|
-
--width: var(--cpsl-font-size-body-xl);
|
274
352
|
}
|
275
353
|
:host(.ghost):host(.disabled) {
|
276
354
|
--button-color: var(--button-ghost-disabled-color);
|
@@ -278,6 +356,9 @@
|
|
278
356
|
:host(.ghost):host(.disabled) ::slotted(cpsl-icon) {
|
279
357
|
--icon-color: var(--button-ghost-disabled-color);
|
280
358
|
}
|
359
|
+
:host(.ghost):host(.disabled) ::slotted(cpsl-spinner) {
|
360
|
+
--background-color: var(--button-ghost-disabled-color);
|
361
|
+
}
|
281
362
|
:host(.ghost) :not(.disabled):hover {
|
282
363
|
--button-color: var(--button-ghost-hover-color);
|
283
364
|
}
|
@@ -379,4 +460,10 @@
|
|
379
460
|
|
380
461
|
:host ::slotted(cpsl-text) {
|
381
462
|
color: var(--button-color);
|
463
|
+
}
|
464
|
+
:host ::slotted(cpsl-icon-group) {
|
465
|
+
--container-border-color: var(--button-background-color);
|
466
|
+
}
|
467
|
+
:host ::slotted(cpsl-spinner) {
|
468
|
+
--background-color: var(--button-background-color);
|
382
469
|
}
|
@@ -10,16 +10,20 @@ export class CpslButton {
|
|
10
10
|
this.variant = 'primary';
|
11
11
|
}
|
12
12
|
render() {
|
13
|
-
return (h(Host, { key: '
|
13
|
+
return (h(Host, { key: '7411754a763990dcbef83edbef353ebf3066f71d', class: {
|
14
|
+
// VARIANTS
|
14
15
|
'primary': this.variant === 'primary',
|
15
16
|
'secondary': this.variant === 'secondary',
|
17
|
+
'tertiary': this.variant === 'tertiary',
|
16
18
|
'ghost': this.variant === 'ghost',
|
17
19
|
'destructive': this.variant === 'destructive',
|
20
|
+
// STATE
|
18
21
|
'disabled': this.disabled,
|
19
22
|
'full-width': this.fullWidth,
|
23
|
+
// SIZES
|
20
24
|
'small': this.size === 'small',
|
21
25
|
'medium': this.size === 'medium',
|
22
|
-
} }, h(this.as, { key: '
|
26
|
+
} }, h(this.as, { key: '1c49c08c3ea7a105ce6c69302e2adc2bc6a443eb', href: this.href, target: this.target, part: "button-native", class: "button-native" }, h("slot", { key: '5ef09afd70e95c9c596c46d84a8d3410a8eba2a9', name: "start" }), h("slot", { key: 'f055ad44f74ca07a612c967432714c00e4b56ba9' }), h("slot", { key: '2a53e40d635b3de4441aed9005b4bb13d42e9d04', name: "end" }))));
|
23
27
|
}
|
24
28
|
static get is() { return "cpsl-button"; }
|
25
29
|
static get encapsulation() { return "shadow"; }
|
@@ -145,15 +149,15 @@ export class CpslButton {
|
|
145
149
|
"type": "string",
|
146
150
|
"mutable": false,
|
147
151
|
"complexType": {
|
148
|
-
"original": "'primary' | 'secondary' | 'ghost' | 'destructive'",
|
149
|
-
"resolved": "\"destructive\" | \"ghost\" | \"primary\" | \"secondary\"",
|
152
|
+
"original": "'primary' | 'secondary' | 'tertiary' | 'ghost' | 'destructive'",
|
153
|
+
"resolved": "\"destructive\" | \"ghost\" | \"primary\" | \"secondary\" | \"tertiary\"",
|
150
154
|
"references": {}
|
151
155
|
},
|
152
156
|
"required": false,
|
153
157
|
"optional": true,
|
154
158
|
"docs": {
|
155
159
|
"tags": [],
|
156
|
-
"text": "The variant of the button.\nOptions are: `\"primary\"`, `\"secondary\", `\"
|
160
|
+
"text": "The variant of the button.\nOptions are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"ghost\"`, `\"destructive\"`.\nDefault is: `\"primary\"`."
|
157
161
|
},
|
158
162
|
"attribute": "variant",
|
159
163
|
"reflect": true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;kBAMS,QAAQ;wBAMQ,KAAK;yBAMrB,KAAK;;oBAYC,QAAQ;;
|
1
|
+
{"version":3,"file":"cpsl-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;kBAMS,QAAQ;wBAMQ,KAAK;yBAMrB,KAAK;;oBAYC,QAAQ;;uBAYwD,SAAS;;IAE7G,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,WAAW;gBACX,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;gBACrC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBACzC,UAAU,EAAE,IAAI,CAAC,OAAO,KAAK,UAAU;gBACvC,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBACjC,aAAa,EAAE,IAAI,CAAC,OAAO,KAAK,aAAa;gBAC7C,QAAQ;gBACR,UAAU,EAAE,IAAI,CAAC,QAAQ;gBACzB,YAAY,EAAE,IAAI,CAAC,SAAS;gBAC5B,QAAQ;gBACR,OAAO,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;gBAC9B,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;aACjC;YAED,EAAC,IAAI,CAAC,EAAE,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,eAAe;gBACvF,6DAAM,IAAI,EAAC,OAAO,GAAQ;gBAC1B,8DAAa;gBACb,6DAAM,IAAI,EAAC,KAAK,GAAQ,CAChB,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-button',\n styleUrl: 'cpsl-button.scss',\n shadow: true,\n})\nexport class CpslButton {\n /**\n * The tag for the button.\n * Options are: `\"button\"`, `\"a\".\n * Default is: `\"button\"`.\n */\n @Prop() as?: 'button' | 'a' = 'button';\n\n /**\n * If the button is disabled.\n * Default is: false.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Whether the button takes the full width of it's container.\n * Default is: false.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * href to use when using a link.\n */\n @Prop() href?: string;\n\n /**\n * The size of the button.\n * Options are: `\"small\"`, `\"medium\".\n * Default is: `\"medium\"`.\n */\n @Prop() size?: 'small' | 'medium' = 'medium';\n\n /**\n * target to use when using a link.\n */\n @Prop() target?: string;\n\n /**\n * The variant of the button.\n * Options are: `\"primary\"`, `\"secondary\", `\"tertiary\", `\"ghost\"`, `\"destructive\"`.\n * Default is: `\"primary\"`.\n */\n @Prop({ reflect: true }) variant?: 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'destructive' = 'primary';\n\n render() {\n return (\n <Host\n class={{\n // VARIANTS\n 'primary': this.variant === 'primary',\n 'secondary': this.variant === 'secondary',\n 'tertiary': this.variant === 'tertiary',\n 'ghost': this.variant === 'ghost',\n 'destructive': this.variant === 'destructive',\n // STATE\n 'disabled': this.disabled,\n 'full-width': this.fullWidth,\n // SIZES\n 'small': this.size === 'small',\n 'medium': this.size === 'medium',\n }}\n >\n <this.as href={this.href} target={this.target} part=\"button-native\" class=\"button-native\">\n <slot name=\"start\"></slot>\n <slot></slot>\n <slot name=\"end\"></slot>\n </this.as>\n </Host>\n );\n }\n}\n"]}
|
@@ -20,7 +20,7 @@ export class CpslButtonGroup {
|
|
20
20
|
item.setAttribute('full-width', 'true');
|
21
21
|
this.selectItem();
|
22
22
|
});
|
23
|
-
if (
|
23
|
+
if ((_a = this.otherSlots) === null || _a === void 0 ? void 0 : _a.length) {
|
24
24
|
console.error('cpsl-button is the only valid child of cpsl-button-group');
|
25
25
|
this.otherSlots.forEach(item => item.remove());
|
26
26
|
}
|
@@ -32,7 +32,7 @@ export class CpslButtonGroup {
|
|
32
32
|
return this.el.querySelectorAll('&> *:not(cpsl-button)');
|
33
33
|
}
|
34
34
|
render() {
|
35
|
-
return (h(Host, { key: '
|
35
|
+
return (h(Host, { key: '91ccfcaf08be6fc45076376b19e63b5b58ab9b15' }, h("slot", { key: '9af22dc4fcbd76ebc32e476d1682e2fe41b33f81' })));
|
36
36
|
}
|
37
37
|
static get is() { return "cpsl-button-group"; }
|
38
38
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-button-group.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button-group/cpsl-button-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,eAAe;;;;IAS1B,UAAU;QACR,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACpC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB;;QACjB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;YAC1C,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACxC,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,IAAI,
|
1
|
+
{"version":3,"file":"cpsl-button-group.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button-group/cpsl-button-group.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAOzE,MAAM,OAAO,eAAe;;;;IAS1B,UAAU;QACR,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,IAAI,CAAC,EAAE,KAAK,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACjC,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACpC,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,mBAAmB;;QACjB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;YAC1C,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACxC,IAAI,CAAC,UAAU,EAAE,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,IAAI,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,EAAE,CAAC;YAC5B,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;YAC1E,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED,IAAY,WAAW;QACrB,OAAO,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACjD,CAAC;IAED,IAAY,UAAU;QACpB,OAAO,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IAC3D,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, Element, h, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-button-group',\n styleUrl: 'cpsl-button-group.scss',\n shadow: true,\n})\nexport class CpslButtonGroup {\n @Element() el!: HTMLCpslButtonGroupElement;\n\n /**\n * The id of the selected button.\n */\n @Prop() selectedId?: string;\n\n @Watch('selectedId')\n selectItem() {\n this.buttonSlots.forEach(item => {\n if (item.id === this.selectedId) {\n item.classList.add('selected');\n } else {\n item.classList.remove('selected');\n }\n });\n }\n\n componentWillRender() {\n this.buttonSlots.forEach(item => {\n item.setAttribute('variant', 'secondary');\n item.setAttribute('full-width', 'true');\n this.selectItem();\n });\n\n if (this.otherSlots?.length) {\n console.error('cpsl-button is the only valid child of cpsl-button-group');\n this.otherSlots.forEach(item => item.remove());\n }\n }\n\n private get buttonSlots() {\n return this.el.querySelectorAll('cpsl-button');\n }\n\n private get otherSlots() {\n return this.el.querySelectorAll('&> *:not(cpsl-button)');\n }\n\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
@@ -60,7 +60,10 @@
|
|
60
60
|
--card-padding-start: 24px;
|
61
61
|
--card-border-width: 1px;
|
62
62
|
--card-border-color: var(--cpsl-color-card-border);
|
63
|
-
--card-border-radius: var(--cpsl-border-radius-card);
|
63
|
+
--card-border-radius-tl: var(--cpsl-border-radius-card);
|
64
|
+
--card-border-radius-tr: var(--cpsl-border-radius-card);
|
65
|
+
--card-border-radius-bl: var(--cpsl-border-radius-card);
|
66
|
+
--card-border-radius-br: var(--cpsl-border-radius-card);
|
64
67
|
--card-background-color: var(--cpsl-color-card-surface);
|
65
68
|
display: block;
|
66
69
|
}
|
@@ -76,6 +79,6 @@
|
|
76
79
|
box-sizing: border-box;
|
77
80
|
overflow: hidden;
|
78
81
|
border: var(--card-border-width) solid var(--card-border-color);
|
79
|
-
border-radius: var(--card-border-radius);
|
82
|
+
border-radius: var(--card-border-radius-tl) var(--card-border-radius-tr) var(--card-border-radius-br) var(--card-border-radius-bl);
|
80
83
|
background: var(--card-background-color);
|
81
84
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
2
2
|
export class CpslCard {
|
3
3
|
render() {
|
4
|
-
return (h(Host, { key: '
|
4
|
+
return (h(Host, { key: '21177f5a9ceec0246dc1fa89a052bfdadacc3063' }, h("div", { key: '0940e0aaf62b24e1be0e99c736069b5bb463854c', class: { card: true }, part: "card-container" }, h("slot", { key: '6317e03f97be9841c03b040845591043bf203e36' }))));
|
5
5
|
}
|
6
6
|
static get is() { return "cpsl-card"; }
|
7
7
|
static get encapsulation() { return "shadow"; }
|
@@ -7,7 +7,7 @@ export class CpslCheckbox {
|
|
7
7
|
this.checked = undefined;
|
8
8
|
}
|
9
9
|
render() {
|
10
|
-
return (h(Host, { key: '
|
10
|
+
return (h(Host, { key: '236c0b027e72c0c25dbc2fd3183a77400c815f8c' }, h("input", { key: '8c350e21268b87d485b16796b2058c4e47f46e75', type: "checkbox", checked: this.checked }), h("span", { key: 'b1d8fc6dd380b67eb8940f55bba47810c54ee189', onClick: this.handleCheckboxClick, class: { container: true, checked: this.checked } }, h("cpsl-icon", { key: '2b3ddcad1e2b9007bda8135a810b75a1a2cfaeca', icon: "check" }))));
|
11
11
|
}
|
12
12
|
static get is() { return "cpsl-checkbox"; }
|
13
13
|
static get encapsulation() { return "shadow"; }
|
@@ -4,13 +4,18 @@ export class CpslCodeInput {
|
|
4
4
|
this.handleInput = (ind, ev) => {
|
5
5
|
var _a;
|
6
6
|
const inputElements = this.inputs;
|
7
|
-
|
7
|
+
// If getting an insertFromPaste remove the last element value since the value setting is handled in the paste event
|
8
|
+
if (ev.inputType === 'insertFromPaste') {
|
9
|
+
inputElements[Math.min(this.length - 1, ind)].value = '';
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
if (ev.inputType === 'insertText') {
|
8
13
|
if (this.type === 'number' && isNaN(parseInt(ev.data))) {
|
9
14
|
inputElements[ind].value = '';
|
10
15
|
return;
|
11
16
|
}
|
12
|
-
inputElements[Math.min(this.length - 1, ind + 1)].focus();
|
13
17
|
const newCode = `${(_a = this.code) !== null && _a !== void 0 ? _a : ''}${ev.data}`;
|
18
|
+
inputElements[Math.min(this.length - 1, newCode.length)].focus();
|
14
19
|
this.cpslInput.emit({ value: newCode });
|
15
20
|
this.code = newCode;
|
16
21
|
}
|
@@ -63,6 +68,7 @@ export class CpslCodeInput {
|
|
63
68
|
const inputElements = this.inputs;
|
64
69
|
const pastedCode = e.clipboardData.getData('text');
|
65
70
|
if (this.type === 'number' && isNaN(parseInt(pastedCode))) {
|
71
|
+
// Remove illegal value from the first input. Not using a timeout here doesn't change the value properly.
|
66
72
|
setTimeout(() => {
|
67
73
|
inputElements[0].value = '';
|
68
74
|
}, 0);
|
@@ -74,7 +80,7 @@ export class CpslCodeInput {
|
|
74
80
|
inputElements.forEach((input, index) => {
|
75
81
|
input.value = pastedCode.charAt(index);
|
76
82
|
});
|
77
|
-
inputElements[this.length - 1].focus();
|
83
|
+
inputElements[Math.min(this.length - 1, pastedCode.length)].focus();
|
78
84
|
};
|
79
85
|
this.code = undefined;
|
80
86
|
this.errorText = undefined;
|
@@ -87,10 +93,10 @@ export class CpslCodeInput {
|
|
87
93
|
}
|
88
94
|
render() {
|
89
95
|
var _a;
|
90
|
-
return (h(Host, { key: '
|
91
|
-
var _a;
|
92
|
-
return (h("input", { class: { 'code-input': true, 'error': Boolean(this.errorText) }, id: `code-input-${i}`,
|
93
|
-
})), (this.errorText || this.helperText) && (h("div", { class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { icon:
|
96
|
+
return (h(Host, { key: 'fd588544d9cdebaaeb1961f4ecb5c5630e8e4699' }, h("div", { key: 'b795c99f0df6fbf4ba9a7118f3f737dbf22c7ee9', class: "code-container" }, new Array(this.length).fill(0).map((_, i) => {
|
97
|
+
var _a, _b;
|
98
|
+
return (h("input", { class: { 'code-input': true, 'error': Boolean(this.errorText), 'has-value': ((_a = this.code) === null || _a === void 0 ? void 0 : _a[i]) !== undefined }, id: `code-input-${i}`, onKeyDown: ev => this.handleKeyDown(i, ev), onInput: ev => this.handleInput(i, ev), onFocus: () => this.handleFocus(i), onPaste: this.handlePaste, min: 0, max: 9, value: (_b = this.code) === null || _b === void 0 ? void 0 : _b[i], inputMode: this.type === 'number' ? 'numeric' : 'text' }));
|
99
|
+
})), (this.errorText || this.helperText) && (h("div", { key: '9cff50eb172f38af5065ad79e3c767f2e8ec33c9', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { key: 'c8d7dbbd0ec7a2015e2e8099d0448b847641b845', icon: this.errorText ? 'alertCircle' : 'infoCircle' }), h("span", { key: '4ae4009a2fb4d8f6dc4c985ea8d39c136cb23780' }, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
|
94
100
|
}
|
95
101
|
static get is() { return "cpsl-code-input"; }
|
96
102
|
static get encapsulation() { return "shadow"; }
|