@t-apps/ui 0.1.1 → 0.1.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.
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +4 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
href?: never;
|
|
5
|
+
as?: "button";
|
|
6
|
+
};
|
|
7
|
+
type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
8
|
+
href: string;
|
|
9
|
+
as: "a";
|
|
10
|
+
};
|
|
11
|
+
type Props$2 = ButtonProps | LinkProps;
|
|
4
12
|
declare function TButton({ children, className, ...props }: Props$2): React.JSX.Element;
|
|
5
13
|
|
|
6
14
|
type Props$1 = React.InputHTMLAttributes<HTMLInputElement>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
type
|
|
3
|
+
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
4
|
+
href?: never;
|
|
5
|
+
as?: "button";
|
|
6
|
+
};
|
|
7
|
+
type LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
8
|
+
href: string;
|
|
9
|
+
as: "a";
|
|
10
|
+
};
|
|
11
|
+
type Props$2 = ButtonProps | LinkProps;
|
|
4
12
|
declare function TButton({ children, className, ...props }: Props$2): React.JSX.Element;
|
|
5
13
|
|
|
6
14
|
type Props$1 = React.InputHTMLAttributes<HTMLInputElement>;
|
package/dist/index.js
CHANGED
|
@@ -29,14 +29,10 @@ module.exports = __toCommonJS(index_exports);
|
|
|
29
29
|
// src/components/TButton.tsx
|
|
30
30
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
31
|
function TButton({ children, className, ...props }) {
|
|
32
|
-
|
|
33
|
-
"a",
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
className: `t-component t-button ${className ?? ""}`,
|
|
37
|
-
children
|
|
38
|
-
}
|
|
39
|
-
);
|
|
32
|
+
if (props.as === "a") {
|
|
33
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { ...props, className: `t-component t-button ${className ?? ""}`, children });
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { ...props, className: `t-component t-button ${className ?? ""}`, children });
|
|
40
36
|
}
|
|
41
37
|
|
|
42
38
|
// src/components/TInput.tsx
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/TButton.tsx","../src/components/TInput.tsx","../src/components/TNavbar.tsx"],"sourcesContent":["export { default as TButton } from \"./components/TButton\";\r\nexport { default as TInput } from \"./components/TInput\";\r\nexport { default as TNavbar } from \"./components/TNavbar\";\r\n\r\nimport \"./style.css\";","\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\ntype
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/TButton.tsx","../src/components/TInput.tsx","../src/components/TNavbar.tsx"],"sourcesContent":["export { default as TButton } from \"./components/TButton\";\r\nexport { default as TInput } from \"./components/TInput\";\r\nexport { default as TNavbar } from \"./components/TNavbar\";\r\n\r\nimport \"./style.css\";","\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\ntype ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\r\n href?: never;\r\n as?: \"button\";\r\n};\r\n\r\ntype LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\r\n href: string;\r\n as: \"a\";\r\n};\r\n\r\ntype Props = ButtonProps | LinkProps;\r\n\r\nexport default function TButton({ children, className, ...props }: Props) {\r\n if (props.as === \"a\") {\r\n return (\r\n <a {...props} className={`t-component t-button ${className ?? \"\"}`}>\r\n {children}\r\n </a>\r\n );\r\n }\r\n\r\n return (\r\n <button {...props} className={`t-component t-button ${className ?? \"\"}`}>\r\n {children}\r\n </button>\r\n );\r\n}","\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\ntype Props = React.InputHTMLAttributes<HTMLInputElement>;\r\n\r\nexport default function TInput({ className, ...props}: Props) {\r\n return (\r\n <input\r\n {...props}\r\n className={`t-component t-input ${className ?? \"\"}`}\r\n />\r\n );\r\n}","\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\ntype Props = React.HTMLAttributes<HTMLDivElement>\r\n\r\nexport default function TNavbar({ children, className, ...props }: Props) {\r\n return (\r\n <div\r\n {...props}\r\n className={`t-navbar ${className ?? \"\"}`}\r\n >\r\n {children}\r\n </div>\r\n );\r\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACmBU;AAHK,SAAR,QAAyB,EAAE,UAAU,WAAW,GAAG,MAAM,GAAU;AACxE,MAAI,MAAM,OAAO,KAAK;AAClB,WACI,4CAAC,OAAG,GAAG,OAAO,WAAW,wBAAwB,aAAa,EAAE,IAC3D,UACL;AAAA,EAER;AAEA,SACI,4CAAC,YAAQ,GAAG,OAAO,WAAW,wBAAwB,aAAa,EAAE,IAChE,UACL;AAEN;;;ACtBI,IAAAA,sBAAA;AAFW,SAAR,OAAwB,EAAE,WAAW,GAAG,MAAK,GAAU;AAC5D,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,uBAAuB,aAAa,EAAE;AAAA;AAAA,EACnD;AAEJ;;;ACLI,IAAAC,sBAAA;AAFW,SAAR,QAAyB,EAAE,UAAU,WAAW,GAAG,MAAM,GAAU;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,YAAY,aAAa,EAAE;AAAA,MAErC;AAAA;AAAA,EACH;AAEJ;","names":["import_jsx_runtime","import_jsx_runtime"]}
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
// src/components/TButton.tsx
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
function TButton({ children, className, ...props }) {
|
|
4
|
-
|
|
5
|
-
"a",
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
className: `t-component t-button ${className ?? ""}`,
|
|
9
|
-
children
|
|
10
|
-
}
|
|
11
|
-
);
|
|
4
|
+
if (props.as === "a") {
|
|
5
|
+
return /* @__PURE__ */ jsx("a", { ...props, className: `t-component t-button ${className ?? ""}`, children });
|
|
6
|
+
}
|
|
7
|
+
return /* @__PURE__ */ jsx("button", { ...props, className: `t-component t-button ${className ?? ""}`, children });
|
|
12
8
|
}
|
|
13
9
|
|
|
14
10
|
// src/components/TInput.tsx
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/TButton.tsx","../src/components/TInput.tsx","../src/components/TNavbar.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\ntype
|
|
1
|
+
{"version":3,"sources":["../src/components/TButton.tsx","../src/components/TInput.tsx","../src/components/TNavbar.tsx"],"sourcesContent":["\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\ntype ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {\r\n href?: never;\r\n as?: \"button\";\r\n};\r\n\r\ntype LinkProps = React.AnchorHTMLAttributes<HTMLAnchorElement> & {\r\n href: string;\r\n as: \"a\";\r\n};\r\n\r\ntype Props = ButtonProps | LinkProps;\r\n\r\nexport default function TButton({ children, className, ...props }: Props) {\r\n if (props.as === \"a\") {\r\n return (\r\n <a {...props} className={`t-component t-button ${className ?? \"\"}`}>\r\n {children}\r\n </a>\r\n );\r\n }\r\n\r\n return (\r\n <button {...props} className={`t-component t-button ${className ?? \"\"}`}>\r\n {children}\r\n </button>\r\n );\r\n}","\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\ntype Props = React.InputHTMLAttributes<HTMLInputElement>;\r\n\r\nexport default function TInput({ className, ...props}: Props) {\r\n return (\r\n <input\r\n {...props}\r\n className={`t-component t-input ${className ?? \"\"}`}\r\n />\r\n );\r\n}","\"use client\";\r\n\r\nimport React from \"react\";\r\n\r\ntype Props = React.HTMLAttributes<HTMLDivElement>\r\n\r\nexport default function TNavbar({ children, className, ...props }: Props) {\r\n return (\r\n <div\r\n {...props}\r\n className={`t-navbar ${className ?? \"\"}`}\r\n >\r\n {children}\r\n </div>\r\n );\r\n}"],"mappings":";AAmBU;AAHK,SAAR,QAAyB,EAAE,UAAU,WAAW,GAAG,MAAM,GAAU;AACxE,MAAI,MAAM,OAAO,KAAK;AAClB,WACI,oBAAC,OAAG,GAAG,OAAO,WAAW,wBAAwB,aAAa,EAAE,IAC3D,UACL;AAAA,EAER;AAEA,SACI,oBAAC,YAAQ,GAAG,OAAO,WAAW,wBAAwB,aAAa,EAAE,IAChE,UACL;AAEN;;;ACtBI,gBAAAA,YAAA;AAFW,SAAR,OAAwB,EAAE,WAAW,GAAG,MAAK,GAAU;AAC5D,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,uBAAuB,aAAa,EAAE;AAAA;AAAA,EACnD;AAEJ;;;ACLI,gBAAAC,YAAA;AAFW,SAAR,QAAyB,EAAE,UAAU,WAAW,GAAG,MAAM,GAAU;AACxE,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,YAAY,aAAa,EAAE;AAAA,MAErC;AAAA;AAAA,EACH;AAEJ;","names":["jsx","jsx"]}
|