@usecapsule/core-components 3.2.0 → 3.3.0-dev.1
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -29,7 +29,7 @@ const CpslAlert = class {
|
|
29
29
|
}
|
30
30
|
}
|
31
31
|
render() {
|
32
|
-
return (h(Host, { key: '
|
32
|
+
return (h(Host, { key: '58e67f0d9500653302c87d15a006876ece17256d', class: { error: this.variant === 'error', warning: this.variant === 'warning', success: this.variant === 'success' } }, h("div", { key: '66dfcb275d19631aed49a023733bc6a955950651', class: "alert-container" }, this.iconType && h("cpsl-icon", { key: 'e71eff78625fe5cdb869070cc116e7cf04b6c3e9', icon: this.iconType }), h("slot", { key: '07301d0f46c6a1b275654c46b8e6c69677f38aed' }))));
|
33
33
|
}
|
34
34
|
};
|
35
35
|
CpslAlert.style = CpslAlertStyle0;
|
@@ -45,13 +45,13 @@ const CpslAppBar = class {
|
|
45
45
|
this.zIndexOverride = undefined;
|
46
46
|
}
|
47
47
|
render() {
|
48
|
-
return (h(Host, { key: '
|
48
|
+
return (h(Host, { key: '281c1ebcc7ad61ccbd6878fb31d9b52a5860c273', style: Object.assign({
|
49
49
|
// position: this.position,
|
50
50
|
height: `${this.height}px`
|
51
|
-
}, (
|
51
|
+
}, (this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {})) }, h("div", { key: '90fdd0e77212ac8a1c861e2402b34b15a9d26f7b', class: "container", part: "container", style: {
|
52
52
|
position: this.position,
|
53
53
|
height: `${this.height}px`,
|
54
|
-
} }, h("slot", { key: '
|
54
|
+
} }, h("slot", { key: '6aa42ab3e08a7d0629082a0bbba2831b1c9374f2' })), this.position === 'fixed' && (h("div", { key: '99169fc7212b22fcaa2e490ee2f6a7aad750e5a3', style: {
|
55
55
|
height: `${this.height}px`,
|
56
56
|
} }))));
|
57
57
|
}
|
@@ -132,7 +132,7 @@ const CpslButtonGroup = class {
|
|
132
132
|
item.setAttribute('full-width', 'true');
|
133
133
|
this.selectItem();
|
134
134
|
});
|
135
|
-
if (
|
135
|
+
if ((_a = this.otherSlots) === null || _a === void 0 ? void 0 : _a.length) {
|
136
136
|
console.error('cpsl-button is the only valid child of cpsl-button-group');
|
137
137
|
this.otherSlots.forEach(item => item.remove());
|
138
138
|
}
|
@@ -144,7 +144,7 @@ const CpslButtonGroup = class {
|
|
144
144
|
return this.el.querySelectorAll('&> *:not(cpsl-button)');
|
145
145
|
}
|
146
146
|
render() {
|
147
|
-
return (h(Host, { key: '
|
147
|
+
return (h(Host, { key: '91ccfcaf08be6fc45076376b19e63b5b58ab9b15' }, h("slot", { key: '9af22dc4fcbd76ebc32e476d1682e2fe41b33f81' })));
|
148
148
|
}
|
149
149
|
get el() { return getElement(this); }
|
150
150
|
static get watchers() { return {
|
@@ -279,7 +279,7 @@ const CpslCodeInput = class {
|
|
279
279
|
return (h(Host, { key: 'a75b04b3cf649df494520712a822f450e44f106f' }, h("div", { key: 'c38ae9fab904d38cd3a3154e2aa4bcdef1e1562b', class: "code-container" }, new Array(this.length).fill(0).map((_, i) => {
|
280
280
|
var _a;
|
281
281
|
return (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' }));
|
282
|
-
})), (this.errorText || this.helperText) && (h("div", { key: '96041359166b5a633d4e4598d22523553592ed4e', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { key: '
|
282
|
+
})), (this.errorText || this.helperText) && (h("div", { key: '96041359166b5a633d4e4598d22523553592ed4e', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("cpsl-icon", { key: 'ea92b75ad3d82c4a3473b758f98f873fc1b84b4c', icon: this.errorText ? 'alertCircle' : 'infoCircle' }), h("span", { key: '09a2ae795033faab8bc187cbe5d3073aeae4b977' }, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
|
283
283
|
}
|
284
284
|
get el() { return getElement(this); }
|
285
285
|
};
|
@@ -335,12 +335,12 @@ const CpslDrawer = class {
|
|
335
335
|
const setHeight = this.anchor === 'top' || this.anchor === 'bottom';
|
336
336
|
const startingAnchor = (_a = `${this.anchorPosition}px`) !== null && _a !== void 0 ? _a : '0px';
|
337
337
|
const size = this.size === 'auto' ? 'auto' : `${this.size}px`;
|
338
|
-
return (h(Host, { key: '
|
338
|
+
return (h(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: {
|
339
339
|
top: this.anchor === 'top',
|
340
340
|
bottom: this.anchor === 'bottom',
|
341
341
|
left: this.anchor === 'left',
|
342
342
|
right: this.anchor === 'right',
|
343
|
-
} }, this.variant === 'temporary' && !this.noOverlay && (h("cpsl-overlay", { key: '
|
343
|
+
} }, this.variant === 'temporary' && !this.noOverlay && (h("cpsl-overlay", { key: '96f094c52ac1dc963494319933e3b59f798a6542', open: this.open, zIndexOverride: DEFAULT_Z_INDICES.modal + 1 })), h("div", { key: '1c201b7a8ba0a86e56b8c8aad35b2028574c9671', id: "container", class: "container", part: "container" }, h("slot", { key: 'e4e6b5b4f761a05d0e4dbe38fa12657e5c44ceca' }))));
|
344
344
|
}
|
345
345
|
get el() { return getElement(this); }
|
346
346
|
};
|
@@ -5224,7 +5224,7 @@ const CpslFileUpload = class {
|
|
5224
5224
|
this.handleInputChange = (ev) => __awaiter$1(this, void 0, void 0, function* () {
|
5225
5225
|
ev.preventDefault();
|
5226
5226
|
const input = this.inputEl;
|
5227
|
-
if (
|
5227
|
+
if (input.files.length) {
|
5228
5228
|
const file = input.files[0];
|
5229
5229
|
if (this.isValidFile(file.type)) {
|
5230
5230
|
yield this.addFile(file);
|
@@ -5233,7 +5233,7 @@ const CpslFileUpload = class {
|
|
5233
5233
|
});
|
5234
5234
|
this.isValidFile = (type) => {
|
5235
5235
|
var _a;
|
5236
|
-
if (
|
5236
|
+
if (((_a = this.fileTypes) === null || _a === void 0 ? void 0 : _a.length) ? !this.fileTypes.includes(type) : false) {
|
5237
5237
|
return false;
|
5238
5238
|
}
|
5239
5239
|
return true;
|
@@ -5243,7 +5243,7 @@ const CpslFileUpload = class {
|
|
5243
5243
|
this.cpslFileChange.emit(file);
|
5244
5244
|
this.uploadError = false;
|
5245
5245
|
this.isUploading = true;
|
5246
|
-
const uploadSuccess =
|
5246
|
+
const uploadSuccess = this.uploadFile ? yield this.uploadFile(file) : true;
|
5247
5247
|
if (!uploadSuccess) {
|
5248
5248
|
this.uploadError = true;
|
5249
5249
|
const input = this.inputEl;
|
@@ -5282,17 +5282,17 @@ const CpslFileUpload = class {
|
|
5282
5282
|
const isUploading = this.isUploading;
|
5283
5283
|
const error = this.uploadError;
|
5284
5284
|
const text = !hasFile ? (h(Fragment, null, 'Drag file here or ', 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 || '');
|
5285
|
-
const TopElement = !hasFile ? (h("cpsl-icon", { icon: "image" })) : isUploading ? (h("cpsl-spinner", null)) : error ? (h("cpsl-icon", { icon: "close" })) : (h("img", { class: "sample-img", src:
|
5285
|
+
const TopElement = !hasFile ? (h("cpsl-icon", { icon: "image" })) : isUploading ? (h("cpsl-spinner", null)) : error ? (h("cpsl-icon", { icon: "close" })) : (h("img", { class: "sample-img", src: this.file ? URL.createObjectURL(this.file) : this.externalSrc, alt: "Sample Image" }));
|
5286
5286
|
return (h(Fragment, null, TopElement, h("span", { class: "sample-image-name-container" }, h("cpsl-text", { class: "sample-image-name", variant: "bodyXS" }, text), hasFile && !error && !isUploading && h("cpsl-icon", { icon: "close", onClick: this.removeFile }))));
|
5287
5287
|
}
|
5288
5288
|
render() {
|
5289
5289
|
var _a, _b, _c;
|
5290
|
-
return (h(Host, { key: '
|
5290
|
+
return (h(Host, { key: '7d86bbac92b88c5e0b4a7c79cde8b2669f3801c2' }, this.label && (h("label", { key: 'eb364a27a57b278c5f6a75b793369e07ced1ea2c', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? h("span", { class: "optional-label" }, "(optional)") : '')), h("slot", { key: 'e40411eb484d37dcc9980aaab3a1f69aaf954cc0', name: "label" }), h("div", { key: '89002e60d7f77b252f0c2975ce7a06e60fc2f869', class: {
|
5291
5291
|
'container': true,
|
5292
5292
|
'error': Boolean(this.errorText),
|
5293
5293
|
'drag': this.dragOver,
|
5294
5294
|
'drag-error': this.dragError,
|
5295
|
-
} }, h("div", { key: '
|
5295
|
+
} }, h("div", { key: '8bafc5c869a0bce30ab2d8b5a0637a3e0107c6fa', class: { 'label-container': true } }, h("slot", { key: '45243bf17f5ea2e330146b1b87f5f2d523ac9250', name: "left-content" })), h("div", { key: '7e2da2facbb1f602b9da2f2a02f8993f629d14a8', class: { 'file-container': true } }, this.FileContent), 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) && (h("div", { key: '26967c087e20d68251d603257fbe0ba491807043', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("span", { key: 'a1c85bed3f74a2f1808fb5f472bddf4c9ea7dc7b' }, (_c = this.errorText) !== null && _c !== void 0 ? _c : this.helperText)))));
|
5296
5296
|
}
|
5297
5297
|
get el() { return getElement(this); }
|
5298
5298
|
};
|
@@ -5309,7 +5309,7 @@ const CpslIcon = class {
|
|
5309
5309
|
this.icon = undefined;
|
5310
5310
|
}
|
5311
5311
|
render() {
|
5312
|
-
return (h(Host, { key: '6960e6da25cb3cd108021f8a5aa20a92a24f92b3', part: "icon", role: "img" }, !
|
5312
|
+
return (h(Host, { key: '6960e6da25cb3cd108021f8a5aa20a92a24f92b3', part: "icon", role: "img" }, !this.icon ? h("img", { src: this.src }) : h("div", { innerHTML: Icons[this.icon] })));
|
5313
5313
|
}
|
5314
5314
|
};
|
5315
5315
|
CpslIcon.style = CpslIconStyle0;
|
@@ -5328,7 +5328,7 @@ const CpslInput = class {
|
|
5328
5328
|
this.inputId = `cpsl-input-${inputIds$1++}`;
|
5329
5329
|
this.onInput = (ev) => {
|
5330
5330
|
const input = ev.target;
|
5331
|
-
if (
|
5331
|
+
if (input) {
|
5332
5332
|
this.value = input.value || '';
|
5333
5333
|
input.value === '' ? this.disableSlots() : this.enableSlots();
|
5334
5334
|
}
|
@@ -5423,7 +5423,7 @@ const CpslInput = class {
|
|
5423
5423
|
// }
|
5424
5424
|
componentDidLoad() {
|
5425
5425
|
this.initButtons();
|
5426
|
-
if (
|
5426
|
+
if (this.value) {
|
5427
5427
|
this.enableSlots();
|
5428
5428
|
}
|
5429
5429
|
else {
|
@@ -5485,11 +5485,11 @@ const CpslInput = class {
|
|
5485
5485
|
}
|
5486
5486
|
render() {
|
5487
5487
|
var _a;
|
5488
|
-
return (h(Host, { key: '
|
5488
|
+
return (h(Host, { key: 'f406b64446832eb4f25c668707ce66194bcf7770', class: {
|
5489
5489
|
'disabled': this.disabled,
|
5490
5490
|
'focused': this.hasFocus,
|
5491
5491
|
'has-value': Boolean(this.focusedValue) || Boolean(this.value),
|
5492
|
-
} }, this.label && (h("label", { key: '
|
5492
|
+
} }, this.label && (h("label", { key: '5b2c4f219de0d03aebe4ae38a75c9132c9b2b9ea', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? h("span", { class: "optional-label" }, "(optional)") : '')), h("div", { key: '9c050f74275e83c717ab3f8f6af8a5bd0693a4b4', class: { 'input-container': true, 'error-container': Boolean(this.errorText) } }, h("slot", { key: '4633e4edbc36defba6bd94ee65b6150c4c5ddf50', name: "start" }), 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 }), h("slot", { key: '476c2c16758a1c7227cd6903ff1b2de3befbaab9', name: "end" })), (this.errorText || this.helperText) && (h("div", { key: '0490e976cb9fc8f36ba0dee545e72346f574daf6', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("span", { key: '9500ff41ad9119d311dc5bfbf5fd583586728d78' }, (_a = this.errorText) !== null && _a !== void 0 ? _a : this.helperText)))));
|
5493
5493
|
}
|
5494
5494
|
get el() { return getElement(this); }
|
5495
5495
|
static get watchers() { return {
|
@@ -14863,9 +14863,9 @@ const CpslModal = class {
|
|
14863
14863
|
}
|
14864
14864
|
render() {
|
14865
14865
|
if (this.noOverlay) {
|
14866
|
-
return (h(Host, { style:
|
14866
|
+
return (h(Host, { style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}, class: "no-overlay" }, this.Modal));
|
14867
14867
|
}
|
14868
|
-
return (h(Host, { style:
|
14868
|
+
return (h(Host, { style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {}, class: { 'include-mobile-styling': true } }, h("cpsl-overlay", { zIndexOverride: this.zIndexOverride ? this.zIndexOverride : undefined, id: "overlay", open: this.open, enterTransitionDuration: this.enterTransitionDuration, exitTransitionDuration: this.exitTransitionDuration }), h("div", { id: "modal-wrapper", class: "modal-wrapper" }, this.Modal)));
|
14869
14869
|
}
|
14870
14870
|
get el() { return getElement(this); }
|
14871
14871
|
static get watchers() { return {
|
@@ -14900,7 +14900,7 @@ const CpslNavButtonGroup = class {
|
|
14900
14900
|
item.setAttribute('full-width', 'true');
|
14901
14901
|
this.selectItem();
|
14902
14902
|
});
|
14903
|
-
if (
|
14903
|
+
if ((_a = this.otherSlots) === null || _a === void 0 ? void 0 : _a.length) {
|
14904
14904
|
console.error('cpsl-button is the only valid child of cpsl-nav-button-group');
|
14905
14905
|
this.otherSlots.forEach(item => item.remove());
|
14906
14906
|
}
|
@@ -14912,7 +14912,7 @@ const CpslNavButtonGroup = class {
|
|
14912
14912
|
return this.el.querySelectorAll('&> *:not(cpsl-button)');
|
14913
14913
|
}
|
14914
14914
|
render() {
|
14915
|
-
return (h(Host, { key: '
|
14915
|
+
return (h(Host, { key: '067afdd4450da73433b1f3f2c1de751e79aadd70' }, h("slot", { key: '109be26467469f2120b756b10a233efe1cf2f77c' })));
|
14916
14916
|
}
|
14917
14917
|
get el() { return getElement(this); }
|
14918
14918
|
static get watchers() { return {
|
@@ -14953,7 +14953,7 @@ const CpslOverlay = class {
|
|
14953
14953
|
}
|
14954
14954
|
}
|
14955
14955
|
render() {
|
14956
|
-
return (h(Host, { key: '
|
14956
|
+
return (h(Host, { key: 'c82e1811eabb1c2796a77572cc73816187ca57cb', style: this.zIndexOverride ? { zIndex: `${this.zIndexOverride}` } : {} }, h("slot", { key: 'a601f5ef8c1042d83b38c74f10359591740fbc72' })));
|
14957
14957
|
}
|
14958
14958
|
get el() { return getElement(this); }
|
14959
14959
|
static get watchers() { return {
|
@@ -15091,14 +15091,14 @@ const CpslPopover = class {
|
|
15091
15091
|
this.triggerClicked = false;
|
15092
15092
|
this.configureTriggerInteraction = () => {
|
15093
15093
|
const { trigger, triggerAction, destroyTriggerInteraction } = this;
|
15094
|
-
if (
|
15094
|
+
if (destroyTriggerInteraction) {
|
15095
15095
|
destroyTriggerInteraction();
|
15096
15096
|
}
|
15097
15097
|
if (trigger === undefined) {
|
15098
15098
|
return;
|
15099
15099
|
}
|
15100
15100
|
this.triggerEl = document.getElementById(trigger);
|
15101
|
-
if (!
|
15101
|
+
if (!this.triggerEl) {
|
15102
15102
|
console.error(`A trigger element with the ID "${trigger}" was not found in the DOM.`, this.el);
|
15103
15103
|
return;
|
15104
15104
|
}
|
@@ -15159,7 +15159,7 @@ const CpslPopover = class {
|
|
15159
15159
|
this.setPosition = () => {
|
15160
15160
|
var _a;
|
15161
15161
|
const anchorEl = (_a = this.anchorEl) !== null && _a !== void 0 ? _a : this.triggerEl;
|
15162
|
-
if (
|
15162
|
+
if (anchorEl) {
|
15163
15163
|
const windowWidth = window.innerWidth;
|
15164
15164
|
const windowHeight = window.innerHeight;
|
15165
15165
|
const elWidth = this.el.clientWidth;
|
@@ -15277,7 +15277,7 @@ const CpslPopover = class {
|
|
15277
15277
|
}
|
15278
15278
|
render() {
|
15279
15279
|
var _a;
|
15280
|
-
return (h(Host, { key: '
|
15280
|
+
return (h(Host, { key: 'b902dfc80a1b92d70729feb0d69ffbd6a266a93c', class: {
|
15281
15281
|
'open': this.open,
|
15282
15282
|
'transform-h-left': this.transformOriginHorizontal === 'left',
|
15283
15283
|
'transform-h-center': this.transformOriginHorizontal === 'center',
|
@@ -15289,7 +15289,7 @@ const CpslPopover = class {
|
|
15289
15289
|
top: `${this.positionY}px`,
|
15290
15290
|
left: `${this.positionX}px`,
|
15291
15291
|
width: this.autoWidth ? 'auto' : `${(_a = this.triggerEl) === null || _a === void 0 ? void 0 : _a.clientWidth}px`,
|
15292
|
-
} }, h("div", { key: '
|
15292
|
+
} }, h("div", { key: 'b0aa879a39c083ab238589bc7093680b1061ad56', id: "container", class: { container: true, open: this.open } }, h("slot", { key: '69497b143a41e30a534e24a06d5306e69ac0d410' }))));
|
15293
15293
|
}
|
15294
15294
|
get el() { return getElement(this); }
|
15295
15295
|
static get watchers() { return {
|
@@ -15435,7 +15435,7 @@ const CpslSelect = class {
|
|
15435
15435
|
item.setAttribute('selected', 'false');
|
15436
15436
|
}
|
15437
15437
|
});
|
15438
|
-
if (!
|
15438
|
+
if (!this.selectedValue) {
|
15439
15439
|
this.hasSelectedItem = false;
|
15440
15440
|
}
|
15441
15441
|
};
|
@@ -15490,9 +15490,9 @@ const CpslSelect = class {
|
|
15490
15490
|
}
|
15491
15491
|
render() {
|
15492
15492
|
var _a, _b, _c, _d;
|
15493
|
-
return (h(Host, { key: '
|
15493
|
+
return (h(Host, { key: '50f16e4ffbc8ccd431d957e55dc07455eb5e5c9b', id: this.id, class: { 'disabled': this.disabled, 'focused': this.hasFocus, 'has-value': Boolean(this.selectedValue) } }, this.label && (h("label", { key: '47170480aec48780e1bb3b7b2a26b37fa8866f7e', class: "label", htmlFor: this.inputId }, this.label, this.required ? '*' : ' ', !this.required && this.showOptionalLabel ? h("span", { class: "optional-label" }, "(optional)") : '')), h("div", { key: '1636db18d4ec355ed48dee0105f26c543a2938b0', id: "select-container", class: { 'select-container': true, 'error-container': Boolean(this.errorText) }, onMouseDown: this.handleClick }, this.hasSelectedItem && this.showFormattedSelectedItem && h("slot", { key: 'a2c97abeb6bb7bba8d98dafb4076cfe0d3069a0a', name: "selected-item" }), h("div", { key: 'dc97728bb0f38408a66277a63b1109ab0bcc7dd3', class: "selected-container-content", id: "selected-container-content" }, (!this.hasSelectedItem || !this.showFormattedSelectedItem) && (h("cpsl-text", { key: 'd90420a0312ae7e6b2a44a738d3b6503328d5c28', class: { 'selected-text': true, 'placeholder': !this.selectedValue } }, !this.selectedValue
|
15494
15494
|
? ((_a = this.placeholder) !== null && _a !== void 0 ? _a : 'Select')
|
15495
|
-
: ((_c = (_b = this.formatValue) === null || _b === void 0 ? void 0 : _b.call(this, this.selectedValue)) !== null && _c !== void 0 ? _c : this.selectedValue)))), h("cpsl-icon", { key: '
|
15495
|
+
: ((_c = (_b = this.formatValue) === null || _b === void 0 ? void 0 : _b.call(this, this.selectedValue)) !== null && _c !== void 0 ? _c : this.selectedValue)))), h("cpsl-icon", { key: 'f8e82e83797286597bfef061e78f3768b10501c8', class: { 'chevron': true, 'open': this.popoverOpen, 'has-value': Boolean(this.selectedValue) }, icon: "chevronUp" }), 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) && (h("div", { key: 'ec6db31b7f9946c2901b7228bd48cb81c35c6d42', class: { 'helper-text-container': true, 'error-text': Boolean(this.errorText) } }, h("span", { key: '45a5695523c4d3b4b96771c766a853c6652910a9' }, (_d = this.errorText) !== null && _d !== void 0 ? _d : this.helperText))), h("cpsl-popover", { key: 'fb10a30be9d95efebca36301fb18cf98767a906b', autoWidth: false, trigger: this.id, preventBlur: this.hasFocus, disabled: this.disabled, anchorEl: this.anchorEl }, h("div", { key: '13f4a873f7e04d3bf97e8be07b13b6a9c74da366', class: "dropdown" }, h("div", { key: 'cc69d0f8ea88c6e8f83ef85a126b011fafdc9159', class: "dropdown-inner", style: { maxHeight: `${this.dropdownMaxHeight}px` } }, h("slot", { key: '67a9a69df08e585b81855ac0ca1b8dda17e1888c', name: "items" }))))));
|
15496
15496
|
}
|
15497
15497
|
get el() { return getElement(this); }
|
15498
15498
|
static get watchers() { return {
|
@@ -15825,7 +15825,7 @@ const CpslTabs = class {
|
|
15825
15825
|
}, 50);
|
15826
15826
|
}
|
15827
15827
|
updateTab(newValue, oldValue) {
|
15828
|
-
if (Boolean(newValue) && !
|
15828
|
+
if (Boolean(newValue) && !oldValue) {
|
15829
15829
|
this.selectedTabRect = getTab(this.tabs, this.selectedTab).getBoundingClientRect();
|
15830
15830
|
}
|
15831
15831
|
}
|
@@ -15852,7 +15852,7 @@ const CpslTabs = class {
|
|
15852
15852
|
// Get border width as a number
|
15853
15853
|
const tabsBorderWidth = +getComputedStyle(this.el).getPropertyValue('--tabs-border-width').slice(0, -2);
|
15854
15854
|
const selectedTabRect = this.selectedTabRect;
|
15855
|
-
return (h(Host, { key: '
|
15855
|
+
return (h(Host, { key: '9b866a24588194c48561a3c1a1f15c1095499b55', class: { 'full-width': this.fullWidth }, onCpslTabButtonClick: this.onTabClicked }, h("div", { key: '4047b6a6773fee92da4f880e50cb7fcbe2171e54', class: "tabs-container" }, h("slot", { key: 'b5d92ad7537e81c40202cff115c85a2efb91e847' }), h("div", { key: '82eab4791625ec572f616416e500737f4f5d7eeb', class: { slider: true, loaded: this.loaded }, style: {
|
15856
15856
|
width: `${selectedTabRect.width}px`,
|
15857
15857
|
left: `${selectedTabRect.x - tabsPosition.x - tabsBorderWidth * 2}px`,
|
15858
15858
|
} }))));
|