@scaleflex/ui-tw 0.0.3 → 0.0.5
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/card/card.component.d.ts +9 -0
- package/card/card.component.js +59 -0
- package/card/index.d.ts +1 -0
- package/card/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
declare function Card({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
4
|
+
declare function CardHeader({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
5
|
+
declare function CardTitle({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
6
|
+
declare function CardDescription({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
7
|
+
declare function CardContent({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
8
|
+
declare function CardSetting({ className, ...rest }: ComponentProps<'div'>): React.JSX.Element;
|
|
9
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardSetting };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["className"],
|
|
4
|
+
_excluded2 = ["className"],
|
|
5
|
+
_excluded3 = ["className"],
|
|
6
|
+
_excluded4 = ["className"],
|
|
7
|
+
_excluded5 = ["className"],
|
|
8
|
+
_excluded6 = ["className"];
|
|
9
|
+
import { cn } from '@scaleflex/ui-tw/utils/cn';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
function Card(_ref) {
|
|
12
|
+
var className = _ref.className,
|
|
13
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
15
|
+
"data-slot": "card",
|
|
16
|
+
className: cn('bg-card lg:border-border border-y-border shadow-shadow mt-8 max-w-7xl border-y shadow-md lg:rounded-xl lg:border', className)
|
|
17
|
+
}, rest));
|
|
18
|
+
}
|
|
19
|
+
function CardHeader(_ref2) {
|
|
20
|
+
var className = _ref2.className,
|
|
21
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
23
|
+
"data-slot": "card-header",
|
|
24
|
+
className: cn('border-border flex flex-col gap-1 border-b px-6 py-6 text-xl font-medium lg:rounded-t-xl', className)
|
|
25
|
+
}, rest));
|
|
26
|
+
}
|
|
27
|
+
function CardTitle(_ref3) {
|
|
28
|
+
var className = _ref3.className,
|
|
29
|
+
rest = _objectWithoutProperties(_ref3, _excluded3);
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
31
|
+
"data-slot": "card-title",
|
|
32
|
+
className: cn(className)
|
|
33
|
+
}, rest));
|
|
34
|
+
}
|
|
35
|
+
function CardDescription(_ref4) {
|
|
36
|
+
var className = _ref4.className,
|
|
37
|
+
rest = _objectWithoutProperties(_ref4, _excluded4);
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
39
|
+
"data-slot": "card-description",
|
|
40
|
+
className: cn('text-secondary-foreground max-w-4xl text-sm font-normal', className)
|
|
41
|
+
}, rest));
|
|
42
|
+
}
|
|
43
|
+
function CardContent(_ref5) {
|
|
44
|
+
var className = _ref5.className,
|
|
45
|
+
rest = _objectWithoutProperties(_ref5, _excluded5);
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
47
|
+
"data-slot": "card-content",
|
|
48
|
+
className: cn('flex flex-col gap-6 rounded-b-xl p-6', className)
|
|
49
|
+
}, rest));
|
|
50
|
+
}
|
|
51
|
+
function CardSetting(_ref6) {
|
|
52
|
+
var className = _ref6.className,
|
|
53
|
+
rest = _objectWithoutProperties(_ref6, _excluded6);
|
|
54
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
55
|
+
"data-slot": "card-setting",
|
|
56
|
+
className: cn('flex min-h-[2.5rem] items-center justify-between gap-4 text-base', className)
|
|
57
|
+
}, rest));
|
|
58
|
+
}
|
|
59
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardContent, CardSetting };
|
package/card/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card, CardHeader, CardContent, CardTitle, CardDescription, CardSetting } from './card.component';
|
package/card/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Card, CardHeader, CardContent, CardTitle, CardDescription, CardSetting } from './card.component';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/ui-tw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"author": "scaleflex",
|
|
5
5
|
"repository": "github:scaleflex/ui",
|
|
6
6
|
"homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@radix-ui/react-label": "^2.1.6",
|
|
17
17
|
"@radix-ui/react-slot": "^1.1.2",
|
|
18
18
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
19
|
-
"@scaleflex/icons-tw": "^0.0.
|
|
19
|
+
"@scaleflex/icons-tw": "^0.0.5",
|
|
20
20
|
"@types/lodash.merge": "^4.6.9",
|
|
21
21
|
"class-variance-authority": "^0.7.1",
|
|
22
22
|
"lodash.merge": "^4.6.2",
|