@getflip/swirl-components 0.173.2 → 0.173.3
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.json +1 -1
- package/dist/cjs/swirl-text.cjs.entry.js +3 -2
- package/dist/collection/components/swirl-text/swirl-text.js +3 -2
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-text2.js +3 -2
- package/dist/esm/swirl-text.entry.js +3 -2
- package/dist/swirl-components/{p-dd1c0c51.entry.js → p-1a7dd0ea.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/package.json +1 -1
package/components.json
CHANGED
|
@@ -972,11 +972,12 @@ const SwirlText = class {
|
|
|
972
972
|
}
|
|
973
973
|
render() {
|
|
974
974
|
const Tag = this.as;
|
|
975
|
+
const truncate = this.truncate && (!Boolean(this.lines) || this.lines === 1);
|
|
975
976
|
const className = index.classnames("text", `text--align-${this.align}`, `text--color-${this.color}`, `text--font-family-${this.fontFamily}`, `text--font-style-${this.fontStyle}`, `text--size-${this.size}`, `text--truncate-direction-${this.truncateDirection}`, `text--weight-${this.weight}`, {
|
|
976
|
-
"text--truncate":
|
|
977
|
+
"text--truncate": truncate,
|
|
977
978
|
});
|
|
978
979
|
const styles = {
|
|
979
|
-
whiteSpace: this.whiteSpace,
|
|
980
|
+
whiteSpace: truncate ? "nowrap" : this.whiteSpace,
|
|
980
981
|
};
|
|
981
982
|
return (index$1.h(index$1.Host, null, index$1.h(Tag, { class: className, ref: (el) => (this.textEl = el), style: styles }, index$1.h("slot", null))));
|
|
982
983
|
}
|
|
@@ -45,11 +45,12 @@ export class SwirlText {
|
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
47
|
const Tag = this.as;
|
|
48
|
+
const truncate = this.truncate && (!Boolean(this.lines) || this.lines === 1);
|
|
48
49
|
const className = classnames("text", `text--align-${this.align}`, `text--color-${this.color}`, `text--font-family-${this.fontFamily}`, `text--font-style-${this.fontStyle}`, `text--size-${this.size}`, `text--truncate-direction-${this.truncateDirection}`, `text--weight-${this.weight}`, {
|
|
49
|
-
"text--truncate":
|
|
50
|
+
"text--truncate": truncate,
|
|
50
51
|
});
|
|
51
52
|
const styles = {
|
|
52
|
-
whiteSpace: this.whiteSpace,
|
|
53
|
+
whiteSpace: truncate ? "nowrap" : this.whiteSpace,
|
|
53
54
|
};
|
|
54
55
|
return (h(Host, null, h(Tag, { class: className, ref: (el) => (this.textEl = el), style: styles }, h("slot", null))));
|
|
55
56
|
}
|