@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
@@ -28,7 +28,7 @@ export class CpslSelect {
|
|
28
28
|
item.setAttribute('selected', 'false');
|
29
29
|
}
|
30
30
|
});
|
31
|
-
if (!
|
31
|
+
if (!this.selectedValue) {
|
32
32
|
this.hasSelectedItem = false;
|
33
33
|
}
|
34
34
|
};
|
@@ -48,6 +48,8 @@ export class CpslSelect {
|
|
48
48
|
this.hasFocus = false;
|
49
49
|
this.popoverOpen = false;
|
50
50
|
this.hasSelectedItem = false;
|
51
|
+
this.anchorElId = undefined;
|
52
|
+
this.autoWidth = false;
|
51
53
|
this.disabled = false;
|
52
54
|
this.dropdownMaxHeight = undefined;
|
53
55
|
this.errorText = undefined;
|
@@ -60,6 +62,8 @@ export class CpslSelect {
|
|
60
62
|
this.selectedValue = undefined;
|
61
63
|
this.showFormattedSelectedItem = undefined;
|
62
64
|
this.showOptionalLabel = false;
|
65
|
+
this.showSearch = false;
|
66
|
+
this.searchPlaceholder = undefined;
|
63
67
|
}
|
64
68
|
onValueChange() {
|
65
69
|
this.popoverEl.closePopover();
|
@@ -78,12 +82,15 @@ export class CpslSelect {
|
|
78
82
|
}
|
79
83
|
componentDidLoad() {
|
80
84
|
this.popoverEl = this.el.shadowRoot.querySelector(`cpsl-popover`);
|
81
|
-
this.anchorEl = this.el.shadowRoot.getElementById('select-container');
|
85
|
+
this.anchorEl = this.anchorElId ? document.getElementById(this.anchorElId) : this.el.shadowRoot.getElementById('select-container');
|
82
86
|
this.selectItem();
|
83
87
|
}
|
84
88
|
render() {
|
85
|
-
var _a, _b, _c, _d;
|
86
|
-
return (h(Host, { key: '
|
89
|
+
var _a, _b, _c, _d, _e;
|
90
|
+
return (h(Host, { key: '72be0f8b2d2eb537dc174bdc74aafa9b3c5a80e6', id: this.id, class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.selectedValue) } }, this.label && (h("label", { key: '95a25acd1fad10b5ce01be175f5469468dbe5cdb', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? h("span", { class: "optional-label" }, "(optional)") : '')), h("div", { key: '1f19b97f0d973264a9fa4c814b43095249496431', id: "select-container", class: { 'select-container': true, 'error-container': Boolean(this.errorText) }, onMouseDown: this.handleClick }, this.hasSelectedItem && this.showFormattedSelectedItem && h("slot", { key: '325527b35284e3058551175b2c392be1557a1a5e', name: "selected-item" }), h("div", { key: '4da5f55d383ee4725f81bd6d9d174c9231d74f1a', class: { 'selected-container-content': true, 'hidden': this.showFormattedSelectedItem }, id: "selected-container-content", style: {} }, (!this.hasSelectedItem || !this.showFormattedSelectedItem) && (h("cpsl-text", { key: 'bc83e992888ae73bc863d96ef11d2b849a6f60f8', class: { 'selected-text': true, 'placeholder': !this.selectedValue } }, !this.selectedValue ? ((_a = this.placeholder) !== null && _a !== void 0 ? _a : 'Select') : ((_c = (_b = this.formatValue) === null || _b === void 0 ? void 0 : _b.call(this, this.selectedValue)) !== null && _c !== void 0 ? _c : this.selectedValue)))), h("cpsl-icon", { key: 'f96b40c6101c561b1e7cc605f157697209dd1e59', class: { 'chevron': true, 'open': this.popoverOpen, 'has-value': Boolean(this.selectedValue) }, icon: "chevronUp" }), h("input", { key: '8f660d9215da0960eb4ca37292fd4c400b65de77', id: this.inputId, disabled: this.disabled, class: { disabled: this.disabled }, value: this.selectedValue, onFocus: this.onFocus, onBlur: this.onBlur, onKeyPress: this.handleEnterPress, inputmode: "none" })), (this.errorText || this.helperText) && (h("div", { key: '26eacb913e1d727ada026ef75a9d7d96478bae9b', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("span", { key: '3ec7937586e52f0858c2e4595596349d8ae4a57d' }, (_d = this.errorText) !== null && _d !== void 0 ? _d : this.helperText))), h("cpsl-popover", { key: '746e0d3b68f1f550c44cdb00f1a846209b34957d', part: "popover", autoWidth: this.autoWidth, trigger: this.id, preventBlur: this.hasFocus, disabled: this.disabled, anchorEl: this.anchorEl }, h("div", { key: 'c1ec487ab2857c0613f3748123d25da32793a008', part: "dropdown", class: "dropdown" }, this.showSearch && (h("div", { key: '342450b93fa5b20d7663c8390ed006921e77b9d4', class: "search-container" }, h("cpsl-input", { key: 'a72472c811025a6d60e4c9bebe37fe7b56707f5d', onClick: e => e.stopPropagation(), placeholder: (_e = this.searchPlaceholder) !== null && _e !== void 0 ? _e : 'Search', value: "", onCpslInput: e => {
|
91
|
+
e.stopPropagation();
|
92
|
+
this.cpslSearchChange.emit(e.detail.value);
|
93
|
+
} }))), h("div", { key: 'c6977cc371d4fb6fce0162d983c53a15dce89590', class: "dropdown-inner", style: { maxHeight: `${this.dropdownMaxHeight}px` } }, h("slot", { key: 'b867d8f557e56105b7a5c7a5f84d26ef3fd25ac5', name: "items" }))))));
|
87
94
|
}
|
88
95
|
static get is() { return "cpsl-select"; }
|
89
96
|
static get encapsulation() { return "shadow"; }
|
@@ -99,6 +106,41 @@ export class CpslSelect {
|
|
99
106
|
}
|
100
107
|
static get properties() {
|
101
108
|
return {
|
109
|
+
"anchorElId": {
|
110
|
+
"type": "string",
|
111
|
+
"mutable": false,
|
112
|
+
"complexType": {
|
113
|
+
"original": "string",
|
114
|
+
"resolved": "string",
|
115
|
+
"references": {}
|
116
|
+
},
|
117
|
+
"required": false,
|
118
|
+
"optional": true,
|
119
|
+
"docs": {
|
120
|
+
"tags": [],
|
121
|
+
"text": "ID of element to anchor popover to."
|
122
|
+
},
|
123
|
+
"attribute": "anchor-el-id",
|
124
|
+
"reflect": false
|
125
|
+
},
|
126
|
+
"autoWidth": {
|
127
|
+
"type": "boolean",
|
128
|
+
"mutable": false,
|
129
|
+
"complexType": {
|
130
|
+
"original": "boolean",
|
131
|
+
"resolved": "boolean",
|
132
|
+
"references": {}
|
133
|
+
},
|
134
|
+
"required": false,
|
135
|
+
"optional": true,
|
136
|
+
"docs": {
|
137
|
+
"tags": [],
|
138
|
+
"text": "If `true` the popover container will use the width of the content, else it will be set to the width of the trigger.\nDefault is `false`"
|
139
|
+
},
|
140
|
+
"attribute": "auto-width",
|
141
|
+
"reflect": false,
|
142
|
+
"defaultValue": "false"
|
143
|
+
},
|
102
144
|
"disabled": {
|
103
145
|
"type": "boolean",
|
104
146
|
"mutable": false,
|
@@ -304,6 +346,41 @@ export class CpslSelect {
|
|
304
346
|
"attribute": "show-optional-label",
|
305
347
|
"reflect": false,
|
306
348
|
"defaultValue": "false"
|
349
|
+
},
|
350
|
+
"showSearch": {
|
351
|
+
"type": "boolean",
|
352
|
+
"mutable": false,
|
353
|
+
"complexType": {
|
354
|
+
"original": "boolean",
|
355
|
+
"resolved": "boolean",
|
356
|
+
"references": {}
|
357
|
+
},
|
358
|
+
"required": false,
|
359
|
+
"optional": false,
|
360
|
+
"docs": {
|
361
|
+
"tags": [],
|
362
|
+
"text": "If `true`, the dropdown will contain a search field."
|
363
|
+
},
|
364
|
+
"attribute": "show-search",
|
365
|
+
"reflect": false,
|
366
|
+
"defaultValue": "false"
|
367
|
+
},
|
368
|
+
"searchPlaceholder": {
|
369
|
+
"type": "string",
|
370
|
+
"mutable": false,
|
371
|
+
"complexType": {
|
372
|
+
"original": "string",
|
373
|
+
"resolved": "string",
|
374
|
+
"references": {}
|
375
|
+
},
|
376
|
+
"required": false,
|
377
|
+
"optional": true,
|
378
|
+
"docs": {
|
379
|
+
"tags": [],
|
380
|
+
"text": "Placeholder for the search field."
|
381
|
+
},
|
382
|
+
"attribute": "search-placeholder",
|
383
|
+
"reflect": false
|
307
384
|
}
|
308
385
|
};
|
309
386
|
}
|
@@ -371,6 +448,21 @@ export class CpslSelect {
|
|
371
448
|
"resolved": "string",
|
372
449
|
"references": {}
|
373
450
|
}
|
451
|
+
}, {
|
452
|
+
"method": "cpslSearchChange",
|
453
|
+
"name": "cpslSearchChange",
|
454
|
+
"bubbles": true,
|
455
|
+
"cancelable": true,
|
456
|
+
"composed": true,
|
457
|
+
"docs": {
|
458
|
+
"tags": [],
|
459
|
+
"text": "Emitted when the search value changes."
|
460
|
+
},
|
461
|
+
"complexType": {
|
462
|
+
"original": "string",
|
463
|
+
"resolved": "string",
|
464
|
+
"references": {}
|
465
|
+
}
|
374
466
|
}];
|
375
467
|
}
|
376
468
|
static get elementRef() { return "el"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-select.js","sourceRoot":"","sources":["../../../../src/components/cpsl-select/cpsl-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,KAAK,EAAE,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QAAQ,EAAE,IAAI,CAAC,QAAQ;gBAC5H,4DAAK,KAAK,EAAC,UAAU;oBACnB,4DAAK,KAAK,EAAC,gBAAgB,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,iBAAiB,IAAI,EAAE;wBAC7E,6DAAM,IAAI,EAAC,OAAO,GAAQ,CACtB,CACF,CACO,CACV,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Host, Element, h, Prop, State, EventEmitter, Event, Watch, Listen } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-select',\n styleUrl: 'cpsl-select.scss',\n shadow: true,\n})\nexport class CpslSelect {\n @Element() el!: HTMLCpslSelectElement;\n private popoverEl!: HTMLCpslPopoverElement;\n private inputId = `cpsl-select-${inputIds++}`;\n\n @State() anchorEl!: HTMLDivElement;\n @State() hasFocus = false;\n @State() popoverOpen = false;\n @State() hasSelectedItem = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * Set the max height of the dropdown.\n */\n @Prop() dropdownMaxHeight?: number;\n\n /**\n * Error text to show below the input. If this is provided the input will enter an error state.\n */\n @Prop() errorText?: string;\n\n /**\n * Format value for display when selected.\n */\n @Prop() formatValue?: (value: string) => string;\n\n /**\n * Helper text to show below the input. If `\"errorText\"` is provided that will take precedence.\n */\n @Prop() helperText?: string;\n\n /**\n * ID of the element, must be unique for the popover trigger.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() id: string = `${this.inputId}-trigger`;\n\n /**\n * The label for the input.\n */\n @Prop() label?: string;\n\n /**\n * Placeholder to display if `selectedValue` is empty.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * Value of the selected item.\n */\n @Prop() selectedValue?: string;\n\n /**\n * Will show the formatted selected item (passed in the `selected-item` slot) in the select rather than the item value.\n */\n @Prop() showFormattedSelectedItem?: boolean;\n\n /**\n * If `true`, the label will display an \"optional\" tag.\n */\n @Prop() showOptionalLabel = false;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() cpslBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() cpslFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value changes.\n */\n @Event() cpslSelectValueChange!: EventEmitter<string>;\n\n @Watch('selectedValue')\n onValueChange() {\n this.popoverEl.closePopover();\n }\n\n @Watch('selectedValue')\n handleValueChange() {\n this.selectItem();\n }\n\n @Listen('cpslSelectItemClick')\n selectItemClickHandler(event: CustomEvent<string>) {\n this.cpslSelectValueChange.emit(event.detail);\n }\n\n @Listen('cpslOpen')\n onPopoverOpen() {\n this.popoverOpen = true;\n }\n\n @Listen('cpslClose')\n onPopoverClose() {\n this.popoverOpen = false;\n }\n\n componentDidLoad() {\n this.popoverEl = this.el.shadowRoot.querySelector(`cpsl-popover`) as HTMLCpslPopoverElement;\n this.anchorEl = this.el.shadowRoot.getElementById('select-container') as HTMLDivElement;\n\n this.selectItem();\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n this.popoverEl.closePopover();\n\n this.cpslBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n\n this.cpslFocus.emit(ev);\n };\n\n private handleEnterPress = (ev: KeyboardEvent) => {\n if (ev.key === 'Enter') {\n ev.preventDefault();\n this.el.dispatchEvent(new MouseEvent('mousedown'));\n }\n };\n\n private selectItem = () => {\n const items = Array.from(this.el.querySelectorAll('cpsl-select-item')) as HTMLCpslSelectItemElement[];\n\n items.forEach(item => {\n if (item.value === this.selectedValue) {\n item.setAttribute('selected', 'true');\n this.hasSelectedItem = true;\n } else {\n item.setAttribute('selected', 'false');\n }\n });\n\n if (!Boolean(this.selectedValue)) {\n this.hasSelectedItem = false;\n }\n };\n\n private handleClickOutside = (event: MouseEvent) => {\n if (this.hasFocus && !this.el.contains(event.target as Node)) {\n this.hasFocus = false;\n window.removeEventListener('click', this.handleClickOutside);\n }\n };\n\n private handleClick = () => {\n if (!this.disabled) {\n this.hasFocus = true;\n window.addEventListener('click', this.handleClickOutside);\n }\n };\n\n render() {\n return (\n <Host id={this.id} class={{ 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.selectedValue) }}>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n {this.required ? '*' : ' '}\n {!this.required && this.showOptionalLabel ? <span class=\"optional-label\">(optional)</span> : ''}\n </label>\n )}\n <div id=\"select-container\" class={{ 'select-container': true, 'error-container': Boolean(this.errorText) }} onMouseDown={this.handleClick}>\n {this.hasSelectedItem && this.showFormattedSelectedItem && <slot name=\"selected-item\"></slot>}\n <div class=\"selected-container-content\" id=\"selected-container-content\">\n {(!this.hasSelectedItem || !this.showFormattedSelectedItem) && (\n <cpsl-text class={{ 'selected-text': true, 'placeholder': !Boolean(this.selectedValue) }}>\n {!Boolean(this.selectedValue) ? this.placeholder ?? 'Select' : this.formatValue?.(this.selectedValue) ?? this.selectedValue}\n </cpsl-text>\n )}\n </div>\n <cpsl-icon class={{ 'chevron': true, 'open': this.popoverOpen, 'has-value': Boolean(this.selectedValue) }} icon=\"chevronUp\" />\n <input\n id={this.inputId}\n disabled={this.disabled}\n class={{ disabled: this.disabled }}\n value={this.selectedValue}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyPress={this.handleEnterPress}\n inputmode=\"none\"\n />\n </div>\n {(this.errorText || this.helperText) && (\n <div class={{ 'helper-text-container': true, 'error-text': Boolean(this.errorText) }}>\n <span>{this.errorText ?? this.helperText}</span>\n </div>\n )}\n <cpsl-popover autoWidth={false} trigger={this.id} preventBlur={this.hasFocus} disabled={this.disabled} anchorEl={this.anchorEl}>\n <div class=\"dropdown\">\n <div class=\"dropdown-inner\" style={{ maxHeight: `${this.dropdownMaxHeight}px` }}>\n <slot name=\"items\"></slot>\n </div>\n </div>\n </cpsl-popover>\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n"]}
|
1
|
+
{"version":3,"file":"cpsl-select.js","sourceRoot":"","sources":["../../../../src/components/cpsl-select/cpsl-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAgB,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAO7G,MAAM,OAAO,UAAU;;QAGb,YAAO,GAAG,eAAe,QAAQ,EAAE,EAAE,CAAC;QA6ItC,WAAM,GAAG,CAAC,EAAc,EAAE,EAAE;YAClC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YAEtB,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;YAE9B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzB,CAAC,CAAC;QAEM,YAAO,GAAG,CAAC,EAAc,EAAE,EAAE;YACnC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;YAErB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1B,CAAC,CAAC;QAEM,qBAAgB,GAAG,CAAC,EAAiB,EAAE,EAAE;YAC/C,IAAI,EAAE,CAAC,GAAG,KAAK,OAAO,EAAE,CAA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f,CAAC,CAAC,eAAe,EAAE,CAAC;gCACpB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;4BAC7C,CAAC,GACD,CACE,CACP;oBACD,4DAAK,KAAK,EAAC,gBAAgB,EAAC,KAAK,EAAE,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,iBAAiB,IAAI,EAAE;wBAC7E,6DAAM,IAAI,EAAC,OAAO,GAAQ,CACtB,CACF,CACO,CACV,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Host, Element, h, Prop, State, EventEmitter, Event, Watch, Listen } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-select',\n styleUrl: 'cpsl-select.scss',\n shadow: true,\n})\nexport class CpslSelect {\n @Element() el!: HTMLCpslSelectElement;\n private popoverEl!: HTMLCpslPopoverElement;\n private inputId = `cpsl-select-${inputIds++}`;\n\n @State() anchorEl!: HTMLElement;\n @State() hasFocus = false;\n @State() popoverOpen = false;\n @State() hasSelectedItem = false;\n\n /**\n * ID of element to anchor popover to.\n */\n @Prop() anchorElId?: string;\n\n /**\n * If `true` the popover container will use the width of the content, else it will be set to the width of the trigger.\n * Default is `false`\n */\n @Prop() autoWidth?: boolean = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * Set the max height of the dropdown.\n */\n @Prop() dropdownMaxHeight?: number;\n\n /**\n * Error text to show below the input. If this is provided the input will enter an error state.\n */\n @Prop() errorText?: string;\n\n /**\n * Format value for display when selected.\n */\n @Prop() formatValue?: (value: string) => string;\n\n /**\n * Helper text to show below the input. If `\"errorText\"` is provided that will take precedence.\n */\n @Prop() helperText?: string;\n\n /**\n * ID of the element, must be unique for the popover trigger.\n */\n\n @Prop() id: string = `${this.inputId}-trigger`;\n\n /**\n * The label for the input.\n */\n @Prop() label?: string;\n\n /**\n * Placeholder to display if `selectedValue` is empty.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * Value of the selected item.\n */\n @Prop() selectedValue?: string;\n\n /**\n * Will show the formatted selected item (passed in the `selected-item` slot) in the select rather than the item value.\n */\n @Prop() showFormattedSelectedItem?: boolean;\n\n /**\n * If `true`, the label will display an \"optional\" tag.\n */\n @Prop() showOptionalLabel = false;\n\n /**\n * If `true`, the dropdown will contain a search field.\n */\n @Prop() showSearch = false;\n\n /**\n * Placeholder for the search field.\n */\n @Prop() searchPlaceholder?: string;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() cpslBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() cpslFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the value changes.\n */\n @Event() cpslSelectValueChange!: EventEmitter<string>;\n\n /**\n * Emitted when the search value changes.\n */\n @Event() cpslSearchChange!: EventEmitter<string>;\n\n @Watch('selectedValue')\n onValueChange() {\n this.popoverEl.closePopover();\n }\n\n @Watch('selectedValue')\n handleValueChange() {\n this.selectItem();\n }\n\n @Listen('cpslSelectItemClick')\n selectItemClickHandler(event: CustomEvent<string>) {\n this.cpslSelectValueChange.emit(event.detail);\n }\n\n @Listen('cpslOpen')\n onPopoverOpen() {\n this.popoverOpen = true;\n }\n\n @Listen('cpslClose')\n onPopoverClose() {\n this.popoverOpen = false;\n }\n\n componentDidLoad() {\n this.popoverEl = this.el.shadowRoot.querySelector(`cpsl-popover`) as HTMLCpslPopoverElement;\n this.anchorEl = this.anchorElId ? document.getElementById(this.anchorElId) : this.el.shadowRoot.getElementById('select-container');\n\n this.selectItem();\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n this.popoverEl.closePopover();\n\n this.cpslBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n\n this.cpslFocus.emit(ev);\n };\n\n private handleEnterPress = (ev: KeyboardEvent) => {\n if (ev.key === 'Enter') {\n ev.preventDefault();\n this.el.dispatchEvent(new MouseEvent('mousedown'));\n }\n };\n\n private selectItem = () => {\n const items = Array.from(this.el.querySelectorAll('cpsl-select-item')) as HTMLCpslSelectItemElement[];\n\n items.forEach(item => {\n if (item.value === this.selectedValue) {\n item.setAttribute('selected', 'true');\n this.hasSelectedItem = true;\n } else {\n item.setAttribute('selected', 'false');\n }\n });\n\n if (!this.selectedValue) {\n this.hasSelectedItem = false;\n }\n };\n\n private handleClickOutside = (event: MouseEvent) => {\n if (this.hasFocus && !this.el.contains(event.target as Node)) {\n this.hasFocus = false;\n window.removeEventListener('click', this.handleClickOutside);\n }\n };\n\n private handleClick = () => {\n if (!this.disabled) {\n this.hasFocus = true;\n window.addEventListener('click', this.handleClickOutside);\n }\n };\n\n render() {\n return (\n <Host id={this.id} class={{ 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.selectedValue) }}>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n {this.required ? '*' : ' '}\n {!this.required && this.showOptionalLabel ? <span class=\"optional-label\">(optional)</span> : ''}\n </label>\n )}\n <div id=\"select-container\" class={{ 'select-container': true, 'error-container': Boolean(this.errorText) }} onMouseDown={this.handleClick}>\n {this.hasSelectedItem && this.showFormattedSelectedItem && <slot name=\"selected-item\"></slot>}\n <div class={{ 'selected-container-content': true, 'hidden': this.showFormattedSelectedItem }} id=\"selected-container-content\" style={{}}>\n {(!this.hasSelectedItem || !this.showFormattedSelectedItem) && (\n <cpsl-text class={{ 'selected-text': true, 'placeholder': !this.selectedValue }}>\n {!this.selectedValue ? (this.placeholder ?? 'Select') : (this.formatValue?.(this.selectedValue) ?? this.selectedValue)}\n </cpsl-text>\n )}\n </div>\n <cpsl-icon class={{ 'chevron': true, 'open': this.popoverOpen, 'has-value': Boolean(this.selectedValue) }} icon=\"chevronUp\" />\n <input\n id={this.inputId}\n disabled={this.disabled}\n class={{ disabled: this.disabled }}\n value={this.selectedValue}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onKeyPress={this.handleEnterPress}\n inputmode=\"none\"\n />\n </div>\n {(this.errorText || this.helperText) && (\n <div class={{ 'helper-text-container': true, 'error-text': Boolean(this.errorText) }}>\n <span>{this.errorText ?? this.helperText}</span>\n </div>\n )}\n <cpsl-popover part=\"popover\" autoWidth={this.autoWidth} trigger={this.id} preventBlur={this.hasFocus} disabled={this.disabled} anchorEl={this.anchorEl}>\n <div part=\"dropdown\" class=\"dropdown\">\n {this.showSearch && (\n <div class=\"search-container\">\n <cpsl-input\n onClick={e => e.stopPropagation()}\n placeholder={this.searchPlaceholder ?? 'Search'}\n value=\"\"\n onCpslInput={e => {\n e.stopPropagation();\n this.cpslSearchChange.emit(e.detail.value);\n }}\n />\n </div>\n )}\n <div class=\"dropdown-inner\" style={{ maxHeight: `${this.dropdownMaxHeight}px` }}>\n <slot name=\"items\"></slot>\n </div>\n </div>\n </cpsl-popover>\n </Host>\n );\n }\n}\n\nlet inputIds = 0;\n"]}
|
@@ -8,7 +8,7 @@ export class CpslSelectItem {
|
|
8
8
|
this.value = undefined;
|
9
9
|
}
|
10
10
|
render() {
|
11
|
-
return (h(Host, { key: '
|
11
|
+
return (h(Host, { key: 'c0407d16cc7afc4fba47acd8236da3f276d6e6dc' }, h("div", { key: '22b2c12c9c5b6109da3bc932b52e538da514a95d', part: "outer-container", class: "outer-container", onClick: this.handleItemClick }, h("div", { key: '1e7a33b947aec6444168a173ca8aa0059c40e823', part: "inner-container", class: { 'inner-container': true, 'selected': this.selected } }, h("slot", { key: '0e9d4878f0e8301ef0182038216249a63071eb27' })))));
|
12
12
|
}
|
13
13
|
static get is() { return "cpsl-select-item"; }
|
14
14
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-select-item.js","sourceRoot":"","sources":["../../../../src/components/cpsl-select-item/cpsl-select-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAgB,MAAM,eAAe,CAAC;AAO9E,MAAM,OAAO,cAAc;;QAiBjB,oBAAe,GAAG,GAAG,EAAE;YAC7B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5C,CAAC,CAAC;;;;IAEF,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,eAAe;
|
1
|
+
{"version":3,"file":"cpsl-select-item.js","sourceRoot":"","sources":["../../../../src/components/cpsl-select-item/cpsl-select-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAgB,MAAM,eAAe,CAAC;AAO9E,MAAM,OAAO,cAAc;;QAiBjB,oBAAe,GAAG,GAAG,EAAE;YAC7B,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC5C,CAAC,CAAC;;;;IAEF,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAC,iBAAiB,EAAC,OAAO,EAAE,IAAI,CAAC,eAAe;gBAC/E,4DAAK,IAAI,EAAC,iBAAiB,EAAC,KAAK,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE;oBACvF,8DAAa,CACT,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, Event, h, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-select-item',\n styleUrl: 'cpsl-select-item.scss',\n shadow: true,\n})\nexport class CpslSelectItem {\n /**\n * Whether the item is selected or not.\n */\n @Prop() selected?: boolean;\n\n /**\n * Value of the item.\n */\n @Prop() value: string;\n\n /**\n * Called when item is clicked.\n * @internal\n */\n @Event() cpslSelectItemClick: EventEmitter<string>;\n\n private handleItemClick = () => {\n this.cpslSelectItemClick.emit(this.value);\n };\n\n render() {\n return (\n <Host>\n <div part=\"outer-container\" class=\"outer-container\" onClick={this.handleItemClick}>\n <div part=\"inner-container\" class={{ 'inner-container': true, 'selected': this.selected }}>\n <slot></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
|
@@ -23,28 +23,36 @@ export class CpslSlideButton {
|
|
23
23
|
};
|
24
24
|
const dragMouseDown = (e) => {
|
25
25
|
e.preventDefault();
|
26
|
+
// get the mouse cursor position at startup:
|
26
27
|
pos3 = e.clientX;
|
27
28
|
document.onmouseup = closeDragElement;
|
29
|
+
// call a function whenever the cursor moves:
|
28
30
|
document.onmousemove = elementMouseDrag;
|
29
31
|
};
|
30
32
|
const dragTouchDown = (e) => {
|
31
33
|
e.preventDefault();
|
32
34
|
const touchLocation = e.targetTouches[0];
|
35
|
+
// get the mouse cursor position at startup:
|
33
36
|
pos3 = touchLocation.clientX;
|
34
37
|
document.ontouchend = closeDragElement;
|
38
|
+
// call a function whenever the cursor moves:
|
35
39
|
document.ontouchmove = elementTouchDrag;
|
36
40
|
};
|
37
41
|
const elementMouseDrag = (e) => {
|
38
42
|
e.preventDefault();
|
43
|
+
// calculate the new cursor position:
|
39
44
|
pos1 = pos3 - e.clientX;
|
40
45
|
pos3 = e.clientX;
|
46
|
+
// set the element's new position:
|
41
47
|
finishElementDrag(pos1);
|
42
48
|
};
|
43
49
|
const elementTouchDrag = (e) => {
|
44
50
|
e.preventDefault();
|
45
51
|
const touchLocation = e.targetTouches[0];
|
52
|
+
// calculate the new cursor position:
|
46
53
|
pos1 = pos3 - touchLocation.clientX;
|
47
54
|
pos3 = touchLocation.clientX;
|
55
|
+
// set the element's new position:
|
48
56
|
finishElementDrag(pos1);
|
49
57
|
};
|
50
58
|
const finishElementDrag = (pos) => {
|
@@ -77,6 +85,7 @@ export class CpslSlideButton {
|
|
77
85
|
endIconEl.style.opacity = '0%';
|
78
86
|
endBackgroundEl.style.opacity = '0%';
|
79
87
|
}
|
88
|
+
// stop moving when mouse button is released:
|
80
89
|
document.onmouseup = null;
|
81
90
|
document.onmousemove = null;
|
82
91
|
document.ontouchend = null;
|
@@ -90,7 +99,9 @@ export class CpslSlideButton {
|
|
90
99
|
const sliderContainerEl = this.sliderContainerEl;
|
91
100
|
const containerWidth = sliderContainerEl.clientWidth;
|
92
101
|
const sliderHeight = el.getBoundingClientRect().height;
|
102
|
+
// Offset min by 1 for 1px left padding
|
93
103
|
const minX = 1;
|
104
|
+
// Offset max by the slider width and 1px for padding
|
94
105
|
const maxX = containerWidth - sliderHeight - 1;
|
95
106
|
let pos1 = 0, pos3 = 0;
|
96
107
|
el.onpointerdown = pointerDown;
|
@@ -114,7 +125,7 @@ export class CpslSlideButton {
|
|
114
125
|
return this.el.shadowRoot.getElementById('end-icon');
|
115
126
|
}
|
116
127
|
render() {
|
117
|
-
return (h(Host, { key: '
|
128
|
+
return (h(Host, { key: '59a886a50251c2a35b5f9b7c82a24b6bbead4835' }, h("div", { key: 'a40904f525abdb06933010b738d30e7bc5318254', id: "slider-container", class: "slider-container" }, h("div", { key: 'f0142fc9e9ba63544ef4ca25ac4710ad75f35866', id: "start-slider-container-background", class: { 'start-slider-container-background': true, 'slider-container-background': true } }), h("div", { key: '36f24475cfe8002f5fe6b532a4a5bed906ee502e', id: "end-slider-container-background", class: { 'end-slider-container-background': true, 'slider-container-background': true } }), h("div", { key: '27ba6f34102be72b6daae01fe8e0748ebeeb906e', id: "slider", class: { slider: true, disabled: this.disabled } }, h("cpsl-icon", { key: '241d0ae75ae75974d16c2b57de631c0abf418c6b', id: "start-icon", class: { 'start-icon': true, 'icon': true }, icon: this.startIcon }), h("cpsl-icon", { key: '719ab71c28ae7041b1371fb85a073467e7b5e0d3', id: "end-icon", class: { 'end-icon': true, 'icon': true }, icon: this.endIcon })), h("span", { key: '2f770d1fd8eea0bd90e4072393952113565201e0', id: "start-text", class: { 'start-text': true, 'disabled': this.disabled } }, this.startText), h("span", { key: '377d99ef277482f649585bf8c5176a212c4610b8', id: "end-text", class: "end-text" }, this.endText))));
|
118
129
|
}
|
119
130
|
static get is() { return "cpsl-slide-button"; }
|
120
131
|
static get encapsulation() { return "shadow"; }
|
@@ -152,7 +163,7 @@ export class CpslSlideButton {
|
|
152
163
|
"mutable": false,
|
153
164
|
"complexType": {
|
154
165
|
"original": "IconType",
|
155
|
-
"resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"
|
166
|
+
"resolved": "\"search\" | \"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowCircleBrokenDownLeft\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"bank\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"creditCard\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"dot\" | \"downloadCloud\" | \"download\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"globe\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroAlertCircle\" | \"heroCheckmarkCapsule\" | \"heroCheckmark\" | \"heroEmail\" | \"heroExternalConnection\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkExternal\" | \"linkedinBrand\" | \"linkedin\" | \"logOut\" | \"mail\" | \"menu\" | \"moonpayBrand\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"puzzlePiece\" | \"qrCode02\" | \"qrCode\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"send\" | \"settings\" | \"shield\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"stripeBrand\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\"",
|
156
167
|
"references": {
|
157
168
|
"IconType": {
|
158
169
|
"location": "import",
|
@@ -192,7 +203,7 @@ export class CpslSlideButton {
|
|
192
203
|
"mutable": false,
|
193
204
|
"complexType": {
|
194
205
|
"original": "IconType",
|
195
|
-
"resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"
|
206
|
+
"resolved": "\"search\" | \"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowCircleBrokenDownLeft\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"bank\" | \"brush\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"checkCircle\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"creditCard\" | \"cube\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"dot\" | \"downloadCloud\" | \"download\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"globe\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroAlertCircle\" | \"heroCheckmarkCapsule\" | \"heroCheckmark\" | \"heroEmail\" | \"heroExternalConnection\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkExternal\" | \"linkedinBrand\" | \"linkedin\" | \"logOut\" | \"mail\" | \"menu\" | \"moonpayBrand\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"puzzlePiece\" | \"qrCode02\" | \"qrCode\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"send\" | \"settings\" | \"shield\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"stripeBrand\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"x\" | \"youtubeBrand\" | \"youtube\" | \"AD\" | \"AE\" | \"AF\" | \"AG\" | \"AI\" | \"AL\" | \"AM\" | \"AO\" | \"AR\" | \"AS\" | \"AT\" | \"AU\" | \"AW\" | \"AX\" | \"AZ\" | \"BA\" | \"BB\" | \"BD\" | \"BE\" | \"BF\" | \"BG\" | \"BH\" | \"BI\" | \"BJ\" | \"BL\" | \"BM\" | \"BN\" | \"BO\" | \"BQ\" | \"BQ2\" | \"BQ3\" | \"BR\" | \"BS\" | \"BT\" | \"BW\" | \"BY\" | \"BZ\" | \"CA\" | \"CC\" | \"CD\" | \"CD2\" | \"CF\" | \"CH\" | \"CK\" | \"CL\" | \"CM\" | \"CN\" | \"CO\" | \"CR\" | \"CU\" | \"CW\" | \"CX\" | \"CY\" | \"CZ\" | \"DE\" | \"DJ\" | \"DK\" | \"DM\" | \"DO\" | \"DS\" | \"DZ\" | \"EC\" | \"EE\" | \"EG\" | \"EH\" | \"ER\" | \"ES\" | \"ET\" | \"FI\" | \"FJ\" | \"FK\" | \"FM\" | \"FO\" | \"FR\" | \"GA\" | \"GB2\" | \"GB\" | \"GD\" | \"GE\" | \"GG\" | \"GH\" | \"GI\" | \"GL\" | \"GM\" | \"GN\" | \"GQ\" | \"GR\" | \"GT\" | \"GU\" | \"GW\" | \"GY\" | \"HK\" | \"HN\" | \"HR\" | \"HT\" | \"HU\" | \"ID\" | \"IE\" | \"IL\" | \"IM\" | \"IN\" | \"IO\" | \"IQ\" | \"IR\" | \"IS\" | \"IT\" | \"JE\" | \"JM\" | \"JO\" | \"JP\" | \"KE\" | \"KG\" | \"KH\" | \"KI\" | \"KM\" | \"KN\" | \"KP\" | \"KR\" | \"KW\" | \"KY\" | \"KZ\" | \"LA\" | \"LB\" | \"LC\" | \"LI\" | \"LK\" | \"LR\" | \"LS\" | \"LT\" | \"LU\" | \"LV\" | \"LY\" | \"MA\" | \"MC\" | \"MD\" | \"ME\" | \"MG\" | \"MH\" | \"MK\" | \"ML\" | \"MM\" | \"MN\" | \"MO\" | \"MP\" | \"MQ\" | \"MR\" | \"MS\" | \"MT\" | \"MU\" | \"MV\" | \"MW\" | \"MX\" | \"MY\" | \"MZ\" | \"NA\" | \"NE\" | \"NF\" | \"NG\" | \"NI\" | \"NL\" | \"NO\" | \"NP\" | \"NR\" | \"NU\" | \"NZ\" | \"OM\" | \"PA\" | \"PE\" | \"PF\" | \"PG\" | \"PH\" | \"PK\" | \"PL\" | \"PN\" | \"PR\" | \"PS\" | \"PT\" | \"PW\" | \"PY\" | \"QA\" | \"RO\" | \"RS\" | \"RU\" | \"RW\" | \"SA\" | \"SB\" | \"SC\" | \"SE\" | \"SG\" | \"SI\" | \"SK\" | \"SL\" | \"SM\" | \"SN\" | \"SO\" | \"SR\" | \"SS\" | \"ST\" | \"SV\" | \"SX\" | \"SY\" | \"SZ\" | \"TC\" | \"TD\" | \"TG\" | \"TH\" | \"TJ\" | \"TK\" | \"TL\" | \"TM\" | \"TN\" | \"TO\" | \"TR\" | \"TT\" | \"TV\" | \"TW\" | \"TZ\" | \"UA\" | \"UG\" | \"US\" | \"UY\" | \"UZ\" | \"VC\" | \"VE\" | \"VG\" | \"VI\" | \"VN\" | \"VU\" | \"WS\" | \"YE\" | \"ZA\" | \"ZM\" | \"ZW\"",
|
196
207
|
"references": {
|
197
208
|
"IconType": {
|
198
209
|
"location": "import",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-slide-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-slide-button/cpsl-slide-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAQvF,MAAM,OAAO,eAAe;;;;;;;;IAiC1B,gBAAgB;QACd,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChE,CAAC;IAEO,WAAW,CAAC,EAAe;QACjC,MAAM,WAAW,GAAG,CAAC,CAAe,EAAE,EAAE;YACtC,IAAI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AAK,EAAE,EAAE,iCAAiC,EAAE,IAAI,EAAE,6BAA6B,EAAE,IAAI,EAAE,GAAI;gBACrI,4DAAK,EAAE,EAAC,QAAQ,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE;oBAC/D,kEAAW,EAAE,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,GAAI;oBAChG,kEAAW,EAAE,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,GAAI,CACtF;gBACN,6DAAM,EAAE,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAC3E,IAAI,CAAC,SAAS,CACV;gBACP,6DAAM,EAAE,EAAC,UAAU,EAAC,KAAK,EAAC,UAAU,IACjC,IAAI,CAAC,OAAO,CACR,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element, EventEmitter, Event } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-slide-button',\n styleUrl: 'cpsl-slide-button.scss',\n shadow: true,\n})\nexport class CpslSlideButton {\n @Element() el!: HTMLCpslSlideButtonElement;\n\n /**\n * Whether or not the component is disabled. If true, the component will display the `startText`.\n */\n @Prop() disabled: boolean;\n\n /**\n * The name of the ending icon to show.\n */\n @Prop() endIcon: IconType;\n\n /**\n * The ending text.\n */\n @Prop() endText: string;\n\n /**\n * The name of the starting icon to show.\n */\n @Prop() startIcon: IconType;\n\n /**\n * The starting text.\n */\n @Prop() startText: string;\n\n /**\n * The `cpslComplete` event is fired when the slider is at the end.\n */\n @Event() cpslComplete!: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.dragElement(this.el.shadowRoot.getElementById('slider'));\n }\n\n private dragElement(el: HTMLElement) {\n const pointerDown = (e: PointerEvent) => {\n pos3 = e.clientX;\n\n switch (e.pointerType) {\n case 'mouse':\n el.onmousedown = dragMouseDown;\n break;\n default:\n el.ontouchstart = dragTouchDown;\n }\n };\n\n const dragMouseDown = (e: MouseEvent) => {\n e.preventDefault();\n // get the mouse cursor position at startup:\n pos3 = e.clientX;\n document.onmouseup = closeDragElement;\n // call a function whenever the cursor moves:\n document.onmousemove = elementMouseDrag;\n };\n\n const dragTouchDown = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // get the mouse cursor position at startup:\n pos3 = touchLocation.clientX;\n document.ontouchend = closeDragElement;\n // call a function whenever the cursor moves:\n document.ontouchmove = elementTouchDrag;\n };\n\n const elementMouseDrag = (e: MouseEvent) => {\n e.preventDefault();\n // calculate the new cursor position:\n pos1 = pos3 - e.clientX;\n pos3 = e.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const elementTouchDrag = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // calculate the new cursor position:\n pos1 = pos3 - touchLocation.clientX;\n pos3 = touchLocation.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const finishElementDrag = (pos: number) => {\n const newPos = el.offsetLeft - pos;\n if (newPos >= minX && newPos <= maxX) {\n const newPosPercent = Math.max(Math.min(Math.round((newPos / maxX) * 100) / 100, 100), 0);\n\n startTextEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endTextEl.style.opacity = `${newPosPercent * 100}%`;\n\n startIconEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endIconEl.style.opacity = `${newPosPercent * 100}%`;\n\n endBackgroundEl.style.opacity = `${newPosPercent * 100}%`;\n\n el.style.left = `${newPos}px`;\n }\n };\n\n const closeDragElement = () => {\n if (el.offsetLeft + sliderHeight >= containerWidth - sliderHeight / 2) {\n el.style.left = `${maxX}px`;\n startTextEl.style.opacity = '0%';\n endTextEl.style.opacity = '100%';\n startIconEl.style.opacity = '0%';\n endIconEl.style.opacity = '100%';\n endBackgroundEl.style.opacity = '100%';\n this.cpslComplete.emit(true);\n } else {\n el.style.left = `${minX}px`;\n startTextEl.style.opacity = '100%';\n endTextEl.style.opacity = '0%';\n startIconEl.style.opacity = '100%';\n endIconEl.style.opacity = '0%';\n endBackgroundEl.style.opacity = '0%';\n }\n // stop moving when mouse button is released:\n document.onmouseup = null;\n document.onmousemove = null;\n document.ontouchend = null;\n document.ontouchmove = null;\n };\n\n const startIconEl = this.startIconEl;\n const endIconEl = this.endIconEl;\n const startTextEl = this.startTextEl;\n const endTextEl = this.endTextEl;\n const endBackgroundEl = this.endBackgroundEl;\n\n const sliderContainerEl = this.sliderContainerEl;\n const containerWidth = sliderContainerEl.clientWidth;\n\n const sliderHeight = el.getBoundingClientRect().height;\n\n // Offset min by 1 for 1px left padding\n const minX = 1;\n // Offset max by the slider width and 1px for padding\n const maxX = containerWidth - sliderHeight - 1;\n\n let pos1 = 0,\n pos3 = 0;\n\n el.onpointerdown = pointerDown;\n }\n\n private get sliderContainerEl() {\n return this.el.shadowRoot.getElementById('slider-container');\n }\n\n private get startTextEl() {\n return this.el.shadowRoot.getElementById('start-text');\n }\n\n private get endTextEl() {\n return this.el.shadowRoot.getElementById('end-text');\n }\n\n private get endBackgroundEl() {\n return this.el.shadowRoot.getElementById('end-slider-container-background');\n }\n\n private get startIconEl() {\n return this.el.shadowRoot.getElementById('start-icon');\n }\n\n private get endIconEl() {\n return this.el.shadowRoot.getElementById('end-icon');\n }\n\n render() {\n return (\n <Host>\n <div id=\"slider-container\" class=\"slider-container\">\n <div id=\"start-slider-container-background\" class={{ 'start-slider-container-background': true, 'slider-container-background': true }} />\n <div id=\"end-slider-container-background\" class={{ 'end-slider-container-background': true, 'slider-container-background': true }} />\n <div id=\"slider\" class={{ slider: true, disabled: this.disabled }}>\n <cpsl-icon id=\"start-icon\" class={{ 'start-icon': true, 'icon': true }} icon={this.startIcon} />\n <cpsl-icon id=\"end-icon\" class={{ 'end-icon': true, 'icon': true }} icon={this.endIcon} />\n </div>\n <span id=\"start-text\" class={{ 'start-text': true, 'disabled': this.disabled }}>\n {this.startText}\n </span>\n <span id=\"end-text\" class=\"end-text\">\n {this.endText}\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"cpsl-slide-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-slide-button/cpsl-slide-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAgB,KAAK,EAAE,MAAM,eAAe,CAAC;AAQvF,MAAM,OAAO,eAAe;;;;;;;;IAiC1B,gBAAgB;QACd,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChE,CAAC;IAEO,WAAW,CAAC,EAAe;QACjC,MAAM,WAAW,GAAG,CAAC,CAAe,EAAE,EAAE;YACtC,IAAI,GAAG,CAAC,CAAC,OAAO,CAAC;YAEjB,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;gBACtB,KAAK,OAAO;oBACV,EAAE,CAAC,WAAW,GAAG,aAAa,CAAC;oBAC/B,MAAM;gBACR;oBACE,EAAE,CAAC,YAAY,GAAG,aAAa,CAAC;YACpC,CAAC;QACH,CAAC,CAAC;QAEF,MAAM,aAAa,GAAG,CAAC,CAAa,EAAE,EAAE;YACtC,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,4CAA4C;YAC5C,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AC,QAAQ,EAAE;oBAC/D,kEAAW,EAAE,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,GAAI;oBAChG,kEAAW,EAAE,EAAC,UAAU,EAAC,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,OAAO,GAAI,CACtF;gBACN,6DAAM,EAAE,EAAC,YAAY,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,QAAQ,EAAE,IAC3E,IAAI,CAAC,SAAS,CACV;gBACP,6DAAM,EAAE,EAAC,UAAU,EAAC,KAAK,EAAC,UAAU,IACjC,IAAI,CAAC,OAAO,CACR,CACH,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h, Element, EventEmitter, Event } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-slide-button',\n styleUrl: 'cpsl-slide-button.scss',\n shadow: true,\n})\nexport class CpslSlideButton {\n @Element() el!: HTMLCpslSlideButtonElement;\n\n /**\n * Whether or not the component is disabled. If true, the component will display the `startText`.\n */\n @Prop() disabled: boolean;\n\n /**\n * The name of the ending icon to show.\n */\n @Prop() endIcon: IconType;\n\n /**\n * The ending text.\n */\n @Prop() endText: string;\n\n /**\n * The name of the starting icon to show.\n */\n @Prop() startIcon: IconType;\n\n /**\n * The starting text.\n */\n @Prop() startText: string;\n\n /**\n * The `cpslComplete` event is fired when the slider is at the end.\n */\n @Event() cpslComplete!: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.dragElement(this.el.shadowRoot.getElementById('slider'));\n }\n\n private dragElement(el: HTMLElement) {\n const pointerDown = (e: PointerEvent) => {\n pos3 = e.clientX;\n\n switch (e.pointerType) {\n case 'mouse':\n el.onmousedown = dragMouseDown;\n break;\n default:\n el.ontouchstart = dragTouchDown;\n }\n };\n\n const dragMouseDown = (e: MouseEvent) => {\n e.preventDefault();\n // get the mouse cursor position at startup:\n pos3 = e.clientX;\n document.onmouseup = closeDragElement;\n // call a function whenever the cursor moves:\n document.onmousemove = elementMouseDrag;\n };\n\n const dragTouchDown = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // get the mouse cursor position at startup:\n pos3 = touchLocation.clientX;\n document.ontouchend = closeDragElement;\n // call a function whenever the cursor moves:\n document.ontouchmove = elementTouchDrag;\n };\n\n const elementMouseDrag = (e: MouseEvent) => {\n e.preventDefault();\n // calculate the new cursor position:\n pos1 = pos3 - e.clientX;\n pos3 = e.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const elementTouchDrag = (e: TouchEvent) => {\n e.preventDefault();\n const touchLocation = e.targetTouches[0];\n // calculate the new cursor position:\n pos1 = pos3 - touchLocation.clientX;\n pos3 = touchLocation.clientX;\n // set the element's new position:\n finishElementDrag(pos1);\n };\n\n const finishElementDrag = (pos: number) => {\n const newPos = el.offsetLeft - pos;\n if (newPos >= minX && newPos <= maxX) {\n const newPosPercent = Math.max(Math.min(Math.round((newPos / maxX) * 100) / 100, 100), 0);\n\n startTextEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endTextEl.style.opacity = `${newPosPercent * 100}%`;\n\n startIconEl.style.opacity = `${(1 - newPosPercent * 2) * 100}%`;\n endIconEl.style.opacity = `${newPosPercent * 100}%`;\n\n endBackgroundEl.style.opacity = `${newPosPercent * 100}%`;\n\n el.style.left = `${newPos}px`;\n }\n };\n\n const closeDragElement = () => {\n if (el.offsetLeft + sliderHeight >= containerWidth - sliderHeight / 2) {\n el.style.left = `${maxX}px`;\n startTextEl.style.opacity = '0%';\n endTextEl.style.opacity = '100%';\n startIconEl.style.opacity = '0%';\n endIconEl.style.opacity = '100%';\n endBackgroundEl.style.opacity = '100%';\n this.cpslComplete.emit(true);\n } else {\n el.style.left = `${minX}px`;\n startTextEl.style.opacity = '100%';\n endTextEl.style.opacity = '0%';\n startIconEl.style.opacity = '100%';\n endIconEl.style.opacity = '0%';\n endBackgroundEl.style.opacity = '0%';\n }\n // stop moving when mouse button is released:\n document.onmouseup = null;\n document.onmousemove = null;\n document.ontouchend = null;\n document.ontouchmove = null;\n };\n\n const startIconEl = this.startIconEl;\n const endIconEl = this.endIconEl;\n const startTextEl = this.startTextEl;\n const endTextEl = this.endTextEl;\n const endBackgroundEl = this.endBackgroundEl;\n\n const sliderContainerEl = this.sliderContainerEl;\n const containerWidth = sliderContainerEl.clientWidth;\n\n const sliderHeight = el.getBoundingClientRect().height;\n\n // Offset min by 1 for 1px left padding\n const minX = 1;\n // Offset max by the slider width and 1px for padding\n const maxX = containerWidth - sliderHeight - 1;\n\n let pos1 = 0,\n pos3 = 0;\n\n el.onpointerdown = pointerDown;\n }\n\n private get sliderContainerEl() {\n return this.el.shadowRoot.getElementById('slider-container');\n }\n\n private get startTextEl() {\n return this.el.shadowRoot.getElementById('start-text');\n }\n\n private get endTextEl() {\n return this.el.shadowRoot.getElementById('end-text');\n }\n\n private get endBackgroundEl() {\n return this.el.shadowRoot.getElementById('end-slider-container-background');\n }\n\n private get startIconEl() {\n return this.el.shadowRoot.getElementById('start-icon');\n }\n\n private get endIconEl() {\n return this.el.shadowRoot.getElementById('end-icon');\n }\n\n render() {\n return (\n <Host>\n <div id=\"slider-container\" class=\"slider-container\">\n <div id=\"start-slider-container-background\" class={{ 'start-slider-container-background': true, 'slider-container-background': true }} />\n <div id=\"end-slider-container-background\" class={{ 'end-slider-container-background': true, 'slider-container-background': true }} />\n <div id=\"slider\" class={{ slider: true, disabled: this.disabled }}>\n <cpsl-icon id=\"start-icon\" class={{ 'start-icon': true, 'icon': true }} icon={this.startIcon} />\n <cpsl-icon id=\"end-icon\" class={{ 'end-icon': true, 'icon': true }} icon={this.endIcon} />\n </div>\n <span id=\"start-text\" class={{ 'start-text': true, 'disabled': this.disabled }}>\n {this.startText}\n </span>\n <span id=\"end-text\" class=\"end-text\">\n {this.endText}\n </span>\n </div>\n </Host>\n );\n }\n}\n"]}
|
@@ -54,18 +54,13 @@
|
|
54
54
|
* }
|
55
55
|
*/
|
56
56
|
:host {
|
57
|
-
--
|
58
|
-
--
|
57
|
+
--bar-width: 12px;
|
58
|
+
--bar-color: var(--cpsl-color-foreground-0);
|
59
|
+
--background-color: var(--cpsl-color-background-0);
|
59
60
|
display: flex;
|
60
61
|
justify-content: center;
|
61
62
|
align-items: center;
|
62
63
|
}
|
63
|
-
:host path {
|
64
|
-
stroke: var(--path-color);
|
65
|
-
}
|
66
|
-
:host circle {
|
67
|
-
fill: var(--circle-color);
|
68
|
-
}
|
69
64
|
@keyframes spin {
|
70
65
|
0% {
|
71
66
|
-webkit-transform: rotate(0deg);
|
@@ -91,4 +86,31 @@
|
|
91
86
|
100% {
|
92
87
|
-webkit-transform: rotate(360deg);
|
93
88
|
}
|
89
|
+
}
|
90
|
+
|
91
|
+
.loader {
|
92
|
+
position: relative;
|
93
|
+
width: 100%;
|
94
|
+
aspect-ratio: 1;
|
95
|
+
background: conic-gradient(transparent, transparent 12%, var(--bar-color));
|
96
|
+
border-radius: 50%;
|
97
|
+
margin: auto;
|
98
|
+
animation: spin 0.8s cubic-bezier(0.3, 0.5, 0.5, 0.5) infinite;
|
99
|
+
}
|
100
|
+
.loader::before, .loader::after {
|
101
|
+
content: "";
|
102
|
+
position: absolute;
|
103
|
+
border-radius: inherit;
|
104
|
+
}
|
105
|
+
.loader::before {
|
106
|
+
top: 0;
|
107
|
+
left: 50%;
|
108
|
+
transform: translateX(-50%);
|
109
|
+
background: linear-gradient(to left, var(--bar-color) 50%, transparent 50%);
|
110
|
+
width: var(--bar-width);
|
111
|
+
aspect-ratio: 1;
|
112
|
+
}
|
113
|
+
.loader::after {
|
114
|
+
inset: var(--bar-width);
|
115
|
+
background: var(--background-color);
|
94
116
|
}
|
@@ -5,13 +5,11 @@ export class CpslSpinner {
|
|
5
5
|
this.speed = 1;
|
6
6
|
}
|
7
7
|
render() {
|
8
|
-
return (h(Host, { key: '
|
9
|
-
|
10
|
-
|
11
|
-
'
|
12
|
-
|
13
|
-
'-moz-animation': `spin ${this.speed}s linear infinite`,
|
14
|
-
} }, h("svg", { key: '2ce2e8a1d0b7ad7b34cbcdc0984883363740c0f5', height: this.size, width: this.size, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 54 54", fill: "none" }, h("path", { key: 'e16659e096d7f2557e0fe829ed239c63a3e08011', d: "M43.1586 17C39.8082 11.5978 33.8243 8 27 8C16.5066 8 8 16.5066 8 27C8 37.4934 16.5066 46 27 46C33.8242 46 39.8082 42.4022 43.1586 37", "stroke-width": "6", "stroke-linecap": "round" }), h("circle", { key: '1cc780ff25da0556aa3012cfa28b457443689dec', cx: "45", cy: "27", r: "5" }))));
|
8
|
+
return (h(Host, { key: 'a7de26e1a17fb0abc34f1f046a922ef591c6e6f3', style: {
|
9
|
+
height: `${this.size}px`,
|
10
|
+
width: `${this.size}px`,
|
11
|
+
['--bar-width']: `${this.size * 0.12}px`,
|
12
|
+
} }, h("div", { key: '0a2faf4d46509c15e59cd685a2799b0c5c0eb85c', class: "loader" })));
|
15
13
|
}
|
16
14
|
static get is() { return "cpsl-spinner"; }
|
17
15
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-spinner.js","sourceRoot":"","sources":["../../../../src/components/cpsl-spinner/cpsl-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,WAAW;;oBAKE,EAAE;qBAMD,CAAC;;IAE1B,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,
|
1
|
+
{"version":3,"file":"cpsl-spinner.js","sourceRoot":"","sources":["../../../../src/components/cpsl-spinner/cpsl-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,WAAW;;oBAKE,EAAE;qBAMD,CAAC;;IAE1B,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBACL,MAAM,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI;gBACxB,KAAK,EAAE,GAAG,IAAI,CAAC,IAAI,IAAI;gBACvB,CAAC,aAAa,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI;aACzC;YAED,4DAAK,KAAK,EAAC,QAAQ,GAAG,CACjB,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-spinner',\n styleUrl: 'cpsl-spinner.scss',\n shadow: true,\n})\nexport class CpslSpinner {\n /**\n * Size of the spinner in pixels.\n * Default is 50.\n */\n @Prop() size?: number = 54;\n\n /**\n * Rotation speed of the spinner in seconds.\n * Default is 1.\n */\n @Prop() speed?: number = 1;\n\n render() {\n return (\n <Host\n style={{\n height: `${this.size}px`,\n width: `${this.size}px`,\n ['--bar-width']: `${this.size * 0.12}px`,\n }}\n >\n <div class=\"loader\" />\n </Host>\n );\n }\n}\n"]}
|
@@ -7,7 +7,7 @@ export class CpslSwitch {
|
|
7
7
|
this.checked = undefined;
|
8
8
|
}
|
9
9
|
render() {
|
10
|
-
return (h(Host, { key: '
|
10
|
+
return (h(Host, { key: 'd324dea22ae9e0ce4755a91944f4f1e610ccabe1' }, h("input", { key: 'd132f929923c331ccb91e550ecd5098acb6c24df', type: "checkbox", checked: this.checked }), h("span", { key: '172dedb09d220dbe4a3ea95032ab0e4ea194bcd4', onClick: this.handleSwitchClick, class: { container: true, checked: this.checked } }, h("span", { key: 'e3d9bec7fdddb3445cc9db05886a705aeb3d9bea', class: { thumb: true, checked: this.checked } }))));
|
11
11
|
}
|
12
12
|
static get is() { return "cpsl-switch"; }
|
13
13
|
static get encapsulation() { return "shadow"; }
|
@@ -1,5 +1,8 @@
|
|
1
1
|
:host {
|
2
|
-
--tab-color: var(--cpsl-color-text-
|
2
|
+
--tab-color: var(--cpsl-color-text-secondary);
|
3
|
+
--tab-gap: 2px;
|
4
|
+
--tab-icon-height: 16px;
|
5
|
+
--tab-icon-width: 16px;
|
3
6
|
padding-top: var(--tab-top-padding);
|
4
7
|
padding-bottom: var(--tab-bottom-padding);
|
5
8
|
padding-left: var(--tab-left-padding);
|
@@ -10,6 +13,20 @@
|
|
10
13
|
cursor: pointer;
|
11
14
|
z-index: 10;
|
12
15
|
}
|
16
|
+
:host ::slotted([slot=start]) {
|
17
|
+
--icon-color: var(--tab-color);
|
18
|
+
--height: var(--tab-icon-height);
|
19
|
+
--width: var(--tab-icon-width);
|
20
|
+
}
|
21
|
+
:host ::slotted([slot=end]) {
|
22
|
+
--icon-color: var(--tab-color);
|
23
|
+
--height: var(--tab-icon-height);
|
24
|
+
--width: var(--tab-icon-width);
|
25
|
+
}
|
26
|
+
|
27
|
+
:host(.selected) {
|
28
|
+
--tab-color: var(--cpsl-color-text-primary);
|
29
|
+
}
|
13
30
|
|
14
31
|
.tab-container {
|
15
32
|
align-items: center;
|
@@ -20,4 +37,10 @@
|
|
20
37
|
white-space: nowrap;
|
21
38
|
font-weight: 500;
|
22
39
|
color: var(--tab-color);
|
40
|
+
display: flex;
|
41
|
+
gap: var(--tab-gap);
|
42
|
+
}
|
43
|
+
|
44
|
+
.content {
|
45
|
+
flex: 1 1 auto;
|
23
46
|
}
|
@@ -21,7 +21,7 @@ export class CpslTab {
|
|
21
21
|
}
|
22
22
|
}
|
23
23
|
render() {
|
24
|
-
return (h(Host, { key: '
|
24
|
+
return (h(Host, { key: '43eb0e4547870b335aa19196bf391f2062df2b34', class: { selected: this.selected }, onClick: this.onTabClicked }, h("div", { key: '79d6974ea7641668144f6a9ba0250fc3262611e3', class: { 'tab-container': true } }, h("slot", { key: 'a52f47df870df25287254127d1e0754e98a9a02f', name: "start" }), h("div", { key: 'e97e9949a12bf7388599fdaec26c478436f284b2', class: "content" }, h("slot", { key: '05bdc0bb599c21f6b703c704f629e5368e86c818' })), h("slot", { key: '66169d0d87d651fe61f0dc2216a868a5f17bd78c', name: "end" }))));
|
25
25
|
}
|
26
26
|
static get is() { return "cpsl-tab"; }
|
27
27
|
static get encapsulation() { return "shadow"; }
|