@mijn-ui/react-card 0.0.2 → 0.0.4

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.
@@ -0,0 +1,18 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { UnstyledProps } from '@mijn-ui/react-utilities/shared';
4
+
5
+ type CardProps = React.ComponentProps<"div"> & UnstyledProps;
6
+ declare const Card: ({ className, unstyled, ...props }: CardProps) => react_jsx_runtime.JSX.Element;
7
+ type CardHeaderProps = React.ComponentPropsWithRef<"div"> & UnstyledProps;
8
+ declare const CardHeader: ({ className, unstyled, ...props }: CardHeaderProps) => react_jsx_runtime.JSX.Element;
9
+ type CardTitleProps = React.ComponentPropsWithRef<"div"> & UnstyledProps;
10
+ declare const CardTitle: ({ className, unstyled, ...props }: CardTitleProps) => react_jsx_runtime.JSX.Element;
11
+ type CardDescriptionProps = React.ComponentPropsWithRef<"div"> & UnstyledProps;
12
+ declare const CardDescription: ({ className, unstyled, ...props }: CardDescriptionProps) => react_jsx_runtime.JSX.Element;
13
+ type CardContentProps = React.ComponentPropsWithRef<"div"> & UnstyledProps;
14
+ declare const CardContent: ({ className, unstyled, ...props }: CardContentProps) => react_jsx_runtime.JSX.Element;
15
+ type CardFooterProps = React.ComponentPropsWithRef<"div"> & UnstyledProps;
16
+ declare const CardFooter: ({ className, unstyled, ...props }: CardFooterProps) => react_jsx_runtime.JSX.Element;
17
+
18
+ export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
package/dist/index.js ADDED
@@ -0,0 +1,102 @@
1
+ "use client"
2
+
3
+ // src/card.tsx
4
+ import { UnstyledProvider, useUnstyled } from "@mijn-ui/react-utilities/context";
5
+ import {
6
+ applyUnstyled,
7
+ cn
8
+ } from "@mijn-ui/react-utilities/shared";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var Card = ({ className, unstyled = false, ...props }) => /* @__PURE__ */ jsx(UnstyledProvider, { unstyled, children: /* @__PURE__ */ jsx(
11
+ "div",
12
+ {
13
+ className: cn(
14
+ "bg-surface text-surface-text rounded-lg shadow-sm",
15
+ className
16
+ ),
17
+ ...props
18
+ }
19
+ ) });
20
+ var CardHeader = ({ className, unstyled, ...props }) => {
21
+ const { unstyled: contextUnstyled } = useUnstyled();
22
+ const isUnstyled = unstyled ?? contextUnstyled;
23
+ return /* @__PURE__ */ jsx(
24
+ "div",
25
+ {
26
+ className: applyUnstyled(
27
+ isUnstyled,
28
+ "flex flex-col space-y-1.5 p-4",
29
+ className
30
+ ),
31
+ ...props
32
+ }
33
+ );
34
+ };
35
+ var CardTitle = ({ className, unstyled, ...props }) => {
36
+ const { unstyled: contextUnstyled } = useUnstyled();
37
+ const isUnstyled = unstyled ?? contextUnstyled;
38
+ return /* @__PURE__ */ jsx(
39
+ "div",
40
+ {
41
+ className: applyUnstyled(
42
+ isUnstyled,
43
+ "text-2xl font-semibold leading-none tracking-tight",
44
+ className
45
+ ),
46
+ ...props
47
+ }
48
+ );
49
+ };
50
+ var CardDescription = ({
51
+ className,
52
+ unstyled,
53
+ ...props
54
+ }) => {
55
+ const { unstyled: contextUnstyled } = useUnstyled();
56
+ const isUnstyled = unstyled ?? contextUnstyled;
57
+ return /* @__PURE__ */ jsx(
58
+ "div",
59
+ {
60
+ className: applyUnstyled(
61
+ isUnstyled,
62
+ "text-sm text-neutral-text",
63
+ className
64
+ ),
65
+ ...props
66
+ }
67
+ );
68
+ };
69
+ var CardContent = ({ className, unstyled, ...props }) => {
70
+ const { unstyled: contextUnstyled } = useUnstyled();
71
+ const isUnstyled = unstyled ?? contextUnstyled;
72
+ return /* @__PURE__ */ jsx(
73
+ "div",
74
+ {
75
+ className: applyUnstyled(isUnstyled, "p-4 pt-0", className),
76
+ ...props
77
+ }
78
+ );
79
+ };
80
+ var CardFooter = ({ className, unstyled, ...props }) => {
81
+ const { unstyled: contextUnstyled } = useUnstyled();
82
+ const isUnstyled = unstyled ?? contextUnstyled;
83
+ return /* @__PURE__ */ jsx(
84
+ "div",
85
+ {
86
+ className: applyUnstyled(
87
+ isUnstyled,
88
+ "flex items-center p-4 pt-0",
89
+ className
90
+ ),
91
+ ...props
92
+ }
93
+ );
94
+ };
95
+ export {
96
+ Card,
97
+ CardContent,
98
+ CardDescription,
99
+ CardFooter,
100
+ CardHeader,
101
+ CardTitle
102
+ };
@@ -0,0 +1 @@
1
+ {"inputs":{"src/card.tsx":{"bytes":4227,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@mijn-ui/react-utilities/context","kind":"import-statement","external":true},{"path":"@mijn-ui/react-utilities/shared","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":23,"imports":[{"path":"src/card.tsx","kind":"import-statement","original":"./card"}],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"@mijn-ui/react-utilities/context","kind":"import-statement","external":true},{"path":"@mijn-ui/react-utilities/shared","kind":"import-statement","external":true},{"path":"react/jsx-runtime","kind":"import-statement","external":true}],"exports":["Card","CardContent","CardDescription","CardFooter","CardHeader","CardTitle"],"entryPoint":"src/index.ts","inputs":{"src/card.tsx":{"bytesInOutput":2239},"src/index.ts":{"bytesInOutput":0}},"bytes":2349}}}
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@mijn-ui/react-card",
3
3
  "author": "Htet Aung Lin<htetaunglin.coder@gmail.com>",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "homepage": "https://mijn-ui.vercel.app",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "sideEffects": false,
9
9
  "files": [
10
- "dist/*"
10
+ "dist"
11
11
  ],
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "git+https://github.com/mijn-ui/components.git",
14
+ "url": "git+https://github.com/mijn-ui/mijn-ui-react.git",
15
15
  "directory": "packages/components/src"
16
16
  },
17
17
  "bugs": {
18
- "url": "https://github.com/mijn-ui/components/issues"
18
+ "url": "https://github.com/mijn-ui/mijn-ui-react/issues"
19
19
  },
20
20
  "exports": "./dist/index.js",
21
21
  "types": "./dist/index.d.ts",
@@ -23,14 +23,14 @@
23
23
  "@next/eslint-plugin-next": "^15.0.3",
24
24
  "@types/react": "^18.3.12",
25
25
  "@types/react-dom": "^18.3.1",
26
- "eslint-config-custom": "0.0.0",
26
+ "eslint-config-custom": "0.0.1",
27
27
  "tsconfig": "0.0.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "react": "19.0.0-rc-b01722d5-20241114",
31
31
  "react-dom": "19.0.0-rc-b01722d5-20241114",
32
32
  "class-variance-authority": "^0.7.0",
33
- "@mijn-ui/react-utilities": "0.0.2"
33
+ "@mijn-ui/react-utilities": "0.0.4"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": "19.0.0-rc-b01722d5-20241114",