@saasquatch/mint-components 2.1.10-53 → 2.1.10-55

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.
@@ -7877,20 +7877,21 @@ const TimelineReward = class {
7877
7877
  }
7878
7878
  };
7879
7879
 
7880
- function getStyle(props) {
7881
- return `
7882
- p {
7883
- margin: 0;
7884
- padding: 0;
7885
- ${props.fontsize && `font-size: ${props.fontsize};`}
7886
- ${props.fontweight && `font-weight: ${props.fontweight};`}
7887
- color: ${props.color ? props.color : "var(--sqm-text)"};
7888
- }`;
7889
- }
7890
7880
  function UserAttributeView(props) {
7881
+ const style = {
7882
+ P: {
7883
+ margin: "0",
7884
+ padding: "0",
7885
+ fontSize: props.fontsize || "inherit",
7886
+ fontWeight: props.fontweight || "inherit",
7887
+ color: props.color || "var(--sqm-text)",
7888
+ },
7889
+ };
7890
+ const sheet = JSS.createStyleSheet(style);
7891
+ const styleString = sheet.toString();
7891
7892
  const loadingSkeleton = (index.h("sqm-skeleton", { width: "200px", height: "20px" }));
7892
7893
  return (props.value && (index.h(index.Host, null,
7893
- index.h("style", null, getStyle(props)),
7894
+ index.h("style", null, styleString),
7894
7895
  index.h("p", { part: "sqm-base" }, props.loading ? loadingSkeleton : props.value))));
7895
7896
  }
7896
7897
 
@@ -1,17 +1,19 @@
1
1
  import { h, Host } from "@stencil/core";
2
- function getStyle(props) {
3
- return `
4
- p {
5
- margin: 0;
6
- padding: 0;
7
- ${props.fontsize && `font-size: ${props.fontsize};`}
8
- ${props.fontweight && `font-weight: ${props.fontweight};`}
9
- color: ${props.color ? props.color : "var(--sqm-text)"};
10
- }`;
11
- }
2
+ import { createStyleSheet } from "../../styling/JSS";
12
3
  export function UserAttributeView(props) {
4
+ const style = {
5
+ P: {
6
+ margin: "0",
7
+ padding: "0",
8
+ fontSize: props.fontsize || "inherit",
9
+ fontWeight: props.fontweight || "inherit",
10
+ color: props.color || "var(--sqm-text)",
11
+ },
12
+ };
13
+ const sheet = createStyleSheet(style);
14
+ const styleString = sheet.toString();
13
15
  const loadingSkeleton = (h("sqm-skeleton", { width: "200px", height: "20px" }));
14
16
  return (props.value && (h(Host, null,
15
- h("style", null, getStyle(props)),
17
+ h("style", null, styleString),
16
18
  h("p", { part: "sqm-base" }, props.loading ? loadingSkeleton : props.value))));
17
19
  }
@@ -6,7 +6,7 @@ import { UserAttributeView, } from "./sqm-user-attribute-view";
6
6
  import { useUserAttribute } from "./useUserAttribute";
7
7
  /**
8
8
  * @uiName User Attribute
9
- * @exampleGroup Advanced Components
9
+ * @exampleGroup Advanced
10
10
  * @example User Attribute - <sqm-user-attribute value="firstName" loading-text="..."></sqm-user-attribute>
11
11
  */
12
12
  export class UserAttribute {
@@ -7873,20 +7873,21 @@ const TimelineReward = class {
7873
7873
  }
7874
7874
  };
7875
7875
 
7876
- function getStyle(props) {
7877
- return `
7878
- p {
7879
- margin: 0;
7880
- padding: 0;
7881
- ${props.fontsize && `font-size: ${props.fontsize};`}
7882
- ${props.fontweight && `font-weight: ${props.fontweight};`}
7883
- color: ${props.color ? props.color : "var(--sqm-text)"};
7884
- }`;
7885
- }
7886
7876
  function UserAttributeView(props) {
7877
+ const style = {
7878
+ P: {
7879
+ margin: "0",
7880
+ padding: "0",
7881
+ fontSize: props.fontsize || "inherit",
7882
+ fontWeight: props.fontweight || "inherit",
7883
+ color: props.color || "var(--sqm-text)",
7884
+ },
7885
+ };
7886
+ const sheet = createStyleSheet(style);
7887
+ const styleString = sheet.toString();
7887
7888
  const loadingSkeleton = (h$1("sqm-skeleton", { width: "200px", height: "20px" }));
7888
7889
  return (props.value && (h$1(Host, null,
7889
- h$1("style", null, getStyle(props)),
7890
+ h$1("style", null, styleString),
7890
7891
  h$1("p", { part: "sqm-base" }, props.loading ? loadingSkeleton : props.value))));
7891
7892
  }
7892
7893