@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 @@
|
|
1
|
+
{"version":3,"file":"cpsl-avatar.js","sourceRoot":"","sources":["../../../../src/components/cpsl-avatar/cpsl-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;;;uBAgBkB,QAAQ;;IAE/C,MAAM;;QACJ,OAAO,CACL,EAAC,IAAI;YACH,6DAAM,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE;gBAC9C,4DAAK,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,MAAA,IAAI,CAAC,GAAG,mCAAI,QAAQ,GAAI,CAC5C,CACF,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-avatar',\n styleUrl: 'cpsl-avatar.scss',\n shadow: true,\n})\nexport class CpslAvatar {\n /**\n * The alternate text for the avatar image.\n */\n @Prop() alt?: string;\n\n /**\n * The source of the avatar image.\n */\n @Prop() src: string;\n\n /**\n * The variant of the avatar.\n * Options are: `\"round\"`, `\"square\".\n * Default is: `\"square\"`.\n */\n @Prop() variant?: 'round' | 'square' = 'square';\n\n render() {\n return (\n <Host>\n <span class={{ round: this.variant === 'round' }}>\n <img src={this.src} alt={this.alt ?? 'avatar'} />\n </span>\n </Host>\n );\n }\n}\n"]}
|
@@ -0,0 +1,29 @@
|
|
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 { newE2EPage } from "@stencil/core/testing";
|
21
|
+
describe('cpsl-avatar', () => {
|
22
|
+
it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
+
const page = yield newE2EPage();
|
24
|
+
yield page.setContent('<cpsl-avatar></cpsl-avatar>');
|
25
|
+
const element = yield page.find('cpsl-avatar');
|
26
|
+
expect(element).toHaveClass('hydrated');
|
27
|
+
}));
|
28
|
+
});
|
29
|
+
//# sourceMappingURL=cpsl-avatar.e2e.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cpsl-avatar.e2e.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-avatar/test/cpsl-avatar.e2e.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;QAErD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC/C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('cpsl-avatar', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cpsl-avatar></cpsl-avatar>');\n\n const element = await page.find('cpsl-avatar');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
@@ -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 { CpslAvatar } from "../cpsl-avatar";
|
22
|
+
describe('cpsl-avatar', () => {
|
23
|
+
it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
+
const page = yield newSpecPage({
|
25
|
+
components: [CpslAvatar],
|
26
|
+
html: `<cpsl-avatar></cpsl-avatar>`,
|
27
|
+
});
|
28
|
+
expect(page.root).toEqualHtml(`
|
29
|
+
<cpsl-avatar>
|
30
|
+
<mock:shadow-root>
|
31
|
+
<slot></slot>
|
32
|
+
</mock:shadow-root>
|
33
|
+
</cpsl-avatar>
|
34
|
+
`);
|
35
|
+
}));
|
36
|
+
});
|
37
|
+
//# sourceMappingURL=cpsl-avatar.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cpsl-avatar.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-avatar/test/cpsl-avatar.spec.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,UAAU,CAAC;YACxB,IAAI,EAAE,6BAA6B;SACpC,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 { CpslAvatar } from '../cpsl-avatar';\n\ndescribe('cpsl-avatar', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslAvatar],\n html: `<cpsl-avatar></cpsl-avatar>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-avatar>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-avatar>\n `);\n });\n});\n"]}
|
@@ -54,109 +54,329 @@
|
|
54
54
|
* }
|
55
55
|
*/
|
56
56
|
:host {
|
57
|
-
--button-border-radius: var(--cpsl-border-radius-primary-button);
|
58
57
|
--button-border-width: 1px;
|
59
|
-
--button-
|
60
|
-
--button-
|
61
|
-
--button-
|
62
|
-
--button-
|
58
|
+
--button-border-width-start: var(--button-border-width);
|
59
|
+
--button-border-width-end: var(--button-border-width);
|
60
|
+
--button-border-width-top: var(--button-border-width);
|
61
|
+
--button-border-width-bottom: var(--button-border-width);
|
62
|
+
--button-gap: 8px;
|
63
|
+
--button-justify-content: center;
|
64
|
+
--button-border-radius-top-start: var(--button-border-radius);
|
65
|
+
--button-border-radius-top-end: var(--button-border-radius);
|
66
|
+
--button-border-radius-bottom-end: var(--button-border-radius);
|
67
|
+
--button-border-radius-bottom-start: var(--button-border-radius);
|
63
68
|
--button-padding-start: 16px;
|
64
69
|
--button-padding-end: 16px;
|
65
|
-
--button-
|
66
|
-
|
67
|
-
|
70
|
+
--button-icon-size: var(--cpls-font-size-body-l);
|
71
|
+
--button-font-weight: 500;
|
72
|
+
--button-primary-color: var(--cpsl-color-primary-button-text);
|
73
|
+
--button-primary-background-color: var(--cpsl-color-primary-button-surface-default);
|
74
|
+
--button-primary-border-color: var(--cpsl-color-primary-button-border-default);
|
75
|
+
--button-primary-icon-color: var(--cpsl-color-primary-button-text);
|
76
|
+
--button-primary-disabled-color: var(--cpsl-color-text-disabled);
|
77
|
+
--button-primary-disabled-background-color: var(--cpsl-color-primary-button-surface-disabled);
|
78
|
+
--button-primary-disabled-border-color: var(--cpsl-color-primary-button-border-disabled);
|
79
|
+
--button-primary-disabled-icon-color: var(--cpsl-color-primary-button-text);
|
80
|
+
--button-primary-hover-color: var(--cpsl-color-primary-button-text);
|
81
|
+
--button-primary-hover-background-color: var(--cpsl-color-primary-button-surface-hover);
|
82
|
+
--button-primary-hover-border-color: var(--cpsl-color-primary-button-surface-hover);
|
83
|
+
--button-primary-hover-icon-color: var(--cpsl-color-primary-button-text);
|
84
|
+
--button-primary-active-color: var(--cpsl-color-primary-button-text);
|
85
|
+
--button-primary-active-background-color: var(--cpsl-color-primary-button-surface-pressed);
|
86
|
+
--button-primary-active-border-color: var(--cpsl-color-primary-button-surface-pressed);
|
87
|
+
--button-primary-active-icon-color: var(--cpsl-color-primary-button-text);
|
88
|
+
--button-secondary-color: var(--cpsl-color-secondary-button-text);
|
89
|
+
--button-secondary-background-color: var(--cpsl-color-secondary-button-surface-default);
|
90
|
+
--button-secondary-border-color: var(--cpsl-color-secondary-button-border-default);
|
91
|
+
--button-secondary-icon-color: var(--cpsl-color-secondary-button-text);
|
92
|
+
--button-secondary-disabled-color: var(--cpsl-color-text-disabled);
|
93
|
+
--button-secondary-disabled-background-color: var(--cpsl-color-secondary-button-surface-disabled);
|
94
|
+
--button-secondary-disabled-border-color: var(--cpsl-color-secondary-button-border-disabled);
|
95
|
+
--button-secondary-disabled-icon-color: var(--cpsl-color-secondary-button-text);
|
96
|
+
--button-secondary-hover-color: var(--cpsl-color-secondary-button-text);
|
97
|
+
--button-secondary-hover-background-color: var(--cpsl-color-secondary-button-surface-hover);
|
98
|
+
--button-secondary-hover-border-color: var(--cpsl-color-secondary-button-border-default);
|
99
|
+
--button-secondary-hover-icon-color: var(--cpsl-color-secondary-button-text);
|
100
|
+
--button-secondary-active-color: var(--cpsl-color-secondary-button-text);
|
101
|
+
--button-secondary-active-background-color: var(--cpsl-color-secondary-button-surface-pressed);
|
102
|
+
--button-secondary-active-border-color: var(--cpsl-color-secondary-button-border-default);
|
103
|
+
--button-secondary-active-icon-color: var(--cpsl-color-secondary-button-text);
|
104
|
+
--button-ghost-color: var(--cpsl-color-ghost-button-default);
|
105
|
+
--button-ghost-disabled-color: var(--cpsl-color-ghost-button-disabled);
|
106
|
+
--button-ghost-hover-color: var(--cpsl-color-ghost-button-hover);
|
107
|
+
--button-destructive-color: var(--cpsl-color-destructive-button-text);
|
108
|
+
--button-destructive-background-color: var(--cpsl-color-destructive-button-surface-default);
|
109
|
+
--button-destructive-border-color: var(--cpsl-color-destructive-button-border-default);
|
110
|
+
--button-destructive-icon-color: var(--cpsl-color-destructive-button-text);
|
111
|
+
--button-destructive-disabled-color: var(--cpsl-color-text-disabled);
|
112
|
+
--button-destructive-disabled-background-color: var(--cpsl-color-destructive-button-surface-disabled);
|
113
|
+
--button-destructive-disabled-border-color: var(--cpsl-color-destructive-button-border-disabled);
|
114
|
+
--button-destructive-disabled-icon-color: var(--cpsl-color-destructive-button-text);
|
115
|
+
--button-destructive-hover-color: var(--cpsl-color-destructive-button-text);
|
116
|
+
--button-destructive-hover-background-color: var(--cpsl-color-destructive-button-surface-hover);
|
117
|
+
--button-destructive-hover-border-color: var(--cpsl-color-destructive-button-border-default);
|
118
|
+
--button-destructive-hover-icon-color: var(--cpsl-color-destructive-button-text);
|
119
|
+
--button-destructive-active-color: var(--cpsl-color-destructive-button-text);
|
120
|
+
--button-destructive-active-background-color: var(--cpsl-color-destructive-button-surface-pressed);
|
121
|
+
--button-destructive-active-border-color: var(--cpsl-color-destructive-button-border-default);
|
122
|
+
--button-destructive-active-icon-color: var(--cpsl-color-destructive-button-text);
|
123
|
+
height: fit-content;
|
124
|
+
width: fit-content;
|
125
|
+
display: inline-block;
|
68
126
|
font-family: var(--cpsl-font-family, inherit);
|
127
|
+
-webkit-tap-highlight-color: transparent;
|
128
|
+
}
|
129
|
+
:host a {
|
130
|
+
height: fit-content;
|
131
|
+
width: auto !important;
|
132
|
+
}
|
133
|
+
|
134
|
+
:host(.full-width) {
|
135
|
+
width: 100%;
|
136
|
+
display: block;
|
137
|
+
}
|
138
|
+
:host(.full-width) .button-native {
|
139
|
+
width: 100%;
|
140
|
+
}
|
141
|
+
|
142
|
+
:host(.small) {
|
143
|
+
--button-font-size: var(--cpsl-font-size-body-s);
|
144
|
+
--button-padding-top: 12px;
|
145
|
+
--button-padding-bottom: 12px;
|
146
|
+
--button-icon-size: var(--cpsl-font-size-body-m);
|
147
|
+
}
|
148
|
+
|
149
|
+
:host(.small.primary) {
|
150
|
+
--button-padding-top: 13px;
|
151
|
+
--button-padding-bottom: 13px;
|
152
|
+
}
|
153
|
+
|
154
|
+
:host(.medium) {
|
155
|
+
--button-font-size: var(--cpsl-font-size-body-m);
|
156
|
+
--button-padding-top: 14px;
|
157
|
+
--button-padding-bottom: 14px;
|
158
|
+
--button-icon-size: var(--cpsl-font-size-body-l);
|
159
|
+
}
|
160
|
+
:host(.medium) :host(.primary) {
|
161
|
+
--button-padding-top: 15px;
|
162
|
+
--button-padding-bottom: 15px;
|
163
|
+
}
|
164
|
+
|
165
|
+
:host(.medium.primary) {
|
166
|
+
--button-padding-top: 15px;
|
167
|
+
--button-padding-bottom: 15px;
|
69
168
|
}
|
70
169
|
|
71
|
-
:host(.
|
170
|
+
:host(.disabled) {
|
72
171
|
cursor: default;
|
73
172
|
pointer-events: none;
|
74
173
|
}
|
75
174
|
|
175
|
+
:host ::slotted(cpsl-icon) {
|
176
|
+
--height: var(--button-icon-size);
|
177
|
+
--width: var(--button-icon-size);
|
178
|
+
}
|
179
|
+
|
76
180
|
:host(.primary) {
|
77
|
-
--button-
|
78
|
-
--button-
|
79
|
-
--button-
|
80
|
-
|
81
|
-
|
82
|
-
--button-
|
83
|
-
--button-border-
|
84
|
-
|
181
|
+
--button-border-radius: var(--cpsl-border-radius-primary-button);
|
182
|
+
--button-color: var(--button-primary-color);
|
183
|
+
--button-background-color: var(--button-primary-background-color);
|
184
|
+
--button-border-color: var(--button-primary-border-color);
|
185
|
+
--button-padding-start: 17px;
|
186
|
+
--button-padding-end: 17px;
|
187
|
+
--button-border-width: 0px;
|
188
|
+
}
|
189
|
+
:host(.primary) ::slotted(cpsl-icon) {
|
190
|
+
--icon-color: var(--button-primary-icon-color);
|
191
|
+
}
|
192
|
+
:host(.primary):host(.disabled) {
|
193
|
+
--button-color: var(--button-primary-disabled-color);
|
194
|
+
--button-background-color: var(--button-primary-disabled-background-color);
|
195
|
+
--button-border-color: var(--button-primary-disabled-border-color);
|
85
196
|
--button-outline-color: transparent;
|
86
197
|
}
|
87
|
-
:host(.primary)
|
88
|
-
--
|
198
|
+
:host(.primary):host(.disabled) ::slotted(cpsl-icon) {
|
199
|
+
--icon-color: var(--button-primary-disabled-icon-color);
|
89
200
|
}
|
90
|
-
:host(.primary) :not(.
|
91
|
-
--button-
|
201
|
+
:host(.primary) :not(.disabled):hover {
|
202
|
+
--button-color: var(--button-primary-hover-color);
|
203
|
+
--button-background-color: var(--button-primary-hover-background-color);
|
204
|
+
--button-border-color: var(--button-primary-hover-border-color);
|
92
205
|
}
|
93
|
-
:host(.primary) :not(.
|
94
|
-
--
|
206
|
+
:host(.primary) :not(.disabled):hover ::slotted(cpsl-icon) {
|
207
|
+
--icon-color: var(--button-primary-hover-icon-color);
|
95
208
|
}
|
96
|
-
:host(.primary)
|
97
|
-
--
|
209
|
+
:host(.primary) :not(.disabled):active {
|
210
|
+
--button-color: var(--button-primary-active-color);
|
211
|
+
--button-background-color: var(--button-primary-active-background-color);
|
212
|
+
--button-border-color: var(--button-primary-active-border-color);
|
213
|
+
}
|
214
|
+
:host(.primary) :not(.disabled):active ::slotted(cpsl-icon) {
|
215
|
+
--icon-color: var(--button-primary-active-icon-color);
|
216
|
+
}
|
217
|
+
:host(.primary) :not(.disabled):focus-visible {
|
218
|
+
--button-outline-color: var(--cpsl-color-primary-button-outline);
|
98
219
|
}
|
99
220
|
|
100
221
|
:host(.secondary) {
|
101
|
-
--button-
|
102
|
-
--button-
|
103
|
-
--button-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
--
|
108
|
-
|
222
|
+
--button-border-radius: var(--cpsl-border-radius-destructive-button);
|
223
|
+
--button-color: var(--button-secondary-color);
|
224
|
+
--button-background-color: var(--button-secondary-background-color);
|
225
|
+
--button-border-color: var(--button-secondary-border-color);
|
226
|
+
}
|
227
|
+
:host(.secondary) ::slotted(cpsl-icon) {
|
228
|
+
--icon-color: var(--button-secondary-icon-color);
|
229
|
+
}
|
230
|
+
:host(.secondary):host(.disabled) {
|
231
|
+
--button-color: var(--button-secondary-disabled-color);
|
232
|
+
--button-background-color: var(--button-secondary-disabled-background-color);
|
233
|
+
--button-border-color: var(--button-secondary-disabled-border-color);
|
109
234
|
--button-outline-color: transparent;
|
110
235
|
}
|
111
|
-
:host(.secondary)
|
112
|
-
--
|
236
|
+
:host(.secondary):host(.disabled) ::slotted(cpsl-icon) {
|
237
|
+
--icon-color: var(--button-secondary-disabled-icon-color);
|
113
238
|
}
|
114
|
-
:host(.secondary) :not(.
|
115
|
-
--button-
|
239
|
+
:host(.secondary) :not(.disabled):hover {
|
240
|
+
--button-color: var(--button-secondary-hover-color);
|
241
|
+
--button-border-color: var(--button-secondary-hover-border-color);
|
242
|
+
--button-background-color: var(--button-secondary-hover-background-color);
|
116
243
|
}
|
117
|
-
:host(.secondary) :not(.
|
118
|
-
--
|
244
|
+
:host(.secondary) :not(.disabled):hover ::slotted(cpsl-icon) {
|
245
|
+
--icon-color: var(--button-secondary-hover-icon-color);
|
119
246
|
}
|
120
|
-
:host(.secondary)
|
121
|
-
--
|
247
|
+
:host(.secondary) :not(.disabled):active {
|
248
|
+
--button-color: var(--button-secondary-active-color);
|
249
|
+
--button-border-color: var(--button-secondary-active-border-color);
|
250
|
+
--button-background-color: var(--button-secondary-active-background-color);
|
251
|
+
}
|
252
|
+
:host(.secondary) :not(.disabled):active ::slotted(cpsl-icon) {
|
253
|
+
--icon-color: var(--button-secondary-active-icon-color);
|
254
|
+
}
|
255
|
+
:host(.secondary) :not(.disabled):focus-visible {
|
256
|
+
--button-outline-color: var(--cpsl-color-secondary-button-outline);
|
122
257
|
}
|
123
258
|
|
124
|
-
:host(.
|
125
|
-
--button-color:
|
259
|
+
:host(.ghost) {
|
260
|
+
--button-color: var(--button-ghost-color);
|
126
261
|
--button-background-color: transparent;
|
127
262
|
--button-border-color: transparent;
|
128
|
-
--button-box-shadow: none;
|
129
263
|
--button-outline-color: transparent;
|
264
|
+
--button-padding-start: 0px;
|
265
|
+
--button-padding-end: 0px;
|
266
|
+
--button-padding-top: 0px;
|
267
|
+
--button-padding-bottom: 0px;
|
268
|
+
--button-border-width: 0px;
|
269
|
+
}
|
270
|
+
:host(.ghost) ::slotted(cpsl-icon) {
|
271
|
+
--icon-color: var(--button-ghost-color);
|
272
|
+
--height: var(--cpsl-font-size-body-xl);
|
273
|
+
--width: var(--cpsl-font-size-body-xl);
|
274
|
+
}
|
275
|
+
:host(.ghost):host(.disabled) {
|
276
|
+
--button-color: var(--button-ghost-disabled-color);
|
277
|
+
}
|
278
|
+
:host(.ghost):host(.disabled) ::slotted(cpsl-icon) {
|
279
|
+
--icon-color: var(--button-ghost-disabled-color);
|
280
|
+
}
|
281
|
+
:host(.ghost) :not(.disabled):hover {
|
282
|
+
--button-color: var(--button-ghost-hover-color);
|
283
|
+
}
|
284
|
+
:host(.ghost) :not(.disabled):hover ::slotted(cpsl-icon) {
|
285
|
+
--icon-color: var(--button-ghost-hover-color);
|
286
|
+
}
|
287
|
+
|
288
|
+
:host(.destructive) {
|
289
|
+
--button-border-radius: var(--cpsl-border-radius-secondary-button);
|
290
|
+
--button-color: var(--button-destructive-color);
|
291
|
+
--button-background-color: var(--button-destructive-background-color);
|
292
|
+
--button-border-color: var(--button-destructive-border-color);
|
293
|
+
}
|
294
|
+
:host(.destructive) ::slotted(cpsl-icon) {
|
295
|
+
--icon-color: var(--button-destructive-icon-color);
|
296
|
+
}
|
297
|
+
:host(.destructive):host(.disabled) {
|
298
|
+
--button-color: var(--button-destructive-disabled-color);
|
299
|
+
--button-background-color: var(--button-destructive-disabled-background-color);
|
300
|
+
--button-border-color: var(--button-destructive-disabled-border-color);
|
301
|
+
--button-outline-color: transparent;
|
302
|
+
}
|
303
|
+
:host(.destructive):host(.disabled) ::slotted(cpsl-icon) {
|
304
|
+
--icon-color: var(--button-destructive-disabled-icon-color);
|
305
|
+
}
|
306
|
+
:host(.destructive) :not(.disabled):hover {
|
307
|
+
--button-color: var(--button-destructive-hover-color);
|
308
|
+
--button-border-color: var(--button-destructive-hover-border-color);
|
309
|
+
--button-background-color: var(--button-destructive-hover-background-color);
|
130
310
|
}
|
131
|
-
:host(.
|
132
|
-
--icon-color: var(--
|
311
|
+
:host(.destructive) :not(.disabled):hover ::slotted(cpsl-icon) {
|
312
|
+
--icon-color: var(--button-destructive-hover-icon-color);
|
133
313
|
}
|
134
|
-
:host(.
|
135
|
-
--
|
314
|
+
:host(.destructive) :not(.disabled):active {
|
315
|
+
--button-color: var(--button-destructive-active-color);
|
316
|
+
--button-border-color: var(--button-destructive-active-border-color);
|
317
|
+
--button-background-color: var(--button-destructive-active-background-color);
|
318
|
+
}
|
319
|
+
:host(.destructive) :not(.disabled):active ::slotted(cpsl-icon) {
|
320
|
+
--icon-color: var(--button-destructive-active-icon-color);
|
321
|
+
}
|
322
|
+
:host(.destructive) :not(.disabled):focus-visible {
|
323
|
+
--button-outline-color: var(--cpsl-color-destructive-button-outline);
|
136
324
|
}
|
137
325
|
|
138
326
|
.button-native {
|
139
|
-
border-radius: var(--button-border-radius);
|
327
|
+
border-top-left-radius: var(--button-border-radius-top-start);
|
328
|
+
border-top-right-radius: var(--button-border-radius-top-end);
|
329
|
+
border-bottom-right-radius: var(--button-border-radius-bottom-end);
|
330
|
+
border-bottom-left-radius: var(--button-border-radius-bottom-start);
|
140
331
|
-webkit-padding-start: var(--button-padding-start);
|
141
332
|
padding-inline-start: var(--button-padding-start);
|
142
333
|
-webkit-padding-end: var(--button-padding-end);
|
143
334
|
padding-inline-end: var(--button-padding-end);
|
144
335
|
padding-top: var(--button-padding-top);
|
145
336
|
padding-bottom: var(--button-padding-bottom);
|
146
|
-
font-size: var(--
|
147
|
-
font-weight:
|
148
|
-
|
337
|
+
font-size: var(--button-font-size);
|
338
|
+
font-weight: var(--button-font-weight);
|
339
|
+
font-family: inherit;
|
340
|
+
white-space: nowrap;
|
341
|
+
text-decoration: none;
|
342
|
+
border: 0px solid transparent;
|
343
|
+
border-width: var(--button-border-width-top) var(--button-border-width-end) var(--button-border-width-bottom) var(--button-border-width-start);
|
149
344
|
cursor: pointer;
|
150
345
|
color: var(--button-color);
|
151
|
-
background
|
346
|
+
background: var(--button-background-color);
|
152
347
|
border-color: var(--button-border-color);
|
153
348
|
display: flex;
|
154
|
-
justify-content:
|
349
|
+
justify-content: var(--button-justify-content);
|
155
350
|
align-items: center;
|
156
351
|
height: 100%;
|
157
|
-
width: 100%;
|
158
|
-
box-shadow: var(--button-box-shadow);
|
159
352
|
gap: var(--button-gap);
|
160
353
|
word-break: break-all;
|
161
354
|
outline-color: var(--button-outline-color);
|
355
|
+
-webkit-tap-highlight-color: transparent;
|
356
|
+
}
|
357
|
+
:host-context([dir=rtl]) .button-native {
|
358
|
+
border-top-left-radius: var(--button-border-radius-top-end);
|
359
|
+
border-top-right-radius: var(--button-border-radius-top-start);
|
360
|
+
border-bottom-right-radius: var(--button-border-radius-bottom-start);
|
361
|
+
border-bottom-left-radius: var(--button-border-radius-bottom-end);
|
362
|
+
}
|
363
|
+
|
364
|
+
[dir=rtl] .button-native {
|
365
|
+
border-top-left-radius: var(--button-border-radius-top-end);
|
366
|
+
border-top-right-radius: var(--button-border-radius-top-start);
|
367
|
+
border-bottom-right-radius: var(--button-border-radius-bottom-start);
|
368
|
+
border-bottom-left-radius: var(--button-border-radius-bottom-end);
|
369
|
+
}
|
370
|
+
|
371
|
+
@supports selector(:dir(rtl)) {
|
372
|
+
.button-native:dir(rtl) {
|
373
|
+
border-top-left-radius: var(--button-border-radius-top-end);
|
374
|
+
border-top-right-radius: var(--button-border-radius-top-start);
|
375
|
+
border-bottom-right-radius: var(--button-border-radius-bottom-start);
|
376
|
+
border-bottom-left-radius: var(--button-border-radius-bottom-end);
|
377
|
+
}
|
378
|
+
}
|
379
|
+
|
380
|
+
:host ::slotted(cpsl-text) {
|
381
|
+
color: var(--button-color);
|
162
382
|
}
|
@@ -1,16 +1,25 @@
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
2
2
|
export class CpslButton {
|
3
3
|
constructor() {
|
4
|
+
this.as = 'button';
|
4
5
|
this.disabled = false;
|
6
|
+
this.fullWidth = false;
|
7
|
+
this.href = undefined;
|
8
|
+
this.size = 'medium';
|
9
|
+
this.target = undefined;
|
5
10
|
this.variant = 'primary';
|
6
11
|
}
|
7
12
|
render() {
|
8
|
-
return (h(Host, { key: '
|
13
|
+
return (h(Host, { key: '554350e7af597bd14c9584f9924f73e04fe44093', class: {
|
9
14
|
'primary': this.variant === 'primary',
|
10
15
|
'secondary': this.variant === 'secondary',
|
11
|
-
'
|
12
|
-
'
|
13
|
-
|
16
|
+
'ghost': this.variant === 'ghost',
|
17
|
+
'destructive': this.variant === 'destructive',
|
18
|
+
'disabled': this.disabled,
|
19
|
+
'full-width': this.fullWidth,
|
20
|
+
'small': this.size === 'small',
|
21
|
+
'medium': this.size === 'medium',
|
22
|
+
} }, 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" }))));
|
14
23
|
}
|
15
24
|
static get is() { return "cpsl-button"; }
|
16
25
|
static get encapsulation() { return "shadow"; }
|
@@ -26,6 +35,24 @@ export class CpslButton {
|
|
26
35
|
}
|
27
36
|
static get properties() {
|
28
37
|
return {
|
38
|
+
"as": {
|
39
|
+
"type": "string",
|
40
|
+
"mutable": false,
|
41
|
+
"complexType": {
|
42
|
+
"original": "'button' | 'a'",
|
43
|
+
"resolved": "\"a\" | \"button\"",
|
44
|
+
"references": {}
|
45
|
+
},
|
46
|
+
"required": false,
|
47
|
+
"optional": true,
|
48
|
+
"docs": {
|
49
|
+
"tags": [],
|
50
|
+
"text": "The tag for the button.\nOptions are: `\"button\"`, `\"a\".\nDefault is: `\"button\"`."
|
51
|
+
},
|
52
|
+
"attribute": "as",
|
53
|
+
"reflect": false,
|
54
|
+
"defaultValue": "'button'"
|
55
|
+
},
|
29
56
|
"disabled": {
|
30
57
|
"type": "boolean",
|
31
58
|
"mutable": false,
|
@@ -44,19 +71,89 @@ export class CpslButton {
|
|
44
71
|
"reflect": true,
|
45
72
|
"defaultValue": "false"
|
46
73
|
},
|
74
|
+
"fullWidth": {
|
75
|
+
"type": "boolean",
|
76
|
+
"mutable": false,
|
77
|
+
"complexType": {
|
78
|
+
"original": "boolean",
|
79
|
+
"resolved": "boolean",
|
80
|
+
"references": {}
|
81
|
+
},
|
82
|
+
"required": false,
|
83
|
+
"optional": true,
|
84
|
+
"docs": {
|
85
|
+
"tags": [],
|
86
|
+
"text": "Whether the button takes the full width of it's container.\nDefault is: false."
|
87
|
+
},
|
88
|
+
"attribute": "full-width",
|
89
|
+
"reflect": false,
|
90
|
+
"defaultValue": "false"
|
91
|
+
},
|
92
|
+
"href": {
|
93
|
+
"type": "string",
|
94
|
+
"mutable": false,
|
95
|
+
"complexType": {
|
96
|
+
"original": "string",
|
97
|
+
"resolved": "string",
|
98
|
+
"references": {}
|
99
|
+
},
|
100
|
+
"required": false,
|
101
|
+
"optional": true,
|
102
|
+
"docs": {
|
103
|
+
"tags": [],
|
104
|
+
"text": "href to use when using a link."
|
105
|
+
},
|
106
|
+
"attribute": "href",
|
107
|
+
"reflect": false
|
108
|
+
},
|
109
|
+
"size": {
|
110
|
+
"type": "string",
|
111
|
+
"mutable": false,
|
112
|
+
"complexType": {
|
113
|
+
"original": "'small' | 'medium'",
|
114
|
+
"resolved": "\"medium\" | \"small\"",
|
115
|
+
"references": {}
|
116
|
+
},
|
117
|
+
"required": false,
|
118
|
+
"optional": true,
|
119
|
+
"docs": {
|
120
|
+
"tags": [],
|
121
|
+
"text": "The size of the button.\nOptions are: `\"small\"`, `\"medium\".\nDefault is: `\"medium\"`."
|
122
|
+
},
|
123
|
+
"attribute": "size",
|
124
|
+
"reflect": false,
|
125
|
+
"defaultValue": "'medium'"
|
126
|
+
},
|
127
|
+
"target": {
|
128
|
+
"type": "string",
|
129
|
+
"mutable": false,
|
130
|
+
"complexType": {
|
131
|
+
"original": "string",
|
132
|
+
"resolved": "string",
|
133
|
+
"references": {}
|
134
|
+
},
|
135
|
+
"required": false,
|
136
|
+
"optional": true,
|
137
|
+
"docs": {
|
138
|
+
"tags": [],
|
139
|
+
"text": "target to use when using a link."
|
140
|
+
},
|
141
|
+
"attribute": "target",
|
142
|
+
"reflect": false
|
143
|
+
},
|
47
144
|
"variant": {
|
48
145
|
"type": "string",
|
49
146
|
"mutable": false,
|
50
147
|
"complexType": {
|
51
|
-
"original": "'primary' | 'secondary' | '
|
52
|
-
"resolved": "\"
|
148
|
+
"original": "'primary' | 'secondary' | 'ghost' | 'destructive'",
|
149
|
+
"resolved": "\"destructive\" | \"ghost\" | \"primary\" | \"secondary\"",
|
53
150
|
"references": {}
|
54
151
|
},
|
55
152
|
"required": false,
|
56
153
|
"optional": true,
|
57
154
|
"docs": {
|
58
155
|
"tags": [],
|
59
|
-
"text": "The variant of button.\nOptions are: `\"primary\"`, `\"secondary\", `\"icon\"
|
156
|
+
"text": "The variant of the button.\nOptions are: `\"primary\"`, `\"secondary\", `\"icon\", `\"text\"`.\nDefault is: `\"primary\"`."
|
60
157
|
},
|
61
158
|
"attribute": "variant",
|
62
159
|
"reflect": true,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cpsl-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;
|
1
|
+
{"version":3,"file":"cpsl-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-button/cpsl-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOzD,MAAM,OAAO,UAAU;;kBAMS,QAAQ;wBAMQ,KAAK;yBAMrB,KAAK;;oBAYC,QAAQ;;uBAY2C,SAAS;;IAEhG,MAAM;QACJ,OAAO,CACL,EAAC,IAAI,qDACH,KAAK,EAAE;gBAEL,SAAS,EAAE,IAAI,CAAC,OAAO,KAAK,SAAS;gBACrC,WAAW,EAAE,IAAI,CAAC,OAAO,KAAK,WAAW;gBACzC,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,OAAO;gBACjC,aAAa,EAAE,IAAI,CAAC,OAAO,KAAK,aAAa;gBAE7C,UAAU,EAAE,IAAI,CAAC,QAAQ;gBACzB,YAAY,EAAE,IAAI,CAAC,SAAS;gBAE5B,OAAO,EAAE,IAAI,CAAC,IAAI,KAAK,OAAO;gBAC9B,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,QAAQ;aACjC;YAED,EAAC,IAAI,CAAC,EAAE,qDAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,EAAC,eAAe,EAAC,KAAK,EAAC,eAAe;gBACvF,6DAAM,IAAI,EAAC,OAAO,GAAQ;gBAC1B,8DAAa;gBACb,6DAAM,IAAI,EAAC,KAAK,GAAQ,CAChB,CACL,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-button',\n styleUrl: 'cpsl-button.scss',\n shadow: true,\n})\nexport class CpslButton {\n /**\n * The tag for the button.\n * Options are: `\"button\"`, `\"a\".\n * Default is: `\"button\"`.\n */\n @Prop() as?: 'button' | 'a' = 'button';\n\n /**\n * If the button is disabled.\n * Default is: false.\n */\n @Prop({ reflect: true }) disabled?: boolean = false;\n\n /**\n * Whether the button takes the full width of it's container.\n * Default is: false.\n */\n @Prop() fullWidth?: boolean = false;\n\n /**\n * href to use when using a link.\n */\n @Prop() href?: string;\n\n /**\n * The size of the button.\n * Options are: `\"small\"`, `\"medium\".\n * Default is: `\"medium\"`.\n */\n @Prop() size?: 'small' | 'medium' = 'medium';\n\n /**\n * target to use when using a link.\n */\n @Prop() target?: string;\n\n /**\n * The variant of the button.\n * Options are: `\"primary\"`, `\"secondary\", `\"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"]}
|