@t-apps/ui 0.1.1 → 0.1.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/dist/index.css +4 -0
- package/dist/index.css.map +1 -1
- 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.css
CHANGED
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/style.css"],"sourcesContent":[":root {\r\n --fg: #0B1220;\r\n\r\n --bg-1: #FFFFFF;\r\n --bg-2: #EEF3FF;\r\n --bg-3: #D9E4FF;\r\n\r\n --component-bg: #F5F8FF;\r\n --component-fg: var(--fg);\r\n --component-bg-hover: #EAF0FF;\r\n\r\n --accent: #2D6BFF;\r\n --accent-hover: #1E4FD6;\r\n\r\n --muted: #5B6B86;\r\n\r\n --border: #D7E1F5;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root {\r\n --fg: #EAF0FF;\r\n\r\n --bg-1: #070D1A;\r\n --bg-2: #0C1528;\r\n --bg-3: #121F3A;\r\n\r\n --component-bg: #0F1B33;\r\n --component-fg: var(--fg);\r\n --component-bg-hover: #16264A;\r\n\r\n --accent: #4A8CFF;\r\n --accent-hover: #6AA3FF;\r\n\r\n --muted: #93A4C7;\r\n\r\n --border: #1F2E4D;\r\n }\r\n}\r\n\r\nbody { \r\n background: var(--bg-1); \r\n color: var(--fg); \r\n font-family: Arial, Helvetica, sans-serif; \r\n} \r\n\r\n.t-component { \r\n display: block; \r\n width: fit-content; \r\n background-color: var(--component-bg); \r\n color: var(--component-fg); \r\n padding: 4px 10px; \r\n border: var(--border) 2px solid; \r\n border-radius: 4px; \r\n outline: none; \r\n} \r\n\r\n.t-button { \r\n user-select: none; \r\n cursor: pointer; \r\n} \r\n\r\n.t-button:hover { \r\n background-color: var(--component-bg-hover); \r\n} \r\n\r\n.t-button:active { \r\n background-color: var(--component-bg); \r\n}\r\n\r\n.t-navbar {\r\n display: flex;\r\n position: relative;\r\n width: 100%;\r\n height: 60px;\r\n background-color: var(--bg-2);\r\n align-items: center;\r\n padding: 4px;\r\n box-sizing: border-box;\r\n gap: 4px;\r\n}\r\n\r\n.t-center {\r\n position: absolute;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n}\r\n\r\n.t-end {\r\n margin-left: auto;\r\n}"],"mappings":";AAAA;AACE,QAAM;AAEN,UAAQ;AACR,UAAQ;AACR,UAAQ;AAER,kBAAgB;AAChB,kBAAgB,IAAI;AACpB,wBAAsB;AAEtB,YAAU;AACV,kBAAgB;AAEhB,WAAS;AAET,YAAU;AACZ;AAEA,QAAO,sBAAuB;AAC5B;AACE,UAAM;AAEN,YAAQ;AACR,YAAQ;AACR,YAAQ;AAER,oBAAgB;AAChB,oBAAgB,IAAI;AACpB,0BAAsB;AAEtB,cAAU;AACV,oBAAgB;AAEhB,aAAS;AAET,cAAU;AACZ;AACF;AAEA;AACE,cAAY,IAAI;AAChB,SAAO,IAAI;AACX;AAAA,IAAa,KAAK;AAAA,IAAE,SAAS;AAAA,IAAE;AACjC;AAEA,CAAC;AACC,WAAS;AACT,SAAO;AACP,oBAAkB,IAAI;AACtB,SAAO,IAAI;AACX,WAAS,IAAI;AACb,UAAQ,IAAI,UAAU,IAAI;AAC1B,iBAAe;AACf,WAAS;AACX;AAEA,CAAC;AACC,eAAa;AACb,UAAQ;AACV;AAEA,CALC,QAKQ;AACP,oBAAkB,IAAI;AACxB;AAEA,
|
|
1
|
+
{"version":3,"sources":["../src/style.css"],"sourcesContent":[":root {\r\n --fg: #0B1220;\r\n\r\n --bg-1: #FFFFFF;\r\n --bg-2: #EEF3FF;\r\n --bg-3: #D9E4FF;\r\n\r\n --component-bg: #F5F8FF;\r\n --component-fg: var(--fg);\r\n --component-bg-hover: #EAF0FF;\r\n\r\n --accent: #2D6BFF;\r\n --accent-hover: #1E4FD6;\r\n\r\n --muted: #5B6B86;\r\n\r\n --border: #D7E1F5;\r\n}\r\n\r\n@media (prefers-color-scheme: dark) {\r\n :root {\r\n --fg: #EAF0FF;\r\n\r\n --bg-1: #070D1A;\r\n --bg-2: #0C1528;\r\n --bg-3: #121F3A;\r\n\r\n --component-bg: #0F1B33;\r\n --component-fg: var(--fg);\r\n --component-bg-hover: #16264A;\r\n\r\n --accent: #4A8CFF;\r\n --accent-hover: #6AA3FF;\r\n\r\n --muted: #93A4C7;\r\n\r\n --border: #1F2E4D;\r\n }\r\n}\r\n\r\nbody { \r\n background: var(--bg-1); \r\n color: var(--fg); \r\n font-family: Arial, Helvetica, sans-serif; \r\n} \r\n\r\n.t-component { \r\n display: block; \r\n width: fit-content; \r\n background-color: var(--component-bg); \r\n color: var(--component-fg); \r\n padding: 4px 10px; \r\n border: var(--border) 2px solid; \r\n border-radius: 4px; \r\n outline: none; \r\n} \r\n\r\n.t-button { \r\n user-select: none; \r\n cursor: pointer; \r\n}\r\n\r\n.t-button:disabled {\r\n opacity: 50%;\r\n pointer-events: none;\r\n}\r\n\r\n.t-button:hover { \r\n background-color: var(--component-bg-hover); \r\n} \r\n\r\n.t-button:active { \r\n background-color: var(--component-bg); \r\n}\r\n\r\n.t-navbar {\r\n display: flex;\r\n position: relative;\r\n width: 100%;\r\n height: 60px;\r\n background-color: var(--bg-2);\r\n align-items: center;\r\n padding: 4px;\r\n box-sizing: border-box;\r\n gap: 4px;\r\n}\r\n\r\n.t-center {\r\n position: absolute;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n}\r\n\r\n.t-end {\r\n margin-left: auto;\r\n}"],"mappings":";AAAA;AACE,QAAM;AAEN,UAAQ;AACR,UAAQ;AACR,UAAQ;AAER,kBAAgB;AAChB,kBAAgB,IAAI;AACpB,wBAAsB;AAEtB,YAAU;AACV,kBAAgB;AAEhB,WAAS;AAET,YAAU;AACZ;AAEA,QAAO,sBAAuB;AAC5B;AACE,UAAM;AAEN,YAAQ;AACR,YAAQ;AACR,YAAQ;AAER,oBAAgB;AAChB,oBAAgB,IAAI;AACpB,0BAAsB;AAEtB,cAAU;AACV,oBAAgB;AAEhB,aAAS;AAET,cAAU;AACZ;AACF;AAEA;AACE,cAAY,IAAI;AAChB,SAAO,IAAI;AACX;AAAA,IAAa,KAAK;AAAA,IAAE,SAAS;AAAA,IAAE;AACjC;AAEA,CAAC;AACC,WAAS;AACT,SAAO;AACP,oBAAkB,IAAI;AACtB,SAAO,IAAI;AACX,WAAS,IAAI;AACb,UAAQ,IAAI,UAAU,IAAI;AAC1B,iBAAe;AACf,WAAS;AACX;AAEA,CAAC;AACC,eAAa;AACb,UAAQ;AACV;AAEA,CALC,QAKQ;AACP,WAAS;AACT,kBAAgB;AAClB;AAEA,CAVC,QAUQ;AACP,oBAAkB,IAAI;AACxB;AAEA,CAdC,QAcQ;AACP,oBAAkB,IAAI;AACxB;AAEA,CAAC;AACC,WAAS;AACT,YAAU;AACV,SAAO;AACP,UAAQ;AACR,oBAAkB,IAAI;AACtB,eAAa;AACb,WAAS;AACT,cAAY;AACZ,OAAK;AACP;AAEA,CAAC;AACC,YAAU;AACV,QAAM;AACN,aAAW,WAAW;AACxB;AAEA,CAAC;AACC,eAAa;AACf;","names":[]}
|
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"]}
|