@getflip/swirl-components 0.173.2 → 0.174.0

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2024-03-21T11:58:01",
2
+ "timestamp": "2024-03-21T15:12:17",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "3.3.1",
@@ -39210,6 +39210,15 @@
39210
39210
  }
39211
39211
  ],
39212
39212
  "events": [
39213
+ {
39214
+ "event": "appThemeUpdated",
39215
+ "detail": "void",
39216
+ "bubbles": true,
39217
+ "cancelable": true,
39218
+ "composed": true,
39219
+ "docs": "",
39220
+ "docsTags": []
39221
+ },
39213
39222
  {
39214
39223
  "event": "themeChange",
39215
39224
  "detail": "{ activeTheme: SwirlOSTheme; preferredTheme: SwirlOSTheme; }",
@@ -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": this.truncate && (!Boolean(this.lines) || this.lines === 1),
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
  }
@@ -10,6 +10,7 @@ const preferredThemeStorageKey = "swirl-preferred-theme";
10
10
  const SwirlThemeProvider = class {
11
11
  constructor(hostRef) {
12
12
  index.registerInstance(this, hostRef);
13
+ this.appThemeUpdated = index.createEvent(this, "appThemeUpdated", 7);
13
14
  this.themeChange = index.createEvent(this, "themeChange", 7);
14
15
  this.setDesignTokens = [];
15
16
  this.config = undefined;
@@ -105,6 +106,7 @@ const SwirlThemeProvider = class {
105
106
  this.recentOSThemeChangeEventData = themeChangeEventData;
106
107
  this.themeChange.emit(this.recentOSThemeChangeEventData);
107
108
  }
109
+ this.appThemeUpdated.emit();
108
110
  }
109
111
  updateTenantAssets() {
110
112
  const theme = this.resolvedConfig?.themes?.[this.appOSTheme];