@usecapsule/core-components 2.0.0 → 2.0.1-dev.dropdown
Sign up to get free protection for your applications and to get access to all the features.
- package/css/capsule-core.css +12 -0
- 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-68c73705.entry.js → p-0cab90fa.entry.js} +2 -2
- package/dist/capsule/{p-91412151.entry.js → p-193ac141.entry.js} +2 -2
- package/dist/capsule/p-c7be2546.entry.js +29 -0
- package/dist/capsule/p-c7be2546.entry.js.map +1 -0
- package/dist/capsule/p-cb8dc0a4.entry.js +2 -0
- package/dist/cjs/capsule.cjs.js +1 -1
- package/dist/cjs/{cpsl-alert_17.cjs.entry.js → cpsl-alert_18.cjs.entry.js} +150 -37
- package/dist/cjs/cpsl-alert_18.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-grid.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-info-box.cjs.entry.js +1 -1
- package/dist/cjs/cpsl-row.cjs.entry.js +1 -1
- package/dist/cjs/index-3fccb5b4.js +2 -2
- package/dist/cjs/index.cjs.js +28 -8
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/icons/chevron-up.svg +3 -0
- package/dist/collection/assets/icons/index.js +2 -1
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.css +88 -0
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +113 -0
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -0
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js +29 -0
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js +37 -0
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.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.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.css +3 -3
- package/dist/collection/components/cpsl-input/cpsl-input.js +2 -2
- package/dist/collection/components/cpsl-modal/cpsl-modal.js +27 -21
- package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- 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-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.css +101 -0
- package/dist/collection/components/cpsl-text/cpsl-text.js +110 -1
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
- package/dist/collection/index.js +1 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/interface.js.map +1 -1
- package/dist/collection/utils/theme/generateFont.js +25 -4
- package/dist/collection/utils/theme/generateFont.js.map +1 -1
- package/dist/collection/utils/theme/generateTheme.js +2 -3
- package/dist/collection/utils/theme/generateTheme.js.map +1 -1
- package/dist/esm/capsule.js +1 -1
- package/dist/esm/{cpsl-alert_17.entry.js → cpsl-alert_18.entry.js} +150 -38
- package/dist/esm/cpsl-alert_18.entry.js.map +1 -0
- package/dist/esm/cpsl-grid.entry.js +2 -2
- package/dist/esm/cpsl-info-box.entry.js +1 -1
- package/dist/esm/cpsl-row.entry.js +1 -1
- package/dist/esm/index-f00e090c.js +2 -2
- package/dist/esm/index.js +28 -8
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/assets/icons/index.d.ts +1 -0
- package/dist/types/components/cpsl-dropdown/cpsl-dropdown.d.ts +25 -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/components.d.ts +53 -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 -3
- package/dist/capsule/p-202a85c9.entry.js +0 -29
- package/dist/capsule/p-202a85c9.entry.js.map +0 -1
- package/dist/capsule/p-f604b591.entry.js +0 -2
- package/dist/cjs/cpsl-alert_17.cjs.entry.js.map +0 -1
- package/dist/esm/cpsl-alert_17.entry.js.map +0 -1
- /package/dist/capsule/{p-68c73705.entry.js.map → p-0cab90fa.entry.js.map} +0 -0
- /package/dist/capsule/{p-91412151.entry.js.map → p-193ac141.entry.js.map} +0 -0
- /package/dist/capsule/{p-f604b591.entry.js.map → p-cb8dc0a4.entry.js.map} +0 -0
- /package/dist/types/Users/{taylorbosch → vinay}/Documents/GitHub/Capsule/component-library/core/.stencil/scripts/buildIconLibrary.d.ts +0 -0
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as s,h as a,H as r}from"./p-6fb7c4d1.js";const c=":host{display:flex;flex-wrap:wrap}";const f=c;const e=class{constructor(a){s(this,a)}render(){return a(r,{key:"5f061d20ff017b612a4bada01c66992795cbabe1"},a("slot",{key:"ba35af68f6f00e8b12ff3c091935482beb10d27c"}))}};e.style=f;export{e as cpsl_row};
|
2
|
+
//# sourceMappingURL=p-cb8dc0a4.entry.js.map
|
package/dist/cjs/capsule.cjs.js
CHANGED
@@ -19,7 +19,7 @@ const patchBrowser = () => {
|
|
19
19
|
|
20
20
|
patchBrowser().then(async (options) => {
|
21
21
|
await appGlobals.globalScripts();
|
22
|
-
return index.bootstrapLazy([["cpsl-animation.cjs",[[1,"cpsl-animation",{"src":[1],"replayAnimation":[64]}]]],["cpsl-col.cjs",[[1,"cpsl-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["cpsl-grid.cjs",[[1,"cpsl-grid",{"fixed":[4]}]]],["cpsl-info-box.cjs",[[1,"cpsl-info-box"]]],["cpsl-row.cjs",[[1,"cpsl-row"]]],["cpsl-
|
22
|
+
return index.bootstrapLazy([["cpsl-animation.cjs",[[1,"cpsl-animation",{"src":[1],"replayAnimation":[64]}]]],["cpsl-col.cjs",[[1,"cpsl-col",{"offset":[1],"offsetXs":[1,"offset-xs"],"offsetSm":[1,"offset-sm"],"offsetMd":[1,"offset-md"],"offsetLg":[1,"offset-lg"],"offsetXl":[1,"offset-xl"],"pull":[1],"pullXs":[1,"pull-xs"],"pullSm":[1,"pull-sm"],"pullMd":[1,"pull-md"],"pullLg":[1,"pull-lg"],"pullXl":[1,"pull-xl"],"push":[1],"pushXs":[1,"push-xs"],"pushSm":[1,"push-sm"],"pushMd":[1,"push-md"],"pushLg":[1,"push-lg"],"pushXl":[1,"push-xl"],"size":[1],"sizeXs":[1,"size-xs"],"sizeSm":[1,"size-sm"],"sizeMd":[1,"size-md"],"sizeLg":[1,"size-lg"],"sizeXl":[1,"size-xl"]},[[9,"resize","onResize"]]]]],["cpsl-grid.cjs",[[1,"cpsl-grid",{"fixed":[4]}]]],["cpsl-info-box.cjs",[[1,"cpsl-info-box"]]],["cpsl-row.cjs",[[1,"cpsl-row"]]],["cpsl-alert_18.cjs",[[1,"cpsl-code-input",{"code":[1025],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"length":[2],"type":[1]}],[1,"cpsl-input",{"autocapitalize":[1],"autocomplete":[1],"autocorrect":[1],"noAutoDisable":[4,"no-auto-disable"],"autofocus":[4],"disabled":[4],"enterkeyhint":[1],"errorText":[1,"error-text"],"helperText":[1,"helper-text"],"inputmode":[1],"label":[1],"max":[8],"maxlength":[2],"min":[8],"minlength":[2],"multiple":[4],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[4],"required":[4],"spellcheck":[4],"startIconSrc":[1,"start-icon-src"],"startIcon":[1,"start-icon"],"step":[1],"type":[1],"value":[1025],"hasFocus":[32]},null,{"disabled":["handleDisable"]}],[1,"cpsl-modal",{"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"],"footerExpanded":[4,"footer-expanded"],"footerTransitionDuration":[2,"footer-transition-duration"],"noOverlay":[4,"no-overlay"],"open":[4],"hasFooter":[32]},null,{"footerExpanded":["toggleHeight"],"open":["toggleModal"]}],[1,"cpsl-slide-button",{"disabled":[4],"endIcon":[1,"end-icon"],"endText":[1,"end-text"],"startIcon":[1,"start-icon"],"startText":[1,"start-text"]}],[1,"cpsl-tile-button",{"src":[1],"icon":[1]}],[1,"cpsl-alert",{"type":[1],"icon":[1]}],[1,"cpsl-button",{"disabled":[516],"variant":[513]}],[1,"cpsl-divider"],[1,"cpsl-dropdown",{"width":[1],"items":[16],"isOpen":[32],"selectedItem":[32]},null,{"isOpen":["handleOpenChange"]}],[1,"cpsl-pill",{"text":[1]}],[1,"cpsl-progress-indicator",{"totalSteps":[2,"total-steps"],"step":[2]}],[1,"cpsl-qr-code",{"url":[1],"imageSrc":[1,"image-src"],"size":[2]}],[1,"cpsl-spinner",{"size":[2],"speed":[2]}],[1,"cpsl-tab",{"selected":[4],"tab":[1]},[[8,"cpslTabsChanged","onTabsChanged"],[8,"cpslTabsInit","onTabsInit"]]],[1,"cpsl-tabs",{"fullWidth":[4,"full-width"],"selectedTab":[1,"selected-tab"],"selectedTabRect":[32],"loaded":[32]},null,{"fullWidth":["updateSlider"],"selectedTab":["updateTab"]}],[1,"cpsl-text",{"color":[1],"variant":[1],"weight":[1]}],[1,"cpsl-overlay",{"open":[4],"enterTransitionDuration":[2,"enter-transition-duration"],"exitTransitionDuration":[2,"exit-transition-duration"]},null,{"open":["toggleHeight"]}],[1,"cpsl-icon",{"src":[1],"icon":[1]}]]]], options);
|
23
23
|
});
|
24
24
|
|
25
25
|
exports.setNonce = index.setNonce;
|
@@ -149,6 +149,11 @@ const Check = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" strok
|
|
149
149
|
</svg>
|
150
150
|
`;
|
151
151
|
|
152
|
+
const ChevronUp = `<svg width="14" height="8" viewBox="0 0 14 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
153
|
+
<path d="M13 7L7 0.999999L1 7" stroke="#525252" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
154
|
+
</svg>
|
155
|
+
`;
|
156
|
+
|
152
157
|
const Clock = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg">
|
153
158
|
<path d="M12 6V12L16 14M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
154
159
|
</svg>
|
@@ -618,7 +623,7 @@ const Youtube = `<svg width="24" height="24" viewBox="0 0 24 24" fill="currentCo
|
|
618
623
|
</svg>
|
619
624
|
`;
|
620
625
|
|
621
|
-
const Icons = { alertCircle: AlertCircle, angelListBrand: AngelListBrand, angelList: AngelList, appleBrand: AppleBrand, apple: Apple, arrowNarrow: ArrowNarrow, arrow: Arrow, backupKit: BackupKit, capsuleLogo: CapsuleLogo, capsuleRingsDark: CapsuleRingsDark, capsuleRings: CapsuleRings, capsule: Capsule, check: Check, clock: Clock, close: Close, clubhouseBrand: ClubhouseBrand, clubhouse: Clubhouse, copy: Copy, discordBrand: DiscordBrand, discord: Discord, downloadCloud: DownloadCloud, dribbbleBrand: DribbbleBrand, dribbble: Dribbble, eyeOff: EyeOff, eye: Eye, facebookBrand: FacebookBrand, facebook: Facebook, figmaBrand: FigmaBrand, figma: Figma, githubBrand: GithubBrand, github: Github, googleBrand: GoogleBrand, google: Google, helpCircle: HelpCircle, heroEmail: HeroEmail, heroLock: HeroLock, heroPasskey: HeroPasskey, heroPhone: HeroPhone, heroWallet: HeroWallet, infoCircle: InfoCircle, instagramBrand: InstagramBrand, instagram: Instagram, key: Key, linkedinBrand: LinkedinBrand, linkedin: Linkedin, mail: Mail, moreLoginOptions: MoreLoginOptions, phone: Phone, pintrestBrand: PintrestBrand, pintrest: Pintrest, plusCircle: PlusCircle, redditBrand: RedditBrand, reddit: Reddit, signalBrand: SignalBrand, signal: Signal, snapchatBrand: SnapchatBrand, snapchat: Snapchat, telegramBrand: TelegramBrand, telegram: Telegram, tikTokBrand: TikTokBrand, tikTok: TikTok, tumblrBrand: TumblrBrand, tumblr: Tumblr, twitterBrand: TwitterBrand, twitter: Twitter, wallet: Wallet, youtubeBrand: YoutubeBrand, youtube: Youtube, };
|
626
|
+
const Icons = { alertCircle: AlertCircle, angelListBrand: AngelListBrand, angelList: AngelList, appleBrand: AppleBrand, apple: Apple, arrowNarrow: ArrowNarrow, arrow: Arrow, backupKit: BackupKit, capsuleLogo: CapsuleLogo, capsuleRingsDark: CapsuleRingsDark, capsuleRings: CapsuleRings, capsule: Capsule, check: Check, chevronUp: ChevronUp, clock: Clock, close: Close, clubhouseBrand: ClubhouseBrand, clubhouse: Clubhouse, copy: Copy, discordBrand: DiscordBrand, discord: Discord, downloadCloud: DownloadCloud, dribbbleBrand: DribbbleBrand, dribbble: Dribbble, eyeOff: EyeOff, eye: Eye, facebookBrand: FacebookBrand, facebook: Facebook, figmaBrand: FigmaBrand, figma: Figma, githubBrand: GithubBrand, github: Github, googleBrand: GoogleBrand, google: Google, helpCircle: HelpCircle, heroEmail: HeroEmail, heroLock: HeroLock, heroPasskey: HeroPasskey, heroPhone: HeroPhone, heroWallet: HeroWallet, infoCircle: InfoCircle, instagramBrand: InstagramBrand, instagram: Instagram, key: Key, linkedinBrand: LinkedinBrand, linkedin: Linkedin, mail: Mail, moreLoginOptions: MoreLoginOptions, phone: Phone, pintrestBrand: PintrestBrand, pintrest: Pintrest, plusCircle: PlusCircle, redditBrand: RedditBrand, reddit: Reddit, signalBrand: SignalBrand, signal: Signal, snapchatBrand: SnapchatBrand, snapchat: Snapchat, telegramBrand: TelegramBrand, telegram: Telegram, tikTokBrand: TikTokBrand, tikTok: TikTok, tumblrBrand: TumblrBrand, tumblr: Tumblr, twitterBrand: TwitterBrand, twitter: Twitter, wallet: Wallet, youtubeBrand: YoutubeBrand, youtube: Youtube, };
|
622
627
|
|
623
628
|
const cpslAlertCss = ":host{--container-gap:8px;--container-padding-top:4px;--container-padding-bottom:4px;--container-padding-start:16px;--container-padding-end:16px;--container-font-size:clamp(12px, 0.75rem, 18px);--container-border-width:1px;--container-border-radius:var(--cpsl-border-radius-alert);display:inline-block;font-family:var(--cpsl-font-family, inherit)}:host(.error){--container-background-color:var(--cpsl-color-alert-surface-error);--container-border-color:var(--cpsl-color-alert-border-error);--container-color:var(--cpsl-color-text-error)}.alert-container{border-radius:var(--container-border-radius);-webkit-padding-start:var(--container-padding-start);padding-inline-start:var(--container-padding-start);-webkit-padding-end:var(--container-padding-end);padding-inline-end:var(--container-padding-end);padding-top:var(--container-padding-top);padding-bottom:var(--container-padding-bottom);font-size:var(--container-font-size);font-weight:500;display:flex;align-items:center;justify-content:center;gap:var(--container-gap);border-style:solid;border-width:var(--container-border-width);border-color:var(--container-border-color);background-color:var(--container-background-color);color:var(--container-color)}.icon{display:flex}";
|
624
629
|
const CpslAlertStyle0 = cpslAlertCss;
|
@@ -778,6 +783,58 @@ const CpslDivider = class {
|
|
778
783
|
};
|
779
784
|
CpslDivider.style = CpslDividerStyle0;
|
780
785
|
|
786
|
+
const cpslDropdownCss = ":host{display:block;position:relative;font-family:Arial, sans-serif}.input-container{position:relative;width:100%}::slotted(cpsl-dropdown){position:absolute;width:100%;top:100%;left:0;z-index:2}.dropdown-button{display:flex;width:100%;padding:0 4px;background:none;border:none;align-items:center;justify-content:space-between;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:inherit;color:inherit}.dropdown-button span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-grow:1}.dropdown-button div{margin-left:8px;display:flex;align-items:center}.dropdown-options{display:none;position:absolute;list-style:none;padding:0;margin:0;border:1px solid #ccc;background:white;z-index:1000}.dropdown-options.open{display:block;border-radius:8px;border:1px solid #483e3e}.dropdown-options.open{display:block;margin-top:20px}.dropdown-options li{padding:6px;cursor:pointer;display:flex;align-items:center;border-bottom:1px solid #ccc}.dropdown-options li svg{width:24px;height:24px;margin-right:8px;padding:0 8px}.dropdown-value{margin-left:8px;color:#6c757d}";
|
787
|
+
const CpslDropdownStyle0 = cpslDropdownCss;
|
788
|
+
|
789
|
+
const CpslDropdown = class {
|
790
|
+
constructor(hostRef) {
|
791
|
+
index.registerInstance(this, hostRef);
|
792
|
+
this.toggleDropdown = () => {
|
793
|
+
this.isOpen = !this.isOpen;
|
794
|
+
};
|
795
|
+
this.selectItem = (item) => {
|
796
|
+
this.selectedItem = item;
|
797
|
+
this.toggleDropdown();
|
798
|
+
};
|
799
|
+
this.handleItemSelect = (item) => () => {
|
800
|
+
this.selectItem(item);
|
801
|
+
};
|
802
|
+
this.width = '100%';
|
803
|
+
this.isOpen = false;
|
804
|
+
this.selectedItem = undefined;
|
805
|
+
this.items = [];
|
806
|
+
}
|
807
|
+
handleOpenChange() {
|
808
|
+
if (this.isOpen) {
|
809
|
+
this.adjustPosition();
|
810
|
+
}
|
811
|
+
}
|
812
|
+
adjustPosition() {
|
813
|
+
var _a;
|
814
|
+
const dropdownOptions = this.el.shadowRoot.querySelector('.dropdown-options');
|
815
|
+
const hostRect = this.el.getBoundingClientRect();
|
816
|
+
const parentRect = (_a = this.el.parentElement) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
817
|
+
if (parentRect) {
|
818
|
+
this.width = `${parentRect.width}px`;
|
819
|
+
dropdownOptions.style.left = `${parentRect.left - hostRect.left}px`;
|
820
|
+
}
|
821
|
+
}
|
822
|
+
componentWillLoad() {
|
823
|
+
if (this.items.length > 0) {
|
824
|
+
this.selectedItem = this.items[0];
|
825
|
+
}
|
826
|
+
}
|
827
|
+
render() {
|
828
|
+
var _a, _b, _c;
|
829
|
+
return (index.h(index.Host, { key: '6882468bccd50b57e16ce09ca360392415c0b1ce', style: { width: this.width } }, index.h("button", { key: '0f34c3f861543fd6f2781adeb371f6dbbf4a7e7c', class: "dropdown-button", onClick: this.toggleDropdown }, `${((_a = this.selectedItem) === null || _a === void 0 ? void 0 : _a.selectedLabel) || ((_b = this.selectedItem) === null || _b === void 0 ? void 0 : _b.label)} ${(_c = this.selectedItem) === null || _c === void 0 ? void 0 : _c.value}`, index.h("div", { key: '9d266062c49e3fce689eccf57229534043d975e8', innerHTML: Icons['chevronUp'] })), index.h("ul", { key: 'c82c76fae351883748e0094d218cfff8261b8ed8', class: { 'dropdown-options': true, 'open': this.isOpen }, style: { width: this.width } }, this.items.map(item => index.h("li", { onClick: this.handleItemSelect(item) }, index.h("span", { innerHTML: item.icon }), item.label, " ", index.h("span", { class: "dropdown-value" }, item.value))))));
|
830
|
+
}
|
831
|
+
get el() { return index.getElement(this); }
|
832
|
+
static get watchers() { return {
|
833
|
+
"isOpen": ["handleOpenChange"]
|
834
|
+
}; }
|
835
|
+
};
|
836
|
+
CpslDropdown.style = CpslDropdownStyle0;
|
837
|
+
|
781
838
|
const cpslIconCss = ":host{display:block;--height:24px;--width:24px;--icon-color:var(--cpsl-color-text-primary);--icon-fill-color:var(--cpsl-color-text-primary);--icon-stroke-color:var(--cpsl-color-text-primary);width:var(--width);height:var(--height)}:host div{display:flex;width:var(--width);height:var(--height);color:var(--icon-color)}:host svg{width:var(--width);height:var(--height)}:host svg .background-16{fill:var(--cpsl-color-background-16)}:host svg .foreground-0{fill:var(--cpsl-color-foreground-0)}:host svg .fill{fill:var(--icon-fill-color)}:host svg .stroke{stroke:var(--icon-stroke-color)}:host img{width:var(--width);height:var(--height);object-fit:contain}";
|
782
839
|
const CpslIconStyle0 = cpslIconCss;
|
783
840
|
|
@@ -788,12 +845,12 @@ const CpslIcon = class {
|
|
788
845
|
this.icon = undefined;
|
789
846
|
}
|
790
847
|
render() {
|
791
|
-
return (index.h(index.Host, { key: '
|
848
|
+
return (index.h(index.Host, { key: '89f3081baf013558e965cc6682811d66dc2b188d', part: "icon", role: "img" }, !Boolean(this.icon) ? index.h("img", { src: this.src }) : index.h("div", { innerHTML: Icons[this.icon] })));
|
792
849
|
}
|
793
850
|
};
|
794
851
|
CpslIcon.style = CpslIconStyle0;
|
795
852
|
|
796
|
-
const cpslInputCss = ":host{--container-box-shadow:none;--container-box-shadow-color:var(--cpsl-color-alpha-black-16);--container-border-color:var(--cpsl-color-input-border-active);--container-border-error-color:var(--cpsl-color-input-border-error);--container-background-color:var(--cpsl-color-input-surface-default);--container-background-color-disabled:var(--cpsl-color-input-surface-disabled);--container-border-width:1px;--container-border-radius:var(--cpsl-border-radius-input);--container-padding-top:4px;--container-padding-bottom:4px;--container-padding-end:4px;--container-padding-start:8px;--container-height:46px;--container-gap:8px;--input-background-color:var(--cpsl-color-input-surface-default);--input-background-color-disabled:var(--cpsl-color-input-surface-disabled);--input-color:var(--cpsl-color-text-primary);--input-placeholder-color:var(--cpsl-color-text-secondary);--input-font-size:
|
853
|
+
const cpslInputCss = ":host{--container-box-shadow:none;--container-box-shadow-color:var(--cpsl-color-alpha-black-16);--container-border-color:var(--cpsl-color-input-border-active);--container-border-error-color:var(--cpsl-color-input-border-error);--container-background-color:var(--cpsl-color-input-surface-default);--container-background-color-disabled:var(--cpsl-color-input-surface-disabled);--container-border-width:1px;--container-border-radius:var(--cpsl-border-radius-input);--container-padding-top:4px;--container-padding-bottom:4px;--container-padding-end:4px;--container-padding-start:8px;--container-height:46px;--container-gap:8px;--input-background-color:var(--cpsl-color-input-surface-default);--input-background-color-disabled:var(--cpsl-color-input-surface-disabled);--input-color:var(--cpsl-color-text-primary);--input-placeholder-color:var(--cpsl-color-text-secondary);--input-font-size:var(--cpsl-font-size-body-m);--label-color:var(--cpsl-color-text-primary);--label-font-size:var(--cpsl-font-size-body-s);--label-margin-bottom:5px;--helper-text-color:var(--cpsl-color-text-secondary);--helper-text-error-color:var(--cpsl-color-text-error);--helper-text-icon-color:var(--cpsl-color-text-secondary);--helper-text-icon-error-color:var(--cpsl-color-text-error);--helper-text-icon-size:16px;--helper-text-font-size:var(--cpsl-font-size-body-xs);--helper-text-margin-top:8px;display:block;font-family:var(--cpsl-font-family, inherit)}:host(.disabled){--container-background-color:var(--container-background-color-disabled);--input-background-color:var(--input-background-color-disabled);--input-color:var(--cpsl-color-text-secondary)}:host(:not(.has-value)){--container-border-color:var(--cpsl-color-input-border-placeholder);--input-color:var(--cpsl-color-text-secondary);--container-background-color:transparent;--input-background-color:transparent}:host(.focused){--container-box-shadow:0px 0px 0px 2px var(--container-box-shadow-color);--container-border-color:var(--cpsl-color-input-border-active);--container-background-color:var(--cpsl-color-input-surface-default)}.input-container{-webkit-padding-start:var(--container-padding-start);padding-inline-start:var(--container-padding-start);-webkit-padding-end:var(--container-padding-end);padding-inline-end:var(--container-padding-end);padding-top:var(--container-padding-top);padding-bottom:var(--container-padding-bottom);display:flex;align-items:center;box-sizing:border-box;height:var(--container-height);gap:var(--container-gap);border-style:solid;border-width:var(--container-border-width);border-color:var(--container-border-color);border-radius:var(--container-border-radius);background-color:var(--container-background-color);box-shadow:var(--container-box-shadow)}.error-container{border-color:var(--container-border-error-color)}.native-input{flex:1;min-width:0;border:none;height:100%;box-sizing:border-box;font-size:var(--input-font-size);color:var(--input-color);background-color:var(--input-background-color);font-family:var(--cpsl-font-family, inherit)}.native-input:focus,.native-input:focus-visible{outline:none}.native-input::placeholder{color:var(--input-placeholder-color);opacity:1;}.label{display:inline-block;color:var(--label-color);font-size:var(--label-font-size);font-weight:500;margin-bottom:var(--label-margin-bottom)}.helper-text-container{display:flex;align-items:center;gap:4px;color:var(--helper-text-color);font-size:var(--helper-text-font-size);font-weight:500;margin-top:var(--helper-text-margin-top)}.helper-text-container cpsl-icon{--height:var(--helper-text-icon-size);--width:var(--helper-text-icon-size);--icon-color:var(--helper-text-icon-color)}.error-text{color:var(--helper-text-error-color)}.error-text cpsl-icon{--icon-color:var(--helper-text-icon-error-color)}:host ::slotted([slot=start]){flex:0}:host ::slotted([slot=end]){flex:0}:host ::slotted(cpsl-icon){--icon-color:var(--input-color)}:host ::slotted(cpsl-button){width:calc(var(--container-height) - var(--container-padding-top) - var(--container-padding-bottom) - var(--container-border-width) * 2);--button-border-radius:calc(var(--container-border-radius) - 2px)}";
|
797
854
|
const CpslInputStyle0 = cpslInputCss;
|
798
855
|
|
799
856
|
const CpslInput = class {
|
@@ -903,7 +960,7 @@ const CpslInput = class {
|
|
903
960
|
}
|
904
961
|
render() {
|
905
962
|
var _a;
|
906
|
-
return (index.h(index.Host, { key: '
|
963
|
+
return (index.h(index.Host, { key: '3e1a55cf2869a31c54ab03c3ecf2bae84ef5031b', class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.focusedValue) || Boolean(this.value) } }, this.label && (index.h("label", { class: "label", htmlFor: this.inputId }, this.label)), index.h("div", { key: '00a7a2d2dde66c610a9626044aae8ed75b9e9bf3', onClick: this.focusInput, class: { 'input-container': true, 'error-container': Boolean(this.errorText) } }, index.h("slot", { key: 'aefa6ccf3ca17216da5a657e104f471109836c78', name: "start" }), index.h("input", { key: '86e8426bff08ead8595bd40086fc7e5fc3c67295', class: "native-input", id: this.inputId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, type: this.type, value: this.value, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }), index.h("slot", { key: '246e05dbbc4740ce09bd9b4bba779eb0d1010882', name: "end" })), (this.errorText || this.helperText) && (index.h("div", { class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("cpsl-icon", { icon: Boolean(this.errorText) ? 'alertCircle' : 'infoCircle' }), index.h("span", null, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
|
907
964
|
}
|
908
965
|
get el() { return index.getElement(this); }
|
909
966
|
static get watchers() { return {
|
@@ -10087,6 +10144,32 @@ const CpslModal = class {
|
|
10087
10144
|
this.footerExpanded ? this.expandFooterTl.play() : this.expandFooterTl.reverse();
|
10088
10145
|
}
|
10089
10146
|
toggleModal() {
|
10147
|
+
if (this.hasAnimatedIn) {
|
10148
|
+
this.handleAnimation();
|
10149
|
+
}
|
10150
|
+
}
|
10151
|
+
componentDidLoad() {
|
10152
|
+
this.handleAnimation();
|
10153
|
+
this.hasAnimatedIn = true;
|
10154
|
+
mm.add(`(min-width: ${constants.MOBILE_SIZE + 1}px)`, () => {
|
10155
|
+
var _a;
|
10156
|
+
(_a = this.draggable) === null || _a === void 0 ? void 0 : _a.disable();
|
10157
|
+
gsapWithCSS.timeline({}).set(this.modalWrapperEl, { yPercent: 0, scale: this.open ? 1 : 0.8, opacity: this.open ? 1 : 0 });
|
10158
|
+
});
|
10159
|
+
mm.add(`(max-width: ${constants.MOBILE_SIZE}px)`, () => {
|
10160
|
+
this.initDraggable();
|
10161
|
+
gsapWithCSS.timeline({}).set(this.modalWrapperEl, { scale: 1, opacity: 1, yPercent: this.open ? -100 : 0 });
|
10162
|
+
});
|
10163
|
+
this.footerSlotEl.addEventListener('slotchange', () => {
|
10164
|
+
if (this.footerSlotEl.assignedNodes().length >= 1) {
|
10165
|
+
this.hasFooter = true;
|
10166
|
+
}
|
10167
|
+
else {
|
10168
|
+
this.hasFooter = false;
|
10169
|
+
}
|
10170
|
+
});
|
10171
|
+
}
|
10172
|
+
handleAnimation() {
|
10090
10173
|
if (this.open) {
|
10091
10174
|
if (window.innerWidth >= constants.MOBILE_SIZE + 1) {
|
10092
10175
|
gsapWithCSS
|
@@ -10161,25 +10244,6 @@ const CpslModal = class {
|
|
10161
10244
|
}
|
10162
10245
|
}
|
10163
10246
|
}
|
10164
|
-
componentDidLoad() {
|
10165
|
-
mm.add(`(min-width: ${constants.MOBILE_SIZE + 1}px)`, () => {
|
10166
|
-
var _a;
|
10167
|
-
(_a = this.draggable) === null || _a === void 0 ? void 0 : _a.disable();
|
10168
|
-
gsapWithCSS.timeline({}).set(this.modalWrapperEl, { yPercent: 0, scale: this.open ? 1 : 0.8, opacity: this.open ? 1 : 0 });
|
10169
|
-
});
|
10170
|
-
mm.add(`(max-width: ${constants.MOBILE_SIZE}px)`, () => {
|
10171
|
-
this.initDraggable();
|
10172
|
-
gsapWithCSS.timeline({}).set(this.modalWrapperEl, { scale: 1, opacity: 1, yPercent: this.open ? -100 : 0 });
|
10173
|
-
});
|
10174
|
-
this.footerSlotEl.addEventListener('slotchange', () => {
|
10175
|
-
if (this.footerSlotEl.assignedNodes().length >= 1) {
|
10176
|
-
this.hasFooter = true;
|
10177
|
-
}
|
10178
|
-
else {
|
10179
|
-
this.hasFooter = false;
|
10180
|
-
}
|
10181
|
-
});
|
10182
|
-
}
|
10183
10247
|
addExpandAnim() {
|
10184
10248
|
setTimeout(() => {
|
10185
10249
|
this.expandFooterTl = gsapWithCSS
|
@@ -10262,11 +10326,10 @@ const CpslModal = class {
|
|
10262
10326
|
return this.el.shadowRoot.getElementById('modal-header');
|
10263
10327
|
}
|
10264
10328
|
get Modal() {
|
10265
|
-
return (index.h("div", { class: { 'modal-container': true, 'no-footer': !this.hasFooter }, part: "modal-container", id: "modal-container" }, index.h("slot", null), index.h("div", { id: "modal-inner-container", class: { 'modal-inner-container': true, 'no-footer': !this.hasFooter }, part: "modal-inner-container" }, index.h("div", { id: "modal-content", part: "modal-content" }, index.h("div", { id: "modal-header", class: "modal-header" }, index.h("slot", { name: "header" })), index.h("slot", { name: "body" })), index.h("div", { id: "modal-header-expanded", class: { 'modal-header': true, 'expanded': true, 'no-opacity': true } }, index.h("slot", { name: "footerExpandedHeader" }))), index.h("div", { id: "modal-footer" }, index.h("slot", { name: "footer" })), index.h("div", { id: "modal-footer-expanded", class: { 'expanded': true, 'no-opacity': true } }, index.h("slot", { name: "footerExpandedFooter" }))));
|
10329
|
+
return (index.h("div", { class: { 'modal-container': true, 'no-footer': !this.hasFooter }, part: "modal-container", id: "modal-container" }, index.h("slot", null), index.h("div", { id: "modal-inner-container", class: { 'modal-inner-container': true, 'no-footer': !this.hasFooter }, part: "modal-inner-container" }, index.h("div", { id: "modal-content", part: "modal-content" }, index.h("div", { id: "modal-header", class: "modal-header", part: "modal-header" }, index.h("slot", { name: "header" })), index.h("div", { id: "modal-body", class: "modal-body", part: "modal-body" }, index.h("slot", { name: "body" }))), index.h("div", { id: "modal-header-expanded", class: { 'modal-header': true, 'expanded': true, 'no-opacity': true }, part: "modal-header-expanded" }, index.h("slot", { name: "footerExpandedHeader" }))), index.h("div", { id: "modal-footer", part: "modal-footer" }, index.h("slot", { name: "footer" })), index.h("div", { id: "modal-footer-expanded", class: { 'expanded': true, 'no-opacity': true }, part: "modal-footer-expanded" }, index.h("slot", { name: "footerExpandedFooter" }))));
|
10266
10330
|
}
|
10267
10331
|
render() {
|
10268
10332
|
if (this.noOverlay) {
|
10269
|
-
this.addExpandAnim();
|
10270
10333
|
return index.h(index.Host, null, this.Modal);
|
10271
10334
|
}
|
10272
10335
|
return (index.h(index.Host, { class: { 'include-mobile-styling': true } }, index.h("cpsl-overlay", { id: "overlay", open: this.open, enterTransitionDuration: this.enterTransitionDuration, exitTransitionDuration: this.exitTransitionDuration }), index.h("div", { id: "modal-wrapper", class: "modal-wrapper" }, this.Modal)));
|
@@ -10309,7 +10372,7 @@ const CpslOverlay = class {
|
|
10309
10372
|
}
|
10310
10373
|
}
|
10311
10374
|
render() {
|
10312
|
-
return (index.h(index.Host, { key: '
|
10375
|
+
return (index.h(index.Host, { key: 'fb52455d1a68056a20f95e7572dd4afcb1827c41' }, index.h("slot", { key: '70c5a7f0ecda8560c92ea6f907ad60650f1cdcf2' })));
|
10313
10376
|
}
|
10314
10377
|
get el() { return index.getElement(this); }
|
10315
10378
|
static get watchers() { return {
|
@@ -10327,7 +10390,7 @@ const CpslPill = class {
|
|
10327
10390
|
this.text = undefined;
|
10328
10391
|
}
|
10329
10392
|
render() {
|
10330
|
-
return (index.h(index.Host, { key: '
|
10393
|
+
return (index.h(index.Host, { key: '061ac64aeb0f301d51f62ff889b6a817b0e5abba' }, index.h("div", { key: 'b6d260c1431d5540c07e976e8fc6d6680dcdda43', class: "pill-container" }, index.h("span", { key: '22d35f5d971c5ce45995e70af3eb9ef0446fdad1' }, this.text))));
|
10331
10394
|
}
|
10332
10395
|
};
|
10333
10396
|
CpslPill.style = CpslPillStyle0;
|
@@ -10402,7 +10465,7 @@ const CpslQrCode = class {
|
|
10402
10465
|
qrCode.append(container);
|
10403
10466
|
}
|
10404
10467
|
render() {
|
10405
|
-
return (index.h(index.Host, { key: '
|
10468
|
+
return (index.h(index.Host, { key: '8aa4d75e098ba25375d26e9e84e150cc70106ffa' }, index.h("div", { key: '02b8d5f1192ecce74476b76f5a6e8602589e2b58', id: "qr-container", class: "qr-container" })));
|
10406
10469
|
}
|
10407
10470
|
get el() { return index.getElement(this); }
|
10408
10471
|
};
|
@@ -10528,7 +10591,7 @@ const CpslSlideButton = class {
|
|
10528
10591
|
return this.el.shadowRoot.getElementById('end-icon');
|
10529
10592
|
}
|
10530
10593
|
render() {
|
10531
|
-
return (index.h(index.Host, { key: '
|
10594
|
+
return (index.h(index.Host, { key: 'ce018bff4b8a965f6828bac0a16ab0ebbf5000d6' }, index.h("div", { key: '0620f35a12979b3262eca8b1a25a1af59745761d', id: "slider-container", class: "slider-container" }, index.h("div", { key: '07c87359d2fff731a4432c802845ace2d361980b', id: "start-slider-container-background", class: { 'start-slider-container-background': true, 'slider-container-background': true } }), index.h("div", { key: '4140a0ab0f2f59693a35b9d36c0a0b6fd6152fbe', id: "end-slider-container-background", class: { 'end-slider-container-background': true, 'slider-container-background': true } }), index.h("div", { key: '39ca4cbcc83d4a8667f93cbeca1dd6c1637d0db2', id: "slider", class: { slider: true, disabled: this.disabled } }, index.h("cpsl-icon", { key: 'f0733efde0e3a00b34d0dd08267e2893f3dfc658', id: "start-icon", class: { 'start-icon': true, 'icon': true }, icon: this.startIcon }), index.h("cpsl-icon", { key: '5f77af9484aad6bc02a8caa89e5c066334f9835b', id: "end-icon", class: { 'end-icon': true, 'icon': true }, icon: this.endIcon })), index.h("span", { key: 'ebf3026838ed70e406704ba85ecd68c0aa04db13', id: "start-text", class: { 'start-text': true, 'disabled': this.disabled } }, this.startText), index.h("span", { key: 'd13ea9ea109900c679c049702760b1c8ce08e38a', id: "end-text", class: "end-text" }, this.endText))));
|
10532
10595
|
}
|
10533
10596
|
get el() { return index.getElement(this); }
|
10534
10597
|
};
|
@@ -10544,13 +10607,13 @@ const CpslSpinner = class {
|
|
10544
10607
|
this.speed = 1;
|
10545
10608
|
}
|
10546
10609
|
render() {
|
10547
|
-
return (index.h(index.Host, { key: '
|
10610
|
+
return (index.h(index.Host, { key: 'f52df0bdd08e1de7ffb6cdda5f1791b1524cbbbe', style: {
|
10548
10611
|
'height': `${this.size}px`,
|
10549
10612
|
'width': `${this.size}px`,
|
10550
10613
|
'animation': `spin ${this.speed}s linear infinite`,
|
10551
10614
|
'-webkit-animation': `spin ${this.speed}s linear infinite`,
|
10552
10615
|
'-moz-animation': `spin ${this.speed}s linear infinite`,
|
10553
|
-
} }, index.h("svg", { key: '
|
10616
|
+
} }, index.h("svg", { key: '867ba4a123619a10de1700ed9c23a9c154fed67c', height: this.size, width: this.size, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 54 54", fill: "none" }, index.h("path", { key: 'd4711f92c2dd5d85b01e26e3c3a82f776cd1b72f', d: "M43.1586 17C39.8082 11.5978 33.8243 8 27 8C16.5066 8 8 16.5066 8 27C8 37.4934 16.5066 46 27 46C33.8242 46 39.8082 42.4022 43.1586 37", "stroke-width": "6", "stroke-linecap": "round" }), index.h("circle", { key: '69cbe92b1cc4f8d1736d4529b78fc5969f127844', cx: "45", cy: "27", r: "5" }))));
|
10554
10617
|
}
|
10555
10618
|
};
|
10556
10619
|
CpslSpinner.style = CpslSpinnerStyle0;
|
@@ -10582,7 +10645,7 @@ const CpslTab = class {
|
|
10582
10645
|
}
|
10583
10646
|
}
|
10584
10647
|
render() {
|
10585
|
-
return (index.h(index.Host, { key: '
|
10648
|
+
return (index.h(index.Host, { key: 'ece9ef79afb7bd761b945f8495b5d7a5707eea28', onClick: this.onTabClicked }, index.h("div", { key: '787d62147f208c37bd7e494499be123317499ed3', class: { 'tab-container': true } }, index.h("slot", { key: '2834e0f4c14b2940941e0dbe78105835111688cf' }))));
|
10586
10649
|
}
|
10587
10650
|
get el() { return index.getElement(this); }
|
10588
10651
|
};
|
@@ -10641,7 +10704,7 @@ const CpslTabs = class {
|
|
10641
10704
|
const tabsPosition = this.el.getBoundingClientRect();
|
10642
10705
|
const tabsBorderWidth = +getComputedStyle(this.el).getPropertyValue('--tabs-border-width').slice(0, -2);
|
10643
10706
|
const selectedTabRect = this.selectedTabRect;
|
10644
|
-
return (index.h(index.Host, { key: '
|
10707
|
+
return (index.h(index.Host, { key: '47d4b201d34630654f4d11c26972f0ddf9d9f748', class: { 'full-width': this.fullWidth }, onCpslTabButtonClick: this.onTabClicked }, index.h("div", { key: '2a956a61b65fb99445a76211448b0ca2b830baab', class: "tabs-container" }, index.h("slot", { key: '3ef04f0dacff55ea829b92e22b0f260e1f95bb95' }), index.h("div", { key: '4cf63ec114998fa41b3367c9c648467044f19d95', class: { slider: true, loaded: this.loaded }, style: { width: `${selectedTabRect.width}px`, left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px` } }))));
|
10645
10708
|
}
|
10646
10709
|
get el() { return index.getElement(this); }
|
10647
10710
|
static get watchers() { return {
|
@@ -10655,15 +10718,64 @@ const getTab = (tabs, tab) => {
|
|
10655
10718
|
};
|
10656
10719
|
CpslTabs.style = CpslTabsStyle0;
|
10657
10720
|
|
10658
|
-
const cpslTextCss = ":host{font-family:var(--cpsl-font-family, inherit);color:var(--cpsl-color-text-primary)}";
|
10721
|
+
const cpslTextCss = ":host{font-family:var(--cpsl-font-family, inherit);color:var(--cpsl-color-text-primary);padding:0px;margin:0px;display:block}:host p,h1,h2,h3,h4,h5,h6{padding:0px;margin:0px;font-weight:inherit;font-size:inherit;letter-spacing:inherit}:host(.primary){color:var(--cpsl-color-text-primary)}:host(.secondary){color:var(--cpsl-color-text-secondary)}:host(.subtle){color:var(--cpsl-color-text-subtle)}:host(.inverted){color:var(--cpsl-color-text-inverted)}:host(.error){color:var(--cpsl-color-text-error)}:host(.medium){font-weight:500}:host(.semi-bold){font-weight:600}:host(.bold){font-weight:700}:host(.body-2xs){font-size:var(--cpsl-font-size-body-2xs)}:host(.body-xs){font-size:var(--cpsl-font-size-body-xs)}:host(.body-s){font-size:var(--cpsl-font-size-body-s)}:host(.body-m){font-size:var(--cpsl-font-size-body-m)}:host(.body-l){font-size:var(--cpsl-font-size-body-l)}:host(.body-xl){font-size:var(--cpsl-font-size-body-xl)}:host(.heading-xs){font-size:var(--cpsl-font-size-heading-xs)}:host(.heading-s){font-size:var(--cpsl-font-size-heading-s)}:host(.heading-m){font-size:var(--cpsl-font-size-heading-m);letter-spacing:-0.4px}:host(.heading-l){font-size:var(--cpsl-font-size-heading-l);letter-spacing:-1.12px}:host(.heading-xl){font-size:var(--cpsl-font-size-heading-xl);letter-spacing:-1.28px}:host(.heading-2xl){font-size:var(--cpsl-font-size-heading-2xl);letter-spacing:-1.44px}";
|
10659
10722
|
const CpslTextStyle0 = cpslTextCss;
|
10660
10723
|
|
10661
10724
|
const CpslText = class {
|
10662
10725
|
constructor(hostRef) {
|
10663
10726
|
index.registerInstance(this, hostRef);
|
10727
|
+
this.color = 'primary';
|
10728
|
+
this.variant = 'bodyM';
|
10729
|
+
this.weight = 'regular';
|
10730
|
+
}
|
10731
|
+
get Content() {
|
10732
|
+
switch (this.variant) {
|
10733
|
+
case 'headingXS': {
|
10734
|
+
return (index.h("h6", null, index.h("slot", null)));
|
10735
|
+
}
|
10736
|
+
case 'headingS': {
|
10737
|
+
return (index.h("h5", null, index.h("slot", null)));
|
10738
|
+
}
|
10739
|
+
case 'headingM': {
|
10740
|
+
return (index.h("h4", null, index.h("slot", null)));
|
10741
|
+
}
|
10742
|
+
case 'headingL': {
|
10743
|
+
return (index.h("h3", null, index.h("slot", null)));
|
10744
|
+
}
|
10745
|
+
case 'headingXL': {
|
10746
|
+
return (index.h("h2", null, index.h("slot", null)));
|
10747
|
+
}
|
10748
|
+
case 'heading2XL': {
|
10749
|
+
return (index.h("h1", null, index.h("slot", null)));
|
10750
|
+
}
|
10751
|
+
default: {
|
10752
|
+
return (index.h("p", null, index.h("slot", null)));
|
10753
|
+
}
|
10754
|
+
}
|
10664
10755
|
}
|
10665
10756
|
render() {
|
10666
|
-
return (index.h(index.Host, { key: '
|
10757
|
+
return (index.h(index.Host, { key: '33b70ccfe3929f306d0a9b956ec2a4e16bf751b8', class: {
|
10758
|
+
'primary': this.color === 'primary',
|
10759
|
+
'secondary': this.color === 'secondary',
|
10760
|
+
'subtle': this.color === 'subtle',
|
10761
|
+
'inverted': this.color === 'inverted',
|
10762
|
+
'error': this.color === 'error',
|
10763
|
+
'medium': this.weight === 'medium',
|
10764
|
+
'semi-bold': this.weight === 'semiBold',
|
10765
|
+
'bold': this.weight === 'bold',
|
10766
|
+
'body-2xs': this.variant === 'body2XS',
|
10767
|
+
'body-xs': this.variant === 'bodyXS',
|
10768
|
+
'body-s': this.variant === 'bodyS',
|
10769
|
+
'body-m': this.variant === 'bodyM',
|
10770
|
+
'body-l': this.variant === 'bodyL',
|
10771
|
+
'body-xl': this.variant === 'bodyXL',
|
10772
|
+
'heading-xs': this.variant === 'headingXS',
|
10773
|
+
'heading-s': this.variant === 'headingS',
|
10774
|
+
'heading-m': this.variant === 'headingM',
|
10775
|
+
'heading-l': this.variant === 'headingL',
|
10776
|
+
'heading-xl': this.variant === 'headingXL',
|
10777
|
+
'heading-2xl': this.variant === 'heading2XL',
|
10778
|
+
} }, this.Content));
|
10667
10779
|
}
|
10668
10780
|
};
|
10669
10781
|
CpslText.style = CpslTextStyle0;
|
@@ -10678,7 +10790,7 @@ const CpslTileButton = class {
|
|
10678
10790
|
this.icon = undefined;
|
10679
10791
|
}
|
10680
10792
|
render() {
|
10681
|
-
return (index.h(index.Host, { key: '
|
10793
|
+
return (index.h(index.Host, { key: '61cbce3574220ee8009ab95c3e37d80535543d1c' }, index.h("button", { key: '50169b226155e2b06014c415dd522dfc0deb799c', class: "button-native" }, index.h("cpsl-icon", { key: '9ee77a4d725f4bec258ae753365a1f5aca733ff5', exportparts: "icon", src: this.src, icon: this.icon }), index.h("slot", { key: 'b01617dbca7322d9cc8f58c30680cd5f3ed0f576' }))));
|
10682
10794
|
}
|
10683
10795
|
};
|
10684
10796
|
CpslTileButton.style = CpslTileButtonStyle0;
|
@@ -10687,6 +10799,7 @@ exports.cpsl_alert = CpslAlert;
|
|
10687
10799
|
exports.cpsl_button = CpslButton;
|
10688
10800
|
exports.cpsl_code_input = CpslCodeInput;
|
10689
10801
|
exports.cpsl_divider = CpslDivider;
|
10802
|
+
exports.cpsl_dropdown = CpslDropdown;
|
10690
10803
|
exports.cpsl_icon = CpslIcon;
|
10691
10804
|
exports.cpsl_input = CpslInput;
|
10692
10805
|
exports.cpsl_modal = CpslModal;
|
@@ -10701,4 +10814,4 @@ exports.cpsl_tabs = CpslTabs;
|
|
10701
10814
|
exports.cpsl_text = CpslText;
|
10702
10815
|
exports.cpsl_tile_button = CpslTileButton;
|
10703
10816
|
|
10704
|
-
//# sourceMappingURL=cpsl-
|
10817
|
+
//# sourceMappingURL=cpsl-alert_18.cjs.entry.js.map
|