@atlas-art/ui-react 0.1.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/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @atlas-art/ui-react
2
+
3
+ React adapter package for `@atlas-art/ui-core`.
4
+
5
+ Includes:
6
+ - React UI components (`Button`, `Input`, `Card`, ...)
7
+ - optional `react-router` adapter (`@atlas-art/ui-react/adapters/react-router`)
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var classVarianceAuthority = require('class-variance-authority');
4
+ var react = require('react');
5
+ var reactRouter = require('react-router');
6
+ var uiCore = require('@atlas-art/ui-core');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ // src/adapters/react-router/app-link.tsx
10
+ var appLinkVariants = classVarianceAuthority.cva("transition", {
11
+ variants: {
12
+ variant: {
13
+ primary: "font-medium text-(--app-active-text) hover:underline",
14
+ muted: "text-sm text-(--app-muted-text) hover:text-(--app-text)"
15
+ }
16
+ },
17
+ defaultVariants: {
18
+ variant: "primary"
19
+ }
20
+ });
21
+ var AppLink = react.forwardRef(
22
+ ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
23
+ reactRouter.Link,
24
+ {
25
+ ref,
26
+ className: uiCore.cn(appLinkVariants({ variant }), className),
27
+ ...props
28
+ }
29
+ )
30
+ );
31
+ AppLink.displayName = "AppLink";
32
+
33
+ exports.AppLink = AppLink;
34
+ //# sourceMappingURL=index.cjs.map
35
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/adapters/react-router/app-link.tsx"],"names":["cva","forwardRef","jsx","Link","cn"],"mappings":";;;;;;;;;AAKA,IAAM,eAAA,GAAkBA,2BAAI,YAAA,EAAc;AAAA,EACxC,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,OAAA,EAAS,sDAAA;AAAA,MACT,KAAA,EAAO;AAAA;AACT,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,OAAA,EAAS;AAAA;AAEb,CAAC,CAAA;AAQM,IAAM,OAAA,GAAUC,gBAAA;AAAA,EACrB,CAAC,EAAE,SAAA,EAAW,SAAS,GAAG,KAAA,IAAS,GAAA,qBACjCC,cAAA;AAAA,IAACC,gBAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAWC,SAAA,CAAG,eAAA,CAAgB,EAAE,OAAA,EAAS,GAAG,SAAS,CAAA;AAAA,MACpD,GAAG;AAAA;AAAA;AAGV;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA","file":"index.cjs","sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { forwardRef } from \"react\";\nimport { Link, type LinkProps } from \"react-router\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nconst appLinkVariants = cva(\"transition\", {\n variants: {\n variant: {\n primary: \"font-medium text-(--app-active-text) hover:underline\",\n muted: \"text-sm text-(--app-muted-text) hover:text-(--app-text)\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n },\n});\n\nexport interface AppLinkProps\n extends LinkProps,\n VariantProps<typeof appLinkVariants> {\n className?: string;\n}\n\nexport const AppLink = forwardRef<HTMLAnchorElement, AppLinkProps>(\n ({ className, variant, ...props }, ref) => (\n <Link\n ref={ref}\n className={cn(appLinkVariants({ variant }), className)}\n {...props}\n />\n ),\n);\n\nAppLink.displayName = \"AppLink\";\n"]}
@@ -0,0 +1,14 @@
1
+ import * as react from 'react';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { LinkProps } from 'react-router';
5
+
6
+ declare const appLinkVariants: (props?: ({
7
+ variant?: "primary" | "muted" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface AppLinkProps extends LinkProps, VariantProps<typeof appLinkVariants> {
10
+ className?: string;
11
+ }
12
+ declare const AppLink: react.ForwardRefExoticComponent<Omit<AppLinkProps, "ref"> & react.RefAttributes<HTMLAnchorElement>>;
13
+
14
+ export { AppLink, type AppLinkProps };
@@ -0,0 +1,14 @@
1
+ import * as react from 'react';
2
+ import * as class_variance_authority_types from 'class-variance-authority/types';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { LinkProps } from 'react-router';
5
+
6
+ declare const appLinkVariants: (props?: ({
7
+ variant?: "primary" | "muted" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface AppLinkProps extends LinkProps, VariantProps<typeof appLinkVariants> {
10
+ className?: string;
11
+ }
12
+ declare const AppLink: react.ForwardRefExoticComponent<Omit<AppLinkProps, "ref"> & react.RefAttributes<HTMLAnchorElement>>;
13
+
14
+ export { AppLink, type AppLinkProps };
@@ -0,0 +1,33 @@
1
+ import { cva } from 'class-variance-authority';
2
+ import { forwardRef } from 'react';
3
+ import { Link } from 'react-router';
4
+ import { cn } from '@atlas-art/ui-core';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ // src/adapters/react-router/app-link.tsx
8
+ var appLinkVariants = cva("transition", {
9
+ variants: {
10
+ variant: {
11
+ primary: "font-medium text-(--app-active-text) hover:underline",
12
+ muted: "text-sm text-(--app-muted-text) hover:text-(--app-text)"
13
+ }
14
+ },
15
+ defaultVariants: {
16
+ variant: "primary"
17
+ }
18
+ });
19
+ var AppLink = forwardRef(
20
+ ({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx(
21
+ Link,
22
+ {
23
+ ref,
24
+ className: cn(appLinkVariants({ variant }), className),
25
+ ...props
26
+ }
27
+ )
28
+ );
29
+ AppLink.displayName = "AppLink";
30
+
31
+ export { AppLink };
32
+ //# sourceMappingURL=index.js.map
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/adapters/react-router/app-link.tsx"],"names":[],"mappings":";;;;;;;AAKA,IAAM,eAAA,GAAkB,IAAI,YAAA,EAAc;AAAA,EACxC,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,OAAA,EAAS,sDAAA;AAAA,MACT,KAAA,EAAO;AAAA;AACT,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,OAAA,EAAS;AAAA;AAEb,CAAC,CAAA;AAQM,IAAM,OAAA,GAAU,UAAA;AAAA,EACrB,CAAC,EAAE,SAAA,EAAW,SAAS,GAAG,KAAA,IAAS,GAAA,qBACjC,GAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAW,EAAA,CAAG,eAAA,CAAgB,EAAE,OAAA,EAAS,GAAG,SAAS,CAAA;AAAA,MACpD,GAAG;AAAA;AAAA;AAGV;AAEA,OAAA,CAAQ,WAAA,GAAc,SAAA","file":"index.js","sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport { forwardRef } from \"react\";\nimport { Link, type LinkProps } from \"react-router\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nconst appLinkVariants = cva(\"transition\", {\n variants: {\n variant: {\n primary: \"font-medium text-(--app-active-text) hover:underline\",\n muted: \"text-sm text-(--app-muted-text) hover:text-(--app-text)\",\n },\n },\n defaultVariants: {\n variant: \"primary\",\n },\n});\n\nexport interface AppLinkProps\n extends LinkProps,\n VariantProps<typeof appLinkVariants> {\n className?: string;\n}\n\nexport const AppLink = forwardRef<HTMLAnchorElement, AppLinkProps>(\n ({ className, variant, ...props }, ref) => (\n <Link\n ref={ref}\n className={cn(appLinkVariants({ variant }), className)}\n {...props}\n />\n ),\n);\n\nAppLink.displayName = \"AppLink\";\n"]}
package/dist/index.cjs ADDED
@@ -0,0 +1,133 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+ var uiCore = require('@atlas-art/ui-core');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+
7
+ // src/components/ui/button.tsx
8
+ var Button = react.forwardRef(
9
+ ({ className, variant, size, fullWidth, type = "button", ...props }, ref) => {
10
+ return /* @__PURE__ */ jsxRuntime.jsx(
11
+ "button",
12
+ {
13
+ ref,
14
+ type,
15
+ className: uiCore.cn(uiCore.buttonVariants({ variant, size, fullWidth }), className),
16
+ ...props
17
+ }
18
+ );
19
+ }
20
+ );
21
+ Button.displayName = "Button";
22
+ var Input = react.forwardRef(
23
+ ({ className, size, state, ...props }, ref) => {
24
+ return /* @__PURE__ */ jsxRuntime.jsx(
25
+ "input",
26
+ {
27
+ ref,
28
+ className: uiCore.cn(uiCore.inputVariants({ size, state }), className),
29
+ ...props
30
+ }
31
+ );
32
+ }
33
+ );
34
+ Input.displayName = "Input";
35
+ var Card = react.forwardRef(
36
+ ({ className, padding, shadow, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
37
+ "div",
38
+ {
39
+ ref,
40
+ className: uiCore.cn(uiCore.cardVariants({ padding, shadow }), className),
41
+ ...props
42
+ }
43
+ )
44
+ );
45
+ Card.displayName = "Card";
46
+ var CardHeader = react.forwardRef(
47
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: uiCore.cn("mb-3 flex flex-col gap-1.5", className), ...props })
48
+ );
49
+ CardHeader.displayName = "CardHeader";
50
+ var CardTitle = react.forwardRef(
51
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("h3", { ref, className: uiCore.cn("text-base font-semibold", className), ...props })
52
+ );
53
+ CardTitle.displayName = "CardTitle";
54
+ var CardDescription = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("p", { ref, className: uiCore.cn("text-sm text-(--app-muted-text)", className), ...props }));
55
+ CardDescription.displayName = "CardDescription";
56
+ var CardContent = react.forwardRef(
57
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: uiCore.cn("space-y-3", className), ...props })
58
+ );
59
+ CardContent.displayName = "CardContent";
60
+ var CardFooter = react.forwardRef(
61
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: uiCore.cn("mt-4 flex items-center gap-2", className), ...props })
62
+ );
63
+ CardFooter.displayName = "CardFooter";
64
+ var FormFieldContext = react.createContext({ hasError: false });
65
+ function FormField({ className, error, children, ...props }) {
66
+ return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { hasError: Boolean(error) }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: uiCore.cn(uiCore.fieldVariants(), className), ...props, children: [
67
+ children,
68
+ error ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: uiCore.errorVariants(), children: error }) : null
69
+ ] }) });
70
+ }
71
+ function FormFieldLabel({ className, ...props }) {
72
+ return /* @__PURE__ */ jsxRuntime.jsx("label", { className: uiCore.cn(uiCore.labelVariants(), className), ...props });
73
+ }
74
+ function Text({ as, className, variant, ...props }) {
75
+ const Component = as ?? "p";
76
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, { className: uiCore.cn(uiCore.textVariants({ variant }), className), ...props });
77
+ }
78
+ var SplitCard = react.forwardRef(
79
+ ({ className, columns, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: uiCore.cn(uiCore.splitCardVariants({ columns }), className), ...props })
80
+ );
81
+ SplitCard.displayName = "SplitCard";
82
+ var SplitCardAside = react.forwardRef(
83
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("section", { ref, className: uiCore.cn(uiCore.splitCardAsideVariants(), className), ...props })
84
+ );
85
+ SplitCardAside.displayName = "SplitCardAside";
86
+ var SplitCardMain = react.forwardRef(
87
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("section", { ref, className: uiCore.cn(uiCore.splitCardMainVariants(), className), ...props })
88
+ );
89
+ SplitCardMain.displayName = "SplitCardMain";
90
+ var SplitCardDecoration = react.forwardRef(
91
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
92
+ "div",
93
+ {
94
+ ref,
95
+ className: uiCore.cn(
96
+ "pointer-events-none absolute -bottom-14 -right-14 h-44 w-44 rounded-full border border-(--app-border)",
97
+ className
98
+ ),
99
+ ...props
100
+ }
101
+ )
102
+ );
103
+ SplitCardDecoration.displayName = "SplitCardDecoration";
104
+ var Stack = react.forwardRef(
105
+ ({ className, gap, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
106
+ "div",
107
+ {
108
+ ref,
109
+ className: uiCore.cn(uiCore.stackVariants({ gap }), className),
110
+ ...props
111
+ }
112
+ )
113
+ );
114
+ Stack.displayName = "Stack";
115
+
116
+ exports.Button = Button;
117
+ exports.Card = Card;
118
+ exports.CardContent = CardContent;
119
+ exports.CardDescription = CardDescription;
120
+ exports.CardFooter = CardFooter;
121
+ exports.CardHeader = CardHeader;
122
+ exports.CardTitle = CardTitle;
123
+ exports.FormField = FormField;
124
+ exports.FormFieldLabel = FormFieldLabel;
125
+ exports.Input = Input;
126
+ exports.SplitCard = SplitCard;
127
+ exports.SplitCardAside = SplitCardAside;
128
+ exports.SplitCardDecoration = SplitCardDecoration;
129
+ exports.SplitCardMain = SplitCardMain;
130
+ exports.Stack = Stack;
131
+ exports.Text = Text;
132
+ //# sourceMappingURL=index.cjs.map
133
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/button.tsx","../src/components/ui/input.tsx","../src/components/ui/card.tsx","../src/components/ui/form-field.tsx","../src/components/ui/typography.tsx","../src/components/ui/split-card.tsx","../src/components/ui/stack.tsx"],"names":["forwardRef","jsx","cn","buttonVariants","inputVariants","cardVariants","createContext","jsxs","fieldVariants","errorVariants","labelVariants","textVariants","splitCardVariants","splitCardAsideVariants","splitCardMainVariants","stackVariants"],"mappings":";;;;;;;AAQO,IAAM,MAAA,GAASA,gBAAA;AAAA,EACpB,CAAC,EAAE,SAAA,EAAW,OAAA,EAAS,IAAA,EAAM,SAAA,EAAW,IAAA,GAAO,QAAA,EAAU,GAAG,KAAA,EAAM,EAAG,GAAA,KAAQ;AAC3E,IAAA,u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EAAQ,GAAA,EAAU,WAAWC,SAAAA,CAAGW,6BAAA,IAA0B,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAEtF;AACA,cAAA,CAAe,WAAA,GAAc,gBAAA;AAEtB,IAAM,aAAA,GAAgBb,gBAAAA;AAAA,EAC3B,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,wBACxBC,cAAAA,CAAC,SAAA,EAAA,EAAQ,GAAA,EAAU,WAAWC,SAAAA,CAAGY,4BAAA,IAAyB,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAErF;AACA,aAAA,CAAc,WAAA,GAAc,eAAA;AAErB,IAAM,mBAAA,GAAsBd,gBAAAA;AAAA,EACjC,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,wBACxBC,cAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAWC,SAAAA;AAAA,QACT,uGAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA;AAGV;AACA,mBAAA,CAAoB,WAAA,GAAc,qBAAA;ACvC3B,IAAM,KAAA,GAAQF,gBAAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,GAAA,EAAK,GAAG,KAAA,EAAM,EAAG,wBAC7BC,cAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAWC,SAAAA,CAAGa,oBAAA,CAAc,EAAE,GAAA,EAAK,GAAG,SAAS,CAAA;AAAA,MAC9C,GAAG;AAAA;AAAA;AAGV;AAEA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"index.cjs","sourcesContent":["import { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport { buttonVariants, type ButtonVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface ButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonVariantProps {}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, fullWidth, type = \"button\", ...props }, ref) => {\n return (\n <button\n ref={ref}\n type={type}\n className={cn(buttonVariants({ variant, size, fullWidth }), className)}\n {...props}\n />\n );\n },\n);\n\nButton.displayName = \"Button\";\n","import { forwardRef, type InputHTMLAttributes } from \"react\";\nimport { inputVariants, type InputVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface InputProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n InputVariantProps {}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, size, state, ...props }, ref) => {\n return (\n <input\n ref={ref}\n className={cn(inputVariants({ size, state }), className)}\n {...props}\n />\n );\n },\n);\n\nInput.displayName = \"Input\";\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { cardVariants, type CardVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface CardProps\n extends HTMLAttributes<HTMLDivElement>,\n CardVariantProps {}\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n ({ className, padding, shadow, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(cardVariants({ padding, shadow }), className)}\n {...props}\n />\n ),\n);\nCard.displayName = \"Card\";\n\nexport const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"mb-3 flex flex-col gap-1.5\", className)} {...props} />\n ),\n);\nCardHeader.displayName = \"CardHeader\";\n\nexport const CardTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3 ref={ref} className={cn(\"text-base font-semibold\", className)} {...props} />\n ),\n);\nCardTitle.displayName = \"CardTitle\";\n\nexport const CardDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm text-(--app-muted-text)\", className)} {...props} />\n));\nCardDescription.displayName = \"CardDescription\";\n\nexport const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"space-y-3\", className)} {...props} />\n ),\n);\nCardContent.displayName = \"CardContent\";\n\nexport const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"mt-4 flex items-center gap-2\", className)} {...props} />\n ),\n);\nCardFooter.displayName = \"CardFooter\";\n","import {\n createContext,\n type HTMLAttributes,\n type LabelHTMLAttributes,\n} from \"react\";\nimport {\n errorVariants,\n fieldVariants,\n labelVariants,\n} from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\ninterface FormFieldContextValue {\n hasError: boolean;\n}\n\nconst FormFieldContext = createContext<FormFieldContextValue>({ hasError: false });\n\nexport interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {\n error?: string;\n}\n\nexport function FormField({ className, error, children, ...props }: FormFieldProps) {\n return (\n <FormFieldContext.Provider value={{ hasError: Boolean(error) }}>\n <div className={cn(fieldVariants(), className)} {...props}>\n {children}\n {error ? <p className={errorVariants()}>{error}</p> : null}\n </div>\n </FormFieldContext.Provider>\n );\n}\n\nexport function FormFieldLabel({ className, ...props }: LabelHTMLAttributes<HTMLLabelElement>) {\n return <label className={cn(labelVariants(), className)} {...props} />;\n}\n","import { type ElementType, type HTMLAttributes } from \"react\";\nimport { textVariants, type TextVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\ntype TypographyElement = ElementType;\n\nexport interface TextProps\n extends HTMLAttributes<HTMLElement>,\n TextVariantProps {\n as?: TypographyElement;\n}\n\nexport function Text({ as, className, variant, ...props }: TextProps) {\n const Component = as ?? \"p\";\n return <Component className={cn(textVariants({ variant }), className)} {...props} />;\n}\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport {\n splitCardAsideVariants,\n splitCardMainVariants,\n splitCardVariants,\n type SplitCardVariantProps,\n} from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface SplitCardProps\n extends HTMLAttributes<HTMLDivElement>,\n SplitCardVariantProps {}\n\nexport const SplitCard = forwardRef<HTMLDivElement, SplitCardProps>(\n ({ className, columns, ...props }, ref) => (\n <div ref={ref} className={cn(splitCardVariants({ columns }), className)} {...props} />\n ),\n);\nSplitCard.displayName = \"SplitCard\";\n\nexport const SplitCardAside = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <section ref={ref} className={cn(splitCardAsideVariants(), className)} {...props} />\n ),\n);\nSplitCardAside.displayName = \"SplitCardAside\";\n\nexport const SplitCardMain = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <section ref={ref} className={cn(splitCardMainVariants(), className)} {...props} />\n ),\n);\nSplitCardMain.displayName = \"SplitCardMain\";\n\nexport const SplitCardDecoration = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"pointer-events-none absolute -bottom-14 -right-14 h-44 w-44 rounded-full border border-(--app-border)\",\n className,\n )}\n {...props}\n />\n ),\n);\nSplitCardDecoration.displayName = \"SplitCardDecoration\";\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { stackVariants, type StackVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface StackProps\n extends HTMLAttributes<HTMLDivElement>, StackVariantProps {}\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n ({ className, gap, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(stackVariants({ gap }), className)}\n {...props}\n />\n ),\n);\n\nStack.displayName = \"Stack\";\n"]}
@@ -0,0 +1,46 @@
1
+ import * as react from 'react';
2
+ import { ButtonHTMLAttributes, InputHTMLAttributes, HTMLAttributes, LabelHTMLAttributes, ElementType } from 'react';
3
+ import { ButtonVariantProps, InputVariantProps, CardVariantProps, TextVariantProps, SplitCardVariantProps, StackVariantProps } from '@atlas-art/ui-core';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+
6
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantProps {
7
+ }
8
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
9
+
10
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size">, InputVariantProps {
11
+ }
12
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
13
+
14
+ interface CardProps extends HTMLAttributes<HTMLDivElement>, CardVariantProps {
15
+ }
16
+ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
17
+ declare const CardHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
18
+ declare const CardTitle: react.ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & react.RefAttributes<HTMLHeadingElement>>;
19
+ declare const CardDescription: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
20
+ declare const CardContent: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
21
+ declare const CardFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
22
+
23
+ interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
24
+ error?: string;
25
+ }
26
+ declare function FormField({ className, error, children, ...props }: FormFieldProps): react_jsx_runtime.JSX.Element;
27
+ declare function FormFieldLabel({ className, ...props }: LabelHTMLAttributes<HTMLLabelElement>): react_jsx_runtime.JSX.Element;
28
+
29
+ type TypographyElement = ElementType;
30
+ interface TextProps extends HTMLAttributes<HTMLElement>, TextVariantProps {
31
+ as?: TypographyElement;
32
+ }
33
+ declare function Text({ as, className, variant, ...props }: TextProps): react_jsx_runtime.JSX.Element;
34
+
35
+ interface SplitCardProps extends HTMLAttributes<HTMLDivElement>, SplitCardVariantProps {
36
+ }
37
+ declare const SplitCard: react.ForwardRefExoticComponent<SplitCardProps & react.RefAttributes<HTMLDivElement>>;
38
+ declare const SplitCardAside: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
39
+ declare const SplitCardMain: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
40
+ declare const SplitCardDecoration: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
41
+
42
+ interface StackProps extends HTMLAttributes<HTMLDivElement>, StackVariantProps {
43
+ }
44
+ declare const Stack: react.ForwardRefExoticComponent<StackProps & react.RefAttributes<HTMLDivElement>>;
45
+
46
+ export { Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, FormField, FormFieldLabel, type FormFieldProps, Input, type InputProps, SplitCard, SplitCardAside, SplitCardDecoration, SplitCardMain, type SplitCardProps, Stack, type StackProps, Text, type TextProps };
@@ -0,0 +1,46 @@
1
+ import * as react from 'react';
2
+ import { ButtonHTMLAttributes, InputHTMLAttributes, HTMLAttributes, LabelHTMLAttributes, ElementType } from 'react';
3
+ import { ButtonVariantProps, InputVariantProps, CardVariantProps, TextVariantProps, SplitCardVariantProps, StackVariantProps } from '@atlas-art/ui-core';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+
6
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariantProps {
7
+ }
8
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
9
+
10
+ interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size">, InputVariantProps {
11
+ }
12
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
13
+
14
+ interface CardProps extends HTMLAttributes<HTMLDivElement>, CardVariantProps {
15
+ }
16
+ declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLDivElement>>;
17
+ declare const CardHeader: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
18
+ declare const CardTitle: react.ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & react.RefAttributes<HTMLHeadingElement>>;
19
+ declare const CardDescription: react.ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & react.RefAttributes<HTMLParagraphElement>>;
20
+ declare const CardContent: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
21
+ declare const CardFooter: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
22
+
23
+ interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {
24
+ error?: string;
25
+ }
26
+ declare function FormField({ className, error, children, ...props }: FormFieldProps): react_jsx_runtime.JSX.Element;
27
+ declare function FormFieldLabel({ className, ...props }: LabelHTMLAttributes<HTMLLabelElement>): react_jsx_runtime.JSX.Element;
28
+
29
+ type TypographyElement = ElementType;
30
+ interface TextProps extends HTMLAttributes<HTMLElement>, TextVariantProps {
31
+ as?: TypographyElement;
32
+ }
33
+ declare function Text({ as, className, variant, ...props }: TextProps): react_jsx_runtime.JSX.Element;
34
+
35
+ interface SplitCardProps extends HTMLAttributes<HTMLDivElement>, SplitCardVariantProps {
36
+ }
37
+ declare const SplitCard: react.ForwardRefExoticComponent<SplitCardProps & react.RefAttributes<HTMLDivElement>>;
38
+ declare const SplitCardAside: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
39
+ declare const SplitCardMain: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
40
+ declare const SplitCardDecoration: react.ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
41
+
42
+ interface StackProps extends HTMLAttributes<HTMLDivElement>, StackVariantProps {
43
+ }
44
+ declare const Stack: react.ForwardRefExoticComponent<StackProps & react.RefAttributes<HTMLDivElement>>;
45
+
46
+ export { Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, CardTitle, FormField, FormFieldLabel, type FormFieldProps, Input, type InputProps, SplitCard, SplitCardAside, SplitCardDecoration, SplitCardMain, type SplitCardProps, Stack, type StackProps, Text, type TextProps };
package/dist/index.js ADDED
@@ -0,0 +1,116 @@
1
+ import { forwardRef, createContext } from 'react';
2
+ import { cn, buttonVariants, inputVariants, cardVariants, splitCardVariants, splitCardAsideVariants, splitCardMainVariants, stackVariants, errorVariants, fieldVariants, labelVariants, textVariants } from '@atlas-art/ui-core';
3
+ import { jsx, jsxs } from 'react/jsx-runtime';
4
+
5
+ // src/components/ui/button.tsx
6
+ var Button = forwardRef(
7
+ ({ className, variant, size, fullWidth, type = "button", ...props }, ref) => {
8
+ return /* @__PURE__ */ jsx(
9
+ "button",
10
+ {
11
+ ref,
12
+ type,
13
+ className: cn(buttonVariants({ variant, size, fullWidth }), className),
14
+ ...props
15
+ }
16
+ );
17
+ }
18
+ );
19
+ Button.displayName = "Button";
20
+ var Input = forwardRef(
21
+ ({ className, size, state, ...props }, ref) => {
22
+ return /* @__PURE__ */ jsx(
23
+ "input",
24
+ {
25
+ ref,
26
+ className: cn(inputVariants({ size, state }), className),
27
+ ...props
28
+ }
29
+ );
30
+ }
31
+ );
32
+ Input.displayName = "Input";
33
+ var Card = forwardRef(
34
+ ({ className, padding, shadow, ...props }, ref) => /* @__PURE__ */ jsx(
35
+ "div",
36
+ {
37
+ ref,
38
+ className: cn(cardVariants({ padding, shadow }), className),
39
+ ...props
40
+ }
41
+ )
42
+ );
43
+ Card.displayName = "Card";
44
+ var CardHeader = forwardRef(
45
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-3 flex flex-col gap-1.5", className), ...props })
46
+ );
47
+ CardHeader.displayName = "CardHeader";
48
+ var CardTitle = forwardRef(
49
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("h3", { ref, className: cn("text-base font-semibold", className), ...props })
50
+ );
51
+ CardTitle.displayName = "CardTitle";
52
+ var CardDescription = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", { ref, className: cn("text-sm text-(--app-muted-text)", className), ...props }));
53
+ CardDescription.displayName = "CardDescription";
54
+ var CardContent = forwardRef(
55
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-3", className), ...props })
56
+ );
57
+ CardContent.displayName = "CardContent";
58
+ var CardFooter = forwardRef(
59
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mt-4 flex items-center gap-2", className), ...props })
60
+ );
61
+ CardFooter.displayName = "CardFooter";
62
+ var FormFieldContext = createContext({ hasError: false });
63
+ function FormField({ className, error, children, ...props }) {
64
+ return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { hasError: Boolean(error) }, children: /* @__PURE__ */ jsxs("div", { className: cn(fieldVariants(), className), ...props, children: [
65
+ children,
66
+ error ? /* @__PURE__ */ jsx("p", { className: errorVariants(), children: error }) : null
67
+ ] }) });
68
+ }
69
+ function FormFieldLabel({ className, ...props }) {
70
+ return /* @__PURE__ */ jsx("label", { className: cn(labelVariants(), className), ...props });
71
+ }
72
+ function Text({ as, className, variant, ...props }) {
73
+ const Component = as ?? "p";
74
+ return /* @__PURE__ */ jsx(Component, { className: cn(textVariants({ variant }), className), ...props });
75
+ }
76
+ var SplitCard = forwardRef(
77
+ ({ className, columns, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn(splitCardVariants({ columns }), className), ...props })
78
+ );
79
+ SplitCard.displayName = "SplitCard";
80
+ var SplitCardAside = forwardRef(
81
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("section", { ref, className: cn(splitCardAsideVariants(), className), ...props })
82
+ );
83
+ SplitCardAside.displayName = "SplitCardAside";
84
+ var SplitCardMain = forwardRef(
85
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("section", { ref, className: cn(splitCardMainVariants(), className), ...props })
86
+ );
87
+ SplitCardMain.displayName = "SplitCardMain";
88
+ var SplitCardDecoration = forwardRef(
89
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
90
+ "div",
91
+ {
92
+ ref,
93
+ className: cn(
94
+ "pointer-events-none absolute -bottom-14 -right-14 h-44 w-44 rounded-full border border-(--app-border)",
95
+ className
96
+ ),
97
+ ...props
98
+ }
99
+ )
100
+ );
101
+ SplitCardDecoration.displayName = "SplitCardDecoration";
102
+ var Stack = forwardRef(
103
+ ({ className, gap, ...props }, ref) => /* @__PURE__ */ jsx(
104
+ "div",
105
+ {
106
+ ref,
107
+ className: cn(stackVariants({ gap }), className),
108
+ ...props
109
+ }
110
+ )
111
+ );
112
+ Stack.displayName = "Stack";
113
+
114
+ export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, FormField, FormFieldLabel, Input, SplitCard, SplitCardAside, SplitCardDecoration, SplitCardMain, Stack, Text };
115
+ //# sourceMappingURL=index.js.map
116
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/button.tsx","../src/components/ui/input.tsx","../src/components/ui/card.tsx","../src/components/ui/form-field.tsx","../src/components/ui/typography.tsx","../src/components/ui/split-card.tsx","../src/components/ui/stack.tsx"],"names":["forwardRef","jsx","cn"],"mappings":";;;;;AAQO,IAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,EAAE,SAAA,EAAW,OAAA,EAAS,IAAA,EAAM,SAAA,EAAW,IAAA,G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C,GAAAA,CAAC,SAAA,EAAA,EAAQ,GAAA,EAAU,WAAWC,EAAAA,CAAG,sBAAA,IAA0B,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAEtF;AACA,cAAA,CAAe,WAAA,GAAc,gBAAA;AAEtB,IAAM,aAAA,GAAgBF,UAAAA;AAAA,EAC3B,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,wBACxBC,GAAAA,CAAC,SAAA,EAAA,EAAQ,GAAA,EAAU,WAAWC,EAAAA,CAAG,qBAAA,IAAyB,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO;AAErF;AACA,aAAA,CAAc,WAAA,GAAc,eAAA;AAErB,IAAM,mBAAA,GAAsBF,UAAAA;AAAA,EACjC,CAAC,EAAE,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,wBACxBC,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,SAAA,EAAWC,EAAAA;AAAA,QACT,uGAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA;AAGV;AACA,mBAAA,CAAoB,WAAA,GAAc,qBAAA;ACvC3B,IAAM,KAAA,GAAQF,UAAAA;AAAA,EACnB,CAAC,EAAE,SAAA,EAAW,GAAA,EAAK,GAAG,KAAA,EAAM,EAAG,wBAC7BC,GAAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,GAAA;AAAA,MACA,WAAWC,EAAAA,CAAG,aAAA,CAAc,EAAE,GAAA,EAAK,GAAG,SAAS,CAAA;AAAA,MAC9C,GAAG;AAAA;AAAA;AAGV;AAEA,KAAA,CAAM,WAAA,GAAc,OAAA","file":"index.js","sourcesContent":["import { forwardRef, type ButtonHTMLAttributes } from \"react\";\nimport { buttonVariants, type ButtonVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface ButtonProps\n extends ButtonHTMLAttributes<HTMLButtonElement>,\n ButtonVariantProps {}\n\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, fullWidth, type = \"button\", ...props }, ref) => {\n return (\n <button\n ref={ref}\n type={type}\n className={cn(buttonVariants({ variant, size, fullWidth }), className)}\n {...props}\n />\n );\n },\n);\n\nButton.displayName = \"Button\";\n","import { forwardRef, type InputHTMLAttributes } from \"react\";\nimport { inputVariants, type InputVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface InputProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\">,\n InputVariantProps {}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n ({ className, size, state, ...props }, ref) => {\n return (\n <input\n ref={ref}\n className={cn(inputVariants({ size, state }), className)}\n {...props}\n />\n );\n },\n);\n\nInput.displayName = \"Input\";\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { cardVariants, type CardVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface CardProps\n extends HTMLAttributes<HTMLDivElement>,\n CardVariantProps {}\n\nexport const Card = forwardRef<HTMLDivElement, CardProps>(\n ({ className, padding, shadow, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(cardVariants({ padding, shadow }), className)}\n {...props}\n />\n ),\n);\nCard.displayName = \"Card\";\n\nexport const CardHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"mb-3 flex flex-col gap-1.5\", className)} {...props} />\n ),\n);\nCardHeader.displayName = \"CardHeader\";\n\nexport const CardTitle = forwardRef<HTMLHeadingElement, HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3 ref={ref} className={cn(\"text-base font-semibold\", className)} {...props} />\n ),\n);\nCardTitle.displayName = \"CardTitle\";\n\nexport const CardDescription = forwardRef<\n HTMLParagraphElement,\n HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm text-(--app-muted-text)\", className)} {...props} />\n));\nCardDescription.displayName = \"CardDescription\";\n\nexport const CardContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"space-y-3\", className)} {...props} />\n ),\n);\nCardContent.displayName = \"CardContent\";\n\nexport const CardFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"mt-4 flex items-center gap-2\", className)} {...props} />\n ),\n);\nCardFooter.displayName = \"CardFooter\";\n","import {\n createContext,\n type HTMLAttributes,\n type LabelHTMLAttributes,\n} from \"react\";\nimport {\n errorVariants,\n fieldVariants,\n labelVariants,\n} from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\ninterface FormFieldContextValue {\n hasError: boolean;\n}\n\nconst FormFieldContext = createContext<FormFieldContextValue>({ hasError: false });\n\nexport interface FormFieldProps extends HTMLAttributes<HTMLDivElement> {\n error?: string;\n}\n\nexport function FormField({ className, error, children, ...props }: FormFieldProps) {\n return (\n <FormFieldContext.Provider value={{ hasError: Boolean(error) }}>\n <div className={cn(fieldVariants(), className)} {...props}>\n {children}\n {error ? <p className={errorVariants()}>{error}</p> : null}\n </div>\n </FormFieldContext.Provider>\n );\n}\n\nexport function FormFieldLabel({ className, ...props }: LabelHTMLAttributes<HTMLLabelElement>) {\n return <label className={cn(labelVariants(), className)} {...props} />;\n}\n","import { type ElementType, type HTMLAttributes } from \"react\";\nimport { textVariants, type TextVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\ntype TypographyElement = ElementType;\n\nexport interface TextProps\n extends HTMLAttributes<HTMLElement>,\n TextVariantProps {\n as?: TypographyElement;\n}\n\nexport function Text({ as, className, variant, ...props }: TextProps) {\n const Component = as ?? \"p\";\n return <Component className={cn(textVariants({ variant }), className)} {...props} />;\n}\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport {\n splitCardAsideVariants,\n splitCardMainVariants,\n splitCardVariants,\n type SplitCardVariantProps,\n} from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface SplitCardProps\n extends HTMLAttributes<HTMLDivElement>,\n SplitCardVariantProps {}\n\nexport const SplitCard = forwardRef<HTMLDivElement, SplitCardProps>(\n ({ className, columns, ...props }, ref) => (\n <div ref={ref} className={cn(splitCardVariants({ columns }), className)} {...props} />\n ),\n);\nSplitCard.displayName = \"SplitCard\";\n\nexport const SplitCardAside = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <section ref={ref} className={cn(splitCardAsideVariants(), className)} {...props} />\n ),\n);\nSplitCardAside.displayName = \"SplitCardAside\";\n\nexport const SplitCardMain = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <section ref={ref} className={cn(splitCardMainVariants(), className)} {...props} />\n ),\n);\nSplitCardMain.displayName = \"SplitCardMain\";\n\nexport const SplitCardDecoration = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n \"pointer-events-none absolute -bottom-14 -right-14 h-44 w-44 rounded-full border border-(--app-border)\",\n className,\n )}\n {...props}\n />\n ),\n);\nSplitCardDecoration.displayName = \"SplitCardDecoration\";\n","import { forwardRef, type HTMLAttributes } from \"react\";\nimport { stackVariants, type StackVariantProps } from \"@atlas-art/ui-core\";\nimport { cn } from \"@atlas-art/ui-core\";\n\nexport interface StackProps\n extends HTMLAttributes<HTMLDivElement>, StackVariantProps {}\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(\n ({ className, gap, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(stackVariants({ gap }), className)}\n {...props}\n />\n ),\n);\n\nStack.displayName = \"Stack\";\n"]}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@atlas-art/ui-react",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ },
14
+ "./adapters/react-router": {
15
+ "types": "./dist/adapters/react-router/index.d.ts",
16
+ "import": "./dist/adapters/react-router/index.js",
17
+ "require": "./dist/adapters/react-router/index.cjs"
18
+ }
19
+ },
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "peerDependencies": {
27
+ "react": ">=18",
28
+ "react-dom": ">=18",
29
+ "react-router": ">=7"
30
+ },
31
+ "peerDependenciesMeta": {
32
+ "react-router": {
33
+ "optional": true
34
+ }
35
+ },
36
+ "dependencies": {
37
+ "class-variance-authority": "^0.7.1",
38
+ "@atlas-art/ui-core": "0.1.0"
39
+ },
40
+ "devDependencies": {
41
+ "@types/react": "^19.2.14",
42
+ "@types/react-dom": "^19.2.3",
43
+ "tsup": "^8.5.0",
44
+ "typescript": "^5.9.3"
45
+ },
46
+ "scripts": {
47
+ "build": "tsup",
48
+ "dev": "tsup --watch",
49
+ "typecheck": "tsc --noEmit"
50
+ }
51
+ }