@usecapsule/core-components 2.0.0 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/capsule/_commonjsHelpers-bc8ff177.js +36 -0
- package/dist/capsule/_commonjsHelpers-bc8ff177.js.map +1 -0
- package/dist/capsule/capsule.esm.js +52 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/cpsl-alert.entry.js +31 -0
- package/dist/capsule/cpsl-alert.entry.js.map +1 -0
- package/dist/{esm → capsule}/cpsl-animation.entry.js +114 -20
- package/dist/capsule/cpsl-animation.entry.js.map +1 -0
- package/dist/capsule/cpsl-button.entry.js +24 -0
- package/dist/capsule/cpsl-button.entry.js.map +1 -0
- package/dist/capsule/cpsl-code-input.entry.js +106 -0
- package/dist/capsule/cpsl-code-input.entry.js.map +1 -0
- package/dist/{esm → capsule}/cpsl-col.entry.js +3 -4
- package/dist/capsule/cpsl-col.entry.js.map +1 -0
- package/dist/capsule/cpsl-divider.entry.js +17 -0
- package/dist/capsule/cpsl-divider.entry.js.map +1 -0
- package/dist/{esm → capsule}/cpsl-grid.entry.js +4 -5
- package/dist/capsule/cpsl-grid.entry.js.map +1 -0
- package/dist/capsule/cpsl-icon.entry.js +20 -0
- package/dist/capsule/cpsl-icon.entry.js.map +1 -0
- package/dist/{esm → capsule}/cpsl-info-box.entry.js +3 -4
- package/dist/capsule/cpsl-info-box.entry.js.map +1 -0
- package/dist/capsule/cpsl-input.entry.js +124 -0
- package/dist/capsule/cpsl-input.entry.js.map +1 -0
- package/dist/capsule/cpsl-modal.entry.js +3338 -0
- package/dist/capsule/cpsl-modal.entry.js.map +1 -0
- package/dist/capsule/cpsl-overlay.entry.js +44 -0
- package/dist/capsule/cpsl-overlay.entry.js.map +1 -0
- package/dist/capsule/cpsl-pill.entry.js +18 -0
- package/dist/capsule/cpsl-pill.entry.js.map +1 -0
- package/dist/capsule/cpsl-progress-indicator.entry.js +29 -0
- package/dist/capsule/cpsl-progress-indicator.entry.js.map +1 -0
- package/dist/capsule/cpsl-qr-code.entry.js +56 -0
- package/dist/capsule/cpsl-qr-code.entry.js.map +1 -0
- package/dist/capsule/cpsl-row.entry.js +17 -0
- package/dist/capsule/cpsl-row.entry.js.map +1 -0
- package/dist/capsule/cpsl-slide-button.entry.js +130 -0
- package/dist/capsule/cpsl-slide-button.entry.js.map +1 -0
- package/dist/capsule/cpsl-spinner.entry.js +25 -0
- package/dist/capsule/cpsl-spinner.entry.js.map +1 -0
- package/dist/capsule/cpsl-tab.entry.js +37 -0
- package/dist/capsule/cpsl-tab.entry.js.map +1 -0
- package/dist/capsule/cpsl-tabs.entry.js +71 -0
- package/dist/capsule/cpsl-tabs.entry.js.map +1 -0
- package/dist/capsule/cpsl-text.entry.js +66 -0
- package/dist/capsule/cpsl-text.entry.js.map +1 -0
- package/dist/capsule/cpsl-tile-button.entry.js +19 -0
- package/dist/capsule/cpsl-tile-button.entry.js.map +1 -0
- package/dist/capsule/index-3ac1b9e9.js +617 -0
- package/dist/capsule/index-3ac1b9e9.js.map +1 -0
- package/dist/capsule/index-3ad00c7e.js +6064 -0
- package/dist/capsule/index-3ad00c7e.js.map +1 -0
- package/dist/capsule/index-f19e63df.js +4148 -0
- package/dist/capsule/index-f19e63df.js.map +1 -0
- package/dist/capsule/index.esm.js +572 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/shadow-css-bc9e2af8.js +478 -0
- package/dist/capsule/shadow-css-bc9e2af8.js.map +1 -0
- package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +2 -0
- package/dist/types/components/cpsl-text/cpsl-text.d.ts +4 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interface.d.ts +15 -0
- package/dist/types/utils/theme/generateFont.d.ts +1 -1
- package/dist/types/utils/theme/generateTheme.d.ts +1 -2
- package/package.json +2 -2
- package/dist/capsule/p-0462f723.js +0 -2
- package/dist/capsule/p-0462f723.js.map +0 -1
- package/dist/capsule/p-202a85c9.entry.js +0 -29
- package/dist/capsule/p-202a85c9.entry.js.map +0 -1
- package/dist/capsule/p-68c73705.entry.js +0 -2
- package/dist/capsule/p-68c73705.entry.js.map +0 -1
- package/dist/capsule/p-6fb7c4d1.js +0 -3
- package/dist/capsule/p-6fb7c4d1.js.map +0 -1
- package/dist/capsule/p-91412151.entry.js +0 -2
- package/dist/capsule/p-91412151.entry.js.map +0 -1
- package/dist/capsule/p-a95ec4df.entry.js +0 -2
- package/dist/capsule/p-a95ec4df.entry.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-d7be092d.entry.js +0 -10
- package/dist/capsule/p-d7be092d.entry.js.map +0 -1
- package/dist/capsule/p-e1255160.js +0 -2
- package/dist/capsule/p-e1255160.js.map +0 -1
- package/dist/capsule/p-f604b591.entry.js +0 -2
- package/dist/capsule/p-f604b591.entry.js.map +0 -1
- package/dist/cjs/_commonjsHelpers-b3309d7b.js +0 -12
- package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +0 -1
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/capsule.cjs.js +0 -27
- package/dist/cjs/capsule.cjs.js.map +0 -1
- package/dist/cjs/constants-4bb85cc5.js +0 -12
- package/dist/cjs/constants-4bb85cc5.js.map +0 -1
- package/dist/cjs/cpsl-alert_17.cjs.entry.js +0 -10704
- package/dist/cjs/cpsl-alert_17.cjs.entry.js.map +0 -1
- package/dist/cjs/cpsl-animation.cjs.entry.js +0 -20129
- package/dist/cjs/cpsl-animation.cjs.entry.js.map +0 -1
- package/dist/cjs/cpsl-col.cjs.entry.js +0 -125
- package/dist/cjs/cpsl-col.cjs.entry.js.map +0 -1
- package/dist/cjs/cpsl-grid.cjs.entry.js +0 -25
- package/dist/cjs/cpsl-grid.cjs.entry.js.map +0 -1
- package/dist/cjs/cpsl-info-box.cjs.entry.js +0 -22
- package/dist/cjs/cpsl-info-box.cjs.entry.js.map +0 -1
- package/dist/cjs/cpsl-row.cjs.entry.js +0 -22
- package/dist/cjs/cpsl-row.cjs.entry.js.map +0 -1
- package/dist/cjs/index-3fccb5b4.js +0 -2012
- package/dist/cjs/index-3fccb5b4.js.map +0 -1
- package/dist/cjs/index.cjs.js +0 -342
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js +0 -17
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/collection/assets/icons/alert-circle.svg +0 -3
- package/dist/collection/assets/icons/angel-list-brand.svg +0 -3
- package/dist/collection/assets/icons/angel-list.svg +0 -3
- package/dist/collection/assets/icons/apple-brand.svg +0 -3
- package/dist/collection/assets/icons/apple.svg +0 -3
- package/dist/collection/assets/icons/arrow-narrow.svg +0 -3
- package/dist/collection/assets/icons/arrow.svg +0 -3
- package/dist/collection/assets/icons/backup-kit.svg +0 -4
- package/dist/collection/assets/icons/capsule-logo.svg +0 -18
- package/dist/collection/assets/icons/capsule-rings-dark.svg +0 -34
- package/dist/collection/assets/icons/capsule-rings.svg +0 -34
- package/dist/collection/assets/icons/capsule.svg +0 -4
- package/dist/collection/assets/icons/check.svg +0 -3
- package/dist/collection/assets/icons/clock.svg +0 -3
- package/dist/collection/assets/icons/close.svg +0 -4
- package/dist/collection/assets/icons/clubhouse-brand.svg +0 -4
- package/dist/collection/assets/icons/clubhouse.svg +0 -4
- package/dist/collection/assets/icons/copy.svg +0 -3
- package/dist/collection/assets/icons/discord-brand.svg +0 -4
- package/dist/collection/assets/icons/discord.svg +0 -4
- package/dist/collection/assets/icons/download-cloud.svg +0 -3
- package/dist/collection/assets/icons/dribbble-brand.svg +0 -4
- package/dist/collection/assets/icons/dribbble.svg +0 -3
- package/dist/collection/assets/icons/eye-off.svg +0 -3
- package/dist/collection/assets/icons/eye.svg +0 -4
- package/dist/collection/assets/icons/facebook-brand.svg +0 -11
- package/dist/collection/assets/icons/facebook.svg +0 -10
- package/dist/collection/assets/icons/figma-brand.svg +0 -14
- package/dist/collection/assets/icons/figma.svg +0 -3
- package/dist/collection/assets/icons/github-brand.svg +0 -10
- package/dist/collection/assets/icons/github.svg +0 -10
- package/dist/collection/assets/icons/google-brand.svg +0 -13
- package/dist/collection/assets/icons/google.svg +0 -10
- package/dist/collection/assets/icons/help-circle.svg +0 -3
- package/dist/collection/assets/icons/hero-email.svg +0 -12
- package/dist/collection/assets/icons/hero-lock.svg +0 -4
- package/dist/collection/assets/icons/hero-passkey.svg +0 -12
- package/dist/collection/assets/icons/hero-phone.svg +0 -4
- package/dist/collection/assets/icons/hero-wallet.svg +0 -5
- package/dist/collection/assets/icons/index.js +0 -70
- package/dist/collection/assets/icons/index.js.map +0 -1
- package/dist/collection/assets/icons/info-circle.svg +0 -3
- package/dist/collection/assets/icons/instagram-brand.svg +0 -12
- package/dist/collection/assets/icons/instagram.svg +0 -12
- package/dist/collection/assets/icons/key.svg +0 -3
- package/dist/collection/assets/icons/linkedin-brand.svg +0 -10
- package/dist/collection/assets/icons/linkedin.svg +0 -10
- package/dist/collection/assets/icons/mail.svg +0 -3
- package/dist/collection/assets/icons/more-login-options.svg +0 -13
- package/dist/collection/assets/icons/phone.svg +0 -3
- package/dist/collection/assets/icons/pintrest-brand.svg +0 -11
- package/dist/collection/assets/icons/pintrest.svg +0 -10
- package/dist/collection/assets/icons/plus-circle.svg +0 -5
- package/dist/collection/assets/icons/reddit-brand.svg +0 -11
- package/dist/collection/assets/icons/reddit.svg +0 -3
- package/dist/collection/assets/icons/signal-brand.svg +0 -3
- package/dist/collection/assets/icons/signal.svg +0 -3
- package/dist/collection/assets/icons/snapchat-brand.svg +0 -4
- package/dist/collection/assets/icons/snapchat.svg +0 -3
- package/dist/collection/assets/icons/telegram-brand.svg +0 -15
- package/dist/collection/assets/icons/telegram.svg +0 -10
- package/dist/collection/assets/icons/tik-tok-brand.svg +0 -5
- package/dist/collection/assets/icons/tik-tok.svg +0 -3
- package/dist/collection/assets/icons/tumblr-brand.svg +0 -10
- package/dist/collection/assets/icons/tumblr.svg +0 -10
- package/dist/collection/assets/icons/twitter-brand.svg +0 -3
- package/dist/collection/assets/icons/twitter.svg +0 -3
- package/dist/collection/assets/icons/wallet.svg +0 -5
- package/dist/collection/assets/icons/youtube-brand.svg +0 -11
- package/dist/collection/assets/icons/youtube.svg +0 -3
- package/dist/collection/collection-manifest.json +0 -33
- package/dist/collection/components/cpsl-alert/cpsl-alert.css +0 -98
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +0 -80
- package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +0 -1
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js +0 -29
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js +0 -37
- package/dist/collection/components/cpsl-alert/test/cpsl-alert.spec.js.map +0 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.css +0 -17
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +0 -102
- package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +0 -1
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +0 -29
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +0 -37
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +0 -1
- package/dist/collection/components/cpsl-button/cpsl-button.css +0 -162
- package/dist/collection/components/cpsl-button/cpsl-button.js +0 -68
- package/dist/collection/components/cpsl-button/cpsl-button.js.map +0 -1
- package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js +0 -29
- package/dist/collection/components/cpsl-button/test/cpsl-button.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js +0 -37
- package/dist/collection/components/cpsl-button/test/cpsl-button.spec.js.map +0 -1
- package/dist/collection/components/cpsl-code-input/code-change-interface.js +0 -2
- package/dist/collection/components/cpsl-code-input/code-change-interface.js.map +0 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.css +0 -134
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +0 -223
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +0 -1
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js +0 -29
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js +0 -37
- package/dist/collection/components/cpsl-code-input/test/cpsl-code-input.spec.js.map +0 -1
- package/dist/collection/components/cpsl-col/cpsl-col.css +0 -200
- package/dist/collection/components/cpsl-col/cpsl-col.js +0 -528
- package/dist/collection/components/cpsl-col/cpsl-col.js.map +0 -1
- package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js +0 -29
- package/dist/collection/components/cpsl-col/test/cpsl-col.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js +0 -37
- package/dist/collection/components/cpsl-col/test/cpsl-col.spec.js.map +0 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.css +0 -73
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +0 -19
- package/dist/collection/components/cpsl-divider/cpsl-divider.js.map +0 -1
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js +0 -29
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js +0 -37
- package/dist/collection/components/cpsl-divider/test/cpsl-divider.spec.js.map +0 -1
- package/dist/collection/components/cpsl-grid/cpsl-grid.css +0 -235
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +0 -46
- package/dist/collection/components/cpsl-grid/cpsl-grid.js.map +0 -1
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js +0 -29
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js +0 -37
- package/dist/collection/components/cpsl-grid/test/cpsl-grid.spec.js.map +0 -1
- package/dist/collection/components/cpsl-icon/cpsl-icon.css +0 -95
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +0 -68
- package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +0 -1
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js +0 -29
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js +0 -37
- package/dist/collection/components/cpsl-icon/test/cpsl-icon.spec.js.map +0 -1
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +0 -77
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +0 -19
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js.map +0 -1
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js +0 -29
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js +0 -37
- package/dist/collection/components/cpsl-info-box/test/cpsl-info-box.spec.js.map +0 -1
- package/dist/collection/components/cpsl-input/cpsl-input.css +0 -194
- package/dist/collection/components/cpsl-input/cpsl-input.js +0 -708
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +0 -1
- package/dist/collection/components/cpsl-input/input-interface.js +0 -2
- package/dist/collection/components/cpsl-input/input-interface.js.map +0 -1
- package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js +0 -29
- package/dist/collection/components/cpsl-input/test/cpsl-input.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js +0 -37
- package/dist/collection/components/cpsl-input/test/cpsl-input.spec.js.map +0 -1
- package/dist/collection/components/cpsl-modal/cpsl-modal.css +0 -172
- package/dist/collection/components/cpsl-modal/cpsl-modal.js +0 -423
- package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +0 -1
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js +0 -29
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js +0 -37
- package/dist/collection/components/cpsl-modal/test/cpsl-modal.spec.js.map +0 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.css +0 -11
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +0 -108
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +0 -1
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js +0 -29
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js +0 -37
- package/dist/collection/components/cpsl-overlay/test/cpsl-overlay.spec.js.map +0 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.css +0 -92
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +0 -43
- package/dist/collection/components/cpsl-pill/cpsl-pill.js.map +0 -1
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js +0 -29
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js +0 -37
- package/dist/collection/components/cpsl-pill/test/cpsl-pill.spec.js.map +0 -1
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +0 -82
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.js +0 -71
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.js.map +0 -1
- package/dist/collection/components/cpsl-progress-indicator/progress-indicator-interface.js +0 -2
- package/dist/collection/components/cpsl-progress-indicator/progress-indicator-interface.js.map +0 -1
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js +0 -29
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js +0 -37
- package/dist/collection/components/cpsl-progress-indicator/test/cpsl-progress-indicator.spec.js.map +0 -1
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +0 -81
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +0 -107
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js.map +0 -1
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js +0 -29
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js +0 -37
- package/dist/collection/components/cpsl-qr-code/test/cpsl-qr-code.spec.js.map +0 -1
- package/dist/collection/components/cpsl-row/cpsl-row.css +0 -136
- package/dist/collection/components/cpsl-row/cpsl-row.js +0 -19
- package/dist/collection/components/cpsl-row/cpsl-row.js.map +0 -1
- package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js +0 -29
- package/dist/collection/components/cpsl-row/test/cpsl-row.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js +0 -37
- package/dist/collection/components/cpsl-row/test/cpsl-row.spec.js.map +0 -1
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +0 -175
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +0 -252
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js.map +0 -1
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js +0 -29
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js +0 -37
- package/dist/collection/components/cpsl-slide-button/test/cpsl-slide-button.spec.js.map +0 -1
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +0 -68
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +0 -69
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js.map +0 -1
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js +0 -29
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js +0 -37
- package/dist/collection/components/cpsl-spinner/test/cpsl-spinner.spec.js.map +0 -1
- package/dist/collection/components/cpsl-tab/cpsl-tab.css +0 -23
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +0 -121
- package/dist/collection/components/cpsl-tab/cpsl-tab.js.map +0 -1
- package/dist/collection/components/cpsl-tab/tab-interface.js +0 -2
- package/dist/collection/components/cpsl-tab/tab-interface.js.map +0 -1
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js +0 -29
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js +0 -37
- package/dist/collection/components/cpsl-tab/test/cpsl-tab.spec.js.map +0 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +0 -111
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +0 -170
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +0 -1
- package/dist/collection/components/cpsl-tabs/tabs-interface.js +0 -2
- package/dist/collection/components/cpsl-tabs/tabs-interface.js.map +0 -1
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js +0 -29
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js +0 -37
- package/dist/collection/components/cpsl-tabs/test/cpsl-tabs.spec.js.map +0 -1
- package/dist/collection/components/cpsl-text/cpsl-text.css +0 -59
- package/dist/collection/components/cpsl-text/cpsl-text.js +0 -19
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +0 -1
- package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js +0 -29
- package/dist/collection/components/cpsl-text/test/cpsl-text.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js +0 -37
- package/dist/collection/components/cpsl-text/test/cpsl-text.spec.js.map +0 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +0 -97
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +0 -67
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js.map +0 -1
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js +0 -29
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.e2e.js.map +0 -1
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js +0 -37
- package/dist/collection/components/cpsl-tile-button/test/cpsl-tile-button.spec.js.map +0 -1
- package/dist/collection/constants.js +0 -6
- package/dist/collection/constants.js.map +0 -1
- package/dist/collection/index.js +0 -3
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/interface.js +0 -2
- package/dist/collection/interface.js.map +0 -1
- package/dist/collection/utils/media.js +0 -18
- package/dist/collection/utils/media.js.map +0 -1
- package/dist/collection/utils/theme/generateBorderRadii.js +0 -56
- package/dist/collection/utils/theme/generateBorderRadii.js.map +0 -1
- package/dist/collection/utils/theme/generateFont.js +0 -7
- package/dist/collection/utils/theme/generateFont.js.map +0 -1
- package/dist/collection/utils/theme/generatePalette.js +0 -46
- package/dist/collection/utils/theme/generatePalette.js.map +0 -1
- package/dist/collection/utils/theme/generateTheme.js +0 -12
- package/dist/collection/utils/theme/generateTheme.js.map +0 -1
- package/dist/collection/utils/theme/utils.js +0 -21
- package/dist/collection/utils/theme/utils.js.map +0 -1
- package/dist/esm/_commonjsHelpers-1789f0cf.js +0 -9
- package/dist/esm/_commonjsHelpers-1789f0cf.js.map +0 -1
- package/dist/esm/capsule.js +0 -22
- package/dist/esm/capsule.js.map +0 -1
- package/dist/esm/cpsl-alert_17.entry.js +0 -10684
- package/dist/esm/cpsl-alert_17.entry.js.map +0 -1
- package/dist/esm/cpsl-animation.entry.js.map +0 -1
- package/dist/esm/cpsl-col.entry.js.map +0 -1
- package/dist/esm/cpsl-grid.entry.js.map +0 -1
- package/dist/esm/cpsl-info-box.entry.js.map +0 -1
- package/dist/esm/cpsl-row.entry.js +0 -18
- package/dist/esm/cpsl-row.entry.js.map +0 -1
- package/dist/esm/index-f00e090c.js +0 -1982
- package/dist/esm/index-f00e090c.js.map +0 -1
- package/dist/esm/index.js +0 -338
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/loader.js +0 -13
- package/dist/esm/loader.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/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/loader/cdn.js +0 -3
- package/dist/loader/index.cjs.js +0 -3
- package/dist/loader/index.d.ts +0 -21
- package/dist/loader/index.es2017.js +0 -3
- package/dist/loader/index.js +0 -4
- package/dist/loader/package.json +0 -11
- package/dist/scripts/buildIconLibrary.js +0 -33
- package/dist/scripts/buildIconLibrary.js.map +0 -1
- /package/dist/{esm → capsule}/app-globals-0f993ce5.js +0 -0
- /package/dist/{esm → capsule}/app-globals-0f993ce5.js.map +0 -0
- /package/dist/{esm → capsule}/constants-7b49abd5.js +0 -0
- /package/dist/{esm → capsule}/constants-7b49abd5.js.map +0 -0
@@ -1,19 +0,0 @@
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
2
|
-
export class CpslText {
|
3
|
-
render() {
|
4
|
-
return (h(Host, { key: '14b6b911fe1c66fa0dbc118207755123110fd85a' }, h("slot", { key: 'ebf8c3b818cc85fd06bc4feb3d7c2b21818fcc9c' })));
|
5
|
-
}
|
6
|
-
static get is() { return "cpsl-text"; }
|
7
|
-
static get encapsulation() { return "shadow"; }
|
8
|
-
static get originalStyleUrls() {
|
9
|
-
return {
|
10
|
-
"$": ["cpsl-text.scss"]
|
11
|
-
};
|
12
|
-
}
|
13
|
-
static get styleUrls() {
|
14
|
-
return {
|
15
|
-
"$": ["cpsl-text.css"]
|
16
|
-
};
|
17
|
-
}
|
18
|
-
}
|
19
|
-
//# sourceMappingURL=cpsl-text.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"cpsl-text.js","sourceRoot":"","sources":["../../../../src/components/cpsl-text/cpsl-text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAOnD,MAAM,OAAO,QAAQ;IACnB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,8DAAa,CACR,CACR,CAAC;IACJ,CAAC;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-text',\n styleUrl: 'cpsl-text.scss',\n shadow: true,\n})\nexport class CpslText {\n render() {\n return (\n <Host>\n <slot></slot>\n </Host>\n );\n }\n}\n"]}
|
@@ -1,29 +0,0 @@
|
|
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-text', () => {
|
22
|
-
it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
-
const page = yield newE2EPage();
|
24
|
-
yield page.setContent('<cpsl-text></cpsl-text>');
|
25
|
-
const element = yield page.find('cpsl-text');
|
26
|
-
expect(element).toHaveClass('hydrated');
|
27
|
-
}));
|
28
|
-
});
|
29
|
-
//# sourceMappingURL=cpsl-text.e2e.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"cpsl-text.e2e.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-text/test/cpsl-text.e2e.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;QAEjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7C,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-text', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cpsl-text></cpsl-text>');\n\n const element = await page.find('cpsl-text');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
@@ -1,37 +0,0 @@
|
|
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 { CpslText } from "../cpsl-text";
|
22
|
-
describe('cpsl-text', () => {
|
23
|
-
it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
-
const page = yield newSpecPage({
|
25
|
-
components: [CpslText],
|
26
|
-
html: `<cpsl-text></cpsl-text>`,
|
27
|
-
});
|
28
|
-
expect(page.root).toEqualHtml(`
|
29
|
-
<cpsl-text>
|
30
|
-
<mock:shadow-root>
|
31
|
-
<slot></slot>
|
32
|
-
</mock:shadow-root>
|
33
|
-
</cpsl-text>
|
34
|
-
`);
|
35
|
-
}));
|
36
|
-
});
|
37
|
-
//# sourceMappingURL=cpsl-text.spec.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"cpsl-text.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-text/test/cpsl-text.spec.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC;YAC7B,UAAU,EAAE,CAAC,QAAQ,CAAC;YACtB,IAAI,EAAE,yBAAyB;SAChC,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 { CpslText } from '../cpsl-text';\n\ndescribe('cpsl-text', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslText],\n html: `<cpsl-text></cpsl-text>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-text>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-text>\n `);\n });\n});\n"]}
|
@@ -1,97 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Convert a font size to a dynamic font size.
|
3
|
-
* Fonts that participate in Dynamic Type should use
|
4
|
-
* dynamic font sizes.
|
5
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
6
|
-
* @param unit (optional) - The unit to convert to. Use this if you want to
|
7
|
-
* convert to a unit other than $baselineUnit.
|
8
|
-
*/
|
9
|
-
/**
|
10
|
-
* Convert a font size to a dynamic font size but impose
|
11
|
-
* a maximum font size.
|
12
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
13
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
14
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
15
|
-
* convert to a unit other than $baselineUnit.
|
16
|
-
*/
|
17
|
-
/**
|
18
|
-
* Convert a font size to a dynamic font size but impose
|
19
|
-
* a minimum font size.
|
20
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
21
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
22
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
23
|
-
* convert to a unit other than $baselineUnit.
|
24
|
-
*/
|
25
|
-
/**
|
26
|
-
* Convert a font size to a dynamic font size but impose
|
27
|
-
* maximum and minimum font sizes.
|
28
|
-
* @param size - The initial font size including the unit (i.e. px or pt)
|
29
|
-
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
30
|
-
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
31
|
-
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
32
|
-
* convert to a unit other than $baselineUnit.
|
33
|
-
*/
|
34
|
-
/**
|
35
|
-
* A heuristic that applies CSS to tablet
|
36
|
-
* viewports.
|
37
|
-
*
|
38
|
-
* Usage:
|
39
|
-
* @include tablet-viewport() {
|
40
|
-
* :host {
|
41
|
-
* background-color: green;
|
42
|
-
* }
|
43
|
-
* }
|
44
|
-
*/
|
45
|
-
/**
|
46
|
-
* A heuristic that applies CSS to mobile
|
47
|
-
* viewports (i.e. phones, not tablets).
|
48
|
-
*
|
49
|
-
* Usage:
|
50
|
-
* @include mobile-viewport() {
|
51
|
-
* :host {
|
52
|
-
* background-color: blue;
|
53
|
-
* }
|
54
|
-
* }
|
55
|
-
*/
|
56
|
-
:host {
|
57
|
-
--button-icon-color: var(--cpsl-color-text-primary);
|
58
|
-
--button-border-radius: var(--cpsl-border-radius-tile-button);
|
59
|
-
--button-background-color: var(--cpsl-color-tile-button-surface-default);
|
60
|
-
--button-border-color: var(--cpsl-color-tile-button-border);
|
61
|
-
--button-width: 72px;
|
62
|
-
--button-height: 56px;
|
63
|
-
--button-gap: 4px;
|
64
|
-
--button-box-shadow: 0px -4px 4px 0px var(--cpsl-color-alpha-black-2) inset, 0px 4px 4px 0px var(--cpsl-color-alpha-white-4) inset;
|
65
|
-
}
|
66
|
-
|
67
|
-
:host :hover {
|
68
|
-
--button-background-color: var(--cpsl-color-tile-button-surface-hover);
|
69
|
-
}
|
70
|
-
:host :active {
|
71
|
-
--button-background-color: var(--cpsl-color-tile-button-surface-pressed);
|
72
|
-
}
|
73
|
-
|
74
|
-
.button-native {
|
75
|
-
border-radius: var(--button-border-radius);
|
76
|
-
-webkit-padding-start: var(--button-padding-start);
|
77
|
-
padding-inline-start: var(--button-padding-start);
|
78
|
-
-webkit-padding-end: var(--button-padding-end);
|
79
|
-
padding-inline-end: var(--button-padding-end);
|
80
|
-
padding-top: var(--button-padding-top);
|
81
|
-
padding-bottom: var(--button-padding-bottom);
|
82
|
-
border: 1px solid transparent;
|
83
|
-
cursor: pointer;
|
84
|
-
background-color: var(--button-background-color);
|
85
|
-
border-color: var(--button-border-color);
|
86
|
-
display: flex;
|
87
|
-
flex-direction: column;
|
88
|
-
gap: var(--button-gap);
|
89
|
-
align-items: center;
|
90
|
-
justify-content: center;
|
91
|
-
width: var(--button-width);
|
92
|
-
height: var(--button-height);
|
93
|
-
box-shadow: var(--button-box-shadow);
|
94
|
-
}
|
95
|
-
.button-native cpsl-icon {
|
96
|
-
--icon-color: var(--button-icon-color);
|
97
|
-
}
|
@@ -1,67 +0,0 @@
|
|
1
|
-
import { Host, h } from "@stencil/core";
|
2
|
-
export class CpslTileButton {
|
3
|
-
constructor() {
|
4
|
-
this.src = undefined;
|
5
|
-
this.icon = undefined;
|
6
|
-
}
|
7
|
-
render() {
|
8
|
-
return (h(Host, { key: 'f86ee8387b40817115e680cad78b3cab4af7b35f' }, h("button", { key: '7fa11eeed97fd89c8d5640cb270403c6bab8cda1', class: "button-native" }, h("cpsl-icon", { key: '0b605c0839dd930cc97a70fd867619929c3ce5af', exportparts: "icon", src: this.src, icon: this.icon }), h("slot", { key: '8c3fe5d96e1443cd7a454589cdb279a684773a83' }))));
|
9
|
-
}
|
10
|
-
static get is() { return "cpsl-tile-button"; }
|
11
|
-
static get encapsulation() { return "shadow"; }
|
12
|
-
static get originalStyleUrls() {
|
13
|
-
return {
|
14
|
-
"$": ["cpsl-tile-button.scss"]
|
15
|
-
};
|
16
|
-
}
|
17
|
-
static get styleUrls() {
|
18
|
-
return {
|
19
|
-
"$": ["cpsl-tile-button.css"]
|
20
|
-
};
|
21
|
-
}
|
22
|
-
static get properties() {
|
23
|
-
return {
|
24
|
-
"src": {
|
25
|
-
"type": "string",
|
26
|
-
"mutable": false,
|
27
|
-
"complexType": {
|
28
|
-
"original": "string",
|
29
|
-
"resolved": "string",
|
30
|
-
"references": {}
|
31
|
-
},
|
32
|
-
"required": false,
|
33
|
-
"optional": true,
|
34
|
-
"docs": {
|
35
|
-
"tags": [],
|
36
|
-
"text": "The external source of the icon. If both `icon` and `src` are provided, `icon` will be used."
|
37
|
-
},
|
38
|
-
"attribute": "src",
|
39
|
-
"reflect": false
|
40
|
-
},
|
41
|
-
"icon": {
|
42
|
-
"type": "string",
|
43
|
-
"mutable": false,
|
44
|
-
"complexType": {
|
45
|
-
"original": "IconType",
|
46
|
-
"resolved": "\"alertCircle\" | \"angelListBrand\" | \"angelList\" | \"appleBrand\" | \"apple\" | \"arrowNarrow\" | \"arrow\" | \"backupKit\" | \"capsuleLogo\" | \"capsuleRingsDark\" | \"capsuleRings\" | \"capsule\" | \"check\" | \"clock\" | \"close\" | \"clubhouseBrand\" | \"clubhouse\" | \"copy\" | \"discordBrand\" | \"discord\" | \"downloadCloud\" | \"dribbbleBrand\" | \"dribbble\" | \"eyeOff\" | \"eye\" | \"facebookBrand\" | \"facebook\" | \"figmaBrand\" | \"figma\" | \"githubBrand\" | \"github\" | \"googleBrand\" | \"google\" | \"helpCircle\" | \"heroEmail\" | \"heroLock\" | \"heroPasskey\" | \"heroPhone\" | \"heroWallet\" | \"infoCircle\" | \"instagramBrand\" | \"instagram\" | \"key\" | \"linkedinBrand\" | \"linkedin\" | \"mail\" | \"moreLoginOptions\" | \"phone\" | \"pintrestBrand\" | \"pintrest\" | \"plusCircle\" | \"redditBrand\" | \"reddit\" | \"signalBrand\" | \"signal\" | \"snapchatBrand\" | \"snapchat\" | \"telegramBrand\" | \"telegram\" | \"tikTokBrand\" | \"tikTok\" | \"tumblrBrand\" | \"tumblr\" | \"twitterBrand\" | \"twitter\" | \"wallet\" | \"youtubeBrand\" | \"youtube\"",
|
47
|
-
"references": {
|
48
|
-
"IconType": {
|
49
|
-
"location": "import",
|
50
|
-
"path": "../../interface",
|
51
|
-
"id": "src/interface.ts::IconType"
|
52
|
-
}
|
53
|
-
}
|
54
|
-
},
|
55
|
-
"required": false,
|
56
|
-
"optional": true,
|
57
|
-
"docs": {
|
58
|
-
"tags": [],
|
59
|
-
"text": "The name of the icon. If both `icon` and `src` are provided, `icon` will be used."
|
60
|
-
},
|
61
|
-
"attribute": "icon",
|
62
|
-
"reflect": false
|
63
|
-
}
|
64
|
-
};
|
65
|
-
}
|
66
|
-
}
|
67
|
-
//# sourceMappingURL=cpsl-tile-button.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"cpsl-tile-button.js","sourceRoot":"","sources":["../../../../src/components/cpsl-tile-button/cpsl-tile-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAQzD,MAAM,OAAO,cAAc;;;;;IAWzB,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,+DAAQ,KAAK,EAAC,eAAe;gBAC3B,kEAAW,WAAW,EAAC,MAAM,EAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAI;gBAChE,8DAAa,CACN,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Host, h, Prop } from '@stencil/core';\nimport { IconType } from '../../interface';\n\n@Component({\n tag: 'cpsl-tile-button',\n styleUrl: 'cpsl-tile-button.scss',\n shadow: true,\n})\nexport class CpslTileButton {\n /**\n * The external source of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() src?: string;\n\n /**\n * The name of the icon. If both `icon` and `src` are provided, `icon` will be used.\n */\n @Prop() icon?: IconType;\n\n render() {\n return (\n <Host>\n <button class=\"button-native\">\n <cpsl-icon exportparts=\"icon\" src={this.src} icon={this.icon} />\n <slot></slot>\n </button>\n </Host>\n );\n }\n}\n"]}
|
@@ -1,29 +0,0 @@
|
|
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-tile-button', () => {
|
22
|
-
it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
|
23
|
-
const page = yield newE2EPage();
|
24
|
-
yield page.setContent('<cpsl-tile-button></cpsl-tile-button>');
|
25
|
-
const element = yield page.find('cpsl-tile-button');
|
26
|
-
expect(element).toHaveClass('hydrated');
|
27
|
-
}));
|
28
|
-
});
|
29
|
-
//# sourceMappingURL=cpsl-tile-button.e2e.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"cpsl-tile-button.e2e.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-tile-button/test/cpsl-tile-button.e2e.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,EAAE,CAAC,SAAS,EAAE,GAAS,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,uCAAuC,CAAC,CAAC;QAE/D,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACpD,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-tile-button', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n await page.setContent('<cpsl-tile-button></cpsl-tile-button>');\n\n const element = await page.find('cpsl-tile-button');\n expect(element).toHaveClass('hydrated');\n });\n});\n"]}
|
@@ -1,37 +0,0 @@
|
|
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 { CpslTileButton } from "../cpsl-tile-button";
|
22
|
-
describe('cpsl-tile-button', () => {
|
23
|
-
it('renders', () => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
-
const page = yield newSpecPage({
|
25
|
-
components: [CpslTileButton],
|
26
|
-
html: `<cpsl-tile-button></cpsl-tile-button>`,
|
27
|
-
});
|
28
|
-
expect(page.root).toEqualHtml(`
|
29
|
-
<cpsl-tile-button>
|
30
|
-
<mock:shadow-root>
|
31
|
-
<slot></slot>
|
32
|
-
</mock:shadow-root>
|
33
|
-
</cpsl-tile-button>
|
34
|
-
`);
|
35
|
-
}));
|
36
|
-
});
|
37
|
-
//# sourceMappingURL=cpsl-tile-button.spec.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"cpsl-tile-button.spec.js","sourceRoot":"","sources":["../../../../../src/components/cpsl-tile-button/test/cpsl-tile-button.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 { CpslTileButton } from '../cpsl-tile-button';\n\ndescribe('cpsl-tile-button', () => {\n it('renders', async () => {\n const page = await newSpecPage({\n components: [CpslTileButton],\n html: `<cpsl-tile-button></cpsl-tile-button>`,\n });\n expect(page.root).toEqualHtml(`\n <cpsl-tile-button>\n <mock:shadow-root>\n <slot></slot>\n </mock:shadow-root>\n </cpsl-tile-button>\n `);\n });\n});\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,eAAe,EAAE,SAAS;IAC1B,eAAe,EAAE,SAAS;CAC3B,CAAC","sourcesContent":["import { Theme } from './interface';\n\nexport const MOBILE_SIZE = 480;\n\nexport const DEFAULT_THEME: Theme = {\n foregroundColor: '#121212',\n backgroundColor: '#FAFAFA',\n};\n"]}
|
package/dist/collection/index.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,6BAA6B,CAAC","sourcesContent":["export * from './components';\n\nexport { default as generateTheme } from './utils/theme/generateTheme';\nexport type { Theme, BorderRadius } from './interface';\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"interface.js","sourceRoot":"","sources":["../../src/interface.ts"],"names":[],"mappings":"","sourcesContent":["import { Icons } from './assets/icons';\n\nexport type PredefinedColors = 'primary' | 'secondary' | 'tertiary' | 'success' | 'warning' | 'danger' | 'light' | 'medium' | 'dark';\n\n// From: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\nexport type AutocompleteTypes =\n | 'on'\n | 'off'\n | 'name'\n | 'honorific-prefix'\n | 'given-name'\n | 'additional-name'\n | 'family-name'\n | 'honorific-suffix'\n | 'nickname'\n | 'email'\n | 'username'\n | 'new-password'\n | 'current-password'\n | 'one-time-code'\n | 'organization-title'\n | 'organization'\n | 'street-address'\n | 'address-line1'\n | 'address-line2'\n | 'address-line3'\n | 'address-level4'\n | 'address-level3'\n | 'address-level2'\n | 'address-level1'\n | 'country'\n | 'country-name'\n | 'postal-code'\n | 'cc-name'\n | 'cc-given-name'\n | 'cc-additional-name'\n | 'cc-family-name'\n | 'cc-family-name'\n | 'cc-number'\n | 'cc-exp'\n | 'cc-exp-month'\n | 'cc-exp-year'\n | 'cc-csc'\n | 'cc-type'\n | 'transaction-currency'\n | 'transaction-amount'\n | 'language'\n | 'bday'\n | 'bday-day'\n | 'bday-month'\n | 'bday-year'\n | 'sex'\n | 'tel'\n | 'tel-country-code'\n | 'tel-national'\n | 'tel-area-code'\n | 'tel-local'\n | 'tel-extension'\n | 'impp'\n | 'url'\n | 'photo';\n\nexport type TextFieldTypes = 'date' | 'email' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'url' | 'time' | 'week' | 'month' | 'datetime-local';\n\nexport type LiteralUnion<T extends U, U = string> = T | (U & Record<never, never>);\n\nexport type Color = LiteralUnion<PredefinedColors, string>;\n\nexport type CssClassMap = { [className: string]: boolean };\n\nexport type IconType = keyof typeof Icons;\n\nexport type Theme = {\n foregroundColor?: string;\n backgroundColor?: string;\n borderRadius?: BorderRadius;\n font?: string;\n customPalette?: CustomPalette;\n};\n\nexport type BorderRadius = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'full';\n\nexport interface CustomPalette {\n text?: {\n primary?: string;\n secondary?: string;\n subtle?: string;\n inverted?: string;\n error?: string;\n };\n modal?: {\n surface?: {\n main?: string;\n footer?: string;\n };\n border?: string;\n };\n input?: {\n surface?: {\n disabled?: string;\n default?: string;\n };\n border?: {\n placeholder?: string;\n active?: string;\n error?: string;\n };\n };\n tileButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n };\n border?: string;\n };\n primaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n secondaryButton?: {\n surface?: {\n default?: string;\n hover?: string;\n pressed?: string;\n disabled?: string;\n };\n border?: {\n default?: string;\n disabled?: string;\n };\n outline?: string;\n };\n divider?: string;\n spinner?: {\n path?: string;\n circle?: string;\n };\n pill?: {\n text?: string;\n container?: {\n background?: string;\n border?: string;\n };\n };\n progressIndicator?: {\n active?: string;\n next?: string;\n previous?: string;\n };\n qr?: {\n fill?: string;\n background?: string;\n border?: string;\n };\n slideButton?: {\n slider?: {\n background?: string;\n border?: string;\n text?: string;\n container?: {\n start?: {\n background?: string;\n border?: string;\n };\n end?: {\n background?: string;\n border?: string;\n };\n };\n };\n start?: {\n text?: string;\n };\n end?: {\n text?: string;\n };\n };\n alert?: {\n surface?: {\n error?: string;\n };\n border?: {\n error?: string;\n };\n };\n}\n"]}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
export const SIZE_TO_MEDIA = {
|
2
|
-
xs: '(min-width: 0px)',
|
3
|
-
sm: '(min-width: 576px)',
|
4
|
-
md: '(min-width: 768px)',
|
5
|
-
lg: '(min-width: 992px)',
|
6
|
-
xl: '(min-width: 1200px)',
|
7
|
-
};
|
8
|
-
export const matchBreakpoint = (breakpoint) => {
|
9
|
-
if (breakpoint === undefined || breakpoint === '') {
|
10
|
-
return true;
|
11
|
-
}
|
12
|
-
if (window.matchMedia) {
|
13
|
-
const mediaQuery = SIZE_TO_MEDIA[breakpoint];
|
14
|
-
return window.matchMedia(mediaQuery).matches;
|
15
|
-
}
|
16
|
-
return false;
|
17
|
-
};
|
18
|
-
//# sourceMappingURL=media.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"media.js","sourceRoot":"","sources":["../../../src/utils/media.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAQ;IAChC,EAAE,EAAE,kBAAkB;IACtB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,qBAAqB;CAC1B,CAAC;AAKF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAA8B,EAAE,EAAE;IAChE,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,EAAE,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAK,MAAc,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["export const SIZE_TO_MEDIA: any = {\n xs: '(min-width: 0px)',\n sm: '(min-width: 576px)',\n md: '(min-width: 768px)',\n lg: '(min-width: 992px)',\n xl: '(min-width: 1200px)',\n};\n\n// Check if the window matches the media query\n// at the breakpoint passed\n// e.g. matchBreakpoint('sm') => true if screen width exceeds 576px\nexport const matchBreakpoint = (breakpoint: string | undefined) => {\n if (breakpoint === undefined || breakpoint === '') {\n return true;\n }\n if ((window as any).matchMedia) {\n const mediaQuery = SIZE_TO_MEDIA[breakpoint];\n return window.matchMedia(mediaQuery).matches;\n }\n return false;\n};\n"]}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
export const generateBorderRadii = ({ borderRadius }) => {
|
2
|
-
if (!Boolean(borderRadius)) {
|
3
|
-
return;
|
4
|
-
}
|
5
|
-
let smallRadius = 8;
|
6
|
-
let mediumRadius = 16;
|
7
|
-
let largeRadius = 24;
|
8
|
-
const fullRadius = 1000;
|
9
|
-
let isFull = false;
|
10
|
-
let isNone = false;
|
11
|
-
switch (borderRadius) {
|
12
|
-
case 'none': {
|
13
|
-
isNone = true;
|
14
|
-
smallRadius = 0;
|
15
|
-
mediumRadius = 0;
|
16
|
-
largeRadius = 0;
|
17
|
-
break;
|
18
|
-
}
|
19
|
-
case 'xs': {
|
20
|
-
smallRadius = 4;
|
21
|
-
mediumRadius = 12;
|
22
|
-
largeRadius = 20;
|
23
|
-
break;
|
24
|
-
}
|
25
|
-
case 'md': {
|
26
|
-
smallRadius = 12;
|
27
|
-
mediumRadius = 20;
|
28
|
-
largeRadius = 28;
|
29
|
-
break;
|
30
|
-
}
|
31
|
-
case 'lg': {
|
32
|
-
smallRadius = 16;
|
33
|
-
mediumRadius = 24;
|
34
|
-
largeRadius = 32;
|
35
|
-
break;
|
36
|
-
}
|
37
|
-
case 'full': {
|
38
|
-
smallRadius = 16;
|
39
|
-
mediumRadius = 24;
|
40
|
-
largeRadius = 32;
|
41
|
-
isFull = true;
|
42
|
-
break;
|
43
|
-
}
|
44
|
-
}
|
45
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);
|
46
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);
|
47
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);
|
48
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);
|
49
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);
|
50
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);
|
51
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);
|
52
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);
|
53
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);
|
54
|
-
document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);
|
55
|
-
};
|
56
|
-
//# sourceMappingURL=generateBorderRadii.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"generateBorderRadii.js","sourceRoot":"","sources":["../../../../src/utils/theme/generateBorderRadii.ts"],"names":[],"mappings":"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","sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateBorderRadii = ({ borderRadius }: Pick<Theme, 'borderRadius'>) => {\n if (!Boolean(borderRadius)) {\n return;\n }\n\n let smallRadius = 8;\n let mediumRadius = 16;\n let largeRadius = 24;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n smallRadius = 0;\n mediumRadius = 0;\n largeRadius = 0;\n break;\n }\n case 'xs': {\n smallRadius = 4;\n mediumRadius = 12;\n largeRadius = 20;\n break;\n }\n case 'md': {\n smallRadius = 12;\n mediumRadius = 20;\n largeRadius = 28;\n break;\n }\n case 'lg': {\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n break;\n }\n case 'full': {\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);\n};\n"]}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"generateFont.js","sourceRoot":"","sources":["../../../../src/utils/theme/generateFont.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,IAAI,EAAuB,EAAE,EAAE;IAC5D,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACnB,OAAO;IACT,CAAC;IAED,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,qBAAqB,EAAE,IAAI,CAAC,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateFont = ({ font }: Pick<Theme, 'font'>) => {\n if (!Boolean(font)) {\n return;\n }\n\n document.documentElement.style.setProperty('--cpsl-default-font', font);\n};\n"]}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { mix, readableColorIsBlack } from "color2k";
|
2
|
-
import { getCssColors, isColor } from "./utils";
|
3
|
-
import { DEFAULT_THEME } from "../../constants";
|
4
|
-
const MIXES = [0, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];
|
5
|
-
export const generatePalette = ({ foregroundColor, backgroundColor, customPalette }) => {
|
6
|
-
if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {
|
7
|
-
foregroundColor = DEFAULT_THEME.foregroundColor;
|
8
|
-
}
|
9
|
-
if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {
|
10
|
-
backgroundColor = DEFAULT_THEME.backgroundColor;
|
11
|
-
}
|
12
|
-
const isDarkBackground = !readableColorIsBlack(backgroundColor);
|
13
|
-
const palette = {
|
14
|
-
foregroundColors: [],
|
15
|
-
backgroundColors: [],
|
16
|
-
isDarkBackground,
|
17
|
-
};
|
18
|
-
const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';
|
19
|
-
const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';
|
20
|
-
MIXES.forEach(value => {
|
21
|
-
palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));
|
22
|
-
palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));
|
23
|
-
});
|
24
|
-
document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);
|
25
|
-
document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[1]);
|
26
|
-
document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[2]);
|
27
|
-
document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[3]);
|
28
|
-
document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[4]);
|
29
|
-
document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[5]);
|
30
|
-
document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[6]);
|
31
|
-
document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[7]);
|
32
|
-
document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);
|
33
|
-
document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[1]);
|
34
|
-
document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[2]);
|
35
|
-
document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[3]);
|
36
|
-
document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[4]);
|
37
|
-
document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[5]);
|
38
|
-
document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[6]);
|
39
|
-
document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[7]);
|
40
|
-
if (Boolean(customPalette)) {
|
41
|
-
const cssColorVars = getCssColors(customPalette);
|
42
|
-
Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));
|
43
|
-
}
|
44
|
-
return palette;
|
45
|
-
};
|
46
|
-
//# sourceMappingURL=generatePalette.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"generatePalette.js","sourceRoot":"","sources":["../../../../src/utils/theme/generatePalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;AAE3D,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAwE,EAAW,EAAE;IACpK,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3D,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IAClD,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3D,eAAe,GAAG,aAAa,CAAC,eAAe,CAAC;IAClD,CAAC;IAED,MAAM,gBAAgB,GAAG,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAAC;IAEhE,MAAM,OAAO,GAAY;QACvB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB,EAAE,EAAE;QACpB,gBAAgB;KACjB,CAAC;IAEF,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACpE,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAEpE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;QACpB,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAAC;QAC/E,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,eAAe,EAAE,kBAAkB,EAAE,KAAK,CAAC,CAAC,CAAC;IACjF,CAAC,CAAC,CAAC;IAGH,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IAGtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,2BAA2B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IACtG,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtG,IAAI,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC;QAC3B,MAAM,YAAY,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;QACjD,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACrG,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import { mix, readableColorIsBlack } from 'color2k';\nimport { Theme } from '../../interface';\nimport { getCssColors, isColor } from './utils';\nimport { DEFAULT_THEME } from '../../constants';\n\nexport type Palette = {\n foregroundColors: string[];\n backgroundColors: string[];\n isDarkBackground: boolean;\n};\n\nconst MIXES = [0, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];\n\nexport const generatePalette = ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>): Palette => {\n if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n\n const isDarkBackground = !readableColorIsBlack(backgroundColor);\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n isDarkBackground,\n };\n\n const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';\n\n MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));\n });\n\n // BACKGROUND\n document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[7]);\n\n // FOREGROUND\n document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[7]);\n\n if (Boolean(customPalette)) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n\n return palette;\n};\n"]}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { DEFAULT_THEME } from "../../constants";
|
2
|
-
import { generateBorderRadii } from "./generateBorderRadii";
|
3
|
-
import { generateFont } from "./generateFont";
|
4
|
-
import { generatePalette } from "./generatePalette";
|
5
|
-
const generateTheme = ({ foregroundColor = DEFAULT_THEME.foregroundColor, backgroundColor = DEFAULT_THEME.backgroundColor, font, customPalette, borderRadius }) => {
|
6
|
-
const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });
|
7
|
-
generateFont({ font });
|
8
|
-
generateBorderRadii({ borderRadius });
|
9
|
-
return palette.isDarkBackground;
|
10
|
-
};
|
11
|
-
export default generateTheme;
|
12
|
-
//# sourceMappingURL=generateTheme.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"generateTheme.js","sourceRoot":"","sources":["../../../../src/utils/theme/generateTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAMpD,MAAM,aAAa,GAAG,CAAC,EAAE,eAAe,GAAG,aAAa,CAAC,eAAe,EAAE,eAAe,GAAG,aAAa,CAAC,eAAe,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAS,EAAW,EAAE;IAChL,MAAM,OAAO,GAAG,eAAe,CAAC,EAAE,eAAe,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC,CAAC;IAErF,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvB,mBAAmB,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC;IAEtC,OAAO,OAAO,CAAC,gBAAgB,CAAC;AAClC,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { DEFAULT_THEME } from '../../constants';\nimport { Theme } from '../../interface';\nimport { generateBorderRadii } from './generateBorderRadii';\nimport { generateFont } from './generateFont';\nimport { generatePalette } from './generatePalette';\n\n/**\n * Generates css theme variables.\n * @returns @boolean Whether background is dark or not.\n */\nconst generateTheme = ({ foregroundColor = DEFAULT_THEME.foregroundColor, backgroundColor = DEFAULT_THEME.backgroundColor, font, customPalette, borderRadius }: Theme): boolean => {\n const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });\n\n generateFont({ font });\n\n generateBorderRadii({ borderRadius });\n\n return palette.isDarkBackground;\n};\n\nexport default generateTheme;\n"]}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
export const isColor = strColor => {
|
2
|
-
const s = new Option().style;
|
3
|
-
s.color = strColor;
|
4
|
-
return s.color !== '';
|
5
|
-
};
|
6
|
-
const toKebabCase = (pascal) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();
|
7
|
-
const buildVars = (prev, obj) => {
|
8
|
-
let resp = {};
|
9
|
-
for (const k in obj) {
|
10
|
-
const name = `${prev}-${toKebabCase(k)}`;
|
11
|
-
if (typeof obj[k] === 'object' && obj[k] !== null) {
|
12
|
-
resp = Object.assign(Object.assign({}, resp), buildVars(name, obj[k]));
|
13
|
-
}
|
14
|
-
else {
|
15
|
-
resp[name] = obj[k];
|
16
|
-
}
|
17
|
-
}
|
18
|
-
return resp;
|
19
|
-
};
|
20
|
-
export const getCssColors = (customPalette) => buildVars('--cpsl-color', customPalette);
|
21
|
-
//# sourceMappingURL=utils.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/utils/theme/utils.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,EAAE;IAChC,MAAM,CAAC,GAAG,IAAI,MAAM,EAAE,CAAC,KAAK,CAAC;IAC7B,CAAC,CAAC,KAAK,GAAG,QAAQ,CAAC;IACnB,OAAO,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC,WAAW,EAAE,CAAC;AAGpG,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,GAAQ,EAA2B,EAAE;IACpE,IAAI,IAAI,GAAG,EAAE,CAAC;IAEd,KAAK,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;QACpB,MAAM,IAAI,GAAG,GAAG,IAAI,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAClD,IAAI,mCAAQ,IAAI,GAAK,SAAS,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAE,CAAC;QACjD,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,aAA4B,EAA2B,EAAE,CAAC,SAAS,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC","sourcesContent":["import { CustomPalette } from '../../interface';\n\nexport const isColor = strColor => {\n const s = new Option().style;\n s.color = strColor;\n return s.color !== '';\n};\n\nconst toKebabCase = (pascal: string) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();\n\n// This function handles arrays and objects\nconst buildVars = (prev: string, obj: any): { [k: string]: string } => {\n let resp = {};\n\n for (const k in obj) {\n const name = `${prev}-${toKebabCase(k)}`;\n if (typeof obj[k] === 'object' && obj[k] !== null) {\n resp = { ...resp, ...buildVars(name, obj[k]) };\n } else {\n resp[name] = obj[k];\n }\n }\n\n return resp;\n};\n\nexport const getCssColors = (customPalette: CustomPalette): { [k: string]: string } => buildVars('--cpsl-color', customPalette);\n"]}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
2
|
-
|
3
|
-
function getDefaultExportFromCjs (x) {
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
5
|
-
}
|
6
|
-
|
7
|
-
export { commonjsGlobal as c, getDefaultExportFromCjs as g };
|
8
|
-
|
9
|
-
//# sourceMappingURL=_commonjsHelpers-1789f0cf.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"file":"_commonjsHelpers-1789f0cf.js","mappings":";;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|