@sikka/hawa 0.21.13-next → 0.21.14-next
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/accordion/index.mjs +3 -2
- package/dist/card/index.d.mts +17 -0
- package/dist/card/index.d.ts +17 -0
- package/dist/card/index.js +117 -0
- package/dist/card/index.mjs +2 -0
- package/dist/{chunk-SMZ7Z4DO.mjs → chunk-LLB4RSG3.mjs} +463 -542
- package/dist/chunk-WPNE4Q3C.mjs +83 -0
- package/dist/index.d.mts +2 -15
- package/dist/index.d.ts +2 -15
- package/dist/index.mjs +6 -4
- package/package.json +1 -1
package/dist/accordion/index.mjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { Accordion, AccordionContent, AccordionTrigger } from '../chunk-
|
|
1
|
+
export { Accordion, AccordionContent, AccordionTrigger } from '../chunk-LLB4RSG3.mjs';
|
|
2
|
+
import '../chunk-ENZDFGFY.mjs';
|
|
2
3
|
import '../chunk-NFLMC26M.mjs';
|
|
3
4
|
import '../chunk-L55L4HKN.mjs';
|
|
4
5
|
import '../chunk-LZAC5DLW.mjs';
|
|
6
|
+
import '../chunk-WPNE4Q3C.mjs';
|
|
5
7
|
import '../chunk-J5NJEHQU.mjs';
|
|
6
8
|
import '../chunk-C4CBXIG5.mjs';
|
|
7
9
|
import '../chunk-PUQV6URH.mjs';
|
|
8
|
-
import '../chunk-ENZDFGFY.mjs';
|
|
9
10
|
import { cn } from '../chunk-TE3BKEXL.mjs';
|
|
10
11
|
import * as React from 'react';
|
|
11
12
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
clickable?: boolean;
|
|
5
|
+
variant?: "default" | "neoBrutalism";
|
|
6
|
+
}
|
|
7
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
10
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
declare const CardContent: React.ForwardRefExoticComponent<{
|
|
12
|
+
headless?: boolean | undefined;
|
|
13
|
+
noPadding?: boolean | undefined;
|
|
14
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
|
|
17
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
clickable?: boolean;
|
|
5
|
+
variant?: "default" | "neoBrutalism";
|
|
6
|
+
}
|
|
7
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
10
|
+
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
11
|
+
declare const CardContent: React.ForwardRefExoticComponent<{
|
|
12
|
+
headless?: boolean | undefined;
|
|
13
|
+
noPadding?: boolean | undefined;
|
|
14
|
+
} & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
|
|
17
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var clsx = require('clsx');
|
|
5
|
+
var tailwindMerge = require('tailwind-merge');
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n.default = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
26
|
+
|
|
27
|
+
// components/elements/card/Card.tsx
|
|
28
|
+
function cn(...inputs) {
|
|
29
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// components/elements/card/Card.tsx
|
|
33
|
+
var Card = React__namespace.forwardRef(
|
|
34
|
+
({ className, variant = "default", clickable = false, ...props }, ref) => {
|
|
35
|
+
let variantStyles = {
|
|
36
|
+
default: cn(
|
|
37
|
+
"hawa-rounded-lg hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm",
|
|
38
|
+
clickable && "hawa-cursor-pointer hawa-transition-all hover:hawa-drop-shadow-md dark:hover:dark-shadow"
|
|
39
|
+
),
|
|
40
|
+
neoBrutalism: cn(
|
|
41
|
+
"neo-brutalism",
|
|
42
|
+
// "hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] transition-all uppercase font-mono dark:bg-black font-bold py-2 px-4 rounded border-2 border-primary shadow-color-primary transition-[transform_50ms, box-shadow_50ms]",
|
|
43
|
+
clickable && "hawa-cursor-pointer active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active active:translate-x-0.5 active:translate-y-0.5 active:shadow-color-primary-active"
|
|
44
|
+
)
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ React__namespace.createElement(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
ref,
|
|
50
|
+
className: cn(className, variantStyles[variant]),
|
|
51
|
+
...props
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
var CardHeader = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React__namespace.createElement(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
ref,
|
|
60
|
+
className: cn(
|
|
61
|
+
"hawa-flex hawa-flex-col hawa-space-y-1.5 hawa-p-6",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
));
|
|
67
|
+
var CardTitle = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React__namespace.createElement(
|
|
68
|
+
"h3",
|
|
69
|
+
{
|
|
70
|
+
ref,
|
|
71
|
+
className: cn("hawa-text-2xl hawa-font-semibold ", className),
|
|
72
|
+
...props
|
|
73
|
+
}
|
|
74
|
+
));
|
|
75
|
+
var CardDescription = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React__namespace.createElement(
|
|
76
|
+
"p",
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
className: cn("hawa-text-sm hawa-text-muted-foreground", className),
|
|
80
|
+
...props
|
|
81
|
+
}
|
|
82
|
+
));
|
|
83
|
+
var CardContent = React__namespace.forwardRef(
|
|
84
|
+
({ headless, noPadding, className, ...props }, ref) => /* @__PURE__ */ React__namespace.createElement(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
ref,
|
|
88
|
+
className: cn(
|
|
89
|
+
noPadding ? "hawa-p-0" : "hawa-p-6",
|
|
90
|
+
headless ? "hawa-pt-6" : "hawa-pt-0",
|
|
91
|
+
className
|
|
92
|
+
),
|
|
93
|
+
...props
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
);
|
|
97
|
+
var CardFooter = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React__namespace.createElement(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
ref,
|
|
101
|
+
className: cn("hawa-flex hawa-items-center hawa-p-6 hawa-pt-0", className),
|
|
102
|
+
...props
|
|
103
|
+
}
|
|
104
|
+
));
|
|
105
|
+
CardDescription.displayName = "CardDescription";
|
|
106
|
+
CardContent.displayName = "CardContent";
|
|
107
|
+
CardHeader.displayName = "CardHeader";
|
|
108
|
+
CardFooter.displayName = "CardFooter";
|
|
109
|
+
CardTitle.displayName = "CardTitle";
|
|
110
|
+
Card.displayName = "Card";
|
|
111
|
+
|
|
112
|
+
exports.Card = Card;
|
|
113
|
+
exports.CardContent = CardContent;
|
|
114
|
+
exports.CardDescription = CardDescription;
|
|
115
|
+
exports.CardFooter = CardFooter;
|
|
116
|
+
exports.CardHeader = CardHeader;
|
|
117
|
+
exports.CardTitle = CardTitle;
|