@usecapsule/core-components 2.0.10 → 3.0.1-dev.1
Sign up to get free protection for your applications and to get access to all the features.
- package/css/capsule-core.css +134 -30
- 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-415384b7.entry.js → p-127ac658.entry.js} +2 -2
- package/dist/capsule/{p-415384b7.entry.js.map → p-127ac658.entry.js.map} +1 -1
- package/dist/capsule/p-39584a7b.entry.js +2 -0
- package/dist/capsule/p-39584a7b.entry.js.map +1 -0
- package/dist/capsule/{p-b76350fd.entry.js → p-69756614.entry.js} +2 -2
- package/dist/capsule/{p-b76350fd.entry.js.map → p-69756614.entry.js.map} +1 -1
- package/dist/capsule/p-73398222.entry.js +2 -0
- package/dist/capsule/{p-fa4e3c14.entry.js.map → p-73398222.entry.js.map} +1 -1
- package/dist/capsule/p-8de15b15.entry.js +29 -0
- package/dist/capsule/p-8de15b15.entry.js.map +1 -0
- package/dist/capsule/p-97c33636.js +3 -0
- package/dist/capsule/p-97c33636.js.map +1 -0
- package/dist/capsule/p-f2393be6.js +2 -0
- package/dist/capsule/p-f2393be6.js.map +1 -0
- package/dist/capsule/p-f72482c3.entry.js +2 -0
- package/dist/capsule/{p-6b02ea8d.entry.js.map → p-f72482c3.entry.js.map} +1 -1
- package/dist/capsule/{p-4d957466.entry.js → p-fd26ce6e.entry.js} +2 -2
- package/dist/capsule/{p-4d957466.entry.js.map → p-fd26ce6e.entry.js.map} +1 -1
- package/dist/cjs/capsule.cjs.js +10 -10
- package/dist/cjs/capsule.cjs.js.map +1 -1
- package/dist/cjs/constants-9b1b01bb.js +29 -0
- package/dist/cjs/constants-9b1b01bb.js.map +1 -0
- package/dist/cjs/{cpsl-alert_18.cjs.entry.js → cpsl-alert_33.cjs.entry.js} +1136 -232
- package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-animation.cjs.entry.js +1 -1
- package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
- 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 +55 -0
- package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
- package/dist/cjs/index-5293d431.js +1414 -0
- package/dist/cjs/index-5293d431.js.map +1 -0
- package/dist/cjs/index.cjs.js +65 -24
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/icons/brush.svg +3 -0
- package/dist/collection/assets/icons/check-circle.svg +3 -0
- package/dist/collection/assets/icons/chevron-up.svg +2 -2
- package/dist/collection/assets/icons/close.svg +3 -4
- package/dist/collection/assets/icons/cube.svg +3 -0
- package/dist/collection/assets/icons/file.svg +3 -0
- package/dist/collection/assets/icons/home.svg +3 -0
- package/dist/collection/assets/icons/image.svg +3 -0
- package/dist/collection/assets/icons/index.js +13 -3
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/assets/icons/lightning-01.svg +3 -0
- package/dist/collection/assets/icons/lightning.svg +2 -2
- package/dist/collection/assets/icons/menu.svg +3 -0
- package/dist/collection/assets/icons/refresh.svg +3 -0
- package/dist/collection/assets/icons/settings.svg +4 -0
- package/dist/collection/assets/icons/stars.svg +4 -0
- package/dist/collection/assets/icons/x.svg +3 -0
- package/dist/collection/collection-manifest.json +18 -2
- package/dist/collection/components/cpsl-alert/cpsl-alert.css +21 -11
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +34 -26
- package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.css +67 -0
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +85 -0
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -0
- package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js +29 -0
- package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js +37 -0
- package/dist/collection/components/cpsl-app-bar/test/cpsl-app-bar.spec.js.map +1 -0
- package/dist/collection/components/cpsl-avatar/cpsl-avatar.css +31 -0
- package/dist/collection/components/cpsl-avatar/cpsl-avatar.js +81 -0
- package/dist/collection/components/cpsl-avatar/cpsl-avatar.js.map +1 -0
- package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js +29 -0
- package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js +37 -0
- package/dist/collection/components/cpsl-avatar/test/cpsl-avatar.spec.js.map +1 -0
- package/dist/collection/components/cpsl-button/cpsl-button.css +276 -56
- package/dist/collection/components/cpsl-button/cpsl-button.js +104 -7
- package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.css +89 -0
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +78 -0
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js.map +1 -0
- package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js +29 -0
- package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js +37 -0
- package/dist/collection/components/cpsl-button-group/test/cpsl-button-group.spec.js.map +1 -0
- package/dist/collection/components/cpsl-card/cpsl-card.css +81 -0
- package/dist/collection/components/cpsl-card/cpsl-card.js +19 -0
- package/dist/collection/components/cpsl-card/cpsl-card.js.map +1 -0
- package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js +29 -0
- package/dist/collection/components/cpsl-card/test/cpsl-card.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js +37 -0
- package/dist/collection/components/cpsl-card/test/cpsl-card.spec.js.map +1 -0
- package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.css +110 -0
- package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js +64 -0
- package/dist/collection/components/cpsl-checkbox/cpsl-checkbox.js.map +1 -0
- package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js +29 -0
- package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js +37 -0
- package/dist/collection/components/cpsl-checkbox/test/cpsl-checkbox.spec.js.map +1 -0
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +2 -2
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
- package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.css +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.css +90 -0
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +222 -0
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -0
- package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js +29 -0
- package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js +37 -0
- package/dist/collection/components/cpsl-drawer/test/cpsl-drawer.spec.js.map +1 -0
- 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-file-upload/cpsl-file-upload.css +210 -0
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +406 -0
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -0
- package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js +29 -0
- package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js +37 -0
- package/dist/collection/components/cpsl-file-upload/test/cpsl-file-upload.spec.js.map +1 -0
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -2
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.css +39 -22
- package/dist/collection/components/cpsl-input/cpsl-input.js +47 -11
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
- package/dist/collection/components/cpsl-modal/cpsl-modal.css +16 -6
- package/dist/collection/components/cpsl-modal/cpsl-modal.js +21 -2
- package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.css +91 -0
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +224 -0
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -0
- package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js +29 -0
- package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js +37 -0
- package/dist/collection/components/cpsl-modal-v2/test/cpsl-modal-v2.spec.js.map +1 -0
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.css +50 -0
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +78 -0
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js.map +1 -0
- package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js +29 -0
- package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js +37 -0
- package/dist/collection/components/cpsl-nav-button-group/test/cpsl-nav-button-group.spec.js.map +1 -0
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +62 -4
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +35 -17
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.css +67 -0
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.js +174 -0
- package/dist/collection/components/cpsl-pagination/cpsl-pagination.js.map +1 -0
- package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js +29 -0
- package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js +37 -0
- package/dist/collection/components/cpsl-pagination/test/cpsl-pagination.spec.js.map +1 -0
- package/dist/collection/components/cpsl-pill/cpsl-pill.css +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-popover/cpsl-popover.css +98 -0
- package/dist/collection/components/cpsl-popover/cpsl-popover.js +470 -0
- package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -0
- package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js +29 -0
- package/dist/collection/components/cpsl-popover/test/cpsl-popover.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js +37 -0
- package/dist/collection/components/cpsl-popover/test/cpsl-popover.spec.js.map +1 -0
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +1 -1
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
- package/dist/collection/components/cpsl-radio/cpsl-radio.css +97 -0
- package/dist/collection/components/cpsl-radio/cpsl-radio.js +66 -0
- package/dist/collection/components/cpsl-radio/cpsl-radio.js.map +1 -0
- package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js +29 -0
- package/dist/collection/components/cpsl-radio/test/cpsl-radio.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js +37 -0
- package/dist/collection/components/cpsl-radio/test/cpsl-radio.spec.js.map +1 -0
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.css +227 -0
- package/dist/collection/components/cpsl-select/cpsl-select.js +393 -0
- package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -0
- package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js +29 -0
- package/dist/collection/components/cpsl-select/test/cpsl-select.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js +37 -0
- package/dist/collection/components/cpsl-select/test/cpsl-select.spec.js.map +1 -0
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.css +104 -0
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.js +85 -0
- package/dist/collection/components/cpsl-select-item/cpsl-select-item.js.map +1 -0
- package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js +29 -0
- package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js +37 -0
- package/dist/collection/components/cpsl-select-item/test/cpsl-select-item.spec.js.map +1 -0
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +3 -3
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
- package/dist/collection/components/cpsl-switch/cpsl-switch.css +115 -0
- package/dist/collection/components/cpsl-switch/cpsl-switch.js +64 -0
- package/dist/collection/components/cpsl-switch/cpsl-switch.js.map +1 -0
- package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js +29 -0
- package/dist/collection/components/cpsl-switch/test/cpsl-switch.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js +37 -0
- package/dist/collection/components/cpsl-switch/test/cpsl-switch.spec.js.map +1 -0
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-table/cpsl-table.css +140 -0
- package/dist/collection/components/cpsl-table/cpsl-table.js +26 -0
- package/dist/collection/components/cpsl-table/cpsl-table.js.map +1 -0
- package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js +29 -0
- package/dist/collection/components/cpsl-table/test/cpsl-table.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js +37 -0
- package/dist/collection/components/cpsl-table/test/cpsl-table.spec.js.map +1 -0
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +2 -2
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.css +4 -0
- package/dist/collection/components/cpsl-text/cpsl-text.js +5 -4
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
- package/dist/collection/constants.js +14 -0
- package/dist/collection/constants.js.map +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/interface.js.map +1 -1
- package/dist/collection/utils/theme/generateBorderRadii.js +28 -7
- package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
- package/dist/collection/utils/theme/generatePalette.js +30 -18
- package/dist/collection/utils/theme/generatePalette.js.map +1 -1
- package/dist/collection/utils/theme/utils.js +8 -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/constants-fce138fa.js +23 -0
- package/dist/esm/constants-fce138fa.js.map +1 -0
- package/dist/esm/{cpsl-alert_18.entry.js → cpsl-alert_33.entry.js} +1122 -233
- package/dist/esm/cpsl-alert_33.entry.js.map +1 -0
- package/dist/esm/cpsl-animation.entry.js +1 -1
- package/dist/esm/cpsl-col.entry.js +2 -2
- package/dist/esm/cpsl-grid.entry.js +3 -3
- 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 +51 -0
- package/dist/esm/cpsl-modal-v2.entry.js.map +1 -0
- package/dist/esm/cpsl-row.entry.js +2 -2
- package/dist/esm/index-97ed6ec1.js +1383 -0
- package/dist/esm/index-97ed6ec1.js.map +1 -0
- package/dist/esm/index.js +65 -24
- 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.es2017.js +1 -3
- package/dist/loader/index.js +1 -3
- package/dist/types/assets/icons/index.d.ts +12 -2
- package/dist/types/components/cpsl-alert/cpsl-alert.d.ts +2 -2
- package/dist/types/components/cpsl-app-bar/cpsl-app-bar.d.ts +6 -0
- package/dist/types/components/cpsl-avatar/cpsl-avatar.d.ts +6 -0
- package/dist/types/components/cpsl-button/cpsl-button.d.ts +6 -1
- package/dist/types/components/cpsl-button-group/cpsl-button-group.d.ts +9 -0
- package/dist/types/components/cpsl-card/cpsl-card.d.ts +3 -0
- package/dist/types/components/cpsl-checkbox/cpsl-checkbox.d.ts +7 -0
- package/dist/types/components/cpsl-drawer/cpsl-drawer.d.ts +18 -0
- package/dist/types/components/cpsl-file-upload/cpsl-file-upload.d.ts +34 -0
- package/dist/types/components/cpsl-input/cpsl-input.d.ts +5 -1
- package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +1 -0
- package/dist/types/components/cpsl-modal-v2/cpsl-modal-v2.d.ts +17 -0
- package/dist/types/components/cpsl-nav-button-group/cpsl-nav-button-group.d.ts +9 -0
- package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +2 -1
- package/dist/types/components/cpsl-pagination/cpsl-pagination.d.ts +14 -0
- package/dist/types/components/cpsl-popover/cpsl-popover.d.ts +33 -0
- package/dist/types/components/cpsl-radio/cpsl-radio.d.ts +7 -0
- package/dist/types/components/cpsl-select/cpsl-select.d.ts +35 -0
- package/dist/types/components/cpsl-select-item/cpsl-select-item.d.ts +8 -0
- package/dist/types/components/cpsl-switch/cpsl-switch.d.ts +7 -0
- package/dist/types/components/cpsl-table/cpsl-table.d.ts +6 -0
- package/dist/types/components/cpsl-text/cpsl-text.d.ts +1 -1
- package/dist/types/components.d.ts +993 -12
- package/dist/types/constants.d.ts +14 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interface.d.ts +79 -0
- package/dist/types/stencil-public-runtime.d.ts +3 -8
- package/dist/types/utils/theme/utils.d.ts +1 -0
- package/package.json +3 -3
- package/dist/capsule/p-6b02ea8d.entry.js +0 -2
- package/dist/capsule/p-92b0d902.entry.js +0 -29
- package/dist/capsule/p-92b0d902.entry.js.map +0 -1
- package/dist/capsule/p-b2997f3c.js +0 -3
- package/dist/capsule/p-b2997f3c.js.map +0 -1
- package/dist/capsule/p-c2bf050b.js +0 -2
- package/dist/capsule/p-c2bf050b.js.map +0 -1
- package/dist/capsule/p-fa4e3c14.entry.js +0 -2
- package/dist/cjs/constants-4bb85cc5.js +0 -12
- package/dist/cjs/constants-4bb85cc5.js.map +0 -1
- package/dist/cjs/cpsl-alert_18.cjs.entry.js.map +0 -1
- package/dist/cjs/index-87ba56f9.js +0 -2017
- package/dist/cjs/index-87ba56f9.js.map +0 -1
- package/dist/collection/assets/icons/farcaster-brand.svg +0 -10
- package/dist/collection/assets/icons/farcaster.svg +0 -10
- package/dist/esm/constants-7b49abd5.js +0 -9
- package/dist/esm/constants-7b49abd5.js.map +0 -1
- package/dist/esm/cpsl-alert_18.entry.js.map +0 -1
- package/dist/esm/index-fd970ca2.js +0 -1987
- package/dist/esm/index-fd970ca2.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/{vinay → taylorbosch}/Documents/GitHub/Capsule/component-library/core/.stencil/scripts/buildIconLibrary.d.ts +0 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try {
|
5
|
+
step(generator.next(value));
|
6
|
+
}
|
7
|
+
catch (e) {
|
8
|
+
reject(e);
|
9
|
+
} }
|
10
|
+
function rejected(value) { try {
|
11
|
+
step(generator["throw"](value));
|
12
|
+
}
|
13
|
+
catch (e) {
|
14
|
+
reject(e);
|
15
|
+
} }
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
18
|
+
});
|
19
|
+
};
|
20
|
+
import { newSpecPage } from "@stencil/core/testing";
|
21
|
+
import { CpslFileUpload } from "../cpsl-file-upload";
|
22
|
+
describe('cpsl-file-upload', () => {
|
23
|
+
it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
+
const page = yield newSpecPage({
|
25
|
+
components: [CpslFileUpload],
|
26
|
+
html: `<cpsl-file-upload></cpsl-file-upload>`,
|
27
|
+
});
|
28
|
+
expect(page.root).toEqualHtml(`
|
29
|
+
<cpsl-file-upload>
|
30
|
+
<mock:shadow-root>
|
31
|
+
<slot></slot>
|
32
|
+
</mock:shadow-root>
|
33
|
+
</cpsl-file-upload>
|
34
|
+
`);
|
35
|
+
}));
|
36
|
+
});
|
37
|
+
//# sourceMappingURL=cpsl-file-upload.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cpsl-file-upload.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-file-upload/test/cpsl-file-upload.spec.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,IAAI,EAAE,uCAAuC;SAC9C,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;KAM7B,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { CpslFileUpload } from '../cpsl-file-upload';\n\ndescribe('cpsl-file-upload', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslFileUpload],\n html: `<cpsl-file-upload></cpsl-file-upload>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-file-upload>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-file-upload>\n `);\n });\n});\n"]}
|
@@ -4,9 +4,9 @@ export class CpslGrid {
|
|
4
4
|
this.fixed = false;
|
5
5
|
}
|
6
6
|
render() {
|
7
|
-
return (h(Host, { key: '
|
7
|
+
return (h(Host, { key: '76084ea41988e4fdff4a48dc400988d2aa190a56', class: {
|
8
8
|
'grid-fixed': this.fixed,
|
9
|
-
} }, h("slot", { key: '
|
9
|
+
} }, h("slot", { key: '1eb8c755910397d58a2165238a1428769623ef6b' })));
|
10
10
|
}
|
11
11
|
static get is() { return "cpsl-grid"; }
|
12
12
|
static get encapsulation() { return "shadow"; }
|
@@ -6,7 +6,7 @@ export class CpslIcon {
|
|
6
6
|
this.icon = undefined;
|
7
7
|
}
|
8
8
|
render() {
|
9
|
-
return (h(Host, { key: '
|
9
|
+
return (h(Host, { key: 'fe58523210b92237924bd768007f3a191b401a57', part: "icon", role: "img" }, !Boolean(this.icon) ? h("img", { src: this.src }) : h("div", { innerHTML: Icons[this.icon] })));
|
10
10
|
}
|
11
11
|
static get is() { return "cpsl-icon"; }
|
12
12
|
static get encapsulation() { return "shadow"; }
|
@@ -44,7 +44,7 @@ export class CpslIcon {
|
|
44
44
|
"mutable": false,
|
45
45
|
"complexType": {
|
46
46
|
"original": "IconType",
|
47
|
-
"resolved": "\"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\" | \"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"
|
47
|
+
"resolved": "\"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\" | \"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\" | \"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\"",
|
48
48
|
"references": {
|
49
49
|
"IconType": {
|
50
50
|
"location": "import",
|
@@ -71,7 +71,7 @@
|
|
71
71
|
padding-top: var(--box-padding-top);
|
72
72
|
padding-bottom: var(--box-padding-bottom);
|
73
73
|
display: flex;
|
74
|
-
background
|
74
|
+
background: var(--cpsl-color-background-secondary);
|
75
75
|
border: var(--box-border-width) solid var(--cpsl-color-input-border-placeholder);
|
76
76
|
border-radius: var(--box-border-radius);
|
77
77
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
2
2
|
export class CpslInfoBox {
|
3
3
|
render() {
|
4
|
-
return (h(Host, { key: '
|
4
|
+
return (h(Host, { key: '15b85f109d7e5371f6fa35f38dc35f86a061c46c' }, h("div", { key: '39eae7146dfa17771e1d68045255c9b0db5d0a0c', class: "info-box-container" }, h("slot", { key: '008e3552b563dd2f3b6d10bc7afe59b0f2a2ba3a' }))));
|
5
5
|
}
|
6
6
|
static get is() { return "cpsl-info-box"; }
|
7
7
|
static get encapsulation() { return "shadow"; }
|
@@ -55,49 +55,52 @@
|
|
55
55
|
*/
|
56
56
|
:host {
|
57
57
|
--container-box-shadow: none;
|
58
|
-
--container-box-shadow-color:
|
58
|
+
--container-box-shadow-color: none;
|
59
59
|
--container-border-color: var(--cpsl-color-input-border-active);
|
60
60
|
--container-border-error-color: var(--cpsl-color-input-border-error);
|
61
61
|
--container-background-color: var(--cpsl-color-input-surface-default);
|
62
62
|
--container-background-color-disabled: var(--cpsl-color-input-surface-disabled);
|
63
63
|
--container-border-width: 1px;
|
64
64
|
--container-border-radius: var(--cpsl-border-radius-input);
|
65
|
-
--container-padding-top:
|
66
|
-
--container-padding-bottom:
|
67
|
-
--container-padding-end:
|
68
|
-
--container-padding-start:
|
69
|
-
--container-height:
|
65
|
+
--container-padding-top: 0px;
|
66
|
+
--container-padding-bottom: 0px;
|
67
|
+
--container-padding-end: 12px;
|
68
|
+
--container-padding-start: 12px;
|
69
|
+
--container-height: 48px;
|
70
70
|
--container-gap: 8px;
|
71
71
|
--input-background-color: var(--cpsl-color-input-surface-default);
|
72
72
|
--input-background-color-disabled: var(--cpsl-color-input-surface-disabled);
|
73
73
|
--input-color: var(--cpsl-color-text-primary);
|
74
74
|
--input-placeholder-color: var(--cpsl-color-text-secondary);
|
75
75
|
--input-font-size: var(--cpsl-font-size-body-m);
|
76
|
+
--optional-label-color: var(--cpsl-color-text-secondary);
|
76
77
|
--label-color: var(--cpsl-color-text-primary);
|
77
78
|
--label-font-size: var(--cpsl-font-size-body-s);
|
78
|
-
--label-margin-bottom:
|
79
|
+
--label-margin-bottom: 0px;
|
79
80
|
--helper-text-color: var(--cpsl-color-text-secondary);
|
80
81
|
--helper-text-error-color: var(--cpsl-color-text-error);
|
81
82
|
--helper-text-icon-color: var(--cpsl-color-text-secondary);
|
82
83
|
--helper-text-icon-error-color: var(--cpsl-color-text-error);
|
83
84
|
--helper-text-icon-size: 16px;
|
84
85
|
--helper-text-font-size: var(--cpsl-font-size-body-xs);
|
85
|
-
--helper-text-margin-top:
|
86
|
-
|
86
|
+
--helper-text-margin-top: 0px;
|
87
|
+
--button-padding: 4px;
|
88
|
+
display: flex;
|
89
|
+
flex-direction: column;
|
90
|
+
gap: 4px;
|
87
91
|
font-family: var(--cpsl-font-family, inherit);
|
88
92
|
}
|
89
93
|
|
90
|
-
:host(.disabled) {
|
91
|
-
--container-background-color: var(--container-background-color-disabled);
|
92
|
-
--input-background-color: var(--input-background-color-disabled);
|
93
|
-
--input-color: var(--cpsl-color-text-secondary);
|
94
|
-
}
|
95
|
-
|
96
94
|
:host(:not(.has-value)) {
|
97
95
|
--container-border-color: var(--cpsl-color-input-border-placeholder);
|
98
96
|
--input-color: var(--cpsl-color-text-secondary);
|
99
|
-
|
100
|
-
|
97
|
+
}
|
98
|
+
|
99
|
+
:host(.disabled) {
|
100
|
+
--container-background-color: var(--container-background-color-disabled);
|
101
|
+
--input-background-color: var(--input-background-color-disabled);
|
102
|
+
--input-color: var(--cpsl-color-text-disabled);
|
103
|
+
--container-border-color: transparent;
|
101
104
|
}
|
102
105
|
|
103
106
|
:host(.focused) {
|
@@ -122,7 +125,7 @@
|
|
122
125
|
border-width: var(--container-border-width);
|
123
126
|
border-color: var(--container-border-color);
|
124
127
|
border-radius: var(--container-border-radius);
|
125
|
-
background
|
128
|
+
background: var(--container-background-color);
|
126
129
|
box-shadow: var(--container-box-shadow);
|
127
130
|
}
|
128
131
|
|
@@ -138,7 +141,7 @@
|
|
138
141
|
box-sizing: border-box;
|
139
142
|
font-size: var(--input-font-size);
|
140
143
|
color: var(--input-color);
|
141
|
-
background
|
144
|
+
background: var(--input-background-color);
|
142
145
|
font-family: var(--cpsl-font-family, inherit);
|
143
146
|
}
|
144
147
|
.native-input:focus, .native-input:focus-visible {
|
@@ -157,6 +160,13 @@
|
|
157
160
|
margin-bottom: var(--label-margin-bottom);
|
158
161
|
}
|
159
162
|
|
163
|
+
.optional-label {
|
164
|
+
display: inline-block;
|
165
|
+
color: var(--optional-label-color);
|
166
|
+
font-size: var(--label-font-size);
|
167
|
+
font-weight: 500;
|
168
|
+
}
|
169
|
+
|
160
170
|
.helper-text-container {
|
161
171
|
display: flex;
|
162
172
|
align-items: center;
|
@@ -180,15 +190,22 @@
|
|
180
190
|
}
|
181
191
|
|
182
192
|
:host ::slotted([slot=start]) {
|
183
|
-
flex: 0;
|
193
|
+
flex: 0 0 auto;
|
184
194
|
}
|
185
195
|
:host ::slotted([slot=end]) {
|
186
|
-
flex: 0;
|
196
|
+
flex: 0 0 auto;
|
187
197
|
}
|
188
198
|
:host ::slotted(cpsl-icon) {
|
189
199
|
--icon-color: var(--input-color);
|
190
200
|
}
|
191
201
|
:host ::slotted(cpsl-button) {
|
192
|
-
width: calc(var(--container-height) - var(--
|
202
|
+
width: calc(var(--container-height) - var(--button-padding) * 2);
|
203
|
+
height: calc(var(--container-height) - var(--button-padding) * 2);
|
193
204
|
--button-border-radius: calc(var(--container-border-radius) - 2px);
|
205
|
+
}
|
206
|
+
:host slot[name=end]::slotted(cpsl-button) {
|
207
|
+
margin-right: calc((var(--container-padding-end) - var(--button-padding)) * -1);
|
208
|
+
}
|
209
|
+
:host slot[name=start]::slotted(cpsl-button) {
|
210
|
+
margin-left: calc((var(--container-padding-end) - var(--button-padding)) * -1);
|
194
211
|
}
|
@@ -62,6 +62,7 @@ export class CpslInput {
|
|
62
62
|
this.placeholder = undefined;
|
63
63
|
this.readonly = false;
|
64
64
|
this.required = false;
|
65
|
+
this.showOptionalLabel = false;
|
65
66
|
this.spellcheck = false;
|
66
67
|
this.startIconSrc = undefined;
|
67
68
|
this.startIcon = undefined;
|
@@ -78,6 +79,7 @@ export class CpslInput {
|
|
78
79
|
}
|
79
80
|
}
|
80
81
|
componentDidLoad() {
|
82
|
+
this.initButtons();
|
81
83
|
if (Boolean(this.value)) {
|
82
84
|
this.enableSlots();
|
83
85
|
}
|
@@ -88,19 +90,32 @@ export class CpslInput {
|
|
88
90
|
disableSlots() {
|
89
91
|
var _a, _b;
|
90
92
|
if (!this.noAutoDisable) {
|
91
|
-
(_a = this.
|
92
|
-
(_b = this.
|
93
|
+
(_a = this.endEl) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'true');
|
94
|
+
(_b = this.startEl) === null || _b === void 0 ? void 0 : _b.setAttribute('disabled', 'true');
|
93
95
|
}
|
94
96
|
}
|
95
97
|
enableSlots() {
|
96
98
|
var _a, _b;
|
97
|
-
(_a = this.
|
98
|
-
(_b = this.
|
99
|
+
(_a = this.endEl) === null || _a === void 0 ? void 0 : _a.setAttribute('disabled', 'false');
|
100
|
+
(_b = this.startEl) === null || _b === void 0 ? void 0 : _b.setAttribute('disabled', 'false');
|
101
|
+
}
|
102
|
+
initButtons() {
|
103
|
+
var _a, _b;
|
104
|
+
if (((_a = this.endEl) === null || _a === void 0 ? void 0 : _a.tagName) === 'CPSL-BUTTON') {
|
105
|
+
this.endEl.setAttribute('full-width', 'true');
|
106
|
+
this.endEl.addEventListener('mousedown', e => {
|
107
|
+
e.preventDefault();
|
108
|
+
});
|
109
|
+
}
|
110
|
+
if (((_b = this.startEl) === null || _b === void 0 ? void 0 : _b.tagName) === 'CPSL-BUTTON') {
|
111
|
+
this.startEl.setAttribute('full-width', 'true');
|
112
|
+
this.startEl.addEventListener('mousedown', e => {
|
113
|
+
e.preventDefault();
|
114
|
+
});
|
115
|
+
}
|
99
116
|
}
|
100
117
|
emitInputChange(event) {
|
101
|
-
|
102
|
-
const newValue = value == null ? value : value.toString();
|
103
|
-
this.cpslInput.emit({ value: newValue, event });
|
118
|
+
this.cpslInput.emit({ value: this.nativeInput.value, event });
|
104
119
|
}
|
105
120
|
emitValueChange(event) {
|
106
121
|
const { value } = this;
|
@@ -108,12 +123,15 @@ export class CpslInput {
|
|
108
123
|
this.focusedValue = newValue;
|
109
124
|
this.cpslChange.emit({ value: newValue, event });
|
110
125
|
}
|
111
|
-
get
|
112
|
-
return this.el.
|
126
|
+
get startEl() {
|
127
|
+
return this.el.querySelector('[slot="start"]');
|
128
|
+
}
|
129
|
+
get endEl() {
|
130
|
+
return this.el.querySelector('[slot="end"]');
|
113
131
|
}
|
114
132
|
render() {
|
115
133
|
var _a;
|
116
|
-
return (h(Host, { key: '
|
134
|
+
return (h(Host, { key: '9e8eece493074613305b6303e9c095b89ee08eb0', class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.focusedValue) || Boolean(this.value) } }, this.label && (h("label", { key: '97ee8423a02cd2547b764609751fbd301e21ccc9', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? h("span", { class: "optional-label" }, "(optional)") : '')), h("div", { key: '933c4863226a6de14910cfe14b5e48015e6a04fd', class: { 'input-container': true, 'error-container': Boolean(this.errorText) } }, h("slot", { key: 'a69f5c53c2fabc038aca226fb4a3965c1516fe53', name: "start" }), h("input", { key: 'f4a7e5234fe5d6b32e14bc226791d5aea9df151d', class: "native-input", ref: input => (this.nativeInput = input), id: this.inputId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, type: this.type, value: this.value, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.focusInput, onPaste: this.onPaste }), h("slot", { key: '6c74cecde29d9f1f9bf00a05e53197324f83f2bf', name: "end" })), (this.errorText || this.helperText) && (h("div", { key: '245c0413133d70b909415f10cdbfbd21ed03da61', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("span", { key: 'a96f3e844d74ba481418e375ccaeab85cfb92836' }, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
|
117
135
|
}
|
118
136
|
static get is() { return "cpsl-input"; }
|
119
137
|
static get encapsulation() { return "shadow"; }
|
@@ -500,6 +518,24 @@ export class CpslInput {
|
|
500
518
|
"reflect": false,
|
501
519
|
"defaultValue": "false"
|
502
520
|
},
|
521
|
+
"showOptionalLabel": {
|
522
|
+
"type": "boolean",
|
523
|
+
"mutable": false,
|
524
|
+
"complexType": {
|
525
|
+
"original": "boolean",
|
526
|
+
"resolved": "boolean",
|
527
|
+
"references": {}
|
528
|
+
},
|
529
|
+
"required": false,
|
530
|
+
"optional": false,
|
531
|
+
"docs": {
|
532
|
+
"tags": [],
|
533
|
+
"text": "If `true`, the label will display an \"optional\" tag."
|
534
|
+
},
|
535
|
+
"attribute": "show-optional-label",
|
536
|
+
"reflect": false,
|
537
|
+
"defaultValue": "false"
|
538
|
+
},
|
503
539
|
"spellcheck": {
|
504
540
|
"type": "boolean",
|
505
541
|
"mutable": false,
|
@@ -540,7 +576,7 @@ export class CpslInput {
|
|
540
576
|
"mutable": false,
|
541
577
|
"complexType": {
|
542
578
|
"original": "IconType",
|
543
|
-
"resolved": "\"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\" | \"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"check\" | \"chevronUp\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"decentBrand\" | \"decent\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"earth\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"
|
579
|
+
"resolved": "\"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\" | \"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\" | \"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\"",
|
544
580
|
"references": {
|
545
581
|
"IconType": {
|
546
582
|
"location": "import",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-input.js","sourceRoot":"","sources":["../../../../src/components/cpsl-input/cpsl-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AASrG,MAAM,OAAO,SAAS;;QAGZ,YAAO,GAAG,cAAc,QAAQ,EAAE,EAAE,CAAC;QA6PrC,YAAO,GAAG,CAAC,EAAsB,EAAE,EAAE;YAC3C,MAAM,KAAK,GAAG,EAAE,CAAC,MAAiC,CAAC;YACnD,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;gBAC/B,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;YAChE,CAAC;YACD,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAC3B,CAAC,CAAC;QAEM,aAAQ,GAAG,CAAC,EAAS,EAAE,EAAE;YAC/B,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAC3B,CAAC,CAAC;QAEM,WAAM,GAAG,CAAC,EAAc,EAAE,EAAE;YAClC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YAEtB,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;gBAKrC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;YAC3B,CAAC;YAED,IAAI,CAAC,QAAQ,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\nimport { AutocompleteTypes, IconType, TextFieldTypes } from '../../interface';\nimport { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\n\n@Component({\n tag: 'cpsl-input',\n styleUrl: 'cpsl-input.scss',\n shadow: true,\n})\nexport class CpslInput {\n @Element() el!: HTMLCpslInputElement;\n\n private inputId = `cpsl-input-${inputIds++}`;\n /**\n * The value of the input when the input is focused.\n */\n private focusedValue?: string | number | null;\n\n @State() hasFocus = false;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n * Available options: `\"off\"`, `\"none\"`, `\"on\"`, `\"sentences\"`, `\"words\"`, `\"characters\"`.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() autocapitalize = 'off';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: AutocompleteTypes = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * Whether to disable auto disabling of the slotted components.\n */\n @Prop() noAutoDisable: boolean;\n\n /**\n * Sets the [`autofocus` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) on the native input element.\n *\n * This may not be sufficient for the element to be focused on page load.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\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 * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * The label for the input.\n */\n @Prop() label?: string;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string | number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string | number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, `\"date\"`, or `\"password\"`, otherwise it is ignored. When the type attribute is `\"date\"`, `pattern` will only be used in browsers that do not support the `\"date\"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n * This property applies only when the `type` property is set to `\"email\"`,\n * `\"number\"`, `\"password\"`, `\"search\"`, `\"tel\"`, `\"text\"`, or `\"url\"`, otherwise it is ignored.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() spellcheck = false;\n\n /**\n * The external source of the icon at the start of the input. If both `startIcon` and `startIconSrc` are provided, `startIcon` will be used.\n */\n @Prop() startIconSrc?: string;\n\n /**\n * The name of the icon at the start of the input. If both `startIcon` and `startIconSrc` are provided, `startIcon` will be used.\n */\n @Prop() startIcon?: IconType;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The type of control to display. The default type is `text`.\n */\n @Prop() type: TextFieldTypes = 'text';\n\n /**\n * The value of the controlled input.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The `cpslInput` event is fired each time the user modifies the input's value.\n * Unlike the `cpslChange` event, the `cpslInput` event is fired for each alteration\n * to the input's value. This typically happens for each keystroke as the user types.\n *\n * For elements that accept text input (`type=text`, `type=tel`, etc.), the interface\n * is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\n * the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\n * the input is cleared on edit, the type is `null`.\n */\n @Event() cpslInput!: EventEmitter<InputInputEventDetail>;\n\n /**\n * The `cpslChange` event is fired when the user modifies the input's value.\n * Unlike the `cpslInput` event, the `cpslChange` event is only fired when changes\n * are committed, not as the user types.\n *\n * Depending on the way the users interacts with the element, the `cpslChange`\n * event fires at a different moment:\n * - When the element loses focus after its value has changed: for elements\n * where the user's interaction is typing.\n */\n @Event() cpslChange!: EventEmitter<InputChangeEventDetail>;\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 something has been paste into the input.\n */\n @Event() cpslPaste!: EventEmitter<ClipboardEvent>;\n\n @Watch('disabled')\n handleDisable() {\n if (this.disabled) {\n this.disableSlots();\n } else {\n this.enableSlots();\n }\n }\n\n componentDidLoad() {\n if (Boolean(this.value)) {\n this.enableSlots();\n } else {\n this.disableSlots();\n }\n }\n\n private disableSlots() {\n if (!this.noAutoDisable) {\n this.el.querySelector('[slot=\"end\"]')?.setAttribute('disabled', 'true');\n this.el.querySelector('[slot=\"start\"]')?.setAttribute('disabled', 'true');\n }\n }\n\n private enableSlots() {\n this.el.querySelector('[slot=\"end\"]')?.setAttribute('disabled', 'false');\n this.el.querySelector('[slot=\"start\"]')?.setAttribute('disabled', 'false');\n }\n\n /**\n * Emits a `cpslInput` event.\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n\n this.cpslInput.emit({ value: newValue, event });\n }\n\n /**\n * Emits a `cpslChange` event.\n *\n * This API should be called for user committed changes.\n * This API should not be used for external value changes.\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n // Emitting a value change should update the internal state for tracking the focused value\n this.focusedValue = newValue;\n this.cpslChange.emit({ value: newValue, event });\n }\n\n private onInput = (ev: InputEvent | Event) => {\n const input = ev.target as HTMLInputElement | null;\n if (Boolean(input)) {\n this.value = input.value || '';\n input.value === '' ? this.disableSlots() : this.enableSlots();\n }\n this.emitInputChange(ev);\n };\n\n private onChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `cpslChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.cpslBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.cpslFocus.emit(ev);\n };\n\n private onPaste = (ev: ClipboardEvent) => {\n ev.stopPropagation();\n ev.preventDefault();\n\n const input = ev.target as HTMLInputElement;\n const pasteData = ev.clipboardData?.getData('text') || '';\n \n // Manually set the value\n input.value = pasteData;\n this.value = pasteData;\n pasteData === '' ? this.disableSlots() : this.enableSlots();\n\n // Emit the cpslPaste event\n this.cpslPaste.emit(ev);\n\n // Emit the cpslChange event since the value was modified by paste\n this.emitValueChange(ev);\n };\n\n private focusInput = () => {\n this.nativeInput.focus();\n };\n\n private get nativeInput() {\n return this.el.shadowRoot.getElementById(this.inputId);\n }\n\n render() {\n return (\n <Host class={{ 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.focusedValue) || Boolean(this.value) }}>\n {this.label && (\n <label class=\"label\" htmlFor={this.inputId}>\n {this.label}\n </label>\n )}\n <div class={{ 'input-container': true, 'error-container': Boolean(this.errorText) }}>\n <slot name=\"start\"></slot>\n <input\n class=\"native-input\"\n id={this.inputId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder || ''}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n type={this.type}\n value={this.value}\n onInput={this.onInput}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.focusInput}\n onPaste={this.onPaste}\n />\n <slot name=\"end\"></slot>\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\nlet inputIds = 0;\n"]}
|
1
|
+
{"version":3,"file":"cpsl-input.js","sourceRoot":"","sources":["../../../../src/components/cpsl-input/cpsl-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAgB,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AASrG,MAAM,OAAO,SAAS;;QAIZ,YAAO,GAAG,cAAc,QAAQ,EAAE,EAAE,CAAC;QA0RrC,YAAO,GAAG,CAAC,EAAc,EAAE,EAAE;YACnC,MAAM,KAAK,GAAG,EAAE,CAAC,MAAiC,CAAC;YACnD,IAAI,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACnB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Host, Prop, h, Event, EventEmitter, State, Element, Watch } from '@stencil/core';\nimport { AutocompleteTypes, IconType, TextFieldTypes } from '../../interface';\nimport { InputChangeEventDetail, InputInputEventDetail } from './input-interface';\n\n@Component({\n tag: 'cpsl-input',\n styleUrl: 'cpsl-input.scss',\n shadow: true,\n})\nexport class CpslInput {\n private nativeInput?: HTMLInputElement;\n @Element() el!: HTMLCpslInputElement;\n\n private inputId = `cpsl-input-${inputIds++}`;\n /**\n * The value of the input when the input is focused.\n */\n private focusedValue?: string | number | null;\n\n @State() hasFocus = false;\n\n /**\n * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.\n * Available options: `\"off\"`, `\"none\"`, `\"on\"`, `\"sentences\"`, `\"words\"`, `\"characters\"`.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() autocapitalize = 'off';\n\n /**\n * Indicates whether the value of the control can be automatically completed by the browser.\n */\n @Prop() autocomplete: AutocompleteTypes = 'off';\n\n /**\n * Whether auto correction should be enabled when the user is entering/editing the text value.\n */\n @Prop() autocorrect: 'on' | 'off' = 'off';\n\n /**\n * Whether to disable auto disabling of the slotted components.\n */\n @Prop() noAutoDisable: boolean;\n\n /**\n * Sets the [`autofocus` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus) on the native input element.\n *\n * This may not be sufficient for the element to be focused on page load.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() autofocus = false;\n\n /**\n * If `true`, the user cannot interact with the input.\n */\n @Prop() disabled = false;\n\n /**\n * A hint to the browser for which enter key to display.\n * Possible values: `\"enter\"`, `\"done\"`, `\"go\"`, `\"next\"`,\n * `\"previous\"`, `\"search\"`, and `\"send\"`.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() enterkeyhint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\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 * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n /**\n * The label for the input.\n */\n @Prop() label?: string;\n\n /**\n * The maximum value, which must not be less than its minimum (min attribute) value.\n */\n @Prop() max?: string | number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the maximum number of characters that the user can enter.\n */\n @Prop() maxlength?: number;\n\n /**\n * The minimum value, which must not be greater than its maximum (max attribute) value.\n */\n @Prop() min?: string | number;\n\n /**\n * If the value of the type attribute is `text`, `email`, `search`, `password`, `tel`, or `url`, this attribute specifies the minimum number of characters that the user can enter.\n */\n @Prop() minlength?: number;\n\n /**\n * If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `\"email\"`, otherwise it is ignored.\n */\n @Prop() multiple?: boolean;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `\"text\"`, `\"search\"`, `\"tel\"`, `\"url\"`, `\"email\"`, `\"date\"`, or `\"password\"`, otherwise it is ignored. When the type attribute is `\"date\"`, `pattern` will only be used in browsers that do not support the `\"date\"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information.\n */\n @Prop() pattern?: string;\n\n /**\n * Instructional text that shows before the input has a value.\n * This property applies only when the `type` property is set to `\"email\"`,\n * `\"number\"`, `\"password\"`, `\"search\"`, `\"tel\"`, `\"text\"`, or `\"url\"`, otherwise it is ignored.\n */\n @Prop() placeholder?: string;\n\n /**\n * If `true`, the user cannot modify the value.\n */\n @Prop() readonly = false;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required = false;\n\n /**\n * If `true`, the label will display an \"optional\" tag.\n */\n @Prop() showOptionalLabel = false;\n\n /**\n * If `true`, the element will have its spelling and grammar checked.\n */\n // eslint-disable-next-line @stencil-community/reserved-member-names\n @Prop() spellcheck = false;\n\n /**\n * The external source of the icon at the start of the input. If both `startIcon` and `startIconSrc` are provided, `startIcon` will be used.\n */\n @Prop() startIconSrc?: string;\n\n /**\n * The name of the icon at the start of the input. If both `startIcon` and `startIconSrc` are provided, `startIcon` will be used.\n */\n @Prop() startIcon?: IconType;\n\n /**\n * Works with the min and max attributes to limit the increments at which a value can be set.\n * Possible values are: `\"any\"` or a positive floating point number.\n */\n @Prop() step?: string;\n\n /**\n * The type of control to display. The default type is `text`.\n */\n @Prop() type: TextFieldTypes = 'text';\n\n /**\n * The value of the controlled input.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The `cpslInput` event is fired each time the user modifies the input's value.\n * Unlike the `cpslChange` event, the `cpslInput` event is fired for each alteration\n * to the input's value. This typically happens for each keystroke as the user types.\n *\n * For elements that accept text input (`type=text`, `type=tel`, etc.), the interface\n * is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\n * the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\n * the input is cleared on edit, the type is `null`.\n */\n @Event() cpslInput!: EventEmitter<InputInputEventDetail>;\n\n /**\n * The `cpslChange` event is fired when the user modifies the input's value.\n * Unlike the `cpslInput` event, the `cpslChange` event is only fired when changes\n * are committed, not as the user types.\n *\n * Depending on the way the users interacts with the element, the `cpslChange`\n * event fires at a different moment:\n * - When the element loses focus after its value has changed: for elements\n * where the user's interaction is typing.\n */\n @Event() cpslChange!: EventEmitter<InputChangeEventDetail>;\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 something has been paste into the input.\n */\n @Event() cpslPaste!: EventEmitter<ClipboardEvent>;\n\n @Watch('disabled')\n handleDisable() {\n if (this.disabled) {\n this.disableSlots();\n } else {\n this.enableSlots();\n }\n }\n\n /**\n * Update the native input element when the value changes\n */\n // @Watch('value')\n // protected valueChanged() {\n // const nativeInput = this.nativeInput;\n // const value = this.value;\n // if (nativeInput && nativeInput.value !== value) {\n // nativeInput.value = value;\n // }\n // Boolean(value) ? this.disableSlots() : this.enableSlots();\n // }\n\n componentDidLoad() {\n this.initButtons();\n if (Boolean(this.value)) {\n this.enableSlots();\n } else {\n this.disableSlots();\n }\n }\n\n private disableSlots() {\n if (!this.noAutoDisable) {\n this.endEl?.setAttribute('disabled', 'true');\n this.startEl?.setAttribute('disabled', 'true');\n }\n }\n\n private enableSlots() {\n this.endEl?.setAttribute('disabled', 'false');\n this.startEl?.setAttribute('disabled', 'false');\n }\n\n private initButtons() {\n if (this.endEl?.tagName === 'CPSL-BUTTON') {\n this.endEl.setAttribute('full-width', 'true');\n this.endEl.addEventListener('mousedown', e => {\n e.preventDefault();\n });\n }\n if (this.startEl?.tagName === 'CPSL-BUTTON') {\n this.startEl.setAttribute('full-width', 'true');\n this.startEl.addEventListener('mousedown', e => {\n e.preventDefault();\n });\n }\n }\n\n /**\n * Emits a `cpslInput` event.\n */\n private emitInputChange(event?: Event) {\n this.cpslInput.emit({ value: this.nativeInput.value, event });\n }\n\n /**\n * Emits a `cpslChange` event.\n *\n * This API should be called for user committed changes.\n * This API should not be used for external value changes.\n */\n private emitValueChange(event?: Event) {\n const { value } = this;\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n // Emitting a value change should update the internal state for tracking the focused value\n this.focusedValue = newValue;\n this.cpslChange.emit({ value: newValue, event });\n }\n\n private onInput = (ev: InputEvent) => {\n const input = ev.target as HTMLInputElement | null;\n if (Boolean(input)) {\n this.value = input.value || '';\n input.value === '' ? this.disableSlots() : this.enableSlots();\n }\n\n this.emitInputChange(ev);\n };\n\n private onChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n /**\n * Emits the `cpslChange` event when the input value\n * is different than the value when the input was focused.\n */\n this.emitValueChange(ev);\n }\n\n this.cpslBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.cpslFocus.emit(ev);\n };\n\n private onPaste = (ev: ClipboardEvent) => {\n ev.stopPropagation();\n ev.preventDefault();\n\n const input = ev.target as HTMLInputElement;\n const pasteData = ev.clipboardData?.getData('text') || '';\n\n // Manually set the value\n input.value = pasteData;\n this.value = pasteData;\n pasteData === '' ? this.disableSlots() : this.enableSlots();\n\n // Emit the cpslPaste event\n this.cpslPaste.emit(ev);\n\n // Emit the cpslChange event since the value was modified by paste\n this.emitValueChange(ev);\n };\n\n private focusInput = () => {\n this.nativeInput.focus();\n };\n\n private get startEl() {\n return this.el.querySelector('[slot=\"start\"]');\n }\n\n private get endEl() {\n return this.el.querySelector('[slot=\"end\"]');\n }\n\n render() {\n return (\n <Host class={{ 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.focusedValue) || Boolean(this.value) }}>\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 class={{ 'input-container': true, 'error-container': Boolean(this.errorText) }}>\n <slot name=\"start\"></slot>\n <input\n class=\"native-input\"\n ref={input => (this.nativeInput = input)}\n id={this.inputId}\n disabled={this.disabled}\n autoCapitalize={this.autocapitalize}\n autoComplete={this.autocomplete}\n autoCorrect={this.autocorrect}\n autoFocus={this.autofocus}\n enterKeyHint={this.enterkeyhint}\n inputMode={this.inputmode}\n min={this.min}\n max={this.max}\n minLength={this.minlength}\n maxLength={this.maxlength}\n multiple={this.multiple}\n name={this.name}\n pattern={this.pattern}\n placeholder={this.placeholder || ''}\n readOnly={this.readonly}\n required={this.required}\n spellcheck={this.spellcheck}\n type={this.type}\n value={this.value}\n onInput={this.onInput}\n onChange={this.onChange}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onClick={this.focusInput}\n onPaste={this.onPaste}\n />\n <slot name=\"end\"></slot>\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 </Host>\n );\n }\n}\n\nlet inputIds = 0;\n"]}
|
@@ -61,7 +61,7 @@
|
|
61
61
|
--container-border-color: var(--cpsl-color-modal-border);
|
62
62
|
--container-background-color: var(--cpsl-color-modal-surface-footer);
|
63
63
|
--container-padding-bottom: 16px;
|
64
|
-
--container-box-shadow: 0px
|
64
|
+
--container-box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.12);
|
65
65
|
--inner-container-background-color: var(--cpsl-color-modal-surface-main);
|
66
66
|
--inner-container-border-radius: var(--cpsl-border-radius-modal);
|
67
67
|
--inner-container-box-shadow: 0px 1px 2px 0px var(--cpsl-color-alpha-black-8);
|
@@ -70,7 +70,13 @@
|
|
70
70
|
--inner-container-padding-bottom: 24px;
|
71
71
|
--inner-container-padding-start: 16px;
|
72
72
|
--inner-container-margin-bottom: 16px;
|
73
|
-
display:
|
73
|
+
display: block;
|
74
|
+
z-index: 10005;
|
75
|
+
position: relative;
|
76
|
+
}
|
77
|
+
|
78
|
+
:host cpsl-overlay {
|
79
|
+
z-index: 10005;
|
74
80
|
}
|
75
81
|
|
76
82
|
@media (max-width: 480px) {
|
@@ -89,15 +95,19 @@
|
|
89
95
|
}
|
90
96
|
}
|
91
97
|
|
98
|
+
:host(.no-overlay) {
|
99
|
+
z-index: 0;
|
100
|
+
}
|
101
|
+
|
92
102
|
.modal-header {
|
93
103
|
position: sticky;
|
94
104
|
top: 0;
|
95
105
|
padding-top: var(--inner-container-padding-top);
|
96
|
-
background
|
106
|
+
background: var(--inner-container-background-color);
|
97
107
|
}
|
98
108
|
|
99
109
|
.modal-wrapper {
|
100
|
-
z-index:
|
110
|
+
z-index: 10005;
|
101
111
|
position: fixed;
|
102
112
|
top: 0;
|
103
113
|
left: 0;
|
@@ -126,7 +136,7 @@
|
|
126
136
|
border: var(--container-border-width) solid var(--container-border-color);
|
127
137
|
border-radius: var(--container-border-radius);
|
128
138
|
box-shadow: var(--container-box-shadow);
|
129
|
-
background
|
139
|
+
background: var(--container-background-color);
|
130
140
|
max-width: 95vw;
|
131
141
|
max-height: 95vh;
|
132
142
|
max-height: 95dvh;
|
@@ -149,7 +159,7 @@
|
|
149
159
|
margin-bottom: var(--inner-container-margin-bottom);
|
150
160
|
border-radius: var(--inner-container-border-radius);
|
151
161
|
box-shadow: var(--inner-container-box-shadow);
|
152
|
-
background
|
162
|
+
background: var(--inner-container-background-color);
|
153
163
|
}
|
154
164
|
|
155
165
|
.expanded {
|
@@ -16,6 +16,7 @@ export class CpslModal {
|
|
16
16
|
this.footerTransitionDuration = 0.15;
|
17
17
|
this.noOverlay = undefined;
|
18
18
|
this.open = undefined;
|
19
|
+
this.zIndexOverride = undefined;
|
19
20
|
}
|
20
21
|
toggleHeight() {
|
21
22
|
this.footerExpanded ? this.expandFooterTl.play() : this.expandFooterTl.reverse();
|
@@ -37,6 +38,7 @@ export class CpslModal {
|
|
37
38
|
this.initDraggable();
|
38
39
|
gsap.timeline({}).set(this.modalWrapperEl, { scale: 1, opacity: 1, yPercent: this.open ? -100 : 0 });
|
39
40
|
});
|
41
|
+
this.hasFooter = this.footerSlotEl.assignedNodes().length >= 1;
|
40
42
|
this.footerSlotEl.addEventListener('slotchange', () => {
|
41
43
|
if (this.footerSlotEl.assignedNodes().length >= 1) {
|
42
44
|
this.hasFooter = true;
|
@@ -209,9 +211,9 @@ export class CpslModal {
|
|
209
211
|
}
|
210
212
|
render() {
|
211
213
|
if (this.noOverlay) {
|
212
|
-
return h(Host,
|
214
|
+
return (h(Host, { style: Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {}, class: "no-overlay" }, this.Modal));
|
213
215
|
}
|
214
|
-
return (h(Host, { class: { 'include-mobile-styling': true } }, h("cpsl-overlay", { id: "overlay", open: this.open, enterTransitionDuration: this.enterTransitionDuration, exitTransitionDuration: this.exitTransitionDuration }), h("div", { id: "modal-wrapper", class: "modal-wrapper" }, this.Modal)));
|
216
|
+
return (h(Host, { style: Boolean(this.zIndexOverride) ? { zIndex: `${this.zIndexOverride}` } : {}, class: { 'include-mobile-styling': true } }, h("cpsl-overlay", { zIndexOverride: Boolean(this.zIndexOverride) ? this.zIndexOverride : undefined, id: "overlay", open: this.open, enterTransitionDuration: this.enterTransitionDuration, exitTransitionDuration: this.exitTransitionDuration }), h("div", { id: "modal-wrapper", class: "modal-wrapper" }, this.Modal)));
|
215
217
|
}
|
216
218
|
static get is() { return "cpsl-modal"; }
|
217
219
|
static get encapsulation() { return "shadow"; }
|
@@ -331,6 +333,23 @@ export class CpslModal {
|
|
331
333
|
},
|
332
334
|
"attribute": "open",
|
333
335
|
"reflect": false
|
336
|
+
},
|
337
|
+
"zIndexOverride": {
|
338
|
+
"type": "number",
|
339
|
+
"mutable": false,
|
340
|
+
"complexType": {
|
341
|
+
"original": "number",
|
342
|
+
"resolved": "number",
|
343
|
+
"references": {}
|
344
|
+
},
|
345
|
+
"required": false,
|
346
|
+
"optional": true,
|
347
|
+
"docs": {
|
348
|
+
"tags": [],
|
349
|
+
"text": "Override z-index."
|
350
|
+
},
|
351
|
+
"attribute": "z-index-override",
|
352
|
+
"reflect": false
|
334
353
|
}
|
335
354
|
};
|
336
355
|
}
|