@usecapsule/core-components 3.2.0 → 3.3.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/index.esm.js +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/p-4203888d.entry.js +29 -0
- package/dist/capsule/p-4203888d.entry.js.map +1 -0
- package/dist/capsule/{p-dc4591d5.entry.js → p-69c3c53b.entry.js} +2 -2
- package/dist/capsule/p-69c3c53b.entry.js.map +1 -0
- package/dist/cjs/cpsl-alert_33.cjs.entry.js +35 -35
- package/dist/cjs/cpsl-alert_33.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-modal-v2.cjs.entry.js +1 -1
- package/dist/cjs/cpsl-modal-v2.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +2 -2
- package/dist/collection/components/cpsl-alert/cpsl-alert.js.map +1 -1
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js +3 -3
- package/dist/collection/components/cpsl-app-bar/cpsl-app-bar.js.map +1 -1
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js +2 -2
- package/dist/collection/components/cpsl-button-group/cpsl-button-group.js.map +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js.map +1 -1
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js +2 -2
- package/dist/collection/components/cpsl-drawer/cpsl-drawer.js.map +1 -1
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js +6 -6
- package/dist/collection/components/cpsl-file-upload/cpsl-file-upload.js.map +1 -1
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +1 -1
- package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.js +4 -4
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
- package/dist/collection/components/cpsl-modal/cpsl-modal.js +2 -2
- package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js +1 -1
- package/dist/collection/components/cpsl-modal-v2/cpsl-modal-v2.js.map +1 -1
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js +2 -2
- package/dist/collection/components/cpsl-nav-button-group/cpsl-nav-button-group.js.map +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
- package/dist/collection/components/cpsl-popover/cpsl-popover.js +5 -5
- package/dist/collection/components/cpsl-popover/cpsl-popover.js.map +1 -1
- package/dist/collection/components/cpsl-select/cpsl-select.js +3 -3
- package/dist/collection/components/cpsl-select/cpsl-select.js.map +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +2 -2
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
- package/dist/collection/utils/theme/generateBorderRadii.js +1 -1
- package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -1
- package/dist/collection/utils/theme/generateFont.js +1 -1
- package/dist/collection/utils/theme/generateFont.js.map +1 -1
- package/dist/collection/utils/theme/generatePalette.js +3 -3
- package/dist/collection/utils/theme/generatePalette.js.map +1 -1
- package/dist/esm/cpsl-alert_33.entry.js +35 -35
- package/dist/esm/cpsl-alert_33.entry.js.map +1 -1
- package/dist/esm/cpsl-modal-v2.entry.js +1 -1
- package/dist/esm/cpsl-modal-v2.entry.js.map +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -3
- package/dist/capsule/p-7233228e.entry.js +0 -29
- package/dist/capsule/p-7233228e.entry.js.map +0 -1
- package/dist/capsule/p-dc4591d5.entry.js.map +0 -1
- /package/dist/types/Users/{taylorbosch/Documents/GitHub/Capsule → norwood/capsule-repos}/web-sdk/packages/core-components/.stencil/scripts/buildAssets.d.ts +0 -0
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as t,c as e,h as i,H as s,g as
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as t,c as e,h as i,H as s,g as a}from"./p-fa6b7678.js";const o=":host{display:none;position:absolute;top:0;left:0;width:100vw;height:100vh;justify-content:center;align-items:center;z-index:10005}:host .card{z-index:10005;opacity:0;position:relative;transition:all}:host(.no-overlay){position:relative;top:unset;left:unset;width:100%;height:auto}:host(.open) .card{opacity:1}:host(.elevated) .card{--card-border-width:0px}:host(.elevated) .card::part(card-container){box-shadow:0px 8px 16px 0px rgba(0, 0, 0, 0.12)}";const n=o;const h=class{constructor(i){t(this,i);this.cpslModalEntering=e(this,"cpslModalEntering",7);this.cpslModalEntered=e(this,"cpslModalEntered",7);this.cpslModalExiting=e(this,"cpslModalExiting",7);this.cpslModalExited=e(this,"cpslModalExited",7);this.enterTransitionDuration=.15;this.exitTransitionDuration=.15;this.elevated=undefined;this.noOverlay=undefined;this.open=undefined;this.zIndexOverride=undefined}toggleHeight(){if(!this.open){this.cpslModalExiting.emit();setTimeout((()=>{this.el.style.display="none";this.cpslModalExited.emit()}),this.exitTransitionDuration*1e3)}else{this.cpslModalEntering.emit();this.el.style.display="flex";setTimeout((()=>{this.cpslModalEntered.emit()}),this.enterTransitionDuration*1e3)}}componentDidLoad(){this.toggleHeight()}render(){return i(s,{key:"0682407f6320fe77b42e4ceed6a9b7738a1b5541",class:{open:this.open,elevated:this.elevated,"no-overlay":this.noOverlay}},!this.noOverlay&&i("cpsl-overlay",{key:"23a4453e4aef7ab92d281fd8c3cfe751e5a9a814",zIndexOverride:this.zIndexOverride?this.zIndexOverride:undefined,id:"overlay",open:this.open,enterTransitionDuration:this.enterTransitionDuration,exitTransitionDuration:this.exitTransitionDuration}),i("cpsl-card",{key:"a8703d0aa0144970928dab18b153ceb703292433",class:"card",style:{transitionDuration:this.open?`${this.exitTransitionDuration}s`:`${this.enterTransitionDuration}s`}},i("slot",{key:"502bb4e11f0520dfeb027a06d7bbb21843cb579f"})))}get el(){return a(this)}static get watchers(){return{open:["toggleHeight"]}}};h.style=n;export{h as cpsl_modal_v2};
|
2
|
+
//# sourceMappingURL=p-69c3c53b.entry.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["cpslModalV2Css","CpslModalV2Style0","CpslModalV2","toggleHeight","this","open","cpslModalExiting","emit","setTimeout","el","style","display","cpslModalExited","exitTransitionDuration","cpslModalEntering","cpslModalEntered","enterTransitionDuration","componentDidLoad","render","h","Host","key","class","elevated","noOverlay","zIndexOverride","undefined","id","transitionDuration"],"sources":["src/components/cpsl-modal-v2/cpsl-modal-v2.scss?tag=cpsl-modal-v2&encapsulation=shadow","src/components/cpsl-modal-v2/cpsl-modal-v2.tsx"],"sourcesContent":["@use 'sass:map';\n@import '../../themes/capsule.globals';\n\n:host {\n display: none;\n\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n justify-content: center;\n align-items: center;\n\n z-index: map.get($z-indices, 'modal');\n\n & .card {\n z-index: map.get($z-indices, 'modal');\n opacity: 0;\n\n position: relative;\n\n transition: all;\n }\n}\n\n:host(.no-overlay) {\n position: relative;\n top: unset;\n left: unset;\n width: 100%;\n height: auto;\n}\n\n:host(.open) {\n & .card {\n opacity: 1;\n }\n}\n\n:host(.elevated) {\n & .card {\n --card-border-width: 0px;\n\n &::part(card-container) {\n box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.12);\n }\n }\n}\n","import { Component, Host, Prop, Watch, Element, Event, h, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-modal-v2',\n styleUrl: 'cpsl-modal-v2.scss',\n shadow: true,\n})\nexport class CpslModalV2 {\n @Element() el!: HTMLCpslModalV2Element;\n\n /**\n * Duration in seconds of the modal entering.\n * Default is .15.\n */\n @Prop() enterTransitionDuration?: number = 0.15;\n\n /**\n * Duration in seconds of the modal exiting.\n * Default is .15.\n */\n @Prop() exitTransitionDuration?: number = 0.15;\n\n /**\n * Whether or not to show the modal with a box shadow.\n */\n @Prop() elevated: boolean;\n\n /**\n * Whether or not to show the overlay.\n */\n @Prop() noOverlay: boolean;\n\n /**\n * Whether or not to show the modal.\n */\n @Prop() open: boolean;\n\n /**\n * Override z-index.\n */\n @Prop() zIndexOverride?: number;\n\n /**\n * Emitted when enter animation starts.\n */\n @Event() cpslModalEntering!: EventEmitter<null>;\n\n /**\n * Emitted when enter animation finishes.\n */\n @Event() cpslModalEntered!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation starts.\n */\n @Event() cpslModalExiting!: EventEmitter<null>;\n\n /**\n * Emitted when exit animation finishes.\n */\n @Event() cpslModalExited!: EventEmitter<null>;\n\n @Watch('open')\n toggleHeight() {\n if (!this.open) {\n this.cpslModalExiting.emit();\n // Animate out before setting display to none\n setTimeout(() => {\n this.el.style.display = 'none';\n this.cpslModalExited.emit();\n }, this.exitTransitionDuration * 1000);\n } else {\n this.cpslModalEntering.emit();\n this.el.style.display = 'flex';\n setTimeout(() => {\n this.cpslModalEntered.emit();\n }, this.enterTransitionDuration * 1000);\n }\n }\n\n componentDidLoad() {\n this.toggleHeight();\n }\n\n render() {\n return (\n <Host class={{ 'open': this.open, 'elevated': this.elevated, 'no-overlay': this.noOverlay }}>\n {!this.noOverlay && (\n <cpsl-overlay\n zIndexOverride={this.zIndexOverride ? this.zIndexOverride : undefined}\n id=\"overlay\"\n open={this.open}\n enterTransitionDuration={this.enterTransitionDuration}\n exitTransitionDuration={this.exitTransitionDuration}\n />\n )}\n <cpsl-card\n class=\"card\"\n style={{ transitionDuration: this.open ? `${this.exitTransitionDuration}s` : `${this.enterTransitionDuration}s` }}\n >\n <slot></slot>\n </cpsl-card>\n </Host>\n );\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAiB,qcACvB,MAAAC,EAAeD,E,MCMFE,EAAW,M,kQAOqB,I,4BAMD,I,mGA2C1C,YAAAC,GACE,IAAKC,KAAKC,KAAM,CACdD,KAAKE,iBAAiBC,OAEtBC,YAAW,KACTJ,KAAKK,GAAGC,MAAMC,QAAU,OACxBP,KAAKQ,gBAAgBL,MAAM,GAC1BH,KAAKS,uBAAyB,I,KAC5B,CACLT,KAAKU,kBAAkBP,OACvBH,KAAKK,GAAGC,MAAMC,QAAU,OACxBH,YAAW,KACTJ,KAAKW,iBAAiBR,MAAM,GAC3BH,KAAKY,wBAA0B,I,EAItC,gBAAAC,GACEb,KAAKD,c,CAGP,MAAAe,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAO,CAAEjB,KAAQD,KAAKC,KAAMkB,SAAYnB,KAAKmB,SAAU,aAAcnB,KAAKoB,aAC5EpB,KAAKoB,WACLL,EAAA,gBAAAE,IAAA,2CACEI,eAAgBrB,KAAKqB,eAAiBrB,KAAKqB,eAAiBC,UAC5DC,GAAG,UACHtB,KAAMD,KAAKC,KACXW,wBAAyBZ,KAAKY,wBAC9BH,uBAAwBT,KAAKS,yBAGjCM,EAAA,aAAAE,IAAA,2CACEC,MAAM,OACNZ,MAAO,CAAEkB,mBAAoBxB,KAAKC,KAAO,GAAGD,KAAKS,0BAA4B,GAAGT,KAAKY,6BAErFG,EAAA,QAAAE,IAAA,8C","ignoreList":[]}
|
@@ -33,7 +33,7 @@ const CpslAlert = class {
|
|
33
33
|
}
|
34
34
|
}
|
35
35
|
render() {
|
36
|
-
return (index.h(index.Host, { key: '
|
36
|
+
return (index.h(index.Host, { key: '58e67f0d9500653302c87d15a006876ece17256d', class: { error: this.variant === 'error', warning: this.variant === 'warning', success: this.variant === 'success' } }, index.h("div", { key: '66dfcb275d19631aed49a023733bc6a955950651', class: "alert-container" }, this.iconType && index.h("cpsl-icon", { key: 'e71eff78625fe5cdb869070cc116e7cf04b6c3e9', icon: this.iconType }), index.h("slot", { key: '07301d0f46c6a1b275654c46b8e6c69677f38aed' }))));
|
37
37
|
}
|
38
38
|
};
|
39
39
|
CpslAlert.style = CpslAlertStyle0;
|
@@ -49,13 +49,13 @@ const CpslAppBar = class {
|
|
49
49
|
this.zIndexOverride = undefined;
|
50
50
|
}
|
51
51
|
render() {
|
52
|
-
return (index.h(index.Host, { key: '
|
52
|
+
return (index.h(index.Host, { key: '281c1ebcc7ad61ccbd6878fb31d9b52a5860c273', style: Object.assign({
|
53
53
|
// position: this.position,
|
54
54
|
height: `${this.height}px`
|
55
|
-
}, (
|
55
|
+
}, (this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {})) }, index.h("div", { key: '90fdd0e77212ac8a1c861e2402b34b15a9d26f7b', class: "container", part: "container", style: {
|
56
56
|
position: this.position,
|
57
57
|
height: `${this.height}px`,
|
58
|
-
} }, index.h("slot", { key: '
|
58
|
+
} }, index.h("slot", { key: '6aa42ab3e08a7d0629082a0bbba2831b1c9374f2' })), this.position === 'fixed' && (index.h("div", { key: '99169fc7212b22fcaa2e490ee2f6a7aad750e5a3', style: {
|
59
59
|
height: `${this.height}px`,
|
60
60
|
} }))));
|
61
61
|
}
|
@@ -136,7 +136,7 @@ const CpslButtonGroup = class {
|
|
136
136
|
item.setAttribute('full-width', 'true');
|
137
137
|
this.selectItem();
|
138
138
|
});
|
139
|
-
if (
|
139
|
+
if ((_a = this.otherSlots) === null || _a === void 0 ? void 0 : _a.length) {
|
140
140
|
console.error('cpsl-button is the only valid child of cpsl-button-group');
|
141
141
|
this.otherSlots.forEach(item => item.remove());
|
142
142
|
}
|
@@ -148,7 +148,7 @@ const CpslButtonGroup = class {
|
|
148
148
|
return this.el.querySelectorAll('&> *:not(cpsl-button)');
|
149
149
|
}
|
150
150
|
render() {
|
151
|
-
return (index.h(index.Host, { key: '
|
151
|
+
return (index.h(index.Host, { key: '91ccfcaf08be6fc45076376b19e63b5b58ab9b15' }, index.h("slot", { key: '9af22dc4fcbd76ebc32e476d1682e2fe41b33f81' })));
|
152
152
|
}
|
153
153
|
get el() { return index.getElement(this); }
|
154
154
|
static get watchers() { return {
|
@@ -283,7 +283,7 @@ const CpslCodeInput = class {
|
|
283
283
|
return (index.h(index.Host, { key: 'a75b04b3cf649df494520712a822f450e44f106f' }, index.h("div", { key: 'c38ae9fab904d38cd3a3154e2aa4bcdef1e1562b', class: "code-container" }, new Array(this.length).fill(0).map((_, i) => {
|
284
284
|
var _a;
|
285
285
|
return (index.h("input", { class: { 'code-input': true, 'error': Boolean(this.errorText) }, id: `code-input-${i}`, maxLength: 1, onKeyDown: ev => this.handleKeyDown(i, ev), onInput: ev => this.handleInput(i, ev), onFocus: () => this.handleFocus(i), onPaste: this.handlePaste, min: 0, max: 9, value: (_a = this.code) === null || _a === void 0 ? void 0 : _a[i], inputMode: this.type === 'number' ? 'numeric' : 'text' }));
|
286
|
-
})), (this.errorText || this.helperText) && (index.h("div", { key: '96041359166b5a633d4e4598d22523553592ed4e', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("cpsl-icon", { key: '
|
286
|
+
})), (this.errorText || this.helperText) && (index.h("div", { key: '96041359166b5a633d4e4598d22523553592ed4e', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("cpsl-icon", { key: 'ea92b75ad3d82c4a3473b758f98f873fc1b84b4c', icon: this.errorText ? 'alertCircle' : 'infoCircle' }), index.h("span", { key: '09a2ae795033faab8bc187cbe5d3073aeae4b977' }, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
|
287
287
|
}
|
288
288
|
get el() { return index.getElement(this); }
|
289
289
|
};
|
@@ -339,12 +339,12 @@ const CpslDrawer = class {
|
|
339
339
|
const setHeight = this.anchor === 'top' || this.anchor === 'bottom';
|
340
340
|
const startingAnchor = (_a = `${this.anchorPosition}px`) !== null && _a !== void 0 ? _a : '0px';
|
341
341
|
const size = this.size === 'auto' ? 'auto' : `${this.size}px`;
|
342
|
-
return (index.h(index.Host, { key: '
|
342
|
+
return (index.h(index.Host, { key: '81d454f0a4532e333880f4e37a79545ee5710536', style: Object.assign({ width: setHeight ? '100vw' : size, height: setHeight ? size : '100vh', transitionDuration: `${this.showTransition ? this.transitionDuration : 0}s`, transitionTimingFunction: `${this.transitionFunction}`, [this.anchor]: this.open || this.variant === 'permanent' ? startingAnchor : this.closedAnchorPosition, opacity: this.closedAnchorPosition === undefined ? '0' : '1' }, (this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {})), class: {
|
343
343
|
top: this.anchor === 'top',
|
344
344
|
bottom: this.anchor === 'bottom',
|
345
345
|
left: this.anchor === 'left',
|
346
346
|
right: this.anchor === 'right',
|
347
|
-
} }, this.variant === 'temporary' && !this.noOverlay && (index.h("cpsl-overlay", { key: '
|
347
|
+
} }, this.variant === 'temporary' && !this.noOverlay && (index.h("cpsl-overlay", { key: '96f094c52ac1dc963494319933e3b59f798a6542', open: this.open, zIndexOverride: constants.DEFAULT_Z_INDICES.modal + 1 })), index.h("div", { key: '1c201b7a8ba0a86e56b8c8aad35b2028574c9671', id: "container", class: "container", part: "container" }, index.h("slot", { key: 'e4e6b5b4f761a05d0e4dbe38fa12657e5c44ceca' }))));
|
348
348
|
}
|
349
349
|
get el() { return index.getElement(this); }
|
350
350
|
};
|
@@ -5228,7 +5228,7 @@ const CpslFileUpload = class {
|
|
5228
5228
|
this.handleInputChange = (ev) => __awaiter$1(this, void 0, void 0, function* () {
|
5229
5229
|
ev.preventDefault();
|
5230
5230
|
const input = this.inputEl;
|
5231
|
-
if (
|
5231
|
+
if (input.files.length) {
|
5232
5232
|
const file = input.files[0];
|
5233
5233
|
if (this.isValidFile(file.type)) {
|
5234
5234
|
yield this.addFile(file);
|
@@ -5237,7 +5237,7 @@ const CpslFileUpload = class {
|
|
5237
5237
|
});
|
5238
5238
|
this.isValidFile = (type) => {
|
5239
5239
|
var _a;
|
5240
|
-
if (
|
5240
|
+
if (((_a = this.fileTypes) === null || _a === void 0 ? void 0 : _a.length) ? !this.fileTypes.includes(type) : false) {
|
5241
5241
|
return false;
|
5242
5242
|
}
|
5243
5243
|
return true;
|
@@ -5247,7 +5247,7 @@ const CpslFileUpload = class {
|
|
5247
5247
|
this.cpslFileChange.emit(file);
|
5248
5248
|
this.uploadError = false;
|
5249
5249
|
this.isUploading = true;
|
5250
|
-
const uploadSuccess =
|
5250
|
+
const uploadSuccess = this.uploadFile ? yield this.uploadFile(file) : true;
|
5251
5251
|
if (!uploadSuccess) {
|
5252
5252
|
this.uploadError = true;
|
5253
5253
|
const input = this.inputEl;
|
@@ -5286,17 +5286,17 @@ const CpslFileUpload = class {
|
|
5286
5286
|
const isUploading = this.isUploading;
|
5287
5287
|
const error = this.uploadError;
|
5288
5288
|
const text = !hasFile ? (index.h(index.Fragment, null, 'Drag file here or ', index.h("cpsl-text", { class: "inline-text", variant: "bodyXS" }, "upload file"))) : isUploading ? (`${this.file.name} is uploading`) : error ? ('Upload Failed') : (((_a = this.file) === null || _a === void 0 ? void 0 : _a.name) || this.externalFilename || '');
|
5289
|
-
const TopElement = !hasFile ? (index.h("cpsl-icon", { icon: "image" })) : isUploading ? (index.h("cpsl-spinner", null)) : error ? (index.h("cpsl-icon", { icon: "close" })) : (index.h("img", { class: "sample-img", src:
|
5289
|
+
const TopElement = !hasFile ? (index.h("cpsl-icon", { icon: "image" })) : isUploading ? (index.h("cpsl-spinner", null)) : error ? (index.h("cpsl-icon", { icon: "close" })) : (index.h("img", { class: "sample-img", src: this.file ? URL.createObjectURL(this.file) : this.externalSrc, alt: "Sample Image" }));
|
5290
5290
|
return (index.h(index.Fragment, null, TopElement, index.h("span", { class: "sample-image-name-container" }, index.h("cpsl-text", { class: "sample-image-name", variant: "bodyXS" }, text), hasFile && !error && !isUploading && index.h("cpsl-icon", { icon: "close", onClick: this.removeFile }))));
|
5291
5291
|
}
|
5292
5292
|
render() {
|
5293
5293
|
var _a, _b, _c;
|
5294
|
-
return (index.h(index.Host, { key: '
|
5294
|
+
return (index.h(index.Host, { key: '7d86bbac92b88c5e0b4a7c79cde8b2669f3801c2' }, this.label && (index.h("label", { key: 'eb364a27a57b278c5f6a75b793369e07ced1ea2c', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? index.h("span", { class: "optional-label" }, "(optional)") : '')), index.h("slot", { key: 'e40411eb484d37dcc9980aaab3a1f69aaf954cc0', name: "label" }), index.h("div", { key: '89002e60d7f77b252f0c2975ce7a06e60fc2f869', class: {
|
5295
5295
|
'container': true,
|
5296
5296
|
'error': Boolean(this.errorText),
|
5297
5297
|
'drag': this.dragOver,
|
5298
5298
|
'drag-error': this.dragError,
|
5299
|
-
} }, index.h("div", { key: '
|
5299
|
+
} }, index.h("div", { key: '8bafc5c869a0bce30ab2d8b5a0637a3e0107c6fa', class: { 'label-container': true } }, index.h("slot", { key: '45243bf17f5ea2e330146b1b87f5f2d523ac9250', name: "left-content" })), index.h("div", { key: '7e2da2facbb1f602b9da2f2a02f8993f629d14a8', class: { 'file-container': true } }, this.FileContent), index.h("input", { key: '6f16f2eeab60fb48018d98ff97de89707d1fdef2', id: this.inputId, type: "file", accept: (_b = (_a = this.fileTypes) === null || _a === void 0 ? void 0 : _a.join(', ')) !== null && _b !== void 0 ? _b : '*', files: this.file ? [this.file] : undefined, onDrop: this.handleDrop, onDragEnter: this.handleDragEnter, onDragLeave: this.handleDragLeave, onChange: this.handleInputChange })), (this.errorText || this.helperText) && (index.h("div", { key: '26967c087e20d68251d603257fbe0ba491807043', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("span", { key: 'a1c85bed3f74a2f1808fb5f472bddf4c9ea7dc7b' }, (_c = this.errorText) !== null && _c !== void 0 ? _c : this.helperText)))));
|
5300
5300
|
}
|
5301
5301
|
get el() { return index.getElement(this); }
|
5302
5302
|
};
|
@@ -5313,7 +5313,7 @@ const CpslIcon = class {
|
|
5313
5313
|
this.icon = undefined;
|
5314
5314
|
}
|
5315
5315
|
render() {
|
5316
|
-
return (index.h(index.Host, { key: '6960e6da25cb3cd108021f8a5aa20a92a24f92b3', part: "icon", role: "img" }, !
|
5316
|
+
return (index.h(index.Host, { key: '6960e6da25cb3cd108021f8a5aa20a92a24f92b3', part: "icon", role: "img" }, !this.icon ? index.h("img", { src: this.src }) : index.h("div", { innerHTML: Icons[this.icon] })));
|
5317
5317
|
}
|
5318
5318
|
};
|
5319
5319
|
CpslIcon.style = CpslIconStyle0;
|
@@ -5332,7 +5332,7 @@ const CpslInput = class {
|
|
5332
5332
|
this.inputId = `cpsl-input-${inputIds$1++}`;
|
5333
5333
|
this.onInput = (ev) => {
|
5334
5334
|
const input = ev.target;
|
5335
|
-
if (
|
5335
|
+
if (input) {
|
5336
5336
|
this.value = input.value || '';
|
5337
5337
|
input.value === '' ? this.disableSlots() : this.enableSlots();
|
5338
5338
|
}
|
@@ -5427,7 +5427,7 @@ const CpslInput = class {
|
|
5427
5427
|
// }
|
5428
5428
|
componentDidLoad() {
|
5429
5429
|
this.initButtons();
|
5430
|
-
if (
|
5430
|
+
if (this.value) {
|
5431
5431
|
this.enableSlots();
|
5432
5432
|
}
|
5433
5433
|
else {
|
@@ -5489,11 +5489,11 @@ const CpslInput = class {
|
|
5489
5489
|
}
|
5490
5490
|
render() {
|
5491
5491
|
var _a;
|
5492
|
-
return (index.h(index.Host, { key: '
|
5492
|
+
return (index.h(index.Host, { key: 'f406b64446832eb4f25c668707ce66194bcf7770', class: {
|
5493
5493
|
'disabled': this.disabled,
|
5494
5494
|
'focused': this.hasFocus,
|
5495
5495
|
'has-value': Boolean(this.focusedValue) || Boolean(this.value),
|
5496
|
-
} }, this.label && (index.h("label", { key: '
|
5496
|
+
} }, this.label && (index.h("label", { key: '5b2c4f219de0d03aebe4ae38a75c9132c9b2b9ea', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? index.h("span", { class: "optional-label" }, "(optional)") : '')), index.h("div", { key: '9c050f74275e83c717ab3f8f6af8a5bd0693a4b4', class: { 'input-container': true, 'error-container': Boolean(this.errorText) } }, index.h("slot", { key: '4633e4edbc36defba6bd94ee65b6150c4c5ddf50', name: "start" }), index.h("input", { key: '4a5b287135486260dec2a14077a2a6e933a5cbb7', class: "native-input", ref: input => (this.nativeInput = input), id: this.inputId, disabled: this.disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, type: this.type, value: this.value, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur, onClick: this.focusInput, onPaste: this.onPaste }), index.h("slot", { key: '476c2c16758a1c7227cd6903ff1b2de3befbaab9', name: "end" })), (this.errorText || this.helperText) && (index.h("div", { key: '0490e976cb9fc8f36ba0dee545e72346f574daf6', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("span", { key: '9500ff41ad9119d311dc5bfbf5fd583586728d78' }, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
|
5497
5497
|
}
|
5498
5498
|
get el() { return index.getElement(this); }
|
5499
5499
|
static get watchers() { return {
|
@@ -14867,9 +14867,9 @@ const CpslModal = class {
|
|
14867
14867
|
}
|
14868
14868
|
render() {
|
14869
14869
|
if (this.noOverlay) {
|
14870
|
-
return (index.h(index.Host, { style:
|
14870
|
+
return (index.h(index.Host, { style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}, class: "no-overlay" }, this.Modal));
|
14871
14871
|
}
|
14872
|
-
return (index.h(index.Host, { style:
|
14872
|
+
return (index.h(index.Host, { style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}, class: { 'include-mobile-styling': true } }, index.h("cpsl-overlay", { zIndexOverride: this.zIndexOverride ? this.zIndexOverride : undefined, id: "overlay", open: this.open, enterTransitionDuration: this.enterTransitionDuration, exitTransitionDuration: this.exitTransitionDuration }), index.h("div", { id: "modal-wrapper", class: "modal-wrapper" }, this.Modal)));
|
14873
14873
|
}
|
14874
14874
|
get el() { return index.getElement(this); }
|
14875
14875
|
static get watchers() { return {
|
@@ -14904,7 +14904,7 @@ const CpslNavButtonGroup = class {
|
|
14904
14904
|
item.setAttribute('full-width', 'true');
|
14905
14905
|
this.selectItem();
|
14906
14906
|
});
|
14907
|
-
if (
|
14907
|
+
if ((_a = this.otherSlots) === null || _a === void 0 ? void 0 : _a.length) {
|
14908
14908
|
console.error('cpsl-button is the only valid child of cpsl-nav-button-group');
|
14909
14909
|
this.otherSlots.forEach(item => item.remove());
|
14910
14910
|
}
|
@@ -14916,7 +14916,7 @@ const CpslNavButtonGroup = class {
|
|
14916
14916
|
return this.el.querySelectorAll('&> *:not(cpsl-button)');
|
14917
14917
|
}
|
14918
14918
|
render() {
|
14919
|
-
return (index.h(index.Host, { key: '
|
14919
|
+
return (index.h(index.Host, { key: '067afdd4450da73433b1f3f2c1de751e79aadd70' }, index.h("slot", { key: '109be26467469f2120b756b10a233efe1cf2f77c' })));
|
14920
14920
|
}
|
14921
14921
|
get el() { return index.getElement(this); }
|
14922
14922
|
static get watchers() { return {
|
@@ -14957,7 +14957,7 @@ const CpslOverlay = class {
|
|
14957
14957
|
}
|
14958
14958
|
}
|
14959
14959
|
render() {
|
14960
|
-
return (index.h(index.Host, { key: '
|
14960
|
+
return (index.h(index.Host, { key: 'c82e1811eabb1c2796a77572cc73816187ca57cb', style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {} }, index.h("slot", { key: 'a601f5ef8c1042d83b38c74f10359591740fbc72' })));
|
14961
14961
|
}
|
14962
14962
|
get el() { return index.getElement(this); }
|
14963
14963
|
static get watchers() { return {
|
@@ -15095,14 +15095,14 @@ const CpslPopover = class {
|
|
15095
15095
|
this.triggerClicked = false;
|
15096
15096
|
this.configureTriggerInteraction = () => {
|
15097
15097
|
const { trigger, triggerAction, destroyTriggerInteraction } = this;
|
15098
|
-
if (
|
15098
|
+
if (destroyTriggerInteraction) {
|
15099
15099
|
destroyTriggerInteraction();
|
15100
15100
|
}
|
15101
15101
|
if (trigger === undefined) {
|
15102
15102
|
return;
|
15103
15103
|
}
|
15104
15104
|
this.triggerEl = document.getElementById(trigger);
|
15105
|
-
if (!
|
15105
|
+
if (!this.triggerEl) {
|
15106
15106
|
console.error(`A trigger element with the ID "${trigger}" was not found in the DOM.`, this.el);
|
15107
15107
|
return;
|
15108
15108
|
}
|
@@ -15163,7 +15163,7 @@ const CpslPopover = class {
|
|
15163
15163
|
this.setPosition = () => {
|
15164
15164
|
var _a;
|
15165
15165
|
const anchorEl = (_a = this.anchorEl) !== null && _a !== void 0 ? _a : this.triggerEl;
|
15166
|
-
if (
|
15166
|
+
if (anchorEl) {
|
15167
15167
|
const windowWidth = window.innerWidth;
|
15168
15168
|
const windowHeight = window.innerHeight;
|
15169
15169
|
const elWidth = this.el.clientWidth;
|
@@ -15281,7 +15281,7 @@ const CpslPopover = class {
|
|
15281
15281
|
}
|
15282
15282
|
render() {
|
15283
15283
|
var _a;
|
15284
|
-
return (index.h(index.Host, { key: '
|
15284
|
+
return (index.h(index.Host, { key: 'b902dfc80a1b92d70729feb0d69ffbd6a266a93c', class: {
|
15285
15285
|
'open': this.open,
|
15286
15286
|
'transform-h-left': this.transformOriginHorizontal === 'left',
|
15287
15287
|
'transform-h-center': this.transformOriginHorizontal === 'center',
|
@@ -15293,7 +15293,7 @@ const CpslPopover = class {
|
|
15293
15293
|
top: `${this.positionY}px`,
|
15294
15294
|
left: `${this.positionX}px`,
|
15295
15295
|
width: this.autoWidth ? 'auto' : `${(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.clientWidth}px`,
|
15296
|
-
} }, index.h("div", { key: '
|
15296
|
+
} }, index.h("div", { key: 'b0aa879a39c083ab238589bc7093680b1061ad56', id: "container", class: { container: true, open: this.open } }, index.h("slot", { key: '69497b143a41e30a534e24a06d5306e69ac0d410' }))));
|
15297
15297
|
}
|
15298
15298
|
get el() { return index.getElement(this); }
|
15299
15299
|
static get watchers() { return {
|
@@ -15439,7 +15439,7 @@ const CpslSelect = class {
|
|
15439
15439
|
item.setAttribute('selected', 'false');
|
15440
15440
|
}
|
15441
15441
|
});
|
15442
|
-
if (!
|
15442
|
+
if (!this.selectedValue) {
|
15443
15443
|
this.hasSelectedItem = false;
|
15444
15444
|
}
|
15445
15445
|
};
|
@@ -15494,9 +15494,9 @@ const CpslSelect = class {
|
|
15494
15494
|
}
|
15495
15495
|
render() {
|
15496
15496
|
var _a, _b, _c, _d;
|
15497
|
-
return (index.h(index.Host, { key: '
|
15497
|
+
return (index.h(index.Host, { key: '50f16e4ffbc8ccd431d957e55dc07455eb5e5c9b', id: this.id, class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.selectedValue) } }, this.label && (index.h("label", { key: '47170480aec48780e1bb3b7b2a26b37fa8866f7e', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? index.h("span", { class: "optional-label" }, "(optional)") : '')), index.h("div", { key: '1636db18d4ec355ed48dee0105f26c543a2938b0', id: "select-container", class: { 'select-container': true, 'error-container': Boolean(this.errorText) }, onMouseDown: this.handleClick }, this.hasSelectedItem && this.showFormattedSelectedItem && index.h("slot", { key: 'a2c97abeb6bb7bba8d98dafb4076cfe0d3069a0a', name: "selected-item" }), index.h("div", { key: 'dc97728bb0f38408a66277a63b1109ab0bcc7dd3', class: "selected-container-content", id: "selected-container-content" }, (!this.hasSelectedItem || !this.showFormattedSelectedItem) && (index.h("cpsl-text", { key: 'd90420a0312ae7e6b2a44a738d3b6503328d5c28', class: { 'selected-text': true, 'placeholder': !this.selectedValue } }, !this.selectedValue
|
15498
15498
|
? ((_a = this.placeholder) !== null && _a !== void 0 ? _a : 'Select')
|
15499
|
-
: ((_c = (_b = this.formatValue) === null || _b === void 0 ? void 0 : _b.call(this, this.selectedValue)) !== null && _c !== void 0 ? _c : this.selectedValue)))), index.h("cpsl-icon", { key: '
|
15499
|
+
: ((_c = (_b = this.formatValue) === null || _b === void 0 ? void 0 : _b.call(this, this.selectedValue)) !== null && _c !== void 0 ? _c : this.selectedValue)))), index.h("cpsl-icon", { key: 'f8e82e83797286597bfef061e78f3768b10501c8', class: { 'chevron': true, 'open': this.popoverOpen, 'has-value': Boolean(this.selectedValue) }, icon: "chevronUp" }), index.h("input", { key: 'e834e3441fe01c9d8a0eecb87a97e3d7451e69fa', id: this.inputId, disabled: this.disabled, class: { disabled: this.disabled }, value: this.selectedValue, onFocus: this.onFocus, onBlur: this.onBlur, onKeyPress: this.handleEnterPress, inputmode: "none" })), (this.errorText || this.helperText) && (index.h("div", { key: 'ec6db31b7f9946c2901b7228bd48cb81c35c6d42', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, index.h("span", { key: '45a5695523c4d3b4b96771c766a853c6652910a9' }, (_d = this.errorText) !== null && _d !== void 0 ? _d : this.helperText))), index.h("cpsl-popover", { key: 'fb10a30be9d95efebca36301fb18cf98767a906b', autoWidth: false, trigger: this.id, preventBlur: this.hasFocus, disabled: this.disabled, anchorEl: this.anchorEl }, index.h("div", { key: '13f4a873f7e04d3bf97e8be07b13b6a9c74da366', class: "dropdown" }, index.h("div", { key: 'cc69d0f8ea88c6e8f83ef85a126b011fafdc9159', class: "dropdown-inner", style: { maxHeight: `${this.dropdownMaxHeight}px` } }, index.h("slot", { key: '67a9a69df08e585b81855ac0ca1b8dda17e1888c', name: "items" }))))));
|
15500
15500
|
}
|
15501
15501
|
get el() { return index.getElement(this); }
|
15502
15502
|
static get watchers() { return {
|
@@ -15829,7 +15829,7 @@ const CpslTabs = class {
|
|
15829
15829
|
}, 50);
|
15830
15830
|
}
|
15831
15831
|
updateTab(newValue, oldValue) {
|
15832
|
-
if (Boolean(newValue) && !
|
15832
|
+
if (Boolean(newValue) && !oldValue) {
|
15833
15833
|
this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();
|
15834
15834
|
}
|
15835
15835
|
}
|
@@ -15856,7 +15856,7 @@ const CpslTabs = class {
|
|
15856
15856
|
// Get border width as a number
|
15857
15857
|
const tabsBorderWidth = +getComputedStyle(this.el).getPropertyValue('--tabs-border-width').slice(0, -2);
|
15858
15858
|
const selectedTabRect = this.selectedTabRect;
|
15859
|
-
return (index.h(index.Host, { key: '
|
15859
|
+
return (index.h(index.Host, { key: '9b866a24588194c48561a3c1a1f15c1095499b55', class: { 'full-width': this.fullWidth }, onCpslTabButtonClick: this.onTabClicked }, index.h("div", { key: '4047b6a6773fee92da4f880e50cb7fcbe2171e54', class: "tabs-container" }, index.h("slot", { key: 'b5d92ad7537e81c40202cff115c85a2efb91e847' }), index.h("div", { key: '82eab4791625ec572f616416e500737f4f5d7eeb', class: { slider: true, loaded: this.loaded }, style: {
|
15860
15860
|
width: `${selectedTabRect.width}px`,
|
15861
15861
|
left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px`,
|
15862
15862
|
} }))));
|