@usecapsule/core-components 3.2.0-dev.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/p-0462f723.js.map +1 -1
- package/dist/capsule/p-05cb769b.entry.js +10 -0
- package/dist/capsule/p-05cb769b.entry.js.map +1 -0
- package/dist/capsule/p-0eea90f8.entry.js +2 -0
- package/dist/capsule/{p-6793ef7a.entry.js.map → p-0eea90f8.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-7233228e.entry.js +29 -0
- package/dist/capsule/p-7233228e.entry.js.map +1 -0
- package/dist/capsule/{p-447d49b9.entry.js → p-742bda0b.entry.js} +2 -2
- package/dist/capsule/{p-447d49b9.entry.js.map → p-742bda0b.entry.js.map} +1 -1
- package/dist/capsule/{p-f6c74d69.entry.js → p-c1aa1ffb.entry.js} +2 -2
- package/dist/capsule/{p-f6c74d69.entry.js.map → p-c1aa1ffb.entry.js.map} +1 -1
- package/dist/capsule/p-d351f076.entry.js +2 -0
- package/dist/capsule/p-d351f076.entry.js.map +1 -0
- package/dist/capsule/{p-452b9998.entry.js → p-dc4591d5.entry.js} +2 -2
- package/dist/capsule/{p-452b9998.entry.js.map → p-dc4591d5.entry.js.map} +1 -1
- 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 → cpsl-alert_33.cjs.entry.js} +136 -95
- package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-animation.cjs.entry.js +5 -2
- 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 +35 -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 +2 -2
- 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 +10 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/icons/index.js +1 -3
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +2 -2
- 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-avatar/cpsl-avatar.js +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.js +5 -2
- package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
- package/dist/collection/components/cpsl-button/cpsl-button.stories.js.map +1 -1
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +1 -1
- 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.js +5 -3
- 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.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 +2 -2
- 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 +6 -1
- 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.js +3 -2
- 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.js +2 -2
- 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.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js +36 -2
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
- package/dist/collection/components/cpsl-modal/cpsl-modal.js +1 -1
- package/dist/collection/components/cpsl-modal/cpsl-modal.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 +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.js +18 -6
- package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -1
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +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.js +3 -1
- 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-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.js +2 -2
- package/dist/collection/components/cpsl-switch/cpsl-switch.js +1 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-table/cpsl-table.js +11 -1
- package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +7 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.js +5 -2
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -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 +1 -1
- package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
- package/dist/collection/utils/theme/generatePalette.js +4 -1
- package/dist/collection/utils/theme/generatePalette.js.map +1 -1
- package/dist/collection/utils/theme/generateTheme.js +4 -0
- 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 → cpsl-alert_33.entry.js} +137 -95
- package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
- package/dist/esm/cpsl-animation.entry.js +5 -2
- 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 +31 -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 +2 -2
- 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 +10 -2
- 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 +0 -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-avatar/cpsl-avatar.d.ts +11 -0
- package/dist/types/components/cpsl-button/cpsl-button.d.ts +29 -0
- 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 +5 -0
- package/dist/types/components/cpsl-icon/cpsl-icon.d.ts +6 -0
- package/dist/types/components/cpsl-identicon/cpsl-identicon.d.ts +4 -0
- package/dist/types/components/cpsl-input/cpsl-input.d.ts +138 -0
- package/dist/types/components/cpsl-input/input-interface.d.ts +5 -0
- package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +39 -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 +55 -2
- 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 +10 -0
- package/dist/types/components/cpsl-radio/cpsl-radio.d.ts +6 -0
- package/dist/types/components/cpsl-select/cpsl-select.d.ts +45 -0
- 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 +15 -0
- package/dist/types/components/cpsl-tile-button/cpsl-tile-button.d.ts +6 -0
- package/dist/types/components.d.ts +28 -6
- package/dist/types/stencil-public-runtime.d.ts +3 -10
- package/dist/types/utils/theme/generateBorderRadii.d.ts +1 -1
- package/dist/types/utils/theme/generatePalette.d.ts +1 -1
- package/dist/types/utils/theme/generateTheme.d.ts +4 -0
- package/package.json +4 -10
- package/readme.md +47 -2
- package/dist/capsule/p-303e6e89.entry.js +0 -29
- package/dist/capsule/p-303e6e89.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 +0 -10
- package/dist/capsule/p-a6aaf3f4.entry.js.map +0 -1
- package/dist/cjs/cpsl-alert_34.cjs.entry.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/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/cpsl-alert_34.entry.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/Users/{briancorbin/Documents/Programming/Capsule/component-library/core → norwood/capsule-repos/web-sdk/packages/core-components}/.stencil/scripts/buildAssets.d.ts +0 -0
@@ -25,7 +25,7 @@ export class CpslAlert {
|
|
25
25
|
}
|
26
26
|
}
|
27
27
|
render() {
|
28
|
-
return (h(Host, { key: '
|
28
|
+
return (h(Host, { key: '9ea40cedf2f696f578a0bd7ff88a788d4136379e', class: { error: this.variant === 'error', warning: this.variant === 'warning', success: this.variant === 'success' } }, h("div", { key: '49eab47245a0bb04dd2f7aa2c6ecae541f3714f6', class: "alert-container" }, this.iconType && h("cpsl-icon", { key: '965814c71b595fb51813fd81ba2e91d1c6ffa541', icon: this.iconType }), h("slot", { key: '38e31fab2bf261206b5d4debaff18ae7c09fca90' }))));
|
29
29
|
}
|
30
30
|
static get is() { return "cpsl-alert"; }
|
31
31
|
static get encapsulation() { return "shadow"; }
|
@@ -46,7 +46,7 @@ export class CpslAlert {
|
|
46
46
|
"mutable": false,
|
47
47
|
"complexType": {
|
48
48
|
"original": "IconType",
|
49
|
-
"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\" | \"
|
49
|
+
"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\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"farcasterBrand\" | \"farcaster\" | \"figmaBrand\" | \"figma\" | \"file\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"home\" | \"image\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"lightning01\" | \"lightning\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"menu\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"rampNetworkBrand\" | \"rampNetwork\" | \"redditBrand\" | \"reddit\" | \"refresh\" | \"settings\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"stars\" | \"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\"",
|
50
50
|
"references": {
|
51
51
|
"IconType": {
|
52
52
|
"location": "import",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-alert.js","sourceRoot":"","sources":["../../../../src/components/cpsl-alert/cpsl-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQzD,MAAM,OAAO,SAAS;;;uBAW2C,OAAO;;IAEtE,IAAY,QAAQ;QAClB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,CAAC;QACZ,CAAC;QAED,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;YACrB,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,OAAO,aAAa,CAAC;YACvB,CAAC;YACD,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,OAAO,aAAa,CAAC;YACvB,CAAC;YACD,KAAK,OAAO,CAAC;YACb,OAAO,CAAC,CAAC,CAAC;gBACR,OAAO,aAAa,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,
|
1
|
+
{"version":3,"file":"cpsl-alert.js","sourceRoot":"","sources":["../../../../src/components/cpsl-alert/cpsl-alert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQzD,MAAM,OAAO,SAAS;;;uBAW2C,OAAO;;IAEtE,IAAY,QAAQ;QAClB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,IAAI,CAAC;QACZ,CAAC;QAED,QAAQ,IAAI,CAAC,OAAO,EAAE,CAAC;YACrB,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,OAAO,aAAa,CAAC;YACvB,CAAC;YACD,KAAK,SAAS,CAAC,CAAC,CAAC;gBACf,OAAO,aAAa,CAAC;YACvB,CAAC;YACD,KAAK,OAAO,CAAC;YACb,OAAO,CAAC,CAAC,CAAC;gBACR,OAAO,aAAa,CAAC;YACvB,CAAC;QACH,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE;YAEpH,4DAAK,KAAK,EAAC,iBAAiB;gBACzB,IAAI,CAAC,QAAQ,IAAI,kEAAW,IAAI,EAAE,IAAI,CAAC,QAAQ,GAAI;gBACpD,8DAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-alert',\n styleUrl: 'cpsl-alert.scss',\n shadow: true,\n})\nexport class CpslAlert {\n /**\n * The name of the icon to show.\n */\n @Prop() icon?: IconType;\n\n /**\n * The variant of alert.\n * Options are: `\"error\"` | `\"warning\"` | `\"success\"` | `\"custom\"`\n * Default is: `\"error\"`.\n */\n @Prop() variant?: 'error' | 'warning' | 'success' | 'custom' = 'error';\n\n private get iconType(): IconType | undefined {\n if (Boolean(this.icon)) {\n this.icon;\n }\n\n switch (this.variant) {\n case 'custom': {\n return undefined;\n }\n case 'success': {\n return 'checkCircle';\n }\n case 'warning': {\n return 'alertCircle';\n }\n case 'error':\n default: {\n return 'alertCircle';\n }\n }\n }\n\n render() {\n return (\n <Host\n class={{ error: this.variant === 'error', warning: this.variant === 'warning', success: this.variant === 'success' }}\n >\n <div class=\"alert-container\">\n {this.iconType && <cpsl-icon icon={this.iconType} />}\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
|
@@ -23,6 +23,9 @@ export class CpslAnimation {
|
|
23
23
|
constructor() {
|
24
24
|
this.src = undefined;
|
25
25
|
}
|
26
|
+
/**
|
27
|
+
* Will replay the animation
|
28
|
+
*/
|
26
29
|
replayAnimation() {
|
27
30
|
return __awaiter(this, void 0, void 0, function* () {
|
28
31
|
this.animation.play();
|
@@ -41,7 +44,7 @@ export class CpslAnimation {
|
|
41
44
|
return this.el.shadowRoot.getElementById('animation-container');
|
42
45
|
}
|
43
46
|
render() {
|
44
|
-
return (h(Host, { key: '
|
47
|
+
return (h(Host, { key: '5fab748126f7b18a9051aa89df1b8a78ef647648' }, h("div", { key: 'b9cac260ee00f54a56c7cd249850a8df5e84dc3b', part: "animation-container", id: "animation-container", class: "animation-container" })));
|
45
48
|
}
|
46
49
|
static get is() { return "cpsl-animation"; }
|
47
50
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-animation.js","sourceRoot":"","sources":["../../../../src/components/cpsl-animation/cpsl-animation.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,MAAyB,MAAM,YAAY,CAAC;AAOnD,MAAM,OAAO,aAAa;;;;
|
1
|
+
{"version":3,"file":"cpsl-animation.js","sourceRoot":"","sources":["../../../../src/components/cpsl-animation/cpsl-animation.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1E,OAAO,MAAyB,MAAM,YAAY,CAAC;AAOnD,MAAM,OAAO,aAAa;;;;IAUxB;;OAEG;IAEG,eAAe;;YACnB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA;IAED,gBAAgB;QACd,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;YACpC,IAAI,EAAE,KAAK;YACX,SAAS,EAAE,IAAI,CAAC,oBAAoB;YACpC,QAAQ,EAAE,KAAK;YACf,IAAI,EAAE,IAAI,CAAC,GAAG;SACf,CAAC,CAAC;QAEH,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;IACxB,CAAC;IAED,IAAY,oBAAoB;QAC9B,OAAO,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,qBAAqB,CAAC,CAAC;IAClE,CAAC;IAED,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,4DAAK,IAAI,EAAC,qBAAqB,EAAC,EAAE,EAAC,qBAAqB,EAAC,KAAK,EAAC,qBAAqB,GAAG,CAClF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Element, Method, Prop } from '@stencil/core';\nimport lottie, { AnimationItem } from 'lottie-web';\n\n@Component({\n tag: 'cpsl-animation',\n styleUrl: 'cpsl-animation.scss',\n shadow: true,\n})\nexport class CpslAnimation {\n private animation: AnimationItem;\n\n @Element() el!: HTMLCpslAnimationElement;\n\n /**\n * Source of the Lottie animation file.\n */\n @Prop() src: string;\n\n /**\n * Will replay the animation\n */\n @Method()\n async replayAnimation() {\n this.animation.play();\n }\n\n componentDidLoad() {\n this.animation = lottie.loadAnimation({\n loop: false,\n container: this.animationContainerEl,\n renderer: 'svg',\n path: this.src,\n });\n\n this.animation.play();\n }\n\n private get animationContainerEl() {\n return this.el.shadowRoot.getElementById('animation-container');\n }\n\n render() {\n return (\n <Host>\n <div part=\"animation-container\" id=\"animation-container\" class=\"animation-container\" />\n </Host>\n );\n }\n}\n"]}
|
@@ -6,10 +6,13 @@ export class CpslAppBar {
|
|
6
6
|
this.zIndexOverride = undefined;
|
7
7
|
}
|
8
8
|
render() {
|
9
|
-
return (h(Host, { key: '
|
9
|
+
return (h(Host, { key: '4608b0dc424585b7e7f865d55b3d217ebe172f04', style: Object.assign({
|
10
|
+
// position: this.position,
|
11
|
+
height: `${this.height}px`
|
12
|
+
}, (Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {})) }, h("div", { key: 'c598749bcfb29c806856573b9f61141b7b68022e', class: "container", part: "container", style: {
|
10
13
|
position: this.position,
|
11
14
|
height: `${this.height}px`,
|
12
|
-
} }, h("slot", { key: '
|
15
|
+
} }, h("slot", { key: '7e2bd9efbe98ca5ff70dd0bc33333d95799f5fe7' })), this.position === 'fixed' && (h("div", { key: 'fc4e1e9f6414ccf74c816f19be79b7d4b0df8bd5', style: {
|
13
16
|
height: `${this.height}px`,
|
14
17
|
} }))));
|
15
18
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-app-bar.js","sourceRoot":"","sources":["../../../../src/components/cpsl-app-bar/cpsl-app-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;;wBAUmB,OAAO;;;IAO/C,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,
|
1
|
+
{"version":3,"file":"cpsl-app-bar.js","sourceRoot":"","sources":["../../../../src/components/cpsl-app-bar/cpsl-app-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;;wBAUmB,OAAO;;;IAO/C,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK;gBACH,2BAA2B;gBAC3B,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,IACvB,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAG/E,4DACE,KAAK,EAAC,WAAW,EACjB,IAAI,EAAC,WAAW,EAChB,KAAK,EAAE;oBACL,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI;iBAC3B;gBAED,8DAAa,CACT;YACL,IAAI,CAAC,QAAQ,KAAK,OAAO,IAAI,CAC5B,4DACE,KAAK,EAAE;oBACL,MAAM,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI;iBAC3B,GACD,CACH,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-app-bar',\n styleUrl: 'cpsl-app-bar.scss',\n shadow: true,\n})\nexport class CpslAppBar {\n /**\n * Height of the app bar.\n */\n @Prop() height: number;\n\n /**\n * The position of the drawer.\n * Default is `fixed`.\n */\n @Prop() position?: 'fixed' | 'static' = 'fixed';\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n render() {\n return (\n <Host\n style={{\n // position: this.position,\n height: `${this.height}px`,\n ...(Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {}),\n }}\n >\n <div\n class=\"container\"\n part=\"container\"\n style={{\n position: this.position,\n height: `${this.height}px`,\n }}\n >\n <slot></slot>\n </div>\n {this.position === 'fixed' && (\n <div\n style={{\n height: `${this.height}px`,\n }}\n />\n )}\n </Host>\n );\n }\n}\n"]}
|
@@ -7,7 +7,7 @@ export class CpslAvatar {
|
|
7
7
|
}
|
8
8
|
render() {
|
9
9
|
var _a;
|
10
|
-
return (h(Host, { key: '
|
10
|
+
return (h(Host, { key: '04dfd668bc6ab12f758e82ccfd915f06e1de3504' }, h("span", { key: '906c7c6e113040b95273c987689e848954e14a1c', class: { round: this.variant === 'round' } }, h("img", { key: '2d952a27ebbeb118c931162487f2d7e13370b41f', src: this.src, alt: (_a = this.alt) !== null && _a !== void 0 ? _a : 'avatar' }))));
|
11
11
|
}
|
12
12
|
static get is() { return "cpsl-avatar"; }
|
13
13
|
static get encapsulation() { return "shadow"; }
|
@@ -10,16 +10,19 @@ export class CpslButton {
|
|
10
10
|
this.variant = 'primary';
|
11
11
|
}
|
12
12
|
render() {
|
13
|
-
return (h(Host, { key: '
|
13
|
+
return (h(Host, { key: '554350e7af597bd14c9584f9924f73e04fe44093', class: {
|
14
|
+
// VARIANTS
|
14
15
|
'primary': this.variant === 'primary',
|
15
16
|
'secondary': this.variant === 'secondary',
|
16
17
|
'ghost': this.variant === 'ghost',
|
17
18
|
'destructive': this.variant === 'destructive',
|
19
|
+
// STATE
|
18
20
|
'disabled': this.disabled,
|
19
21
|
'full-width': this.fullWidth,
|
22
|
+
// SIZES
|
20
23
|
'small': this.size === 'small',
|
21
24
|
'medium': this.size === 'medium',
|
22
|
-
} }, h(this.as, { key: '
|
25
|
+
} }, h(this.as, { key: '20b6865c03e312d263c523f681bb775d8626fc9c', href: this.href, target: this.target, part: "button-native", class: "button-native" }, h("slot", { key: '4ee8d68b06ce21288e63bfcff9aa186908b89af2', name: "start" }), h("slot", { key: '9c0a5f0daa64c75886d03fb830739c8f8cfb65d9' }), h("slot", { key: 'cf9addee55b0a0d8f487313c972d7b48d6f8c75c', name: "end" }))));
|
23
26
|
}
|
24
27
|
static get is() { return "cpsl-button"; }
|
25
28
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.tsx"],"names":[],"mappings":"AAA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AAC,KAAK,GAAQ,CAChB,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-button',\n styleUrl: 'cpsl-button.scss',\n shadow: true,\n})\nexport class CpslButton {\n /**\n * The tag for the button.\n * Options are: `\"button\"`, `\"a\".\n * Default is: `\"button\"`.\n */\n @Prop() as?: 'button' | 'a' = 'button';\n\n /**\n * If the button is disabled.\n * Default is: false.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Whether the button takes the full width of it's container.\n * Default is: false.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * href to use when using a link.\n */\n @Prop() href?: string;\n\n /**\n * The size of the button.\n * Options are: `\"small\"`, `\"medium\".\n * Default is: `\"medium\"`.\n */\n @Prop() size?: 'small' | 'medium' = 'medium';\n\n /**\n * target to use when using a link.\n */\n @Prop() target?: string;\n\n /**\n * The variant of the button.\n * Options are: `\"primary\"`, `\"secondary\", `\"icon\", `\"text\"`.\n * Default is: `\"primary\"`.\n */\n @Prop({ reflect: true }) variant?: 'primary' | 'secondary' | 'ghost' | 'destructive' = 'primary';\n\n render() {\n return (\n <Host\n class={{\n // VARIANTS\n 'primary': this.variant === 'primary',\n 'secondary': this.variant === 'secondary',\n 'ghost': this.variant === 'ghost',\n 'destructive': this.variant === 'destructive',\n // STATE\n 'disabled': this.disabled,\n 'full-width': this.fullWidth,\n // SIZES\n 'small': this.size === 'small',\n 'medium': this.size === 'medium',\n }}\n >\n <this.as href={this.href} target={this.target} part=\"button-native\" class=\"button-native\">\n <slot name=\"start\"></slot>\n <slot></slot>\n <slot name=\"end\"></slot>\n </this.as>\n </Host>\n );\n }\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-button.stories.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.stories.ts"],"names":[],"mappings":"AAGA,MAAM,IAAI,GAA4C;IACpD,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE;IAC7D,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;aACf;YACD,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC;SAC1D;QACD,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;aACf;YACD,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;SAC7B;KACF;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,QAAQ,GAAU,IAAI,CAAC,EAAE,CAAC,yBAAyB,IAAI,CAAC,OAAO,WAAW,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,gBAAgB,CAAC;AAC3H,MAAM,gBAAgB,GAAU,IAAI,CAAC,EAAE,
|
1
|
+
{"version":3,"file":"cpsl-button.stories.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.stories.ts"],"names":[],"mappings":"AAGA,MAAM,IAAI,GAA4C;IACpD,KAAK,EAAE,uBAAuB;IAC9B,IAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE;IAC7D,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;aACf;YACD,OAAO,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,CAAC;SAC1D;QACD,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,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AM,CAAC,MAAM,eAAe,GAAU,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAChE,eAAe,CAAC,IAAI,GAAG;IACrB,OAAO,EAAE,mBAAmB;CAC7B,CAAC","sourcesContent":["import type { Meta, StoryFn } from '@storybook/html';\nimport { type CpslButton } from './cpsl-button';\n\nconst meta: Meta<CpslButton & { content?: string }> = {\n title: 'Components/CpslButton',\n args: { variant: 'primary', size: 'medium', content: 'Test' },\n argTypes: {\n variant: {\n control: {\n type: 'select',\n },\n options: ['primary', 'secondary', 'ghost', 'destructive'],\n },\n size: {\n control: {\n type: 'select',\n },\n options: ['small', 'medium'],\n },\n },\n};\n\nexport default meta;\n\ntype Story = StoryFn<CpslButton & { content?: string }>;\n\nconst Template: Story = args => `<cpsl-button variant=\"${args.variant}\" size=\"${args.size}\">${args.content}</cpsl-button>`;\nconst TemplateWithIcon: Story = args =>\n `<cpsl-button variant=\"${args.variant}\" size=\"${args.size}\"><cpsl-icon icon=\"home\" slot=\"start\"></cpsl-icon>${args.content}</cpsl-button>`;\n\nexport const Primary: Story = Template.bind({});\nPrimary.args = {\n content: 'Primary',\n};\n\nexport const Secondary: Story = Template.bind({});\nSecondary.args = {\n content: 'Secondary',\n variant: 'secondary',\n};\n\nexport const Ghost: Story = Template.bind({});\nGhost.args = {\n content: 'Ghost',\n variant: 'ghost',\n};\n\nexport const Destructive: Story = Template.bind({});\nDestructive.args = {\n content: 'Destructive',\n variant: 'destructive',\n};\n\nexport const Icon: Story = TemplateWithIcon.bind({});\nIcon.args = {\n content: '',\n variant: 'ghost',\n};\n\nexport const PrimaryWithIcon: Story = TemplateWithIcon.bind({});\nPrimaryWithIcon.args = {\n content: 'Primary With Icon',\n};\n"]}
|
@@ -32,7 +32,7 @@ export class CpslButtonGroup {
|
|
32
32
|
return this.el.querySelectorAll('&> *:not(cpsl-button)');
|
33
33
|
}
|
34
34
|
render() {
|
35
|
-
return (h(Host, { key: '
|
35
|
+
return (h(Host, { key: '18830efc419c35995cc7b31a89e2405e230f4978' }, h("slot", { key: 'f466f88653fd0fe91b258c03706b13adc78be777' })));
|
36
36
|
}
|
37
37
|
static get is() { return "cpsl-button-group"; }
|
38
38
|
static get encapsulation() { return "shadow"; }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
2
2
|
export class CpslCard {
|
3
3
|
render() {
|
4
|
-
return (h(Host, { key: '
|
4
|
+
return (h(Host, { key: '21177f5a9ceec0246dc1fa89a052bfdadacc3063' }, h("div", { key: '0940e0aaf62b24e1be0e99c736069b5bb463854c', class: { card: true }, part: "card-container" }, h("slot", { key: '6317e03f97be9841c03b040845591043bf203e36' }))));
|
5
5
|
}
|
6
6
|
static get is() { return "cpsl-card"; }
|
7
7
|
static get encapsulation() { return "shadow"; }
|
@@ -7,7 +7,7 @@ export class CpslCheckbox {
|
|
7
7
|
this.checked = undefined;
|
8
8
|
}
|
9
9
|
render() {
|
10
|
-
return (h(Host, { key: '
|
10
|
+
return (h(Host, { key: '236c0b027e72c0c25dbc2fd3183a77400c815f8c' }, h("input", { key: '8c350e21268b87d485b16796b2058c4e47f46e75', type: "checkbox", checked: this.checked }), h("span", { key: 'b1d8fc6dd380b67eb8940f55bba47810c54ee189', onClick: this.handleCheckboxClick, class: { container: true, checked: this.checked } }, h("cpsl-icon", { key: '2b3ddcad1e2b9007bda8135a810b75a1a2cfaeca', icon: "check" }))));
|
11
11
|
}
|
12
12
|
static get is() { return "cpsl-checkbox"; }
|
13
13
|
static get encapsulation() { return "shadow"; }
|
@@ -4,7 +4,7 @@ export class CpslCodeInput {
|
|
4
4
|
this.handleInput = (ind, ev) => {
|
5
5
|
var _a;
|
6
6
|
const inputElements = this.inputs;
|
7
|
-
if (ev.inputType
|
7
|
+
if (ev.inputType === 'insertText') {
|
8
8
|
if (this.type === 'number' && isNaN(parseInt(ev.data))) {
|
9
9
|
inputElements[ind].value = '';
|
10
10
|
return;
|
@@ -59,10 +59,12 @@ export class CpslCodeInput {
|
|
59
59
|
inputElements[ind].setSelectionRange(1, 1);
|
60
60
|
}, 0);
|
61
61
|
};
|
62
|
+
// TODO: figure out why pasting a string populates the first input
|
62
63
|
this.handlePaste = (e) => {
|
63
64
|
const inputElements = this.inputs;
|
64
65
|
const pastedCode = e.clipboardData.getData('text');
|
65
66
|
if (this.type === 'number' && isNaN(parseInt(pastedCode))) {
|
67
|
+
// Remove illegal value from the first input. Not using a timeout here doesn't change the value properly.
|
66
68
|
setTimeout(() => {
|
67
69
|
inputElements[0].value = '';
|
68
70
|
}, 0);
|
@@ -87,10 +89,10 @@ export class CpslCodeInput {
|
|
87
89
|
}
|
88
90
|
render() {
|
89
91
|
var _a;
|
90
|
-
return (h(Host, { key: '
|
92
|
+
return (h(Host, { key: 'a75b04b3cf649df494520712a822f450e44f106f' }, h("div", { key: 'c38ae9fab904d38cd3a3154e2aa4bcdef1e1562b', class: "code-container" }, new Array(this.length).fill(0).map((_, i) => {
|
91
93
|
var _a;
|
92
94
|
return (h("input", { class: { 'code-input': true, 'error': Boolean(this.errorText) }, id: `code-input-${i}`, maxLength: 1, onKeyDown: ev => this.handleKeyDown(i, ev), onInput: ev => this.handleInput(i, ev), onFocus: () => this.handleFocus(i), onPaste: this.handlePaste, min: 0, max: 9, value: (_a = this.code) === null || _a === void 0 ? void 0 : _a[i], inputMode: this.type === 'number' ? 'numeric' : 'text' }));
|
93
|
-
})), (this.errorText || this.helperText) && (h("div", { class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { icon: Boolean(this.errorText) ? 'alertCircle' : 'infoCircle' }), h("span",
|
95
|
+
})), (this.errorText || this.helperText) && (h("div", { key: '96041359166b5a633d4e4598d22523553592ed4e', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { key: '32dd48613df030cc809331567df2972eb987701d', icon: Boolean(this.errorText) ? 'alertCircle' : 'infoCircle' }), h("span", { key: 'ddba19144be6675259254e698de8668ee4662324' }, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
|
94
96
|
}
|
95
97
|
static get is() { return "cpsl-code-input"; }
|
96
98
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-code-input.js","sourceRoot":"","sources":["../../../../src/components/cpsl-code-input/cpsl-code-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAQvF,MAAM,OAAO,aAAa;;
|
1
|
+
{"version":3,"file":"cpsl-code-input.js","sourceRoot":"","sources":["../../../../src/components/cpsl-code-input/cpsl-code-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AAQvF,MAAM,OAAO,aAAa;;QAkChB,gBAAW,GAAG,CAAC,GAAW,EAAE,EAAc,EAAE,EAAE;;YACpD,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC;YAClC,IAAI,EAAE,CAAC,SAAS,KAAK,YAAY,EAAE,CAAC;gBAClC,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;oBACvD,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;oBAC9B,OAAO;gBACT,CAAC;gBACD,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;gBAE1D,MAAM,OAAO,GAAG,GAAG,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;gBAC/C,IAAI,CAAC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KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,GACtD,CACH,CAAA;aAAA,CAAC,CACE;YACL,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,CACtC,4DAAK,KAAK,EAAE,EAAE,uBAAuB,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE;gBAClF,kEAAW,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,GAAI;gBAC3E,+DAAO,MAAA,IAAI,CAAC,SAAS,mCAAI,IAAI,CAAC,UAAU,CAAQ,CAC5C,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop, Element, Event, EventEmitter } from '@stencil/core';\nimport { CodeChangeEventDetail } from './code-change-interface';\n\n@Component({\n tag: 'cpsl-code-input',\n styleUrl: 'cpsl-code-input.scss',\n shadow: true,\n})\nexport class CpslCodeInput {\n @Element() el!: HTMLCpslCodeInputElement;\n\n /**\n * Value of the code.\n */\n @Prop({ mutable: true }) code: string;\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 * Helper text to show below the input. If `\"errorText\"` is provided that will take precedence.\n */\n @Prop() helperText?: string;\n\n /**\n * Length of the code.\n */\n @Prop() length: number;\n\n /**\n * Type of characters to accept in the code.\n * Defaults to number.\n */\n @Prop() type?: 'number' | 'string' = 'number';\n\n /**\n * The `cpslInput` event is fired each time the user modifies the input's value.\n */\n @Event() cpslInput!: EventEmitter<CodeChangeEventDetail>;\n\n private handleInput = (ind: number, ev: InputEvent) => {\n const inputElements = this.inputs;\n if (ev.inputType === 'insertText') {\n if (this.type === 'number' && isNaN(parseInt(ev.data))) {\n inputElements[ind].value = '';\n return;\n }\n inputElements[Math.min(this.length - 1, ind + 1)].focus();\n\n const newCode = `${this.code ?? ''}${ev.data}`;\n this.cpslInput.emit({ value: newCode });\n this.code = newCode;\n }\n };\n\n private handleKeyDown = (ind: number, ev: KeyboardEvent) => {\n const inputElements = this.inputs;\n\n switch (ev.key) {\n case 'Backspace': {\n let newCode;\n if (!inputElements[ind].value) {\n inputElements[Math.max(0, ind - 1)].value = '';\n inputElements[Math.max(0, ind - 1)].focus();\n newCode = this.code.substring(0, ind - 1);\n } else {\n newCode = this.code.substring(0, ind);\n }\n this.cpslInput.emit({ value: newCode });\n this.code = newCode;\n break;\n }\n case 'ArrowLeft': {\n setTimeout(() => {\n this.inputs[ind].setSelectionRange(1, 1);\n }, 0);\n break;\n }\n default: {\n break;\n }\n }\n };\n\n private handleFocus = (ind: number) => {\n const inputElements = this.inputs;\n\n for (const input of inputElements) {\n if (!input.value) {\n input.focus();\n break;\n } else if (input.id === `code-input-${this.length - 1}`) {\n input.focus();\n break;\n }\n }\n\n setTimeout(() => {\n inputElements[ind].setSelectionRange(1, 1);\n }, 0);\n };\n\n // TODO: figure out why pasting a string populates the first input\n private handlePaste = (e: ClipboardEvent) => {\n const inputElements = this.inputs;\n const pastedCode = e.clipboardData.getData('text');\n\n if (this.type === 'number' && isNaN(parseInt(pastedCode))) {\n // Remove illegal value from the first input. Not using a timeout here doesn't change the value properly.\n setTimeout(() => {\n inputElements[0].value = '';\n }, 0);\n return;\n }\n\n this.cpslInput.emit({\n value: pastedCode,\n });\n inputElements.forEach((input, index) => {\n input.value = pastedCode.charAt(index);\n });\n inputElements[this.length - 1].focus();\n };\n\n private get inputs() {\n return Array.from(this.el.shadowRoot.querySelectorAll('input'));\n }\n\n render() {\n return (\n <Host>\n <div class=\"code-container\">\n {new Array(this.length).fill(0).map((_, i) => (\n <input\n class={{ 'code-input': true, 'error': Boolean(this.errorText) }}\n id={`code-input-${i}`}\n maxLength={1}\n onKeyDown={ev => this.handleKeyDown(i, ev)}\n onInput={ev => this.handleInput(i, ev)}\n onFocus={() => this.handleFocus(i)}\n onPaste={this.handlePaste}\n min={0}\n max={9}\n value={this.code?.[i]}\n inputMode={this.type === 'number' ? 'numeric' : 'text'}\n />\n ))}\n </div>\n {(this.errorText || this.helperText) && (\n <div class={{ 'helper-text-container': true, 'error-text': Boolean(this.errorText) }}>\n <cpsl-icon icon={Boolean(this.errorText) ? 'alertCircle' : 'infoCircle'} />\n <span>{this.errorText ?? this.helperText}</span>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
@@ -33,28 +33,40 @@ export class CpslCol {
|
|
33
33
|
onResize() {
|
34
34
|
forceUpdate(this);
|
35
35
|
}
|
36
|
+
// Loop through all of the breakpoints to see if the media query
|
37
|
+
// matches and grab the column value from the relevant prop if so
|
36
38
|
getColumns(property) {
|
37
39
|
let matched;
|
38
40
|
for (const breakpoint of BREAKPOINTS) {
|
39
41
|
const matches = matchBreakpoint(breakpoint);
|
42
|
+
// Grab the value of the property, if it exists and our
|
43
|
+
// media query matches we return the value
|
40
44
|
const columns = this[property + breakpoint.charAt(0).toUpperCase() + breakpoint.slice(1)];
|
41
45
|
if (matches && columns !== undefined) {
|
42
46
|
matched = columns;
|
43
47
|
}
|
44
48
|
}
|
49
|
+
// Return the last matched columns since the breakpoints
|
50
|
+
// increase in size and we want to return the largest match
|
45
51
|
return matched;
|
46
52
|
}
|
47
53
|
calculateSize() {
|
48
54
|
const columns = this.getColumns('size');
|
55
|
+
// If size wasn't set for any breakpoint
|
56
|
+
// or if the user set the size without a value
|
57
|
+
// it means we need to stick with the default and return
|
58
|
+
// e.g. <ion-col size-md>
|
49
59
|
if (!columns || columns === '') {
|
50
60
|
return;
|
51
61
|
}
|
62
|
+
// If the size is set to auto then don't calculate a size
|
52
63
|
const colSize = columns === 'auto'
|
53
64
|
? 'auto'
|
54
|
-
:
|
65
|
+
: // If CSS supports variables we should use the grid columns var
|
55
66
|
SUPPORTS_VARS
|
56
67
|
? `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`
|
57
|
-
:
|
68
|
+
: // Convert the columns to a percentage by dividing by the total number
|
69
|
+
// of columns (12) and then multiplying by 100
|
58
70
|
(columns / 12) * 100 + '%';
|
59
71
|
return {
|
60
72
|
'flex': `0 0 ${colSize}`,
|
@@ -62,15 +74,19 @@ export class CpslCol {
|
|
62
74
|
'max-width': `${colSize}`,
|
63
75
|
};
|
64
76
|
}
|
77
|
+
// Called by push, pull, and offset since they use the same calculations
|
65
78
|
calculatePosition(property, modifier) {
|
66
79
|
const columns = this.getColumns(property);
|
67
80
|
if (!columns) {
|
68
81
|
return;
|
69
82
|
}
|
83
|
+
// If the number of columns passed are greater than 0 and less than
|
84
|
+
// 12 we can position the column, else default to auto
|
70
85
|
const amount = SUPPORTS_VARS
|
71
|
-
?
|
86
|
+
? // If CSS supports variables we should use the grid columns var
|
72
87
|
`calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`
|
73
|
-
:
|
88
|
+
: // Convert the columns to a percentage by dividing by the total number
|
89
|
+
// of columns (12) and then multiplying by 100
|
74
90
|
columns > 0 && columns < 12
|
75
91
|
? (columns / 12) * 100 + '%'
|
76
92
|
: 'auto';
|
@@ -89,7 +105,7 @@ export class CpslCol {
|
|
89
105
|
}
|
90
106
|
render() {
|
91
107
|
const isRTL = document.dir === 'rtl';
|
92
|
-
return (h(Host, { key: '
|
108
|
+
return (h(Host, { key: 'febc737118ea526e5c53e8e59479a245ec1b5dd1', style: Object.assign(Object.assign(Object.assign(Object.assign({}, this.calculateOffset(isRTL)), this.calculatePull(isRTL)), this.calculatePush(isRTL)), this.calculateSize()) }, h("slot", { key: '88e01f9f4ed95eedbfd0620398792d9d5d58633d' })));
|
93
109
|
}
|
94
110
|
static get is() { return "cpsl-col"; }
|
95
111
|
static get encapsulation() { return "shadow"; }
|
@@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,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAEO,aAAa,CAAC,KAAc;QAClC,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAClE,CAAC;IAED,MAAM;QACJ,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,KAAK,KAAK,CAAC;QACrC,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,8DACA,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,GAC3B,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,GACzB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,GACzB,IAAI,CAAC,aAAa,EAAE;YAGzB,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Listen, Prop, forceUpdate, h } from '@stencil/core';\nimport { matchBreakpoint } from '../../utils/media';\n\nconst win = typeof (window as any) !== 'undefined' ? (window as any) : undefined;\nconst SUPPORTS_VARS = win && !!(win.CSS && win.CSS.supports && win.CSS.supports('--a: 0'));\nconst BREAKPOINTS = ['', 'xs', 'sm', 'md', 'lg', 'xl'];\n\n@Component({\n tag: 'cpsl-col',\n styleUrl: 'cpsl-col.scss',\n shadow: true,\n})\nexport class CpslCol {\n /**\n * The amount to offset the column, in terms of how many columns it should shift to the end\n * of the total available.\n */\n @Prop() offset?: string;\n\n /**\n * The amount to offset the column for xs screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetXs?: string;\n\n /**\n * The amount to offset the column for sm screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetSm?: string;\n\n /**\n * The amount to offset the column for md screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetMd?: string;\n\n /**\n * The amount to offset the column for lg screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetLg?: string;\n\n /**\n * The amount to offset the column for xl screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetXl?: string;\n\n /**\n * The amount to pull the column, in terms of how many columns it should shift to the start of\n * the total available.\n */\n @Prop() pull?: string;\n\n /**\n * The amount to pull the column for xs screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullXs?: string;\n /**\n * The amount to pull the column for sm screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullSm?: string;\n /**\n * The amount to pull the column for md screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullMd?: string;\n /**\n * The amount to pull the column for lg screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullLg?: string;\n /**\n * The amount to pull the column for xl screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullXl?: string;\n\n /**\n * The amount to push the column, in terms of how many columns it should shift to the end\n * of the total available.\n */\n @Prop() push?: string;\n\n /**\n * The amount to push the column for xs screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushXs?: string;\n\n /**\n * The amount to push the column for sm screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushSm?: string;\n\n /**\n * The amount to push the column for md screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushMd?: string;\n\n /**\n * The amount to push the column for lg screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushLg?: string;\n\n /**\n * The amount to push the column for xl screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushXl?: string;\n\n /**\n * The size of the column, in terms of how many columns it should take up out of the total\n * available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() size?: string;\n\n /**\n * The size of the column for xs screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeXs?: string;\n\n /**\n * The size of the column for sm screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeSm?: string;\n\n /**\n * The size of the column for md screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeMd?: string;\n\n /**\n * The size of the column for lg screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeLg?: string;\n\n /**\n * The size of the column for xl screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeXl?: string;\n\n @Listen('resize', { target: 'window' })\n onResize() {\n forceUpdate(this);\n }\n\n // Loop through all of the breakpoints to see if the media query\n // matches and grab the column value from the relevant prop if so\n private getColumns(property: string) {\n let matched;\n\n for (const breakpoint of BREAKPOINTS) {\n const matches = matchBreakpoint(breakpoint);\n\n // Grab the value of the property, if it exists and our\n // media query matches we return the value\n const columns = (this as any)[property + breakpoint.charAt(0).toUpperCase() + breakpoint.slice(1)];\n\n if (matches && columns !== undefined) {\n matched = columns;\n }\n }\n\n // Return the last matched columns since the breakpoints\n // increase in size and we want to return the largest match\n return matched;\n }\n\n private calculateSize() {\n const columns = this.getColumns('size');\n\n // If size wasn't set for any breakpoint\n // or if the user set the size without a value\n // it means we need to stick with the default and return\n // e.g. <ion-col size-md>\n if (!columns || columns === '') {\n return;\n }\n\n // If the size is set to auto then don't calculate a size\n const colSize =\n columns === 'auto'\n ? 'auto'\n : // If CSS supports variables we should use the grid columns var\n SUPPORTS_VARS\n ? `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`\n : // Convert the columns to a percentage by dividing by the total number\n // of columns (12) and then multiplying by 100\n (columns / 12) * 100 + '%';\n\n return {\n 'flex': `0 0 ${colSize}`,\n 'width': `${colSize}`,\n 'max-width': `${colSize}`,\n };\n }\n\n // Called by push, pull, and offset since they use the same calculations\n private calculatePosition(property: string, modifier: string) {\n const columns = this.getColumns(property);\n\n if (!columns) {\n return;\n }\n\n // If the number of columns passed are greater than 0 and less than\n // 12 we can position the column, else default to auto\n const amount = SUPPORTS_VARS\n ? // If CSS supports variables we should use the grid columns var\n `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`\n : // Convert the columns to a percentage by dividing by the total number\n // of columns (12) and then multiplying by 100\n columns > 0 && columns < 12\n ? (columns / 12) * 100 + '%'\n : 'auto';\n\n return {\n [modifier]: amount,\n };\n }\n\n private calculateOffset(isRTL: boolean) {\n return this.calculatePosition('offset', isRTL ? 'margin-right' : 'margin-left');\n }\n\n private calculatePull(isRTL: boolean) {\n return this.calculatePosition('pull', isRTL ? 'left' : 'right');\n }\n\n private calculatePush(isRTL: boolean) {\n return this.calculatePosition('push', isRTL ? 'right' : 'left');\n }\n\n render() {\n const isRTL = document.dir === 'rtl';\n return (\n <Host\n style={{\n ...this.calculateOffset(isRTL),\n ...this.calculatePull(isRTL),\n ...this.calculatePush(isRTL),\n ...this.calculateSize(),\n }}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"cpsl-col.js","sourceRoot":"","sources":["../../../../src/components/cpsl-col/cpsl-col.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAA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["import { Component, Host, Listen, Prop, forceUpdate, h } from '@stencil/core';\nimport { matchBreakpoint } from '../../utils/media';\n\nconst win = typeof (window as any) !== 'undefined' ? (window as any) : undefined;\nconst SUPPORTS_VARS = win && !!(win.CSS && win.CSS.supports && win.CSS.supports('--a: 0'));\nconst BREAKPOINTS = ['', 'xs', 'sm', 'md', 'lg', 'xl'];\n\n@Component({\n tag: 'cpsl-col',\n styleUrl: 'cpsl-col.scss',\n shadow: true,\n})\nexport class CpslCol {\n /**\n * The amount to offset the column, in terms of how many columns it should shift to the end\n * of the total available.\n */\n @Prop() offset?: string;\n\n /**\n * The amount to offset the column for xs screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetXs?: string;\n\n /**\n * The amount to offset the column for sm screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetSm?: string;\n\n /**\n * The amount to offset the column for md screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetMd?: string;\n\n /**\n * The amount to offset the column for lg screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetLg?: string;\n\n /**\n * The amount to offset the column for xl screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() offsetXl?: string;\n\n /**\n * The amount to pull the column, in terms of how many columns it should shift to the start of\n * the total available.\n */\n @Prop() pull?: string;\n\n /**\n * The amount to pull the column for xs screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullXs?: string;\n /**\n * The amount to pull the column for sm screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullSm?: string;\n /**\n * The amount to pull the column for md screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullMd?: string;\n /**\n * The amount to pull the column for lg screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullLg?: string;\n /**\n * The amount to pull the column for xl screens, in terms of how many columns it should shift\n * to the start of the total available.\n */\n @Prop() pullXl?: string;\n\n /**\n * The amount to push the column, in terms of how many columns it should shift to the end\n * of the total available.\n */\n @Prop() push?: string;\n\n /**\n * The amount to push the column for xs screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushXs?: string;\n\n /**\n * The amount to push the column for sm screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushSm?: string;\n\n /**\n * The amount to push the column for md screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushMd?: string;\n\n /**\n * The amount to push the column for lg screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushLg?: string;\n\n /**\n * The amount to push the column for xl screens, in terms of how many columns it should shift\n * to the end of the total available.\n */\n @Prop() pushXl?: string;\n\n /**\n * The size of the column, in terms of how many columns it should take up out of the total\n * available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() size?: string;\n\n /**\n * The size of the column for xs screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeXs?: string;\n\n /**\n * The size of the column for sm screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeSm?: string;\n\n /**\n * The size of the column for md screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeMd?: string;\n\n /**\n * The size of the column for lg screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeLg?: string;\n\n /**\n * The size of the column for xl screens, in terms of how many columns it should take up out\n * of the total available. If `\"auto\"` is passed, the column will be the size of its content.\n */\n @Prop() sizeXl?: string;\n\n @Listen('resize', { target: 'window' })\n onResize() {\n forceUpdate(this);\n }\n\n // Loop through all of the breakpoints to see if the media query\n // matches and grab the column value from the relevant prop if so\n private getColumns(property: string) {\n let matched;\n\n for (const breakpoint of BREAKPOINTS) {\n const matches = matchBreakpoint(breakpoint);\n\n // Grab the value of the property, if it exists and our\n // media query matches we return the value\n const columns = (this as any)[property + breakpoint.charAt(0).toUpperCase() + breakpoint.slice(1)];\n\n if (matches && columns !== undefined) {\n matched = columns;\n }\n }\n\n // Return the last matched columns since the breakpoints\n // increase in size and we want to return the largest match\n return matched;\n }\n\n private calculateSize() {\n const columns = this.getColumns('size');\n\n // If size wasn't set for any breakpoint\n // or if the user set the size without a value\n // it means we need to stick with the default and return\n // e.g. <ion-col size-md>\n if (!columns || columns === '') {\n return;\n }\n\n // If the size is set to auto then don't calculate a size\n const colSize =\n columns === 'auto'\n ? 'auto'\n : // If CSS supports variables we should use the grid columns var\n SUPPORTS_VARS\n ? `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`\n : // Convert the columns to a percentage by dividing by the total number\n // of columns (12) and then multiplying by 100\n (columns / 12) * 100 + '%';\n\n return {\n 'flex': `0 0 ${colSize}`,\n 'width': `${colSize}`,\n 'max-width': `${colSize}`,\n };\n }\n\n // Called by push, pull, and offset since they use the same calculations\n private calculatePosition(property: string, modifier: string) {\n const columns = this.getColumns(property);\n\n if (!columns) {\n return;\n }\n\n // If the number of columns passed are greater than 0 and less than\n // 12 we can position the column, else default to auto\n const amount = SUPPORTS_VARS\n ? // If CSS supports variables we should use the grid columns var\n `calc(calc(${columns} / var(--ion-grid-columns, 12)) * 100%)`\n : // Convert the columns to a percentage by dividing by the total number\n // of columns (12) and then multiplying by 100\n columns > 0 && columns < 12\n ? (columns / 12) * 100 + '%'\n : 'auto';\n\n return {\n [modifier]: amount,\n };\n }\n\n private calculateOffset(isRTL: boolean) {\n return this.calculatePosition('offset', isRTL ? 'margin-right' : 'margin-left');\n }\n\n private calculatePull(isRTL: boolean) {\n return this.calculatePosition('pull', isRTL ? 'left' : 'right');\n }\n\n private calculatePush(isRTL: boolean) {\n return this.calculatePosition('push', isRTL ? 'right' : 'left');\n }\n\n render() {\n const isRTL = document.dir === 'rtl';\n return (\n <Host\n style={{\n ...this.calculateOffset(isRTL),\n ...this.calculatePull(isRTL),\n ...this.calculatePush(isRTL),\n ...this.calculateSize(),\n }}\n >\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
2
2
|
export class CpslDivider {
|
3
3
|
render() {
|
4
|
-
return (h(Host, { key: '
|
4
|
+
return (h(Host, { key: 'd5cffdef9344f7dcac4aae1bc2acca8c02d69946' }, h("div", { key: 'e07f8107804df83537a3b8e40d124c66d2fc6f44' }), h("slot", { key: 'd97f02d46a63d32d107838b5aa50654a9593cc8a' }), h("div", { key: '2316aed010b91a65c961e2f30cc2cde03b892429' })));
|
5
5
|
}
|
6
6
|
static get is() { return "cpsl-divider"; }
|
7
7
|
static get encapsulation() { return "shadow"; }
|
@@ -16,6 +16,7 @@ export class CpslDrawer {
|
|
16
16
|
}
|
17
17
|
componentDidLoad() {
|
18
18
|
this.closedAnchorPosition = `-${this.getContainerHeight()}px`;
|
19
|
+
// Show transition after initial render
|
19
20
|
setTimeout(() => {
|
20
21
|
this.showTransition = true;
|
21
22
|
}, 100);
|
@@ -32,12 +33,12 @@ export class CpslDrawer {
|
|
32
33
|
const setHeight = this.anchor === 'top' || this.anchor === 'bottom';
|
33
34
|
const startingAnchor = (_a = `${this.anchorPosition}px`) !== null && _a !== void 0 ? _a : '0px';
|
34
35
|
const size = this.size === 'auto' ? 'auto' : `${this.size}px`;
|
35
|
-
return (h(Host, { key: '
|
36
|
+
return (h(Host, { key: '9568be6ee1897a96bbdb18dabfd32d40ba6a6fa5', style: Object.assign({ width: setHeight ? '100vw' : size, height: setHeight ? size : '100vh', transitionDuration: `${this.showTransition ? this.transitionDuration : 0}s`, transitionTimingFunction: `${this.transitionFunction}`, [this.anchor]: this.open || this.variant === 'permanent' ? startingAnchor : this.closedAnchorPosition, opacity: this.closedAnchorPosition === undefined ? '0' : '1' }, (Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {})), class: {
|
36
37
|
top: this.anchor === 'top',
|
37
38
|
bottom: this.anchor === 'bottom',
|
38
39
|
left: this.anchor === 'left',
|
39
40
|
right: this.anchor === 'right',
|
40
|
-
} }, this.variant === 'temporary' && !this.noOverlay && h("cpsl-overlay", { open: this.open, zIndexOverride: DEFAULT_Z_INDICES.modal + 1 }), h("div", { key: '
|
41
|
+
} }, this.variant === 'temporary' && !this.noOverlay && (h("cpsl-overlay", { key: '6ef14dc2350c5c37d58eb86e9d8fafd8ffd1c56b', open: this.open, zIndexOverride: DEFAULT_Z_INDICES.modal + 1 })), h("div", { key: '317ce432fcd3865ac162b5a25a5511a15caeab40', id: "container", class: "container", part: "container" }, h("slot", { key: '9c547c861b9146ec5aea40004895e0d5d45138aa' }))));
|
41
42
|
}
|
42
43
|
static get is() { return "cpsl-drawer"; }
|
43
44
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-drawer.js","sourceRoot":"","sources":["../../../../src/components/cpsl-drawer/cpsl-drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAOpD,MAAM,OAAO,UAAU;;;;;;;;;kCAmCiB,IAAI;kCAMJ,aAAa;uBAOL,WAAW;;;IAOzD,gBAAgB;QACd,IAAI,CAAC,oBAAoB,GAAG,IAAI,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"cpsl-drawer.js","sourceRoot":"","sources":["../../../../src/components/cpsl-drawer/cpsl-drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAOpD,MAAM,OAAO,UAAU;;;;;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,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,EACrG,OAAO,EAAE,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IACzD,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,GAE/E,KAAK,EAAE;gBACL,GAAG,EAAE,IAAI,CAAC,MAAM,KAAK,KAAK;gBAC1B,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,QAAQ;gBAChC,IAAI,EAAE,IAAI,CAAC,MAAM,KAAK,MAAM;gBAC5B,KAAK,EAAE,IAAI,CAAC,MAAM,KAAK,OAAO;aAC/B;YAEA,IAAI,CAAC,OAAO,KAAK,WAAW,IAAI,CAAC,IAAI,CAAC,SAAS,IAAI,CAClD,qEAAc,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,cAAc,EAAE,iBAAiB,CAAC,KAAK,GAAG,CAAC,GAAI,CAC/E;YACD,4DAAK,EAAE,EAAC,WAAW,EAAC,KAAK,EAAC,WAAW,EAAC,IAAI,EAAC,WAAW;gBACpD,8DAAa,CACT,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, Element, h, State } from '@stencil/core';\nimport { DEFAULT_Z_INDICES } from '../../constants';\n\n@Component({\n tag: 'cpsl-drawer',\n styleUrl: 'cpsl-drawer.scss',\n shadow: true,\n})\nexport class CpslDrawer {\n @Element() el!: HTMLCpslDrawerElement;\n\n @State() closedAnchorPosition?: string;\n @State() showTransition: boolean;\n\n /**\n * Side from which the drawer will enter from.\n */\n @Prop() anchor: 'top' | 'bottom' | 'left' | 'right';\n\n /**\n * Starting anchor position.\n */\n @Prop() anchorPosition?: number;\n\n /**\n * Hides the overlay for temporary drawers.\n */\n @Prop() noOverlay?: boolean;\n\n /**\n * Whether the drawer is open or not.\n */\n @Prop() open: boolean;\n\n /**\n * Size (height or width) of the drawer.\n */\n @Prop() size: number | 'auto';\n\n /**\n * Duration in seconds of the open/close animation.\n * Default is 0.15.\n */\n @Prop() transitionDuration?: number = 0.15;\n\n /**\n * Transition timing function to use.\n * Default is ease-in-out.\n */\n @Prop() transitionFunction?: string = 'ease-in-out';\n\n /**\n * The variant of the drawer.\n * `temporary` drawers will cover content and contain a backdrop. `permanent` drawers will sit beside content, i.e. desktop navigation.\n * Default is `temporary`.\n */\n @Prop() variant?: 'temporary' | 'permanent' = 'temporary';\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n componentDidLoad() {\n this.closedAnchorPosition = `-${this.getContainerHeight()}px`;\n // Show transition after initial render\n setTimeout(() => {\n this.showTransition = true;\n }, 100);\n }\n\n private getContainerHeight() {\n return this.containerEl?.clientHeight;\n }\n\n private get containerEl() {\n return this.el.shadowRoot.getElementById('container');\n }\n\n render() {\n const setHeight = this.anchor === 'top' || this.anchor === 'bottom';\n const startingAnchor = `${this.anchorPosition}px` ?? '0px';\n const size = this.size === 'auto' ? 'auto' : `${this.size}px`;\n\n return (\n <Host\n style={{\n width: setHeight ? '100vw' : size,\n height: setHeight ? size : '100vh',\n transitionDuration: `${this.showTransition ? this.transitionDuration : 0}s`,\n transitionTimingFunction: `${this.transitionFunction}`,\n [this.anchor]: this.open || this.variant === 'permanent' ? startingAnchor : this.closedAnchorPosition,\n opacity: this.closedAnchorPosition === undefined ? '0' : '1',\n ...(Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {}),\n }}\n class={{\n top: this.anchor === 'top',\n bottom: this.anchor === 'bottom',\n left: this.anchor === 'left',\n right: this.anchor === 'right',\n }}\n >\n {this.variant === 'temporary' && !this.noOverlay && (\n <cpsl-overlay open={this.open} zIndexOverride={DEFAULT_Z_INDICES.modal + 1} />\n )}\n <div id=\"container\" class=\"container\" part=\"container\">\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"]}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
1
|
+
import { Host, h, } from "@stencil/core";
|
2
2
|
import { Icons } from "../../assets/icons";
|
3
3
|
export class CpslDropdown {
|
4
4
|
constructor() {
|
@@ -94,7 +94,7 @@ export class CpslDropdown {
|
|
94
94
|
}
|
95
95
|
render() {
|
96
96
|
var _a, _b, _c;
|
97
|
-
return (h(Host, { key: '
|
97
|
+
return (h(Host, { key: 'a34526653b775141129622b3b2c4f394fe2cd7a3' }, h("button", { key: '5925ed5bfddd0f956cd5f834dc18c4f7434c9cc2', class: "dropdown-button", onClick: this.toggleDropdown }, `${((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.selectedLabel) || ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.label)} ${(_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.value}`, h("div", { key: '74bb9192ad7740af23db871d80492796a4158eee', class: `chevron ${this.isOpen ? '' : 'closed'}`, innerHTML: Icons['chevronUp'] })), h("ul", { key: '981160bd591ee5a41a1e94ad0d4c9ae705381468', class: { 'dropdown-options': true, 'open': this.isOpen }, style: { width: this.width } }, this.hasCpslSearch && (h("li", { key: 'a15daf3ad8ba55d81020c3b07b4c5dedc6119ca7', class: "search-bar" }, h("input", { key: 'fa9e3a1a9bb404de23474a641949c06e8cc11b50', type: "text", placeholder: "Search...", value: this.searchQuery, onInput: this.handleSearchQueryChange }))), this.filteredItems.map(item => (h("li", { onClick: this.handleItemSelect(item) }, h("span", { innerHTML: Icons[item.icon] }), item.label, " ", h("span", { class: "dropdown-value" }, item.value)))))));
|
98
98
|
}
|
99
99
|
static get is() { return "cpsl-dropdown"; }
|
100
100
|
static get encapsulation() { return "shadow"; }
|