@xplor-education/core-stencil-components 3.2.0 → 3.2.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/components/{p-C6BIO-Ab.js → p-D1Gio4_d.js} +11 -3
- package/components/p-D1Gio4_d.js.map +1 -0
- package/components/xplor-btn-tooltip.js +1 -1
- package/components/xplor-button.js +1 -1
- package/components/xplor-chat-widget.js +1 -1
- package/components/xplor-drag-and-drop-input.js +1 -1
- package/components/xplor-input-send.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/xplor-alert-dialog_60.cjs.entry.js +8 -1
- package/dist/cjs/xplor-alert-dialog_60.cjs.entry.js.map +1 -1
- package/dist/cjs/xplor-component-library.cjs.js +1 -1
- package/dist/collection/components/xplor-button/xplor-button.js +33 -5
- package/dist/collection/components/xplor-button/xplor-button.js.map +1 -1
- package/dist/components/{p-DL_Sv4jB.js → p-Cv5--wGB.js} +11 -3
- package/{components/p-C6BIO-Ab.js.map → dist/components/p-Cv5--wGB.js.map} +1 -1
- package/dist/components/xplor-btn-tooltip.js +1 -1
- package/dist/components/xplor-button.js +1 -1
- package/dist/components/xplor-chat-widget.js +1 -1
- package/dist/components/xplor-drag-and-drop-input.js +1 -1
- package/dist/components/xplor-input-send.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/xplor-alert-dialog_60.entry.js +8 -1
- package/dist/esm/xplor-alert-dialog_60.entry.js.map +1 -1
- package/dist/esm/xplor-component-library.js +1 -1
- package/dist/hydrate/index.js +9 -1
- package/dist/hydrate/index.mjs +9 -1
- package/dist/types/components/xplor-button/xplor-button.d.ts +5 -3
- package/dist/types/components.d.ts +15 -3
- package/dist/xplor-component-library/p-e5a96114.entry.js +2 -0
- package/dist/xplor-component-library/p-e5a96114.entry.js.map +1 -0
- package/dist/xplor-component-library/xplor-component-library.esm.js +1 -1
- package/package.json +1 -1
- package/dist/components/p-DL_Sv4jB.js.map +0 -1
- package/dist/xplor-component-library/p-1fb310f5.entry.js +0 -2
- package/dist/xplor-component-library/p-1fb310f5.entry.js.map +0 -1
|
@@ -1793,6 +1793,12 @@ const XplorButton = class {
|
|
|
1793
1793
|
this.disabled = false;
|
|
1794
1794
|
/** Whether the button stretches to full width of its container */
|
|
1795
1795
|
this.fullWidth = false;
|
|
1796
|
+
/** Backward compatibility for using fullWidth as an HTML attribute (serialized as fullwidth) */
|
|
1797
|
+
this.fullWidthAttr = false;
|
|
1798
|
+
/**
|
|
1799
|
+
* Icon position: 'start' | 'end' | null
|
|
1800
|
+
*/
|
|
1801
|
+
this.iconPosition = null;
|
|
1796
1802
|
/**
|
|
1797
1803
|
* Icon to display (defaults to plus sign)
|
|
1798
1804
|
*/
|
|
@@ -1805,9 +1811,10 @@ const XplorButton = class {
|
|
|
1805
1811
|
return (h("span", { class: "button-icon" }, this.icon));
|
|
1806
1812
|
}
|
|
1807
1813
|
render() {
|
|
1814
|
+
const isFullWidth = this.fullWidth || this.fullWidthAttr;
|
|
1808
1815
|
const isIconOnly = !this.text && this.iconPosition !== null;
|
|
1809
1816
|
const hasIcon = this.iconPosition !== null;
|
|
1810
|
-
return (h(Host, { key: '
|
|
1817
|
+
return (h(Host, { key: '34e4c56a387bfb7b1c0f283d1484a85da2cbdc4a', class: { 'x-button--full-width': isFullWidth } }, h("slot", { key: '1caaaa71b289e389a9ca2a4e7a65d4c3a2573792' }, h("button", { key: '719ea7a1a260c481bdabe70bee765a35d7da8b25', role: "button", class: Object.assign({ 'x-button': true, [this.type]: true, 'x-button--full-width': isFullWidth, 'x-button--icon-only': isIconOnly, 'x-button--with-icon': hasIcon && !isIconOnly, 'x-button--icon-start': this.iconPosition === 'start' && !isIconOnly, 'x-button--icon-end': this.iconPosition === 'end' && !isIconOnly }, (this.styles ? { [this.styles]: true } : {})), onClick: () => this.clickAction && this.clickAction(), "aria-label": this.ariaLabel, "aria-disabled": this.disabled ? 'true' : null, disabled: this.disabled }, hasIcon && this.iconPosition === 'start' && this.renderIcon(), this.text && h("span", { key: 'a3ca7d26488c993ec9fd6a10483d8ab28351dc19', class: "button-text" }, this.text), hasIcon && this.iconPosition === 'end' && this.renderIcon()))));
|
|
1811
1818
|
}
|
|
1812
1819
|
};
|
|
1813
1820
|
XplorButton.style = xplorButtonCss;
|