tgui-core 4.3.1 → 4.3.2

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.
@@ -12,7 +12,11 @@ type Props = {
12
12
  spin: BooleanLike;
13
13
  }> & Omit<BoxProps, 'children'>;
14
14
  export declare function Icon(props: Props): import("react/jsx-runtime").JSX.Element;
15
- declare function IconStack(props: BoxProps): import("react/jsx-runtime").JSX.Element;
15
+ type IconStackProps = {
16
+ /** Works same as `Icon` size prop, but for all icons inside. */
17
+ size?: number;
18
+ };
19
+ declare function IconStack(props: BoxProps & IconStackProps): import("react/jsx-runtime").JSX.Element;
16
20
  /**
17
21
  * ## Icon
18
22
  *
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{classes as e}from"../common/react.js";import{computeBoxClassName as o,computeBoxProps as r}from"../common/ui.js";let a=/-o$/;function s(s){let{name:n="",size:c,spin:i,className:m,rotation:f,...l}=s,p=l.style||{};c&&(p.fontSize=`${100*c}%`),f&&(p.transform=`rotate(${f}deg)`),l.style=p;let u=r(l),I="";if(n.startsWith("tg-"))I=n;else{let t=a.test(n),e=n.replace(a,""),o=!e.startsWith("fa-");I=t?"far ":"fas ",o&&(I+="fa-"),I+=e,i&&(I+=" fa-spin")}return t("i",{className:e(["Icon",I,m,o(l)]),...u})}(s||(s={})).Stack=function(a){let{className:s,children:n,...c}=a;return t("span",{className:e(["IconStack",s,o(c)]),...r(c),children:n})};export{s as Icon};
1
+ import{jsx as t}from"react/jsx-runtime";import{classes as e}from"../common/react.js";import{computeBoxClassName as o,computeBoxProps as r}from"../common/ui.js";let s=/-o$/;function a(a){let{name:n="",size:c,spin:i,className:f,rotation:l,...m}=a,p=m.style||{};c&&(p.fontSize=`${100*c}%`),l&&(p.transform=`rotate(${l}deg)`),m.style=p;let u=r(m),I="";if(n.startsWith("tg-"))I=n;else{let t=s.test(n),e=n.replace(s,""),o=!e.startsWith("fa-");I=t?"far ":"fas ",o&&(I+="fa-"),I+=e,i&&(I+=" fa-spin")}return t("i",{className:e(["Icon",I,f,o(m)]),...u})}(a||(a={})).Stack=function(s){let{className:a,children:n,size:c,...i}=s,f=i.style||{};return c&&(f.fontSize=`${100*c}%`),i.style=f,t("span",{className:e(["IconStack",a,o(i)]),...r(i),children:n})};export{a as Icon};
package/package.json CHANGED
@@ -69,5 +69,5 @@
69
69
  "test": "bun test"
70
70
  },
71
71
  "type": "module",
72
- "version": "4.3.1"
72
+ "version": "4.3.2"
73
73
  }
@@ -1,18 +1,16 @@
1
- .IconStack > .Icon {
2
- position: absolute;
3
- width: 100%;
4
- text-align: center;
5
- }
6
-
7
1
  .IconStack {
8
2
  position: relative;
9
- display: inline-block;
10
- height: 1.2em;
11
- line-height: 2em;
12
- vertical-align: middle;
3
+ display: inline-flex;
4
+ justify-content: center;
5
+ align-items: center;
6
+
7
+ .Icon {
8
+ &:before {
9
+ vertical-align: middle;
10
+ }
13
11
 
14
- &:after {
15
- color: transparent;
16
- content: ".";
12
+ &:not(:first-child) {
13
+ position: absolute;
14
+ }
17
15
  }
18
16
  }